Opened 4 months ago

Closed 4 months ago

#25990 closed defect (implemented)

module: Better safeguard authdir_mode_v3() if dirauth module is disabled

Reported by: dgoulet Owned by: dgoulet
Priority: Medium Milestone: Tor: 0.3.4.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: 034-roadmap-subtask, modularization, tor-dirauth, refactor
Cc: Actual Points:
Parent ID: #25494 Points:
Reviewer: ahf Sponsor:

Description

We need to safeguard somehow the authdir_mode_v3() so it can NEVER return true if the dirauth module is disabled.

One option here is to move this function to the dirauth module and NOP it by returning false if the module is not enabled.

An other option is to #ifdef HAVE_MODULE_DIRAUTH in the function directly. I'm kind of less enthusiastic about it but maybe it is better, dunno yet.

Child Tickets

Change History (3)

comment:1 Changed 4 months ago by dgoulet

Reviewer: ahf
Status: assignedneeds_review

Even though mode.h in the branch is very small, I still think it is a good way to separate things. Ultimately, we'll have _no_ code outside the dirauth module that will include that mode.h.

Notice also that it is only for *Directory Authority*, bridge authority use the AuthoritativeDir option so authdir_mode() can't be isolated.

Branch: ticket25990_034_01

comment:2 Changed 4 months ago by dgoulet

Status: needs_reviewmerge_ready

ahf is having Internet issues but told me "ack" on this one. Going in merge_ready. He'll double confirm when he is back online but in the meantime, we are good.

comment:3 Changed 4 months ago by nickm

Resolution: implemented
Status: merge_readyclosed

Merging!

Note: See TracTickets for help on using tickets.