aboutsummaryrefslogtreecommitdiff
path: root/loginutils
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2006-07-16 08:06:34 +0000
committerRob Landley <rob@landley.net>2006-07-16 08:06:34 +0000
commitafb94ecf2bb6c53ce2a381d6ce45a426243c76d9 (patch)
tree0390f5cfb0cfd70882175f7e383a30d8cb1527cc /loginutils
parent25c194fd1941a7ba67d68a09fa101bc54a756a14 (diff)
downloadbusybox-afb94ecf2bb6c53ce2a381d6ce45a426243c76d9.tar.gz
Convert setuid/setgid users to xsetuid/xsetgid.
Diffstat (limited to 'loginutils')
-rw-r--r--loginutils/passwd.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/loginutils/passwd.c b/loginutils/passwd.c
index 5b828dfee..7745444c0 100644
--- a/loginutils/passwd.c
+++ b/loginutils/passwd.c
@@ -227,10 +227,7 @@ int passwd_main(int argc, char **argv)
signal(SIGINT, SIG_IGN);
signal(SIGQUIT, SIG_IGN);
umask(077);
- if (setuid(0)) {
- syslog(LOG_ERR, "can't setuid(0)");
- bb_error_msg_and_die( "Cannot change ID to root.\n");
- }
+ xsetuid(0);
if (!update_passwd(pw, crypt_passwd)) {
syslog(LOG_INFO, "password for `%s' changed by user `%s'", name,
myname);