diff options
author | Manuel Novoa III | 2003-03-19 09:13:01 +0000 |
---|---|---|
committer | Manuel Novoa III | 2003-03-19 09:13:01 +0000 |
commit | cad5364599eb5062d59e0c397ed638ddd61a8d5d (patch) | |
tree | a318d0f03aa076c74b576ea45dc543a5669e8e91 /loginutils/su.c | |
parent | e01f9662a5bd5d91be4f6b3941b57fff73cd5af1 (diff) | |
download | busybox-cad5364599eb5062d59e0c397ed638ddd61a8d5d.zip busybox-cad5364599eb5062d59e0c397ed638ddd61a8d5d.tar.gz |
Major coreutils update.
Diffstat (limited to 'loginutils/su.c')
-rw-r--r-- | loginutils/su.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/loginutils/su.c b/loginutils/su.c index 6d42726..5e40cf2 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 ); |