From b5a122b6f9643fb052d31390e435397960289154 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sat, 30 Dec 2006 14:46:51 +0000 Subject: fix for uclibc-without-shadow.h compilation --- loginutils/passwd.c | 4 +++- loginutils/sulogin.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'loginutils') diff --git a/loginutils/passwd.c b/loginutils/passwd.c index c825c978f..5c822b190 100644 --- a/loginutils/passwd.c +++ b/loginutils/passwd.c @@ -276,7 +276,8 @@ int passwd_main(int argc, char **argv) } filename = bb_path_passwd_file; - if (ENABLE_FEATURE_SHADOWPASSWDS) { +#if ENABLE_FEATURE_SHADOWPASSWDS + { struct spwd *sp = getspnam(name); if (!sp) { /* LOGMODE_BOTH */ @@ -288,6 +289,7 @@ int passwd_main(int argc, char **argv) pw->pw_passwd = sp->sp_pwdp; } } +#endif /* Decide what the new password will be */ newp = NULL; diff --git a/loginutils/sulogin.c b/loginutils/sulogin.c index 30f9d9350..8bcb393f5 100644 --- a/loginutils/sulogin.c +++ b/loginutils/sulogin.c @@ -74,13 +74,15 @@ int sulogin_main(int argc, char **argv) goto auth_error; } - if (ENABLE_FEATURE_SHADOWPASSWDS) { +#if ENABLE_FEATURE_SHADOWPASSWDS + { struct spwd *spwd = getspnam(pwd->pw_name); if (!spwd) { goto auth_error; } pwd->pw_passwd = spwd->sp_pwdp; } +#endif while (1) { /* cp points to a static buffer that is zeroed every time */ -- cgit v1.2.3