- (bal) Cygwin lacks setgroups() API. Patch by Corinna Vinschen
<vinschen@redhat.com>
This commit is contained in:
parent
26f33893a6
commit
0f85348e89
|
@ -7,6 +7,8 @@
|
||||||
Vinschen <vinschen@redhat.com>
|
Vinschen <vinschen@redhat.com>
|
||||||
- (bal) Add /etc/sysconfig/sshd support to redhat's sshd.init. Patch by
|
- (bal) Add /etc/sysconfig/sshd support to redhat's sshd.init. Patch by
|
||||||
Pekka Savola <pekkas@netcore.fi>
|
Pekka Savola <pekkas@netcore.fi>
|
||||||
|
- (bal) Cygwin lacks setgroups() API. Patch by Corinna Vinschen
|
||||||
|
<vinschen@redhat.com>
|
||||||
|
|
||||||
20010425
|
20010425
|
||||||
- OpenBSD CVS Sync
|
- OpenBSD CVS Sync
|
||||||
|
@ -5262,4 +5264,4 @@
|
||||||
- Wrote replacements for strlcpy and mkdtemp
|
- Wrote replacements for strlcpy and mkdtemp
|
||||||
- Released 1.0pre1
|
- Released 1.0pre1
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.1175 2001/04/27 00:46:17 mouring Exp $
|
$Id: ChangeLog,v 1.1176 2001/04/27 02:10:15 mouring Exp $
|
||||||
|
|
|
@ -80,9 +80,11 @@ temporarily_use_uid(struct passwd *pw)
|
||||||
if (user_groupslen < 0)
|
if (user_groupslen < 0)
|
||||||
fatal("getgroups: %.100s", strerror(errno));
|
fatal("getgroups: %.100s", strerror(errno));
|
||||||
}
|
}
|
||||||
|
#ifndef HAVE_CYGWIN
|
||||||
/* Set the effective uid to the given (unprivileged) uid. */
|
/* Set the effective uid to the given (unprivileged) uid. */
|
||||||
if (setgroups(user_groupslen, user_groups) < 0)
|
if (setgroups(user_groupslen, user_groups) < 0)
|
||||||
fatal("setgroups: %.100s", strerror(errno));
|
fatal("setgroups: %.100s", strerror(errno));
|
||||||
|
#endif /* !HAVE_CYWIN */
|
||||||
#ifndef SAVED_IDS_WORK_WITH_SETEUID
|
#ifndef SAVED_IDS_WORK_WITH_SETEUID
|
||||||
/* Propagate the privileged gid to all of our gids. */
|
/* Propagate the privileged gid to all of our gids. */
|
||||||
if (setgid(getegid()) < 0)
|
if (setgid(getegid()) < 0)
|
||||||
|
@ -130,8 +132,10 @@ restore_uid(void)
|
||||||
setgid(getgid());
|
setgid(getgid());
|
||||||
#endif /* SAVED_IDS_WORK_WITH_SETEUID */
|
#endif /* SAVED_IDS_WORK_WITH_SETEUID */
|
||||||
|
|
||||||
|
#ifndef HAVE_CYGWIN
|
||||||
if (setgroups(saved_egroupslen, saved_egroups) < 0)
|
if (setgroups(saved_egroupslen, saved_egroups) < 0)
|
||||||
fatal("setgroups: %.100s", strerror(errno));
|
fatal("setgroups: %.100s", strerror(errno));
|
||||||
|
#endif /* !HAVE_CYGWIN */
|
||||||
temporarily_use_uid_effective = 0;
|
temporarily_use_uid_effective = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue