- (djm) Bug #494: Allow multiple accounts on Windows 9x/Me;

From vinschen@redhat.com
This commit is contained in:
Damien Miller 2003-02-24 13:04:01 +11:00
parent 8d8168a255
commit 1a3ccb07c5
2 changed files with 13 additions and 6 deletions

View File

@ -81,8 +81,11 @@
- (djm) Add new object files to Makefile and reorder - (djm) Add new object files to Makefile and reorder
- (djm) Bug #501: gai_strerror should return char*; - (djm) Bug #501: gai_strerror should return char*;
fix from dtucker@zip.com.au fix from dtucker@zip.com.au
- (djm) Most of Bug #499: Cygwin compile fixes for new progressmeter - (djm) Most of Bug #499: Cygwin compile fixes for new progressmeter;
From vinschen@redhat.com
- (djm) Rest of Bug #499: Import a basename() function from OpenBSD libc - (djm) Rest of Bug #499: Import a basename() function from OpenBSD libc
- (djm) Bug #494: Allow multiple accounts on Windows 9x/Me;
From vinschen@redhat.com
20030211 20030211
- (djm) Cygwin needs libcrypt too. Patch from vinschen@redhat.com - (djm) Cygwin needs libcrypt too. Patch from vinschen@redhat.com
@ -1183,4 +1186,4 @@
save auth method before monitor_reset_key_state(); bugzilla bug #284; save auth method before monitor_reset_key_state(); bugzilla bug #284;
ok provos@ ok provos@
$Id: ChangeLog,v 1.2619 2003/02/24 01:55:55 djm Exp $ $Id: ChangeLog,v 1.2620 2003/02/24 02:04:01 djm Exp $

View File

@ -1205,11 +1205,11 @@ do_nologin(struct passwd *pw)
void void
do_setusercontext(struct passwd *pw) do_setusercontext(struct passwd *pw)
{ {
#ifdef HAVE_CYGWIN #ifndef HAVE_CYGWIN
if (is_winnt) { if (getuid() == 0 || geteuid() == 0)
#else /* HAVE_CYGWIN */
if (getuid() == 0 || geteuid() == 0) {
#endif /* HAVE_CYGWIN */ #endif /* HAVE_CYGWIN */
{
#ifdef HAVE_SETPCRED #ifdef HAVE_SETPCRED
setpcred(pw->pw_name); setpcred(pw->pw_name);
#endif /* HAVE_SETPCRED */ #endif /* HAVE_SETPCRED */
@ -1259,6 +1259,10 @@ do_setusercontext(struct passwd *pw)
permanently_set_uid(pw); permanently_set_uid(pw);
#endif #endif
} }
#ifdef HAVE_CYGWIN
if (is_winnt)
#endif
if (getuid() != pw->pw_uid || geteuid() != pw->pw_uid) if (getuid() != pw->pw_uid || geteuid() != pw->pw_uid)
fatal("Failed to set uids to %u.", (u_int) pw->pw_uid); fatal("Failed to set uids to %u.", (u_int) pw->pw_uid);
} }