On 4/15/14, 6:20 AM, Jan Lieskovsky wrote:
Hello Shawn,
----- Original Message -----
> >From: "Shawn Wells"
> >Sent: Monday, April 14, 2014 6:34:53 PM
> >Subject: [PATCH 01/15] New Remediation
Tried this one, and there's a typo / missing backslash before
the opening bracket in the -perm 0002 subpart, producing the
following error currently (with the patch applied):
# bash sticky_world_writable_dirs.sh
sticky_world_writable_dirs.sh: line 3: syntax error near unexpected token `('
sticky_world_writable_dirs.sh: line 3: `( -perm -0002 -a ! -perm -1000 \) 2>/dev/null
\'
When the fix has the form of (i.e. with that backslash added):
df --local -P | awk {'if (NR!=1) print $6'} \
| xargs -I '{}' find '{}' -xdev -type d \
\( -perm -0002 -a ! -perm -1000 \) 2>/dev/null \
| xargs chmod a+t
it works.
So conditional NACK till this is solved (+ the concerns Jeff raised if
applicable to this change too), but otherwise looks fine.
Updated & will
resubmit shortly