[Pkg-shadow-commits] r289 - trunk/debian
Alexander Gattin
pkg-shadow-devel@lists.alioth.debian.org
Tue, 21 Jun 2005 23:44:57 +0000
Author: xrgtn-guest
Date: 2005-06-21 23:44:57 +0000 (Tue, 21 Jun 2005)
New Revision: 289
Modified:
trunk/debian/add-shell.sh
trunk/debian/changelog
trunk/debian/passwd.config
trunk/debian/passwd.postinst
trunk/debian/remove-shell.sh
trunk/debian/shadowconfig.sh
Log:
"Fighting isms" fix. Closes: #256732
Modified: trunk/debian/add-shell.sh
===================================================================
--- trunk/debian/add-shell.sh 2005-06-21 23:24:01 UTC (rev 288)
+++ trunk/debian/add-shell.sh 2005-06-21 23:44:57 UTC (rev 289)
@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/bin/sh -e
if test $# -eq 0
then
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2005-06-21 23:24:01 UTC (rev 288)
+++ trunk/debian/changelog 2005-06-21 23:44:57 UTC (rev 289)
@@ -26,6 +26,14 @@
- debian/passwd.config:
Re-enable the password confirmation question at critical priority
Closes: #304350
+ - debian/add-shell.sh, debian/remove-shell.sh, debian/shadowconfig.sh,
+ debian/passwd.config, debian/passwd.postinst:
+ - checked for bashisms, replaced "#!/bin/bash" with "#!/bin/sh",
+ - replaced "test XXX -a YYY" XSI:isms with "test XXX && test YYY",
+ for rationale see:
+ http://www.opengroup.org/onlinepubs/009695399/utilities/test.html
+ - replaced all unneeded "egrep"s with basic "grep"s
+ Closes: #256732
- debian/rules:
Remove the setuid bit on login
Closes: #298060
Modified: trunk/debian/passwd.config
===================================================================
--- trunk/debian/passwd.config 2005-06-21 23:24:01 UTC (rev 288)
+++ trunk/debian/passwd.config 2005-06-21 23:44:57 UTC (rev 289)
@@ -22,9 +22,9 @@
# Returns a true value if there seems to be a system user account.
is_system_user () {
# Assume NIS, or any uid from 1000 to 29999, means there is a user.
- if egrep -q '^+:' /etc/passwd || \
- egrep -q '^[^:]*:[^:]*:[1-9][0-9][0-9][0-9]:' /etc/passwd || \
- egrep -q '^[^:]*:[^:]*:[12][0-9][0-9][0-9][0-9]:' /etc/passwd; then
+ if grep -q '^+:' /etc/passwd || \
+ grep -q '^[^:]*:[^:]*:[1-9][0-9][0-9][0-9]:' /etc/passwd || \
+ grep -q '^[^:]*:[^:]*:[12][0-9][0-9][0-9][0-9]:' /etc/passwd; then
return 0
else
return 1
@@ -34,7 +34,7 @@
# Returns a true value if root already has a password.
root_password () {
# Assume there is a root password if NIS is being used.
- if egrep -q '^+:' /etc/passwd; then
+ if grep -q '^+:' /etc/passwd; then
return 0
fi
@@ -43,8 +43,8 @@
return 0
fi
- if [ "`grep ^root: /etc/passwd | cut -d : -f 2`" -a \
- "`grep ^root: /etc/passwd | cut -d : -f 2`" != 'x' ]; then
+ if [ "`grep ^root: /etc/passwd | cut -d : -f 2`" ] && \
+ [ "`grep ^root: /etc/passwd | cut -d : -f 2`" != 'x' ]; then
return 0
fi
@@ -98,7 +98,7 @@
# Main loop starts here. Use a state machine to allow jumping back to
# previous questions.
STATE=0
-while [ "$STATE" != '9' -a "$STATE" != '-1' ]; do
+while [ "$STATE" != '9' ] && [ "$STATE" != '-1' ]; do
case "$STATE" in
0)
# Ask how the password files should be set up.
@@ -143,7 +143,7 @@
continue
fi
db_get passwd/root-password-again
- if [ "$COMPARE_PW" -a "$ROOT_PW" != "$RET" ]; then
+ if [ "$COMPARE_PW" ] && [ "$ROOT_PW" != "$RET" ]; then
db_fset passwd/password-mismatch seen false
db_input critical passwd/password-mismatch
STATE=2
@@ -226,7 +226,7 @@
db_get passwd/user-password
USER_PW="$RET"
db_get passwd/user-password-again
- if [ "$COMPARE_PW" -a "$USER_PW" != "$RET" ]; then
+ if [ "$COMPARE_PW" ] && [ "$USER_PW" != "$RET" ]; then
db_set passwd/user-password ""
db_set passwd/user-password-again ""
db_fset passwd/password-mismatch seen false
Modified: trunk/debian/passwd.postinst
===================================================================
--- trunk/debian/passwd.postinst 2005-06-21 23:24:01 UTC (rev 288)
+++ trunk/debian/passwd.postinst 2005-06-21 23:44:57 UTC (rev 289)
@@ -3,7 +3,7 @@
test -f /usr/share/debconf/confmodule && . /usr/share/debconf/confmodule
# only install /etc/shells on package install
-if test -z "$2" -a ! -f /etc/shells
+if test -z "$2" && test ! -f /etc/shells
then
cp -p /usr/share/passwd/shells /etc/shells
fi
Modified: trunk/debian/remove-shell.sh
===================================================================
--- trunk/debian/remove-shell.sh 2005-06-21 23:24:01 UTC (rev 288)
+++ trunk/debian/remove-shell.sh 2005-06-21 23:44:57 UTC (rev 289)
@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/bin/sh -e
if test $# -eq 0
then
Modified: trunk/debian/shadowconfig.sh
===================================================================
--- trunk/debian/shadowconfig.sh 2005-06-21 23:24:01 UTC (rev 288)
+++ trunk/debian/shadowconfig.sh 2005-06-21 23:44:57 UTC (rev 289)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# turn shadow passwords on or off on a Debian system
set -e