X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=driver%2Fpasswd-pwent.c;h=bb0edfc23d26076e0fb38ade9e1aa19294dfb10b;hb=c85f503f5793839a6be4c818332aca4a96927bb2;hp=5bfaec9ec860fa32cc6b53c7d18b02bac01842af;hpb=551b3de3f619c04c2dd1971ee9b3f02e270c28c9;p=xscreensaver diff --git a/driver/passwd-pwent.c b/driver/passwd-pwent.c index 5bfaec9e..bb0edfc2 100644 --- a/driver/passwd-pwent.c +++ b/driver/passwd-pwent.c @@ -104,6 +104,11 @@ static char *encrypted_user_passwd = 0; # define ROOT "root" #endif +#ifndef VMS +Bool pwent_priv_init (int argc, char **argv, Bool verbose_p); +Bool pwent_lock_init (int argc, char **argv, Bool verbose_p); +Bool pwent_passwd_valid_p (const char *typed_passwd, Bool verbose_p); +#endif #ifndef VMS @@ -195,9 +200,15 @@ get_encrypted_passwd(const char *user) *s = 0; } +#ifndef HAVE_PAM + /* We only issue this warning if not compiled with support for PAM. + If we're using PAM, it's not unheard of that normal pwent passwords + would be unavailable. */ + if (!result) fprintf (stderr, "%s: couldn't get password of \"%s\"\n", blurb(), (user ? user : "(null)")); +#endif /* !HAVE_PAM */ return result; } @@ -282,11 +293,13 @@ pwent_passwd_valid_p (const char *typed_passwd, Bool verbose_p) passwds_match_p (typed_passwd, encrypted_user_passwd)) return True; +#ifdef ALLOW_ROOT_PASSWD /* do not allow root to have a null password. */ else if (typed_passwd[0] && encrypted_root_passwd && passwds_match_p (typed_passwd, encrypted_root_passwd)) return True; +#endif /* ALLOW_ROOT_PASSWD */ else return False;