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.
This commit is contained in:
Michael Spang 2007-05-05 01:32:16 -04:00
parent ca33addaf1
commit d95790285d
2 changed files with 6 additions and 0 deletions

View File

@ -74,6 +74,9 @@ def main():
pwuid, pwnam = whoami()
euid = os.geteuid()
os.setreuid(euid, euid)
gecos_params = {}
try:

View File

@ -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