tag 603320 + patch
thanks
I have got round to looking at this in more detail. Please ignore my
previous suggestion. I have a fair degree of confidence in the attached
patch for reasons I will explain.
The file is systems/Linux/2/check_umask
The line in question starts at 121 and amounts to:
GLOBALUMASK=`grep ^UMASK /etc/login.defs | expand | cut -d" " -f3`
The first part hopefully extracts the correct line for us.
The second part replaces tabs into spaces.
The last part splits the line up using spaces as sperators.
I am not quite sure how this line came about except that it seems to
have been copied from the 'check_umask'
function further down in the code.
The effect of my patch is to merge all the spaces between UMASK and the
number into a single space so that we know exactly how many spaces there
are.
GLOBALUMASK=`grep ^UMASK /etc/login.defs | expand | sed -e"s/\s\+/ /g" |
cut -d" " -f2`
Author: Nicholas Bamber <nicho...@periapt.co.uk>
Subject: The upstream code fails on my system.
Last-Update: 2011-01-20
Forwarded: no
--- a/systems/Linux/2/check_umask
+++ b/systems/Linux/2/check_umask
@@ -24,6 +24,7 @@
# The command requirements have been modified to adjust to what it's really
# needed.
#
+# 20/01/2011 - npb - Fixed field parsing in UMASK analysis
# 05/21/2009 - jfs - Enhance checks so that different messages are provided
# based on installed shells
# 01/13/2004 - jfs - Fixed syntax error in the previous patch
@@ -119,7 +120,8 @@
if [ -r $GLOBALFILE ] ; then
GLOBALUMASK=`$GREP ^UMASK $GLOBALFILE \
| $EXPAND \
- | $CUT -d" " -f3`
+ | $SED -e"s/\s\+/ /g" \
+ | $CUT -d" " -f2`
fi
if [ -z "$GLOBALUMASK" ]; then