summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorWilliam Jon McCann <mccann@src.gnome.org>2007-06-08 01:18:08 +0000
committerWilliam Jon McCann <mccann@src.gnome.org>2007-06-08 01:18:08 +0000
commitc4adefa73913fb5d448c6dd74dc58eb3a67c7376 (patch)
treedda3f1a3696ee8ea5917a751277ad0dbca008de6 /utils
parentfd6e91f3fee22b0c9389ffe91265f4099e688501 (diff)
downloadgdm-c4adefa73913fb5d448c6dd74dc58eb3a67c7376.tar.gz
Make the session object talk to the greeter!
svn path=/branches/mccann-gobject/; revision=4973
Diffstat (limited to 'utils')
-rw-r--r--utils/Makefile.am11
-rw-r--r--utils/gdmaskpass.c58
2 files changed, 1 insertions, 68 deletions
diff --git a/utils/Makefile.am b/utils/Makefile.am
index 22fa8b56..35f31f77 100644
--- a/utils/Makefile.am
+++ b/utils/Makefile.am
@@ -47,7 +47,6 @@ libexec_SCRIPTS = \
@GDMSSHSESSION@
libexec_PROGRAMS = \
- @GDMASKPASS@ \
@GDMOPEN@ \
@GDMPREFETCH@ \
gdmtranslate
@@ -57,10 +56,7 @@ bin_PROGRAMS = gdm-dmx-reconnect-proxy
endif
EXTRA_SCRIPTS = gdm-ssh-session
-EXTRA_PROGRAMS = gdmaskpass gdmopen gdmprefetch
-
-gdmaskpass_SOURCES = \
- gdmaskpass.c
+EXTRA_PROGRAMS = gdmopen gdmprefetch
gdmtranslate_SOURCES = \
gdmtranslate.c
@@ -71,11 +67,6 @@ gdmopen_SOURCES = \
gdmprefetch_SOURCES = \
gdmprefetch.c
-gdmaskpass_LDADD = \
- $(INTLLIBS) \
- -lpam \
- $(EXTRA_GDMASKPASS_LIBS)
-
gdmopen_LDADD = \
$(INTLLIBS)
diff --git a/utils/gdmaskpass.c b/utils/gdmaskpass.c
deleted file mode 100644
index 206b9eda..00000000
--- a/utils/gdmaskpass.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/* Simple pam thingie to ask the root password, for use in XKeepsCrashing
- * script. */
-#include "config.h"
-#include <glib/gi18n.h>
-#include <stdio.h>
-#include <locale.h>
-#include <unistd.h>
-#include <security/pam_appl.h>
-#include <security/pam_misc.h>
-
-static struct pam_conv conv = {
- misc_conv,
- NULL
-};
-
-int
-main (int argc, char *argv[])
-{
- pam_handle_t *pamh;
- const char *username = "root";
- int retval;
- int tries = 3;
-
- if (getuid () != geteuid () ||
- getuid () != 0) {
- fprintf (stderr, _("gdmaskpass only runs as root\n"));
- return 1;
- }
-
- if (argc >= 2) {
- username = argv[1];
- }
-
- setlocale (LC_ALL, "");
- bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
- textdomain (GETTEXT_PACKAGE);
-
- for (tries = 3; tries > 0; tries --) {
- if ((retval = pam_start ("gdm", username, &conv, &pamh)) != PAM_SUCCESS) {
- pam_end (pamh, retval);
- pamh = NULL;
- printf (_("Authentication failure!\n"));
- continue;
- }
- if ((retval = pam_authenticate (pamh, 0)) != PAM_SUCCESS) {
- pam_end (pamh, retval);
- pamh = NULL;
- printf (_("Authentication failure!\n"));
- continue;
- }
- break;
- }
-
- if (pamh != NULL)
- pam_end (pamh, retval);
-
- return (retval == PAM_SUCCESS) ? 0 : 1;
-}