summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Lebl <jirka@5z.com>2003-09-29 21:33:48 +0000
committerGeorge Lebl <jirka@src.gnome.org>2003-09-29 21:33:48 +0000
commit4a1f1b22cb6dac873c0388e12956eeb4949bbe64 (patch)
tree3be8b40313f6b613712c8710cb5db4dba97256fd
parent508b254e93e86f61a206ce6910bcf526563219c0 (diff)
downloadgdm-4a1f1b22cb6dac873c0388e12956eeb4949bbe64.tar.gz
Be more careful with shell stuff and quote whatever we can, should fix rh
Mon Sep 29 14:32:18 2003 George Lebl <jirka@5z.com> * config/PreSession.in, config/PostSession.in, config/XKeepsCrashing, config/Xsession.in: Be more careful with shell stuff and quote whatever we can, should fix rh #105858. * daemon/misc.c, config/XKeepsCrashing: Don't use gdialog as it's nowdays just a wrapper on zenity
-rw-r--r--ChangeLog9
-rwxr-xr-xconfig/PostSession.in6
-rwxr-xr-xconfig/PreSession.in12
-rwxr-xr-xconfig/XKeepsCrashing7
-rwxr-xr-xconfig/Xsession.in20
-rw-r--r--daemon/misc.c4
6 files changed, 30 insertions, 28 deletions
diff --git a/ChangeLog b/ChangeLog
index f733e4bd..9415a716 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Mon Sep 29 14:32:18 2003 George Lebl <jirka@5z.com>
+
+ * config/PreSession.in, config/PostSession.in, config/XKeepsCrashing,
+ config/Xsession.in: Be more careful with shell stuff and quote
+ whatever we can, should fix rh #105858.
+
+ * daemon/misc.c, config/XKeepsCrashing: Don't use gdialog as it's
+ nowdays just a wrapper on zenity
+
Fri Sep 26 13:38:55 2003 George Lebl <jirka@5z.com>
* daemon/slave.c: in a further fit of anality, stat the file
diff --git a/config/PostSession.in b/config/PostSession.in
index a139b7cb..bcb38230 100755
--- a/config/PostSession.in
+++ b/config/PostSession.in
@@ -1,9 +1,9 @@
#!/bin/sh
-PATH=@X_PATH@:$PATH:/bin:/usr/bin
+PATH="@X_PATH@:$PATH:/bin:/usr/bin"
SESSREG=`which sessreg 2>/dev/null`
-if [ x$SESSREG != x ] ; then
- $SESSREG -d -w /var/log/wtmp -u /var/run/utmp -x "$X_SERVERS" -h "$REMOTE_HOST" -l $DISPLAY $USER
+if [ "x$SESSREG" != "x" ] ; then
+ "$SESSREG" -d -w /var/log/wtmp -u /var/run/utmp -x "$X_SERVERS" -h "$REMOTE_HOST" -l "$DISPLAY" "$USER"
fi
exit 0
diff --git a/config/PreSession.in b/config/PreSession.in
index bf557be2..dea3fbf2 100755
--- a/config/PreSession.in
+++ b/config/PreSession.in
@@ -6,21 +6,21 @@
#
# Note that output goes into the .xsession-errors file for easy debugging
#
-PATH=@X_PATH@:$PATH:/bin:/usr/bin
+PATH="@X_PATH@:$PATH:/bin:/usr/bin"
XSETROOT=`which xsetroot 2>/dev/null`
-if [ x$XSETROOT != x ] ; then
- $XSETROOT -cursor_name left_ptr -solid "#363047"
+if [ "x$XSETROOT" != "x" ] ; then
+ "$XSETROOT" -cursor_name left_ptr -solid "#363047"
fi
SESSREG=`which sessreg 2>/dev/null`
-if [ x$SESSREG != x ] ; then
+if [ "x$SESSREG" != "x" ] ; then
# some output for easy debugging
echo "$0: Registering your session with wtmp and utmp"
- echo "$0: running: $SESSREG -a -w /var/log/wtmp -u /var/run/utmp -x \"$X_SERVERS\" -h \"$REMOTE_HOST\" -l $DISPLAY $USER"
+ echo "$0: running: $SESSREG -a -w /var/log/wtmp -u /var/run/utmp -x \"$X_SERVERS\" -h \"$REMOTE_HOST\" -l \"$DISPLAY\" \"$USER\""
- exec $SESSREG -a -w /var/log/wtmp -u /var/run/utmp -x "$X_SERVERS" -h "$REMOTE_HOST" -l $DISPLAY $USER
+ exec "$SESSREG" -a -w /var/log/wtmp -u /var/run/utmp -x "$X_SERVERS" -h "$REMOTE_HOST" -l "$DISPLAY" "$USER"
# this is not reached
fi
diff --git a/config/XKeepsCrashing b/config/XKeepsCrashing
index 84ee0c0e..6bc015e6 100755
--- a/config/XKeepsCrashing
+++ b/config/XKeepsCrashing
@@ -8,7 +8,7 @@ fi
gettextfunc () {
if [ "x$GDMTRANSLATE" != "x" ] ; then
- $GDMTRANSLATE "$1"
+ "$GDMTRANSLATE" "$1"
else
echo "$1"
fi
@@ -60,10 +60,7 @@ done
#
DIALOG=`which dialog`
if test "x$DIALOG" = "x" ; then
- DIALOG=`which gdialog`
- if test "x$DIALOG" = "x" ; then
- DIALOG=`which whiptail`
- fi
+ DIALOG=`which whiptail`
fi
if test -x "$LIBEXECDIR/gdmaskpass" ; then
ASKPASS="$LIBEXECDIR/gdmaskpass"
diff --git a/config/Xsession.in b/config/Xsession.in
index 1dbd4f2e..f648e764 100755
--- a/config/Xsession.in
+++ b/config/Xsession.in
@@ -30,10 +30,10 @@ echo "$0: Beginning session setup..."
# First read /etc/profile and .profile
test -f /etc/profile && . /etc/profile
-test -f $HOME/.profile && . $HOME/.profile
+test -f "$HOME/.profile" && . "$HOME/.profile"
# Second read /etc/xprofile and .xprofile for X specific setup
test -f /etc/xprofile && . /etc/xprofile
-test -f $HOME/.xprofile && . $HOME/.xprofile
+test -f "$HOME/.xprofile" && . "$HOME/.xprofile"
# Translation stuff
if [ -x "@EXPANDED_LIBEXECDIR@/gdmtranslate" ] ; then
@@ -45,7 +45,7 @@ fi
# Note that this should only go to zenity dialogs which always expect utf8
gettextfunc () {
if [ "x$gdmtranslate" != "x" ] ; then
- $gdmtranslate --utf8 "$1"
+ "$gdmtranslate" --utf8 "$1"
else
echo "$1"
fi
@@ -61,7 +61,7 @@ fi
if [ x"$command" = xfailsafe ] ; then
if [ -n "$zenity" ] ; then
- $zenity --info --text `gettextfunc "This is the failsafe xterm session. Windows now have focus only if you have your cursor above them. To get out of this mode type 'exit' in the window in the upper left corner"`
+ "$zenity" --info --text `gettextfunc "This is the failsafe xterm session. Windows now have focus only if you have your cursor above them. To get out of this mode type 'exit' in the window in the upper left corner"`
else
echo "$0: Starting the failsafe xterm session."
fi
@@ -74,12 +74,12 @@ fi
# clean up after xbanner
freetemp=`which freetemp 2>/dev/null`
if [ -n "$freetemp" ] ; then
- $freetemp
+ "$freetemp"
fi
-userresources=$HOME/.Xresources
-usermodmap=$HOME/.Xmodmap
-userxkbmap=$HOME/.Xkbmap
+userresources="$HOME/.Xresources"
+usermodmap="$HOME/.Xmodmap"
+userxkbmap="$HOME/.Xkbmap"
sysresources=/etc/X11/Xresources
sysmodmap=/etc/X11/Xmodmap
@@ -207,7 +207,7 @@ if [ "x$command" = "xdefault" ] ; then
fi
# add ssh-agent if found
-sshagent=`which ssh-agent 2>/dev/null`
+sshagent="`which ssh-agent 2>/dev/null`"
if [ -n "$sshagent" ] && [ -x "$sshagent" ] && [ -z "$SSH_AUTH_SOCK" ]; then
command="$sshagent -- $command"
elif [ -z "$sshagent" ] ; then
@@ -221,7 +221,7 @@ eval exec $command
echo "$0: Executing $command failed, will run xterm"
if [ -n "$zenity" ] ; then
- $zenity --info --text `gettextfunc "I could not start your session and so I have started the failsafe xterm session. Windows now have focus only if you have your cursor above them. To get out of this mode type 'exit' in the window in the upper left corner"`
+ "$zenity" --info --text `gettextfunc "I could not start your session and so I have started the failsafe xterm session. Windows now have focus only if you have your cursor above them. To get out of this mode type 'exit' in the window in the upper left corner"`
fi
exec xterm -geometry 80x24+0+0
diff --git a/daemon/misc.c b/daemon/misc.c
index 9cef6738..7656ecf6 100644
--- a/daemon/misc.c
+++ b/daemon/misc.c
@@ -459,8 +459,6 @@ gdm_text_message_dialog (const char *msg)
dialog = g_find_program_in_path ("dialog");
if (dialog == NULL)
- dialog = g_find_program_in_path ("gdialog");
- if (dialog == NULL)
dialog = g_find_program_in_path ("whiptail");
if (dialog != NULL) {
char *argv[6];
@@ -528,8 +526,6 @@ gdm_text_yesno_dialog (const char *msg, gboolean *ret)
dialog = g_find_program_in_path ("dialog");
if (dialog == NULL)
- dialog = g_find_program_in_path ("gdialog");
- if (dialog == NULL)
dialog = g_find_program_in_path ("whiptail");
if (dialog != NULL) {
char *argv[6];