diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | uidswap.c | 4 |
2 files changed, 7 insertions, 1 deletions
@@ -7,6 +7,8 @@ | |||
7 | Vinschen <vinschen@redhat.com> | 7 | Vinschen <vinschen@redhat.com> |
8 | - (bal) Add /etc/sysconfig/sshd support to redhat's sshd.init. Patch by | 8 | - (bal) Add /etc/sysconfig/sshd support to redhat's sshd.init. Patch by |
9 | Pekka Savola <pekkas@netcore.fi> | 9 | Pekka Savola <pekkas@netcore.fi> |
10 | - (bal) Cygwin lacks setgroups() API. Patch by Corinna Vinschen | ||
11 | <vinschen@redhat.com> | ||
10 | 12 | ||
11 | 20010425 | 13 | 20010425 |
12 | - OpenBSD CVS Sync | 14 | - OpenBSD CVS Sync |
@@ -5262,4 +5264,4 @@ | |||
5262 | - Wrote replacements for strlcpy and mkdtemp | 5264 | - Wrote replacements for strlcpy and mkdtemp |
5263 | - Released 1.0pre1 | 5265 | - Released 1.0pre1 |
5264 | 5266 | ||
5265 | $Id: ChangeLog,v 1.1175 2001/04/27 00:46:17 mouring Exp $ | 5267 | $Id: ChangeLog,v 1.1176 2001/04/27 02:10:15 mouring Exp $ |
@@ -80,9 +80,11 @@ temporarily_use_uid(struct passwd *pw) | |||
80 | if (user_groupslen < 0) | 80 | if (user_groupslen < 0) |
81 | fatal("getgroups: %.100s", strerror(errno)); | 81 | fatal("getgroups: %.100s", strerror(errno)); |
82 | } | 82 | } |
83 | #ifndef HAVE_CYGWIN | ||
83 | /* Set the effective uid to the given (unprivileged) uid. */ | 84 | /* Set the effective uid to the given (unprivileged) uid. */ |
84 | if (setgroups(user_groupslen, user_groups) < 0) | 85 | if (setgroups(user_groupslen, user_groups) < 0) |
85 | fatal("setgroups: %.100s", strerror(errno)); | 86 | fatal("setgroups: %.100s", strerror(errno)); |
87 | #endif /* !HAVE_CYWIN */ | ||
86 | #ifndef SAVED_IDS_WORK_WITH_SETEUID | 88 | #ifndef SAVED_IDS_WORK_WITH_SETEUID |
87 | /* Propagate the privileged gid to all of our gids. */ | 89 | /* Propagate the privileged gid to all of our gids. */ |
88 | if (setgid(getegid()) < 0) | 90 | if (setgid(getegid()) < 0) |
@@ -130,8 +132,10 @@ restore_uid(void) | |||
130 | setgid(getgid()); | 132 | setgid(getgid()); |
131 | #endif /* SAVED_IDS_WORK_WITH_SETEUID */ | 133 | #endif /* SAVED_IDS_WORK_WITH_SETEUID */ |
132 | 134 | ||
135 | #ifndef HAVE_CYGWIN | ||
133 | if (setgroups(saved_egroupslen, saved_egroups) < 0) | 136 | if (setgroups(saved_egroupslen, saved_egroups) < 0) |
134 | fatal("setgroups: %.100s", strerror(errno)); | 137 | fatal("setgroups: %.100s", strerror(errno)); |
138 | #endif /* !HAVE_CYGWIN */ | ||
135 | temporarily_use_uid_effective = 0; | 139 | temporarily_use_uid_effective = 0; |
136 | } | 140 | } |
137 | 141 | ||