bugzilla-daemon at mindrot.org
2022-Nov-06  04:39 UTC
[Bug 3497] New: setresuid configure check may need _GNU_SOURCE
https://bugzilla.mindrot.org/show_bug.cgi?id=3497
            Bug ID: 3497
           Summary: setresuid configure check may need _GNU_SOURCE
           Product: Portable OpenSSH
           Version: 9.1p1
          Hardware: 68k
                OS: Mac OS X
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: Build system
          Assignee: unassigned-bugs at mindrot.org
          Reporter: sam at gentoo.org
OpenSSH's configure check for setresuid omits _GNU_SOURCE which, on
Linux systems with glibc+gcc at least, is needed to expose setresuid.
```
error: call to undeclared function 'setresuid'; ISO C99 and later do
not support implicit function declarations
[-Wimplicit-function-declaration]
```
Reproduced on master of openssh-portable at
6b17e128879ec6cc32ca2c28b5d894b4aa72e32d but originally hit with
9.1_p1.
It's technically harmless, I think, as OpenSSH provides its own
implementation if the system's copy is nonexistent or unsuitable, but
it's at least noise when trying to find broader Clang 16 issues (see
https://lwn.net/Articles/913505/ etc).
-- 
You are receiving this mail because:
You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2022-Nov-06  04:44 UTC
[Bug 3497] setresuid configure check may need _GNU_SOURCE
https://bugzilla.mindrot.org/show_bug.cgi?id=3497 --- Comment #1 from Sam James <sam at gentoo.org> --- Created attachment 3620 --> https://bugzilla.mindrot.org/attachment.cgi?id=3620&action=edit config.log.xz -- You are receiving this mail because: You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2022-Nov-06  04:49 UTC
[Bug 3497] setresuid/setresgid configure check may need _GNU_SOURCE
https://bugzilla.mindrot.org/show_bug.cgi?id=3497
Sam James <sam at gentoo.org> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|setresuid configure check   |setresuid/setresgid
                   |may need _GNU_SOURCE        |configure check may need
                   |                            |_GNU_SOURCE
--- Comment #2 from Sam James <sam at gentoo.org> ---
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.
-- 
You are receiving this mail because:
You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2022-Nov-06  04:49 UTC
[Bug 3497] setresuid/setresgid configure check may need _GNU_SOURCE
https://bugzilla.mindrot.org/show_bug.cgi?id=3497 --- Comment #3 from Sam James <sam at gentoo.org> --- The original bug remains for setresuid and setresgid. -- You are receiving this mail because: You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2022-Nov-06  07:49 UTC
[Bug 3497] setresuid/setresgid configure check may need _GNU_SOURCE
https://bugzilla.mindrot.org/show_bug.cgi?id=3497
Darren Tucker <dtucker at dtucker.net> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|Mac OS X                    |Linux
                 CC|                            |dtucker at dtucker.net
           Hardware|68k                         |amd64
             Blocks|                            |3480
Referenced Bugs:
https://bugzilla.mindrot.org/show_bug.cgi?id=3480
[Bug 3480] tracking bug for openssh-9.2
-- 
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2022-Nov-06  07:51 UTC
[Bug 3497] setresuid/setresgid configure check may need _GNU_SOURCE
https://bugzilla.mindrot.org/show_bug.cgi?id=3497 --- Comment #4 from Darren Tucker <dtucker at dtucker.net> --- Created attachment 3621 --> https://bugzilla.mindrot.org/attachment.cgi?id=3621&action=edit 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)? -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at mindrot.org
2022-Nov-06  08:06 UTC
[Bug 3497] setresuid/setresgid configure check may need _GNU_SOURCE
https://bugzilla.mindrot.org/show_bug.cgi?id=3497 --- Comment #5 from Sam James <sam at gentoo.org> --- Created attachment 3622 --> https://bugzilla.mindrot.org/attachment.cgi?id=3622&action=edit config.log.xz -- You are receiving this mail because: You are watching someone on the CC list of the bug. You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2022-Nov-06  08:06 UTC
[Bug 3497] setresuid/setresgid configure check may need _GNU_SOURCE
https://bugzilla.mindrot.org/show_bug.cgi?id=3497
Sam James <sam at gentoo.org> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #3622|0                           |1
        is obsolete|                            |
-- 
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2022-Nov-06  08:07 UTC
[Bug 3497] setresuid/setresgid configure check may need _GNU_SOURCE
https://bugzilla.mindrot.org/show_bug.cgi?id=3497
Sam James <sam at gentoo.org> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #3620|0                           |1
        is obsolete|                            |
--- Comment #6 from Sam James <sam at gentoo.org> ---
Created attachment 3623
  --> https://bugzilla.mindrot.org/attachment.cgi?id=3623&action=edit
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.)
-- 
You are receiving this mail because:
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.
bugzilla-daemon at mindrot.org
2022-Nov-06  23:30 UTC
[Bug 3497] setresuid/setresgid configure check may need _GNU_SOURCE
https://bugzilla.mindrot.org/show_bug.cgi?id=3497
Darren Tucker <dtucker at dtucker.net> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #3621|0                           |1
        is obsolete|                            |
--- Comment #7 from Darren Tucker <dtucker at dtucker.net> ---
Created attachment 3624
  --> https://bugzilla.mindrot.org/attachment.cgi?id=3624&action=edit
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.
-- 
You are receiving this mail because:
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.
bugzilla-daemon at mindrot.org
2022-Nov-06  23:44 UTC
[Bug 3497] setresuid/setresgid configure check may need _GNU_SOURCE
https://bugzilla.mindrot.org/show_bug.cgi?id=3497
Darren Tucker <dtucker at dtucker.net> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED
--- Comment #8 from Darren Tucker <dtucker at dtucker.net> ---
Patch applied and will be in 9.2p1.  Thanks for the report.
-- 
You are receiving this mail because:
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.
bugzilla-daemon at mindrot.org
2022-Nov-07  04:39 UTC
[Bug 3497] setresuid/setresgid configure check may need _GNU_SOURCE
https://bugzilla.mindrot.org/show_bug.cgi?id=3497 --- Comment #9 from Sam James <sam at gentoo.org> --- Confirmed that works great, thank you! -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at mindrot.org
2023-Mar-17  02:42 UTC
[Bug 3497] setresuid/setresgid configure check may need _GNU_SOURCE
https://bugzilla.mindrot.org/show_bug.cgi?id=3497
Damien Miller <djm at mindrot.org> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |CLOSED
--- Comment #10 from Damien Miller <djm at mindrot.org> ---
OpenSSH 9.3 has been released. Close resolved bugs
-- 
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.