diff options
author | Manuel Novoa III <mjn3@codepoet.org> | 2003-03-19 09:13:01 +0000 |
---|---|---|
committer | Manuel Novoa III <mjn3@codepoet.org> | 2003-03-19 09:13:01 +0000 |
commit | cad5364599eb5062d59e0c397ed638ddd61a8d5d (patch) | |
tree | a318d0f03aa076c74b576ea45dc543a5669e8e91 /loginutils/login.c | |
parent | e01f9662a5bd5d91be4f6b3941b57fff73cd5af1 (diff) | |
download | busybox-w32-cad5364599eb5062d59e0c397ed638ddd61a8d5d.tar.gz busybox-w32-cad5364599eb5062d59e0c397ed638ddd61a8d5d.tar.bz2 busybox-w32-cad5364599eb5062d59e0c397ed638ddd61a8d5d.zip |
Major coreutils update.
Diffstat (limited to 'loginutils/login.c')
-rw-r--r-- | loginutils/login.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/loginutils/login.c b/loginutils/login.c index c1ea165c8..e239f421c 100644 --- a/loginutils/login.c +++ b/loginutils/login.c | |||
@@ -94,10 +94,10 @@ extern int login_main(int argc, char **argv) | |||
94 | * (-f root, *NOT* -froot). --marekm | 94 | * (-f root, *NOT* -froot). --marekm |
95 | */ | 95 | */ |
96 | if ( optarg != argv[optind-1] ) | 96 | if ( optarg != argv[optind-1] ) |
97 | show_usage ( ); | 97 | bb_show_usage( ); |
98 | 98 | ||
99 | if ( !amroot ) /* Auth bypass only if real UID is zero */ | 99 | if ( !amroot ) /* Auth bypass only if real UID is zero */ |
100 | error_msg_and_die ( "-f permission denied" ); | 100 | bb_error_msg_and_die ( "-f permission denied" ); |
101 | 101 | ||
102 | safe_strncpy(username, optarg, USERNAME_SIZE); | 102 | safe_strncpy(username, optarg, USERNAME_SIZE); |
103 | opt_fflag = 1; | 103 | opt_fflag = 1; |
@@ -106,7 +106,7 @@ extern int login_main(int argc, char **argv) | |||
106 | opt_host = optarg; | 106 | opt_host = optarg; |
107 | break; | 107 | break; |
108 | default: | 108 | default: |
109 | show_usage ( ); | 109 | bb_show_usage( ); |
110 | } | 110 | } |
111 | } | 111 | } |
112 | 112 | ||
@@ -275,11 +275,11 @@ static int login_prompt ( char *buf_name ) | |||
275 | 275 | ||
276 | static int check_nologin ( int amroot ) | 276 | static int check_nologin ( int amroot ) |
277 | { | 277 | { |
278 | if ( access ( nologin_file, F_OK ) == 0 ) { | 278 | if ( access ( bb_path_nologin_file, F_OK ) == 0 ) { |
279 | FILE *fp; | 279 | FILE *fp; |
280 | int c; | 280 | int c; |
281 | 281 | ||
282 | if (( fp = fopen ( nologin_file, "r" ))) { | 282 | if (( fp = fopen ( bb_path_nologin_file, "r" ))) { |
283 | while (( c = getc ( fp )) != EOF ) | 283 | while (( c = getc ( fp )) != EOF ) |
284 | putchar (( c == '\n' ) ? '\r' : c ); | 284 | putchar (( c == '\n' ) ? '\r' : c ); |
285 | 285 | ||
@@ -304,9 +304,9 @@ static int check_tty ( const char *tty ) | |||
304 | int i; | 304 | int i; |
305 | char buf[BUFSIZ]; | 305 | char buf[BUFSIZ]; |
306 | 306 | ||
307 | if (( fp = fopen ( securetty_file, "r" ))) { | 307 | if (( fp = fopen ( bb_path_securetty_file, "r" ))) { |
308 | while ( fgets ( buf, sizeof( buf ) - 1, fp )) { | 308 | while ( fgets ( buf, sizeof( buf ) - 1, fp )) { |
309 | for ( i = xstrlen( buf ) - 1; i >= 0; --i ) { | 309 | for ( i = bb_strlen( buf ) - 1; i >= 0; --i ) { |
310 | if ( !isspace ( buf[i] )) | 310 | if ( !isspace ( buf[i] )) |
311 | break; | 311 | break; |
312 | } | 312 | } |
@@ -348,7 +348,7 @@ static void motd ( ) | |||
348 | FILE *fp; | 348 | FILE *fp; |
349 | register int c; | 349 | register int c; |
350 | 350 | ||
351 | if (( fp = fopen ( motd_file, "r" ))) { | 351 | if (( fp = fopen ( bb_path_motd_file, "r" ))) { |
352 | while (( c = getc ( fp )) != EOF ) | 352 | while (( c = getc ( fp )) != EOF ) |
353 | putchar ( c ); | 353 | putchar ( c ); |
354 | fclose ( fp ); | 354 | fclose ( fp ); |