From d95790285daac464211aed68c03436b21ab3648b Mon Sep 17 00:00:00 2001 From: Michael Spang Date: Sat, 5 May 2007 01:32:16 -0400 Subject: [PATCH] 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. --- bin/csc-chfn | 3 +++ bin/csc-chsh | 3 +++ 2 files changed, 6 insertions(+) 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