|
Bugzilla – Full Text Bug Listing |
| Summary: | when compiled with HAVE_DOMAINNAME sudo should still check there *IS* a domainname | ||
|---|---|---|---|
| Product: | Sudo | Reporter: | Sean Kamath <sean.kamath> |
| Component: | Sudo | Assignee: | Todd C. Miller <Todd.Miller> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | low | ||
| Version: | 1.8.6 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
|
Description
Sean Kamath
2013-03-26 15:14:35 MDT
And I'm high on crack and looking at a revision from 12 years ago. OK, it's changed (there's now indeed a check), but it's still a problem for us. Now, in plugins/sudoers/match.c line 749, the check is now made, but against NULL, not against the literal '(none)'. I suppose this is a Red Hat weirdness, but nonetheless, seems like a || strcmp(domain,"(NULL)") might help us out. That is somewhat odd. I'll add a check for "(none)" for sudo 1.8.7. So, I opened a ticket with Red Hat. Turns out they must be doing something to set the domain to "(none)" since we can set it to null with a little C program. . . I'll update this ticket if they give me any useful information. Still, any domain returned with a non-legal hostname character, like a paren or the like probably shouldn't be considered a domainname. :-) Sean Hi. I just checked the upstream kernel bits after Red Hat got back to me. Turns out that there is this define in current stable on git.kernel.org: In root/include/linux/uts.h: #ifndef UTS_DOMAINNAME #define UTS_DOMAINNAME "(none)" /* set by setdomainname() */ #endif Thus, if "setdomainname()" is NEVER called, domainname will be set to "(none)". So, not a Red Hat-ism. Thanks for adding this to 1.8.7. Sean Fixed in sudo 1.8.7. |