diff options
author | George Lebl <jirka@5z.com> | 2003-05-13 19:24:41 +0000 |
---|---|---|
committer | George Lebl <jirka@src.gnome.org> | 2003-05-13 19:24:41 +0000 |
commit | 925d8c210cbd3cd050bc90d2ec35c35dbbd2f119 (patch) | |
tree | addb27e19ea1820d5211a316aaceefb432264f7a /daemon/verify-shadow.c | |
parent | 7a6db24a73eb0e7ff812457dd61209997daf1ceb (diff) | |
download | gdm-925d8c210cbd3cd050bc90d2ec35c35dbbd2f119.tar.gz |
when more then 50 users don't put them all in the combo boxes, this is a
Tue May 13 12:22:45 2003 George Lebl <jirka@5z.com>
* gui/gdmsetup.c: when more then 50 users don't put them all in the
combo boxes, this is a semi-solution to #111830
* daemon/verify-shadow.c: Apply patch from cschelcher@free.fr to fall
back to standard password when shadow is not available. Apparently
fixes NIS stuff, but I really think people should be using pam,
but I digress. Fixes #109765
* daemon/auth.c, daemon/misc.c, daemon/server.c, daemon/slave.c:
use strerror instead of g_strerror as that returns always UTF-8
and we want current locale. We already assume strerror is on
the system so this is not a portability issue anyway. Fixes
#106655
* utils/gdmopen.c: apply patch from Owen Taylor to fix #106656
by not deallocating the vt after we are done as apparently this
is what open does and the kernel has a fit otherwise anyway.
It's braindead, but oh well, this is the way it apparently works
right.
* daemon/gdm.c: apply patch from Owen Taylor to fix #106656
by setting TEXTDOMAIN to GETTEXT_PACKAGE rather then PACKAGE
before running scripts
* utils/gdmopen.c, daemon/misc.c: Apply patch from Owen Taylor
to fix #106658, but fix it portably by adding the -l
option to gdmopen as suggested by Owen. So all gdmopens
we do are now using login shells which makes me wonder if we
should just build that into gdmopen, since it's a special
purpose utility anyhow.
Diffstat (limited to 'daemon/verify-shadow.c')
-rw-r--r-- | daemon/verify-shadow.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/daemon/verify-shadow.c b/daemon/verify-shadow.c index 643010cb..dd455d26 100644 --- a/daemon/verify-shadow.c +++ b/daemon/verify-shadow.c @@ -88,10 +88,19 @@ gdm_verify_user (GdmDisplay *d, const char *username, const gchar *display, gboo /* Lookup shadow password */ sp = getspnam (login); - if (sp) - ppasswd = g_strdup (sp->sp_pwdp); - else - ppasswd = NULL; + /* Use shadow password when available */ + if (sp != NULL) { + ppasswd = g_strdup (sp->sp_pwdp); + } else { + /* In case shadow password cannot be retrieved (when using NIS + authentication for example), use standard passwd */ + if (pwent != NULL && + pwent->pw_passwd != NULL) + ppasswd = g_strdup (pwent->pw_passwd); + else + /* If no password can be retrieved, set it to NULL */ + ppasswd = NULL; + } endspent (); |