summaryrefslogtreecommitdiff
path: root/daemon/verify-pam.c
diff options
context:
space:
mode:
authorGeorge Lebl <jirka@5z.com>2002-01-22 02:50:45 +0000
committerGeorge Lebl <jirka@src.gnome.org>2002-01-22 02:50:45 +0000
commita28569fe9d8e7aa542731797b09a4063d57b84b0 (patch)
treeef8478d328e1de44f01133a8bddb475d98873b0e /daemon/verify-pam.c
parent6d507ba54dc5e6df37a1f59f28a8b0ab56a63536 (diff)
downloadgdm-a28569fe9d8e7aa542731797b09a4063d57b84b0.tar.gz
use GETTEXT_PACKAGE
Mon Jan 21 19:14:28 2002 George Lebl <jirka@5z.com> * acconfig.h, configure.in: use GETTEXT_PACKAGE * daemon/gdm.c, daemon/misc.[ch], daemon/verify-pam.c, daemon/server.c, daemon/slave.c, daemon/display.c: When displaying something on a console display it only when the console is UTF-8, which is only true if "gdmopen vt-is-UTF8 -q" returns 0 status. Else don't actually translate anything and just print out the english/ASCII version. * daemon/verify-pam.c: Better check for existance of the pam gdm configuration * daemon/gdm.c, gui/gdmXnestchooser.c, gui/gdmchooser.c, gui/gdmconfig.c, gui/gdmflexiserver.c, gui/gdmlogin.c, gui/gdmphotosetup.c: property bind gettext stuff and make sure we correctly set it up for UTF-8
Diffstat (limited to 'daemon/verify-pam.c')
-rw-r--r--daemon/verify-pam.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/daemon/verify-pam.c b/daemon/verify-pam.c
index c15d5be3..074ccb3f 100644
--- a/daemon/verify-pam.c
+++ b/daemon/verify-pam.c
@@ -645,22 +645,23 @@ gdm_verify_cleanup (GdmDisplay *d)
void
gdm_verify_check (void)
{
- /* FIXME: this is somewhat evil */
- if (access (PAM_PREFIX "/pam.d/gdm", F_OK) != 0 &&
- access ("/etc/pam.d/gdm", F_OK) != 0 &&
- access (PAM_PREFIX "/pam.conf", F_OK) != 0 &&
- access ("/etc/pam.conf", F_OK) != 0) {
- char *s;
- s = g_strdup_printf (_("Can't find PAM configuration file for gdm. "
- "I've tried %s, %s, %s and %s"),
- PAM_PREFIX "/pam.d/gdm",
- "/etc/pam.d/gdm",
- PAM_PREFIX "/pam.conf",
- "/etc/pam.conf");
- gdm_text_message_dialog (s);
- gdm_fail ("gdm_verify_check: %s", s);
- g_free (s); /* I'm an anal wanker */
+ pam_handle_t *ph = NULL;
+
+ if (pam_start ("gdm", NULL, &standalone_pamc, &ph) != PAM_SUCCESS) {
+ closelog ();
+ openlog ("gdm", LOG_PID, LOG_DAEMON);
+
+ gdm_text_message_dialog
+ (gdm_cons_i18n (N_("Can't find PAM configuration for gdm.")));
+ gdm_fail ("gdm_verify_check: %s",
+ _("Can't find PAM configuration for gdm."));
}
+
+ if (ph != NULL)
+ pam_end (ph, PAM_SUCCESS);
+
+ closelog ();
+ openlog ("gdm", LOG_PID, LOG_DAEMON);
}
/* used in pam */