diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | uidswap.c | 5 |
2 files changed, 9 insertions, 2 deletions
@@ -9,6 +9,10 @@ | |||
9 | when describing the -o option, give -o Protocol=1 as the specific example | 9 | when describing the -o option, give -o Protocol=1 as the specific example |
10 | since we are SICK AND TIRED of clueless people who cannot have difficulty | 10 | since we are SICK AND TIRED of clueless people who cannot have difficulty |
11 | thinking on their own. | 11 | thinking on their own. |
12 | - markus@cvs.openbsd.org 2001/08/08 18:20:15 | ||
13 | [uidswap.c] | ||
14 | permanently_set_uid is a noop if user is not privilegued; | ||
15 | fixes bug on solaris; from sbi@uchicago.edu | ||
12 | 16 | ||
13 | 20010814 | 17 | 20010814 |
14 | - (stevesk) sshpty.c, cray.[ch]: whitespace, formatting and cleanup | 18 | - (stevesk) sshpty.c, cray.[ch]: whitespace, formatting and cleanup |
@@ -6298,4 +6302,4 @@ | |||
6298 | - Wrote replacements for strlcpy and mkdtemp | 6302 | - Wrote replacements for strlcpy and mkdtemp |
6299 | - Released 1.0pre1 | 6303 | - Released 1.0pre1 |
6300 | 6304 | ||
6301 | $Id: ChangeLog,v 1.1477 2001/08/15 23:06:59 mouring Exp $ | 6305 | $Id: ChangeLog,v 1.1478 2001/08/15 23:14:49 mouring Exp $ |
@@ -12,7 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include "includes.h" | 14 | #include "includes.h" |
15 | RCSID("$OpenBSD: uidswap.c,v 1.16 2001/04/20 16:32:22 markus Exp $"); | 15 | RCSID("$OpenBSD: uidswap.c,v 1.17 2001/08/08 18:20:15 markus Exp $"); |
16 | 16 | ||
17 | #include "log.h" | 17 | #include "log.h" |
18 | #include "uidswap.h" | 18 | #include "uidswap.h" |
@@ -145,6 +145,9 @@ restore_uid(void) | |||
145 | void | 145 | void |
146 | permanently_set_uid(struct passwd *pw) | 146 | permanently_set_uid(struct passwd *pw) |
147 | { | 147 | { |
148 | /* it's a no-op unless privileged */ | ||
149 | if (!privileged) | ||
150 | return; | ||
148 | if (temporarily_use_uid_effective) | 151 | if (temporarily_use_uid_effective) |
149 | fatal("restore_uid: temporarily_use_uid effective"); | 152 | fatal("restore_uid: temporarily_use_uid effective"); |
150 | if (setgid(pw->pw_gid) < 0) | 153 | if (setgid(pw->pw_gid) < 0) |