aboutsummaryrefslogtreecommitdiff
path: root/loginutils/su.c
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2003-03-19 09:13:01 +0000
committerManuel Novoa III <mjn3@codepoet.org>2003-03-19 09:13:01 +0000
commitcad5364599eb5062d59e0c397ed638ddd61a8d5d (patch)
treea318d0f03aa076c74b576ea45dc543a5669e8e91 /loginutils/su.c
parente01f9662a5bd5d91be4f6b3941b57fff73cd5af1 (diff)
downloadbusybox-cad5364599eb5062d59e0c397ed638ddd61a8d5d.tar.gz
Major coreutils update.
Diffstat (limited to 'loginutils/su.c')
-rw-r--r--loginutils/su.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/loginutils/su.c b/loginutils/su.c
index 6d427262e..5e40cf2e4 100644
--- a/loginutils/su.c
+++ b/loginutils/su.c
@@ -94,7 +94,7 @@ int su_main ( int argc, char **argv )
opt_loginshell = 1;
break;
default:
- show_usage ( );
+ bb_show_usage( );
break;
}
}
@@ -114,7 +114,7 @@ int su_main ( int argc, char **argv )
pw = getpwnam ( opt_username );
if ( !pw )
- error_msg_and_die ( "user %s does not exist", opt_username );
+ bb_error_msg_and_die ( "user %s does not exist", opt_username );
/* Make sure pw->pw_shell is non-NULL. It may be NULL when NEW_USER
is a username that is retrieved via NIS (YP), but that doesn't have
@@ -127,15 +127,15 @@ int su_main ( int argc, char **argv )
the static data through the getlogin call from log_su. */
pw_copy = *pw;
pw = &pw_copy;
- pw-> pw_name = xstrdup ( pw-> pw_name );
- pw-> pw_dir = xstrdup ( pw-> pw_dir );
- pw-> pw_shell = xstrdup ( pw-> pw_shell );
+ pw-> pw_name = bb_xstrdup ( pw-> pw_name );
+ pw-> pw_dir = bb_xstrdup ( pw-> pw_dir );
+ pw-> pw_shell = bb_xstrdup ( pw-> pw_shell );
if (( getuid ( ) == 0 ) || correct_password ( pw ))
log_su ( pw, 1 );
else {
log_su ( pw, 0 );
- error_msg_and_die ( "incorrect password" );
+ bb_error_msg_and_die ( "incorrect password" );
}
if ( !opt_shell && opt_preserve )
@@ -152,7 +152,7 @@ int su_main ( int argc, char **argv )
}
if ( !opt_shell )
- opt_shell = xstrdup ( pw-> pw_shell );
+ opt_shell = bb_xstrdup ( pw-> pw_shell );
change_identity ( pw );
setup_environment ( opt_shell, opt_loginshell, !opt_preserve, pw );