diff options
author | William Jon McCann <mccann@jhu.edu> | 2007-04-20 08:39:35 +0000 |
---|---|---|
committer | William Jon McCann <mccann@src.gnome.org> | 2007-04-20 08:39:35 +0000 |
commit | 216a8e5b324f52a3e4d13eccb0cf956f275aefab (patch) | |
tree | ac0584f4bd4ba3343b8ca8031c162f763d61b207 /utils | |
parent | 9b4f9050a55aca0166cebab96b3af3988f3c0bee (diff) | |
download | gdm-216a8e5b324f52a3e4d13eccb0cf956f275aefab.tar.gz |
Fixes the pid file handling in the gdm-restart/stop/safe-restart scripts.
2007-04-20 William Jon McCann <mccann@jhu.edu>
* Makefile.am:
* configure.ac:
* gdm-restart.in:
* gdm-safe-restart.in:
* gdm-stop.in:
* gdm.spec.in:
* gdmsetup-pam:
* gdmsetup-security.in:
* utils/Makefile.am:
* utils/gdm-restart.in:
* utils/gdm-safe-restart.in:
* utils/gdm-stop.in:
Fixes the pid file handling in the gdm-restart/stop/safe-restart
scripts. Moves the scripts to the utils subdir. Moves the
gdmsetup stuff from toplevel to utils subdir. Removes gdm.spec.
Fixes #431462
svn path=/trunk/; revision=4845
Diffstat (limited to 'utils')
-rw-r--r-- | utils/Makefile.am | 55 | ||||
-rwxr-xr-x | utils/gdm-restart.in | 9 | ||||
-rwxr-xr-x | utils/gdm-safe-restart.in | 9 | ||||
-rwxr-xr-x | utils/gdm-stop.in | 9 | ||||
-rw-r--r-- | utils/gdmsetup-pam | 6 | ||||
-rw-r--r-- | utils/gdmsetup-security.in | 5 |
6 files changed, 90 insertions, 3 deletions
diff --git a/utils/Makefile.am b/utils/Makefile.am index 759c70b7..e4f02792 100644 --- a/utils/Makefile.am +++ b/utils/Makefile.am @@ -1,4 +1,5 @@ -## Process this file with automake to produce makefile.in +NULL = + DEFS = @DEFS@ -DGDM_CONFIG_FILE=\"$(gdmconfdir)/gdm.conf\" \ -DGDM_FACTORY_CONFIG_FILE=\"$(gdmconfdir)/factory-gdm.conf\" \ -DGDM_GLADE_DIR=\"@datadir@/gdm\" @@ -11,7 +12,36 @@ INCLUDES = \ -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ $(UTILS_CFLAGS) -EXTRA_DIST = gdm-ssh-session +edit = sed \ + -e 's|@sbindir[@]|$(sbindir)|g' \ + -e 's|@sysconfdir[@]|$(sysconfdir)|g' \ + -e 's|@localstatedir[@]|$(localstatedir)|g' \ + -e 's|@GDM_PID_FILE[@]|$(GDM_PID_FILE)|g' + +gdm-stop: gdm-stop.in Makefile + $(edit) $< >$@ +gdm-restart: gdm-restart.in Makefile + $(edit) $< >$@ +gdm-safe-restart: gdm-safe-restart.in Makefile + $(edit) $< >$@ +gdmsetup: gdmsetup-security.in + $(edit) <gdmsetup-security.in >gdmsetup + + +sbin_SCRIPTS = \ + gdm-stop \ + gdm-restart \ + gdm-safe-restart \ + $(NULL) + +EXTRA_DIST = \ + gdm-ssh-session \ + gdm-stop.in \ + gdm-restart.in \ + gdm-safe-restart.in \ + gdmsetup-pam \ + gdmsetup-security.in \ + $(NULL) libexec_SCRIPTS = \ @GDMSSHSESSION@ @@ -20,7 +50,7 @@ libexec_PROGRAMS = \ @GDMASKPASS@ \ @GDMOPEN@ \ @GDMPREFETCH@ \ - gdmtranslate + gdmtranslate if DMX_SUPPORT bin_PROGRAMS = gdm-dmx-reconnect-proxy @@ -63,3 +93,22 @@ gdm_dmx_reconnect_proxy_LDADD = \ -lX11 \ $(DMX_LIBS) endif + +if CONSOLE_HELPER +cappsdir = $(PAM_PREFIX)/security/console.apps +capps_DATA = gdmsetup + +install-data-local: + $(mkinstalldirs) $(DESTDIR)$(PAM_PREFIX)/pam.d + $(INSTALL_DATA) $(srcdir)/gdmsetup-pam $(DESTDIR)$(PAM_PREFIX)/pam.d/gdmsetup +else +install-data-local: +endif + +CLEANFILES = \ + gdmsetup-security \ + $(NULL) + +DISTCLEANFILES = \ + gdmsetup \ + $(NULL) diff --git a/utils/gdm-restart.in b/utils/gdm-restart.in new file mode 100755 index 00000000..db1d634b --- /dev/null +++ b/utils/gdm-restart.in @@ -0,0 +1,9 @@ +#!/bin/sh + +PIDFILE=@GDM_PID_FILE@ +if test '!' -f $PIDFILE ; then + echo "$PIDFILE doesn't exist, perhaps GDM isn't running" + exit 1 +fi +# exec the kill to get the correct return code +exec kill -HUP `cat $PIDFILE` diff --git a/utils/gdm-safe-restart.in b/utils/gdm-safe-restart.in new file mode 100755 index 00000000..8b75a97f --- /dev/null +++ b/utils/gdm-safe-restart.in @@ -0,0 +1,9 @@ +#!/bin/sh + +PIDFILE=@GDM_PID_FILE@ +if test '!' -f $PIDFILE ; then + echo "$PIDFILE doesn't exist, perhaps GDM isn't running" + exit 1 +fi +# exec the kill to get the correct return code +exec kill -USR1 `cat $PIDFILE` diff --git a/utils/gdm-stop.in b/utils/gdm-stop.in new file mode 100755 index 00000000..546c6b51 --- /dev/null +++ b/utils/gdm-stop.in @@ -0,0 +1,9 @@ +#!/bin/sh + +PIDFILE=@GDM_PID_FILE@ +if test '!' -f $PIDFILE ; then + echo "$PIDFILE doesn't exist, perhaps GDM isn't running" + exit 1 +fi +# exec the kill to get the correct return code +exec kill -TERM `cat $PIDFILE` diff --git a/utils/gdmsetup-pam b/utils/gdmsetup-pam new file mode 100644 index 00000000..ecb84946 --- /dev/null +++ b/utils/gdmsetup-pam @@ -0,0 +1,6 @@ +#%PAM-1.0 +auth sufficient pam_rootok.so +auth required pam_stack.so service=system-auth +session required pam_permit.so +session optional pam_xauth.so +account required pam_permit.so diff --git a/utils/gdmsetup-security.in b/utils/gdmsetup-security.in new file mode 100644 index 00000000..4db426ac --- /dev/null +++ b/utils/gdmsetup-security.in @@ -0,0 +1,5 @@ +USER=root +PROGRAM=@sbindir@/gdmsetup +SESSION=true +FALLBACK=false + |