From: Michael Spang Date: Sat, 5 May 2007 05:32:16 +0000 (-0400) Subject: Call setreuid(euid, euid) in csc-chfn and csc-chsh on setup X-Git-Tag: v0.2.4~3 X-Git-Url: http://git.csclub.uwaterloo.ca/?p=public%2Fpyceo-broken.git;a=commitdiff_plain;h=d95790285daac464211aed68c03436b21ab3648b Call setreuid(euid, euid) in csc-chfn and csc-chsh on setup This fixes an important bug in these utilities, in that they didn't actually work for regular users. --- diff --git a/bin/csc-chfn b/bin/csc-chfn index 4b6be80..f723984 100755 --- a/bin/csc-chfn +++ b/bin/csc-chfn @@ -74,6 +74,9 @@ def main(): pwuid, pwnam = whoami() + euid = os.geteuid() + os.setreuid(euid, euid) + gecos_params = {} try: diff --git a/bin/csc-chsh b/bin/csc-chsh index ef0db49..25013a1 100755 --- a/bin/csc-chsh +++ b/bin/csc-chsh @@ -55,6 +55,9 @@ def main(): pwuid, pwnam = whoami() + euid = os.geteuid() + os.setreuid(euid, euid) + try: options, arguments = getopt.gnu_getopt(sys.argv[1:], 's:') new_shell = None