Bug 2299 - Disable uid=0 resetting test on Solaris
Summary: Disable uid=0 resetting test on Solaris
Status: CLOSED DUPLICATE of bug 2511
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: sshd (show other bugs)
Version: 6.7p1
Hardware: SPARC Solaris
: P5 normal
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-23 00:51 AEDT by Tomas Kuthan
Modified: 2016-08-02 10:42 AEST (History)
0 users

See Also:


Attachments
Patch disabling uid=0 resetting test on Solaris (2.70 KB, text/plain)
2014-10-23 00:51 AEDT, Tomas Kuthan
no flags Details
Patch disabling uid=0 resetting test on Solaris (2.70 KB, patch)
2014-10-23 00:54 AEDT, Tomas Kuthan
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Kuthan 2014-10-23 00:51:27 AEDT
Created attachment 2497 [details]
Patch disabling uid=0 resetting test on Solaris

After the server process drops uid=0, a test is made to make sure
uid=0 cannot be reclaimed.

On Solaris, if a user is granted ALL privilege in a zone, this user
can successfully call setuid(0) and setgid(0). In this case it is
not due to a failure of dropping uid=0, sshd was started with.
Uid restoration test fails and the user is not permitted to log in.

This fix disables the check on Solaris.
For non-privileged users the inability to reclaim uid=0 is implied
from previous successful call to setresuid().
For user with ALL privilege in the zone the assertion in the test is
not correct; the ability to restore uid=0 stems from additional
privileges granted to the user.

The fix is implemented by replacing appropriate occurrences of
OS-based define HAVE_CYGWIN with functionality-based define
NO_UID_RESTORATION_TEST and defining it for Solaris and Cygwin
in configure.ac.
Comment 1 Tomas Kuthan 2014-10-23 00:54:34 AEDT
Created attachment 2498 [details]
Patch disabling uid=0 resetting test on Solaris
Comment 2 Tomas Kuthan 2016-03-15 00:53:49 AEDT
resolved as a part of fine-grained privileges wad

*** This bug has been marked as a duplicate of bug 2511 ***
Comment 3 Damien Miller 2016-08-02 10:42:32 AEST
Close all resolved bugs after 7.3p1 release