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:
parent
ca33addaf1
commit
d95790285d
|
@ -74,6 +74,9 @@ def main():
|
||||||
|
|
||||||
pwuid, pwnam = whoami()
|
pwuid, pwnam = whoami()
|
||||||
|
|
||||||
|
euid = os.geteuid()
|
||||||
|
os.setreuid(euid, euid)
|
||||||
|
|
||||||
gecos_params = {}
|
gecos_params = {}
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -55,6 +55,9 @@ def main():
|
||||||
|
|
||||||
pwuid, pwnam = whoami()
|
pwuid, pwnam = whoami()
|
||||||
|
|
||||||
|
euid = os.geteuid()
|
||||||
|
os.setreuid(euid, euid)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
options, arguments = getopt.gnu_getopt(sys.argv[1:], 's:')
|
options, arguments = getopt.gnu_getopt(sys.argv[1:], 's:')
|
||||||
new_shell = None
|
new_shell = None
|
||||||
|
|
Loading…
Reference in New Issue