| Summary: | setresuid/setresgid configure check may need _GNU_SOURCE | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | Sam James <sam> | ||||||||||||
| Component: | Build system | Assignee: | Assigned to nobody <unassigned-bugs> | ||||||||||||
| Status: | CLOSED FIXED | ||||||||||||||
| Severity: | enhancement | CC: | dtucker | ||||||||||||
| Priority: | P5 | ||||||||||||||
| Version: | 9.1p1 | ||||||||||||||
| Hardware: | amd64 | ||||||||||||||
| OS: | Linux | ||||||||||||||
| Bug Depends on: | |||||||||||||||
| Bug Blocks: | 3480 | ||||||||||||||
| Attachments: |
|
||||||||||||||
|
Description
Sam James
2022-11-06 15:39:39 AEDT
Created attachment 3620 [details]
config.log.xz
Note my config.log has an issue with openpty too but I've filed https://github.com/openssh/openssh-portable/pull/355 for that as it's a simple case. The original bug remains for setresuid and setresgid. Created attachment 3621 [details]
Add -D_GNU_SOURCE
The way we deal with this on other platforms (eg HPUX) is to add the requisite flag to CPPFLAGS in configure like so. Does this resolve your issue (after running "autoreconf" to regenerate configure)?
Created attachment 3622 [details]
config.log.xz
Created attachment 3623 [details]
config.log.xz
It doesn't seem to make any difference (I guess because I don't have audit installed and I've not passed any arg for it).
(I've confirmed -D_GNU_SOURCE appears in the generated configure, it's just that the path isn't taken.)
Created attachment 3624 [details]
Fix setres*id tests to work with clang-16
There were two problems: I put _GNU_SOURCE in the wrong place, and the tests themselves did not include unistd.h for the prototypes. This seems to fix both when compiling with a self-built clang/llvm from git.
Patch applied and will be in 9.2p1. Thanks for the report. Confirmed that works great, thank you! OpenSSH 9.3 has been released. Close resolved bugs |