diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-10-10 04:20:21 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-10-10 04:20:21 +0000 |
commit | 71ae64bdc6b044eef0a9f3bebd85cc4a6b67362f (patch) | |
tree | 802990cf39a805f253b9d32f3888a7c749babd01 /loginutils/login.c | |
parent | fdfe298a966da0e6eecdc355efd640acf73c00e5 (diff) | |
download | busybox-w32-71ae64bdc6b044eef0a9f3bebd85cc4a6b67362f.tar.gz busybox-w32-71ae64bdc6b044eef0a9f3bebd85cc4a6b67362f.tar.bz2 busybox-w32-71ae64bdc6b044eef0a9f3bebd85cc4a6b67362f.zip |
last_patch61 from vodz:
New complex patch for decrease size devel version. Requires previous patch.
Also removed small problems from dutmp and tar applets.
Also includes vodz' last_patch61_2:
Last patch correcting comment for #endif and more integrated
with libbb (very reduce size if used "cat" applet also).
Requires last_patch61 for modutils/config.in.
Diffstat (limited to 'loginutils/login.c')
-rw-r--r-- | loginutils/login.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/loginutils/login.c b/loginutils/login.c index 714829db1..6b8f6c651 100644 --- a/loginutils/login.c +++ b/loginutils/login.c | |||
@@ -22,20 +22,15 @@ | |||
22 | // import from utmp.c | 22 | // import from utmp.c |
23 | static void checkutmp(int picky); | 23 | static void checkutmp(int picky); |
24 | static void setutmp(const char *name, const char *line); | 24 | static void setutmp(const char *name, const char *line); |
25 | /* Stuff global to this file */ | ||
26 | struct utmp utent; | ||
25 | #endif | 27 | #endif |
26 | 28 | ||
27 | // import from encrypt.c | ||
28 | extern char *pw_encrypt(const char *clear, const char *salt); | ||
29 | |||
30 | |||
31 | // login defines | 29 | // login defines |
32 | #define TIMEOUT 60 | 30 | #define TIMEOUT 60 |
33 | #define EMPTY_USERNAME_COUNT 10 | 31 | #define EMPTY_USERNAME_COUNT 10 |
34 | #define USERNAME_SIZE 32 | 32 | #define USERNAME_SIZE 32 |
35 | 33 | ||
36 | /* Stuff global to this file */ | ||
37 | struct utmp utent; | ||
38 | |||
39 | 34 | ||
40 | static int check_nologin ( int amroot ); | 35 | static int check_nologin ( int amroot ); |
41 | 36 | ||
@@ -131,12 +126,15 @@ extern int login_main(int argc, char **argv) | |||
131 | else | 126 | else |
132 | safe_strncpy ( tty, "UNKNOWN", sizeof( tty )); | 127 | safe_strncpy ( tty, "UNKNOWN", sizeof( tty )); |
133 | 128 | ||
129 | #ifdef CONFIG_FEATURE_U_W_TMP | ||
134 | if ( amroot ) | 130 | if ( amroot ) |
135 | memset ( utent.ut_host, 0, sizeof utent.ut_host ); | 131 | memset ( utent.ut_host, 0, sizeof utent.ut_host ); |
132 | #endif | ||
136 | 133 | ||
137 | if ( opt_host ) { | 134 | if ( opt_host ) { |
135 | #ifdef CONFIG_FEATURE_U_W_TMP | ||
138 | safe_strncpy ( utent.ut_host, opt_host, sizeof( utent. ut_host )); | 136 | safe_strncpy ( utent.ut_host, opt_host, sizeof( utent. ut_host )); |
139 | 137 | #endif | |
140 | snprintf ( fromhost, sizeof( fromhost ) - 1, " on `%.100s' from `%.200s'", tty, opt_host ); | 138 | snprintf ( fromhost, sizeof( fromhost ) - 1, " on `%.100s' from `%.200s'", tty, opt_host ); |
141 | } | 139 | } |
142 | else | 140 | else |