Author: jsmeix
Date: Fri Jan 29 14:50:42 2010
New Revision: 60617
URL: http://svn.opensuse.org/viewcvs/yast?rev=60617&view=rev
Log:
In none of the bash scripts for yast2-printer bash globbing is needed.
Actually in all those scripts no bash globbing should happen.
Therefore I added to all those scripts a "set -f" line (bnc #575056).
Modified:
trunk/printer/tools/autodetect_print_queues
trunk/printer/tools/autodetect_printers
trunk/printer/tools/create_printer_ppd_database
trunk/printer/tools/cups_client_only
trunk/printer/tools/determine_printer_driver_options
trunk/printer/tools/modify_cupsd_conf
trunk/printer/tools/test_device
trunk/printer/tools/test_remote_ipp
trunk/printer/tools/test_remote_lpd
trunk/printer/tools/test_remote_novell
trunk/printer/tools/test_remote_smb
trunk/printer/tools/test_remote_socket
Modified: trunk/printer/tools/autodetect_print_queues
URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/tools/autodetect_print_queues?rev=60617&r1=60616&r2=60617&view=diff
==============================================================================
--- trunk/printer/tools/autodetect_print_queues (original)
+++ trunk/printer/tools/autodetect_print_queues Fri Jan 29 14:50:42 2010
@@ -1,13 +1,16 @@
#! /bin/bash
#
-# Johannes Meixner , 2007, 2008, 2009
+# Johannes Meixner , 2007, 2008, 2009, 2010
#set -x
+# Make sure to have a clean environment:
export PATH="/sbin:/usr/sbin:/usr/bin:/bin"
export LC_ALL="POSIX"
export LANG="POSIX"
umask 022
+# Disable bash file name globbing:
+set -f
MY_NAME=${0##*/}
Modified: trunk/printer/tools/autodetect_printers
URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/tools/autodetect_printers?rev=60617&r1=60616&r2=60617&view=diff
==============================================================================
--- trunk/printer/tools/autodetect_printers (original)
+++ trunk/printer/tools/autodetect_printers Fri Jan 29 14:50:42 2010
@@ -1,13 +1,16 @@
#! /bin/bash
#
-# Johannes Meixner , 2007, 2008, 2009
+# Johannes Meixner , 2007, 2008, 2009, 2010
#set -x
+# Make sure to have a clean environment:
export PATH="/sbin:/usr/sbin:/usr/bin:/bin"
export LC_ALL="POSIX"
export LANG="POSIX"
umask 022
+# Disable bash file name globbing:
+set -f
# This file name for a progress indicator is also used in Printer.ycp:
test -z "$PROGRESS" && PROGRESS="/var/lib/YaST2/autodetect_printers.progress"
Modified: trunk/printer/tools/create_printer_ppd_database
URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/tools/create_printer_ppd_database?rev=60617&r1=60616&r2=60617&view=diff
==============================================================================
--- trunk/printer/tools/create_printer_ppd_database (original)
+++ trunk/printer/tools/create_printer_ppd_database Fri Jan 29 14:50:42 2010
@@ -1,13 +1,16 @@
#! /bin/bash
#
-# Johannes Meixner , 2007, 2008, 2009
+# Johannes Meixner , 2007, 2008, 2009, 2010
#set -x
+# Make sure to have a clean environment:
export PATH="/sbin:/usr/sbin:/usr/bin:/bin"
export LC_ALL="POSIX"
export LANG="POSIX"
umask 022
+# Disable bash file name globbing:
+set -f
# This file name for a progress indicator is also used in Printer.ycp:
test -z "$PROGRESS" && PROGRESS="/var/lib/YaST2/create_printer_ppd_database.progress"
Modified: trunk/printer/tools/cups_client_only
URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/tools/cups_client_only?rev=60617&r1=60616&r2=60617&view=diff
==============================================================================
--- trunk/printer/tools/cups_client_only (original)
+++ trunk/printer/tools/cups_client_only Fri Jan 29 14:50:42 2010
@@ -1,13 +1,16 @@
#! /bin/bash
#
-# Johannes Meixner , 2007, 2008, 2009
+# Johannes Meixner , 2007, 2008, 2009, 2010
#set -x
+# Make sure to have a clean environment:
export PATH="/sbin:/usr/sbin:/usr/bin:/bin"
export LC_ALL="POSIX"
export LANG="POSIX"
umask 022
+# Disable bash file name globbing:
+set -f
# When 'localhost' or its IP-address is to be set,
# it is unified so that only 'localhost' or '127.0.0.1' are set
Modified: trunk/printer/tools/determine_printer_driver_options
URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/tools/determine_printer_driver_options?rev=60617&r1=60616&r2=60617&view=diff
==============================================================================
--- trunk/printer/tools/determine_printer_driver_options (original)
+++ trunk/printer/tools/determine_printer_driver_options Fri Jan 29 14:50:42 2010
@@ -1,13 +1,16 @@
#! /bin/bash
#
-# Johannes Meixner , 2007, 2008, 2009
+# Johannes Meixner , 2007, 2008, 2009, 2010
#set -x
+# Make sure to have a clean environment:
export PATH="/sbin:/usr/sbin:/usr/bin:/bin"
export LC_ALL="POSIX"
export LANG="POSIX"
umask 022
+# Disable bash file name globbing:
+set -f
MY_NAME=${0##*/}
QUEUE="$1"
Modified: trunk/printer/tools/modify_cupsd_conf
URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/tools/modify_cupsd_conf?rev=60617&r1=60616&r2=60617&view=diff
==============================================================================
--- trunk/printer/tools/modify_cupsd_conf (original)
+++ trunk/printer/tools/modify_cupsd_conf Fri Jan 29 14:50:42 2010
@@ -1,13 +1,16 @@
#! /bin/bash
#
-# Johannes Meixner , 2007, 2008, 2009
+# Johannes Meixner , 2007, 2008, 2009, 2010
#set -x
+# Make sure to have a clean environment:
export PATH="/sbin:/usr/sbin:/usr/bin:/bin"
export LC_ALL="POSIX"
export LANG="POSIX"
umask 022
+# Disable bash file name globbing:
+set -f
MY_NAME=${0##*/}
CUPSDCONF="/etc/cups/cupsd.conf"
Modified: trunk/printer/tools/test_device
URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/tools/test_device?rev=60617&r1=60616&r2=60617&view=diff
==============================================================================
--- trunk/printer/tools/test_device (original)
+++ trunk/printer/tools/test_device Fri Jan 29 14:50:42 2010
@@ -6,15 +6,18 @@
# 2 problems while writing to $2
#
# Jan Holesovsky , 2000
-# Johannes Meixner , 2008
+# Johannes Meixner , 2008, 2010
# $Id: test_device 2928 2002-06-27 08:53:17Z jsrain $
#set -x
+# Make sure to have a clean environment:
export PATH="/sbin:/usr/sbin:/usr/bin:/bin"
export LC_ALL="POSIX"
export LANG="POSIX"
umask 022
+# Disable bash file name globbing:
+set -f
EXITCODE=2
trap "EXITCODE=0" 10
Modified: trunk/printer/tools/test_remote_ipp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/tools/test_remote_ipp?rev=60617&r1=60616&r2=60617&view=diff
==============================================================================
--- trunk/printer/tools/test_remote_ipp (original)
+++ trunk/printer/tools/test_remote_ipp Fri Jan 29 14:50:42 2010
@@ -13,7 +13,7 @@
# 15 lp not executable (no cups-client RPM installed?)
# The program head is in the coreutils RPM and therefore assumed to exist.
#
-# Johannes Meixner , 2000, 2002, 2007, 2008, 2009
+# Johannes Meixner , 2000, 2002, 2007, 2008, 2009, 2010
# Jan Holesovsky , 2000
# Jiri Srain , 2002
# $Id: test_remote_ipp 43943 2008-01-28 13:38:58Z mzugec $
@@ -25,6 +25,8 @@
export LC_ALL="POSIX"
export LANG="POSIX"
umask 022
+# Disable bash file name globbing:
+set -f
# Use the binaries of the operating system (no aliases, functions, /usr/local/):
export PING=$( type -ap ping | head -n 1 )
Modified: trunk/printer/tools/test_remote_lpd
URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/tools/test_remote_lpd?rev=60617&r1=60616&r2=60617&view=diff
==============================================================================
--- trunk/printer/tools/test_remote_lpd (original)
+++ trunk/printer/tools/test_remote_lpd Fri Jan 29 14:50:42 2010
@@ -18,7 +18,7 @@
# since Suse Linux 11.0 /bin/mktemp is in the coreutils RPM which is required by YaST
# The programs head, mkfifo, sleep, tr, rm are in the coreutils RPM and therefore assumed to exist.
#
-# Johannes Meixner , 2000, 2002, 2007, 2008, 2009
+# Johannes Meixner , 2000, 2002, 2007, 2008, 2009, 2010
# Jan Holesovsky , 2000
# Jiri Srain , 2002
# $Id: test_remote_lpd 43943 2008-01-28 13:38:58Z mzugec $
@@ -30,6 +30,8 @@
export LC_ALL="POSIX"
export LANG="POSIX"
umask 022
+# Disable bash file name globbing:
+set -f
# Use the binaries of the operating system (no aliases, functions, /usr/local/):
export PING=$( type -ap ping | head -n 1 )
Modified: trunk/printer/tools/test_remote_novell
URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/tools/test_remote_novell?rev=60617&r1=60616&r2=60617&view=diff
==============================================================================
--- trunk/printer/tools/test_remote_novell (original)
+++ trunk/printer/tools/test_remote_novell Fri Jan 29 14:50:42 2010
@@ -8,7 +8,7 @@
# (10=ping,11=netcat,12=fuser,13=mktemp,14=sed,15=lp,16=smbclient: see test_remote_smb)
# 17 nprint not executable (no ncpfs RPM installed?)
#
-# Johannes Meixner , 2000, 2002, 2007, 2008, 2009
+# Johannes Meixner , 2000, 2002, 2007, 2008, 2009, 2010
# Jan Holesovsky , 2000
# Jiri Srain , 2002
# $Id: test_remote_novell 43943 2008-01-28 13:38:58Z mzugec $
@@ -20,6 +20,8 @@
export LC_ALL="POSIX"
export LANG="POSIX"
umask 022
+# Disable bash file name globbing:
+set -f
# Use the binaries of the operating system (no aliases, functions, /usr/local/):
export NPRINT=$( type -ap nprint | head -n 1 )
Modified: trunk/printer/tools/test_remote_smb
URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/tools/test_remote_smb?rev=60617&r1=60616&r2=60617&view=diff
==============================================================================
--- trunk/printer/tools/test_remote_smb (original)
+++ trunk/printer/tools/test_remote_smb Fri Jan 29 14:50:42 2010
@@ -11,7 +11,7 @@
# 16 smbclient not executable (no samba-client RPM installed?)
# The programs head, mkfifo, sleep, tr, rm are in the coreutils RPM and therefore assumed to exist.
#
-# Johannes Meixner , 2000, 2002, 2007, 2008, 2009
+# Johannes Meixner , 2000, 2002, 2007, 2008, 2009, 2010
# Jan Holesovsky , 2000
# Jiri Srain , 2002
# $Id: test_remote_smb 43943 2008-01-28 13:38:58Z mzugec $
@@ -23,6 +23,8 @@
export LC_ALL="POSIX"
export LANG="POSIX"
umask 022
+# Disable bash file name globbing:
+set -f
# Use the binaries of the operating system (no aliases, functions, /usr/local/):
export PING=$( type -ap ping | head -n 1 )
Modified: trunk/printer/tools/test_remote_socket
URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/tools/test_remote_socket?rev=60617&r1=60616&r2=60617&view=diff
==============================================================================
--- trunk/printer/tools/test_remote_socket (original)
+++ trunk/printer/tools/test_remote_socket Fri Jan 29 14:50:42 2010
@@ -11,7 +11,7 @@
# 11 netcat not executable (no netcat RPM installed?)
# The program head is in the coreutils RPM and therefore assumed to exist.
#
-# Johannes Meixner 2002, 2007, 2008, 2009
+# Johannes Meixner 2002, 2007, 2008, 2009, 2010
# Jiri Srain , 2002
# $Id: test_remote_socket 43943 2008-01-28 13:38:58Z mzugec $
@@ -22,6 +22,8 @@
export LC_ALL="POSIX"
export LANG="POSIX"
umask 022
+# Disable bash file name globbing:
+set -f
# Use the binaries of the operating system (no aliases, functions, /usr/local/):
export PING=$( type -ap ping | head -n 1 )
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org