|
Bugzilla – Full Text Bug Listing |
| Summary: | compat/getaddrinfo.o not added to LTLIBOBJS when needed (on HP-UX) | ||
|---|---|---|---|
| Product: | Sudo | Reporter: | Daniel Richard G. <skunk> |
| Component: | Configure | Assignee: | Todd C. Miller <Todd.Miller> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | low | ||
| Version: | 1.8.7 | ||
| Hardware: | HP | ||
| OS: | HP-UX | ||
| Attachments: |
Patch against sudo hg tip
Follow-up patch against sudo hg tip |
||
|
Description
Daniel Richard G.
2013-11-06 21:38:17 MST
Created attachment 377 [details]
Patch against sudo hg tip
This patch fixes the problem and allows sudo to compile on systems lacking {get,free}addrinfo().
Committed, thanks. getaddrinfo.lo has the "$(top_builddir)/config.h" dependency listed twice in compat/Makefile.in ... The script that generates dependencies wasn't checking for duplicates. I've fixed that. Created attachment 380 [details]
Follow-up patch against sudo hg tip
Only a couple further changes, attached, are needed to get Sudo building and testing correctly on the aforementioned HP-UX system.
Applied, thanks. Oh, there's one more thing I forgot to mention:
cc -c -I../../include -I.. -I. -I../../src -I../.. -D__STDC_WANT_LIB_EXT1__=1 -g +DAportable -Bhidden_def -D_REENTRANT -DLOCALEDIR=\"/usr/local/share/locale\" ../../src/exec.c
cc: "../../src/exec.c", line 211: error 1588: "MSG_WAITALL" undefined.
cc: "../../src/exec.c", line 211: warning 563: Argument #4 is not the correct type.
*** Error exit code 1
On HP-UX, MSG_WAITALL exists, but it is not #defined unless you define the _XOPEN_SOURCE_EXTENDED feature test macro. So effectively, you can't build Sudo unless you #define that macro. (This is true for 11.00, 11.11, 11.31, and is likely true even for the latest kit.)
I'm not sure what's the preferred way of handling this kind of thing, but there isn't even a mention of it in the OS-specific notes section of INSTALL. (I can file a new bug on this if appropriate.)
I just checked in changes to define _XOPEN_SOURCE_EXTENDED on HP-UX if needed. Excellent. I tested the new configure-time logic, and it does the trick. I see you added something in case MSG_WAITALL is (really) missing, too.
Everything looks good here, except for one final nit, in "make check". I get this error on the 11.00 system:
check_symbols: test 7: able to resolve local symbol user_in_group
check_symbols: 7 tests run, 1 errors, 85% success rate
It doesn't happen on 11.11. Known issue?
That means that the symbol visibility controls are not working. It's a toolchain issue but it won't actually cause any problems. Well, as long as that's not a fatal flaw security-wise :-) Todd, thank you for all your help on this bug. Please have a look at the others I've submitted when you have a chance! |