Page MenuHomeFreeBSD

libc: Disable debugging code in the resolver.
Needs ReviewPublic

Authored by des on Nov 9 2022, 5:51 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 22 2024, 3:01 PM
Unknown Object (File)
Jan 20 2024, 9:30 AM
Unknown Object (File)
Dec 23 2023, 4:00 AM
Unknown Object (File)
Dec 20 2023, 8:04 PM
Unknown Object (File)
Nov 30 2023, 4:40 AM
Unknown Object (File)
Mar 5 2023, 6:05 PM
Unknown Object (File)
Feb 18 2023, 7:12 AM
Unknown Object (File)
Feb 8 2023, 12:46 AM
Subscribers

Details

Reviewers
karels

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 48319
Build 45205: arc lint + arc unit

Event Timeline

des requested review of this revision.Nov 9 2022, 5:51 PM

My main question is whether the DEBUG definitions should just be deleted, or whether it is worth leaving bread crumbs for where it used to be defined.

lib/libc/net/res_config.h
3

Shouldn't this just be deleted rather than doing #undef? If the user defines DEBUG then includes headers, or defines DEBUG on the command line, I think it should be honored,

lib/libc/resolv/res_mkquery.c
87

I wonder whether the previous two lines should just be deleted (similarly elsewhere).

lib/libc/net/res_config.h
3

I was following the established idiom, cf. SUNSECURITY below.

lib/libc/resolv/res_mkquery.c
87

One might ask why these don't just #include "res_config.h", cf. res_init.c which also redefines RESOLVSORT.

comment rather than undef

lib/libc/net/res_config.h
3

I'm not sure the two cases are analogous. If I understand correctly, there is no reason to enable SUNSECURITY at all. However, DEBUG might reasonably enabled for debugging, etc. It makes the debug option to the resolver actually do something.

btw, why did you remove the comment on SUNSECURITY? I wouldn't change that line at all.

lib/libc/resolv/res_mkquery.c
87

True, but the comment no longer makes sense.

jfyi this is on hold pending discussions with a concerned third party