[Fedora-directory-commits] ldapserver/ldap/admin/src/scripts Util.pm.in, 1.9, 1.10
Richard Allen Megginson (rmeggins)
fedora-directory-commits at redhat.com
Thu Jul 19 00:23:43 UTC 2007
- Previous message (by thread): [Fedora-directory-commits] adminserver dirver.pl,1.3,NONE
- Next message (by thread): [Fedora-directory-commits] ldapserver Makefile.am, 1.50, 1.51 aclocal.m4, 1.42, 1.43 configure, 1.53, 1.54 missing, 1.32, 1.33 install-sh, 1.32, 1.33 depcomp, 1.32, 1.33 compile, 1.32, 1.33 Makefile.in, 1.59, 1.60 config.sub, 1.31, 1.32 config.guess, 1.31, 1.32
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17397
Modified Files:
Util.pm.in
Log Message:
Resolves: bug 248820
Bug Description: quick install failed when login userid doesn't match install user's id
Reviewed by: me
Fix Description: getlogin returns the _login_ ID which is the initial login id (from utmp). We want the username of the effective user ID, so I just needed to change getLogin to do that.
Platforms tested: RHEL4
Flag Day: no
Doc impact: no
Index: Util.pm.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/Util.pm.in,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- Util.pm.in 13 Jul 2007 19:51:48 -0000 1.9
+++ Util.pm.in 19 Jul 2007 00:23:40 -0000 1.10
@@ -111,8 +111,11 @@
return $servid =~ /^[$validchars]+$/o;
}
+# we want the name of the effective user id of this process e.g. if someone did
+# an su root, we want getLogin to return "root" not the originating id (getlogin)
+# in perl, $> is the effective numeric user id - we need to turn it into a string
sub getLogin {
- return getlogin || (getpwuid($>))[0] || $ENV{USER} || die "Error: could not determine the current user ID: $!";
+ return (getpwuid($>))[0] || $ENV{USER} || die "Error: could not determine the current user ID: $!";
}
sub isValidUser {
- Previous message (by thread): [Fedora-directory-commits] adminserver dirver.pl,1.3,NONE
- Next message (by thread): [Fedora-directory-commits] ldapserver Makefile.am, 1.50, 1.51 aclocal.m4, 1.42, 1.43 configure, 1.53, 1.54 missing, 1.32, 1.33 install-sh, 1.32, 1.33 depcomp, 1.32, 1.33 compile, 1.32, 1.33 Makefile.in, 1.59, 1.60 config.sub, 1.31, 1.32 config.guess, 1.31, 1.32
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Fedora-directory-commits
mailing list