diff options
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | acconfig.h | 47 | ||||
-rw-r--r-- | config/gdm.conf.in | 10 | ||||
-rw-r--r-- | configure.in | 116 | ||||
-rw-r--r-- | daemon/gdm.h | 10 |
5 files changed, 134 insertions, 59 deletions
@@ -1,3 +1,11 @@ +Thu Feb 02 2:20:00 2005 Brian Cameron <Brian.Cameron@Sun.Com> + + * configure.in, config/gdm.conf.in, daemon/gdm.h: Cleaned up + the way the user's default PATH is set and allow it to be + configurable. Also allow default Halt, Reboot, and Suspend + commands to be different on Solaris. + * acconfig.h: Cleanup, added new configure options. + Wed Feb 02 11:20:00 2005 Brian Cameron <Brian.Cameron@Sun.Com> * Release 2.6.0.7 @@ -6,7 +14,7 @@ Tue Jan 28 15:35:00 2005 Brian Cameron <Brian.Cameron@Sun.Com> * This patch makes gdm2 build with newer versions of the build tools. Previously it was requiring automake-1.4, autoconf-1.4, - and clocal-1.4. Better error checking in the newer version + and aclocal-1.4. Better error checking in the newer version caught the following issues: * Makefile.am: Added distuninstallcheck_listfiles for the files in /var/scrollkeeper, which were causing "makedist" @@ -1,35 +1,50 @@ #undef PACKAGE #undef VERSION -#undef HAVE_LIBSM +#undef GETTEXT_PACKAGE +#undef GDM_USER_PATH +#undef HALT_COMMAND +#undef REBOOT_COMMAND +#undef SUSPEND_COMMAND +#undef ENABLE_IPV6 #undef ENABLE_NLS +#undef HAVE_ADT #undef HAVE_CATGETS +#undef HAVE_CHPASS +#undef HAVE_CLEARENV +#undef HAVE_CRYPT #undef HAVE_DEFOPEN #undef HAVE_FBCONSOLE #undef HAVE_GETTEXT #undef HAVE_LC_MESSAGES -#undef HAVE_STPCPY +#undef HAVE_LIBSM +#undef HAVE_LIBXDMCP +#undef HAVE_LOGINCAP +#undef HAVE_LOGINDEVPERM +#undef HAVE_LOGINRESTRICTIONS #undef HAVE_PAM -#undef HAVE_TCPWRAPPERS +#undef HAVE_PASSWDEXPIRED +#undef HAVE_SCHED_YIELD +#undef HAVE_SELINUX #undef HAVE_SHADOW -#undef HAVE_CRYPT +#undef HAVE_STPCPY +#undef HAVE_SYS_SOCKIO_H +#undef HAVE_TCPWRAPPERS #undef HAVE_XINERAMA #undef HAVE_XFREE_XINERAMA #undef HAVE_SOLARIS_XINERAMA -#undef HAVE_LIBXDMCP #undef HAVE_SETENV #undef HAVE_UNSETENV -#undef HAVE_CLEARENV #undef HAVE_SETRESUID +#undef EXPANDED_AUTHDIR #undef EXPANDED_DATADIR -#undef EXPANDED_PIXMAPDIR #undef EXPANDED_BINDIR -#undef EXPANDED_SBINDIR +#undef EXPANDED_GDMCONFIGDIR #undef EXPANDED_LIBEXECDIR #undef EXPANDED_LIBDIR -#undef EXPANDED_GDMCONFIGDIR #undef EXPANDED_LOCALEDIR -#undef EXPANDED_AUTHDIR #undef EXPANDED_LOGDIR +#undef EXPANDED_PIXMAPDIR +#undef EXPANDED_SBINDIR #undef EXPANDED_SYSCONFDIR #undef EXPANDED_SESSDIR #undef X_PATH @@ -37,16 +52,4 @@ #undef X_SERVER_PATH #undef X_XNEST_PATH #undef X_XNEST_CONFIG_OPTIONS -#undef X_CONF_PATH #undef X_CONFIG_OPTIONS -#undef GETTEXT_PACKAGE -#undef HAVE_LOGINCAP -#undef HAVE_SYS_SOCKIO_H -#undef HAVE_SCHED_YIELD -#undef ENABLE_IPV6 -#undef HAVE_SELINUX -#undef HAVE_PASSWDEXPIRED -#undef HAVE_CHPASS -#undef HAVE_LOGINRESTRICTIONS -#undef HAVE_LOGINDEVPERM -#undef HAVE_ADT diff --git a/config/gdm.conf.in b/config/gdm.conf.in index 35d97e54..c4cac2e7 100644 --- a/config/gdm.conf.in +++ b/config/gdm.conf.in @@ -60,9 +60,9 @@ TimedLoginDelay=30 #GtkModulesList=gail:atk-bridge:@EXPANDED_LIBDIR@/gtk-2.0/modules/libdwellmouselistener:@EXPANDED_LIBDIR@/gtk-2.0/modules/libkeymouselistener # Default path to set. The profile scripts will likely override this -#DefaultPath=/bin:/usr/bin:@X_CONF_PATH@:@EXPANDED_BINDIR@ +#DefaultPath=@GDM_USER_PATH@ # Default path for root. The profile scripts will likely override this -#RootPath=/sbin:/usr/sbin:/bin:/usr/bin:@X_CONF_PATH@:@EXPANDED_BINDIR@ +#RootPath=/sbin:/usr/sbin:@GDM_USER_PATH@ # If you are having trouble with using a single server for a long time and # want gdm to kill/restart the server, turn this on @@ -95,9 +95,9 @@ DisplayInitDir=@EXPANDED_SYSCONFDIR@/gdm/Init XKeepsCrashing=@EXPANDED_SYSCONFDIR@/gdm/XKeepsCrashing # Reboot, Halt and suspend commands, you can add different commands # separated by a semicolon and gdm will use the first one it can find -#RebootCommand=/usr/bin/reboot;/sbin/reboot;/sbin/shutdown -r now;/usr/sbin/shutdown -r now -#HaltCommand=/usr/bin/poweroff;/sbin/poweroff;/sbin/shutdown -h now;/usr/sbin/shutdown -h now -#SuspendCommand= +#RebootCommand=@REBOOT_COMMAND@ +#HaltCommand=@HALT_COMMAND@ +#SuspendCommand=@SUSPEND_COMMAND@ # Probably should not touch the below this is the standard setup ServAuthDir=@EXPANDED_AUTHDIR@ # This is our standard startup script. A bit different from a normal diff --git a/configure.in b/configure.in index ce31e882..6c19b34d 100644 --- a/configure.in +++ b/configure.in @@ -63,6 +63,16 @@ AC_ARG_WITH(tcp-wrappers, AC_ARG_WITH(selinux, [ --with-selinux Add SELinux support]) +withval="" +AC_ARG_WITH(post-path, +[ --with-post-path=<PATH> add PATH to end of user's PATH when logging in],[ +if test x$withval != x; then + AC_MSG_RESULT("PATH ${withval} with be added to end of user's PATH when logging in.") +fi]) +if test x$withval != x; then + USER_POST_PATH="$withval" +fi + dnl dnl PAM prefix dnl @@ -592,6 +602,9 @@ EXPANDED_PIXMAPDIR=`eval echo $PIXMAPDIR_TMP` AC_SUBST(EXPANDED_PIXMAPDIR) AC_DEFINE_UNQUOTED(EXPANDED_PIXMAPDIR,"$EXPANDED_PIXMAPDIR") +# Only set EXPANDED_BINDIR if it is a value that is not in +# the path already (/bin or /usr/bin) +# BINDIR_TMP="$bindir" EXPANDED_BINDIR=`eval echo $BINDIR_TMP` AC_SUBST(EXPANDED_BINDIR) @@ -673,23 +686,76 @@ AC_CHECK_LIB(devinfo, di_devperm_login, [ AC_DEFINE(HAVE_LOGINDEVPERM) EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS -ldevinfo" ]) -if test -x /usr/X11R6/bin/X; then - X_PATH="/usr/bin/X11:/usr/X11R6/bin:/opt/X11R6/bin" +# On Solaris, Xnest is only shipped in /usr/openwin/, so set path +# properly. The Xsun version of Xnest also requires the -pn +# argument so it can be run as the user. Note that you can have +# both the X.org and Xsun Xservers on the same system (but X.org on +# Solaris doesn't ship with Xnest), so this makes Solaris work +# properly when the X.org Xserver is included. +# +# Define different Halt, and Reboot commands differently for Solaris. +# +# On Solaris/bin is a symlink to /usr/bin, so don't include it in +# GDM_USER_PATH. +# +case "$host" in +*solaris*) + GDM_USER_PATH="/usr/bin" + X_XNEST_PATH="/usr/openwin/bin" + X_XNEST_CONFIG_OPTIONS="-audit 0 -name Xnest -pn" + HALT_COMMAND="/sbin/init 0" + REBOOT_COMMAND="/sbin/init 6" + SUSPEND_COMMAND="/usr/openwin/bin/sys-suspend -n" + ;; +*) + GDM_USER_PATH="/bin:/usr/bin" + X_XNEST_PATH=$X_SERVER_PATH + X_XNEST_CONFIG_OPTIONS="-audit 0 -name Xnest" + HALT_COMMAND="/usr/bin/poweroff;/sbin/poweroff;/sbin/shutdown -h now;/usr/sbin/shutdown -h now" + REBOOT_COMMAND="/usr/bin/reboot;/sbin/reboot;/sbin/shutdown -r now;/usr/sbin/shutdown -r now" + SUSPEND_COMMAND="" + ;; +esac + +# First check with "! -h" for /usr/X11R6 and /usr/X11 since they often +# symlink to each other, and configure should use the more stable +# location (the real directory) if possible. +# +if test ! -h /usr/X11R6 -a -x /usr/X11R6/bin/X; then + X_PATH="/usr/X11R6/bin" X_SERVER_PATH="/usr/X11R6/bin" X_SERVER="/usr/X11R6/bin/X" - X_CONF_PATH="/usr/bin/X11:/usr/X11R6/bin:/usr/local/bin:/opt/X11R6/bin" + GDM_USER_PATH="$GDM_USER_PATH:/usr/X11R6/bin" + X_CONFIG_OPTIONS="-audit 0" +elif test ! -h /usr/X11 -a -x /usr/X11/bin/X; then + X_PATH="/usr/X11/bin" + X_SERVER_PATH="/usr/X11/bin" + X_SERVER="/usr/X11/bin/X" + GDM_USER_PATH="$GDM_USER_PATH:/usr/X11/bin" + X_CONFIG_OPTIONS="-audit 0" +elif test -x /usr/X11R6/bin/X; then + X_PATH="/usr/X11R6/bin" + X_SERVER_PATH="/usr/X11R6/bin" + X_SERVER="/usr/X11R6/bin/X" + GDM_USER_PATH="$GDM_USER_PATH:/usr/X11R6/bin" + X_CONFIG_OPTIONS="-audit 0" +elif test -x /usr/X11/bin/X; then + X_PATH="/usr/X11/bin" + X_SERVER_PATH="/usr/X11/bin" + X_SERVER="/usr/X11/bin/X" + GDM_USER_PATH="$GDM_USER_PATH:/usr/X11/bin" X_CONFIG_OPTIONS="-audit 0" elif test -x /usr/openwin/bin/Xsun; then X_PATH="/usr/openwin/bin" X_SERVER_PATH="/usr/openwin/bin" X_SERVER="/usr/openwin/bin/Xsun" - X_CONF_PATH="/usr/openwin/bin" + GDM_USER_PATH="$GDM_USER_PATH:/usr/openwin/bin" X_CONFIG_OPTIONS="-audit 0 -nobanner" elif test -x /opt/X11R6/bin/X; then - X_PATH="/opt/X11R6/bin:/usr/X11R6/bin:/usr/bin/X11" + X_PATH="/opt/X11R6/bin" X_SERVER_PATH="/opt/X11R6/bin" X_SERVER="/opt/X11R6/bin/X" - X_CONF_PATH="/opt/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/usr/bin/X11" + GDM_USER_PATH="$GDM_USER_PATH:/opt/X11R6/bin" X_CONFIG_OPTIONS="-audit 0" else # what to do, what to do, this is wrong, but this just sets the @@ -697,38 +763,36 @@ else X_PATH="/usr/bin/X11:/usr/X11R6/bin:/opt/X11R6/bin" X_SERVER_PATH="/usr/X11R6/bin" X_SERVER="/usr/X11R6/bin/X" - X_CONF_PATH="/usr/bin/X11:/usr/X11R6/bin:/usr/local/bin:/opt/X11R6/bin" + GDM_USER_PATH="$GDM_USER_PATH:/usr/bin/X11:/usr/X11R6/bin:/usr/local/bin:/opt/X11R6/bin:/usr/openwin/bin" X_CONFIG_OPTIONS="-audit 0" fi -# On Solaris, Xnest is only shipped in /usr/openwin/, so set path -# properly. The Xsun version of Xnest also requires the -pn -# argument so it can be run as the user. Note that you can have -# both the X.org and Xsun Xservers on the same system (but X.org on -# Solaris doesn't ship with Xnest), so this makes Solaris work -# properly when the X.org Xserver is included. -# -case "$host" in -*solaris*) - X_XNEST_PATH="/usr/openwin/bin" - X_XNEST_CONFIG_OPTIONS="-audit 0 -name Xnest -pn" - ;; -*) - X_XNEST_PATH=$X_SERVER_PATH - X_XNEST_CONFIG_OPTIONS="-audit 0 -name Xnest" - ;; -esac +# Don't add EXPANDED_BINDIR to GDM_USER_PATH if it is already in the PATH. +if test "x$EXPANDED_BINDIR" != "x/bin" -a "x$EXPANDED_BINDIR" != "x/usr/bin"; then + GDM_USER_PATH="$GDM_USER_PATH:$EXPANDED_BINDIR" +fi + +if test "x$USER_POST_PATH" != "x"; then + GDM_USER_PATH="$GDM_USER_PATH:$USER_POST_PATH" +fi + +AC_SUBST(HALT_COMMAND) +AC_DEFINE_UNQUOTED(HALT_COMMAND,"$HALT_COMMAND") +AC_SUBST(REBOOT_COMMAND) +AC_DEFINE_UNQUOTED(REBOOT_COMMAND,"$REBOOT_COMMAND") +AC_SUBST(SUSPEND_COMMAND) +AC_DEFINE_UNQUOTED(SUSPEND_COMMAND,"$SUSPEND_COMMAND") +AC_SUBST(GDM_USER_PATH) +AC_DEFINE_UNQUOTED(GDM_USER_PATH,"$GDM_USER_PATH") AC_SUBST(X_PATH) AC_SUBST(X_SERVER) AC_SUBST(X_SERVER_PATH) AC_SUBST(X_XNEST_PATH) AC_SUBST(X_XNEST_CONFIG_OPTIONS) -AC_SUBST(X_CONF_PATH) AC_SUBST(X_CONFIG_OPTIONS) AC_DEFINE_UNQUOTED(X_SERVER,"$X_SERVER") AC_DEFINE_UNQUOTED(X_SERVER_PATH,"$X_SERVER_PATH") -AC_DEFINE_UNQUOTED(X_CONF_PATH,"$X_CONF_PATH") AC_DEFINE_UNQUOTED(X_CONFIG_OPTIONS,"$X_CONFIG_OPTIONS", Options used when launching xserver) SYSCONFDIR_TMP="$sysconfdir" diff --git a/daemon/gdm.h b/daemon/gdm.h index c1424a4d..bd69bf81 100644 --- a/daemon/gdm.h +++ b/daemon/gdm.h @@ -133,24 +133,24 @@ enum { #define GDM_KEY_ADD_GTK_MODULES "daemon/AddGtkModules=false" #define GDM_KEY_GTK_MODULES_LIST "daemon/GtkModulesList=" #define GDM_KEY_GROUP "daemon/Group=gdm" -#define GDM_KEY_HALT "daemon/HaltCommand=/usr/bin/poweroff;/sbin/poweroff;/sbin/shutdown -h now;/usr/sbin/shutdown -h now" +#define GDM_KEY_HALT "daemon/DefaultPath=" HALT_COMMAND #define GDM_KEY_INITDIR "daemon/DisplayInitDir=" EXPANDED_SYSCONFDIR "/gdm/Init" #define GDM_KEY_KILLIC "daemon/KillInitClients=true" #define GDM_KEY_LOGDIR "daemon/LogDir=" EXPANDED_LOGDIR -#define GDM_KEY_PATH "daemon/DefaultPath=/bin:/usr/bin:" X_CONF_PATH ":" EXPANDED_BINDIR +#define GDM_KEY_PATH "daemon/DefaultPath=" GDM_USER_PATH #define GDM_KEY_PIDFILE "daemon/PidFile=/var/run/gdm.pid" #define GDM_KEY_POSTSESS "daemon/PostSessionScriptDir=" EXPANDED_SYSCONFDIR "/gdm/PostSession/" #define GDM_KEY_PRESESS "daemon/PreSessionScriptDir=" EXPANDED_SYSCONFDIR "/gdm/PreSession/" #define GDM_KEY_POSTLOGIN "daemon/PostLoginScriptDir=" EXPANDED_SYSCONFDIR "/gdm/PreSession/" #define GDM_KEY_FAILSAFE_XSERVER "daemon/FailsafeXServer=" #define GDM_KEY_XKEEPSCRASHING "daemon/XKeepsCrashing=" EXPANDED_SYSCONFDIR "/gdm/XKeepsCrashing" -#define GDM_KEY_REBOOT "daemon/RebootCommand=/usr/bin/reboot;/sbin/reboot;/sbin/shutdown -r now;/usr/sbin/shutdown -r now" -#define GDM_KEY_ROOTPATH "daemon/RootPath=/sbin:/usr/sbin:/bin:/usr/bin:" X_CONF_PATH ":" EXPANDED_BINDIR +#define GDM_KEY_REBOOT "daemon/RebootCommand=" REBOOT_COMMAND +#define GDM_KEY_ROOTPATH "daemon/RootPath=/sbin:/usr/sbin:" GDM_USER_PATH #define GDM_KEY_SERVAUTH "daemon/ServAuthDir=" EXPANDED_AUTHDIR #define GDM_KEY_SESSDIR "daemon/SessionDesktopDir=/etc/X11/sessions/:" EXPANDED_SYSCONFDIR "/dm/Sessions/:" EXPANDED_DATADIR "/gdm/BuiltInSessions/:" EXPANDED_DATADIR "/xsessions/" #define GDM_KEY_BASEXSESSION "daemon/BaseXsession=" EXPANDED_SYSCONFDIR "/gdm/Xsession" #define GDM_KEY_DEFAULTSESSION "daemon/DefaultSession=gnome.desktop" -#define GDM_KEY_SUSPEND "daemon/SuspendCommand=" +#define GDM_KEY_SUSPEND "daemon/SuspendCommand=" SUSPEND_COMMAND #define GDM_KEY_UAUTHDIR "daemon/UserAuthDir=" #define GDM_KEY_UAUTHFB "daemon/UserAuthFBDir=/tmp" |