summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
a4d7408)
With SElinux feature enabled on Client, sanity.sh test_103a failed
with 'Host key verification failure'. "ls -l" command was producing
'.' at the end to indicate extra security attributes when SElinux is
is enabled.
Hence, modifying filtering by not allowing '.' in the output. Files
modified are as follows: cp.test, misc.test, permission.test,
setfacl.test, 974.test, 4924.test .
Signed-off-by: Saurabh Tandan <saurabh.tandan@intel.com>
Change-Id: I725c1aa095f1a9feac521675cf29faa0a750598e
Reviewed-on: http://review.whamcloud.com/17529
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
$ cd 4924
$ touch f
$ chmod u=rwx,g=rwxs f
$ cd 4924
$ touch f
$ chmod u=rwx,g=rwxs f
- $ ls -l f | awk -- '{ print $1, $3, $4 }'
+ $ ls -l f | awk -- '{sub(/\\./, "", $1); print $1, $3, $4 }'
> -rwxrwsr-- root root
$ touch f
> -rwxrwsr-- root root
$ touch f
- $ ls -l f | awk -- '{ print $1, $3, $4 }'
+ $ ls -l f | awk -- '{sub(/\\./, "", $1); print $1, $3, $4 }'
> -rwxrwsr-- root root
$ cd ..
$ rm -rf 4924
> -rwxrwsr-- root root
$ cd ..
$ rm -rf 4924
$ mkdir 974
$ touch 974/f1
$ mkdir 974
$ touch 974/f1
- $ ls -dl 974/f1 | awk '{ print $1 }'
+ $ ls -dl 974/f1 | awk '{sub(/\\./, "", $1); print $1 }'
> -rw-r--r--
$ setfacl -R -d -m mask:007 974
> -rw-r--r--
$ setfacl -R -d -m mask:007 974
- $ ls -dl f3 | awk '{ print $1 }'
+ $ ls -dl f3 | awk '{sub(/\\./, "", $1); print $1 }'
> -rw-------
$ rm -rf 974
> -rw-------
$ rm -rf 974
- $ ls -l g | awk -- '{ print $1 }'
+ $ ls -l g | awk -- '{sub(/\\./, "", $1); print $1 }'
Symlink in directory with default ACL?
$ ln -s d d/l
Symlink in directory with default ACL?
$ ln -s d d/l
- $ ls -dl d/l | awk '{print $1}'
+ $ ls -dl d/l | awk 'sub(/\\./, "", $1); {print $1}'
> lrwxrwxrwx
$ ls -dl -L d/l | awk '{print $1}'
> lrwxrwxrwx
$ ls -dl -L d/l | awk '{print $1}'
Reset to base entries
$ setfacl -b d
Reset to base entries
$ setfacl -b d
- $ ls -dl d | awk '{print $1}'
+ $ ls -dl d | awk '{sub(/\\./, "", $1); print $1}'
> drwxr-x---
$ getfacl --omit-header d
> drwxr-x---
$ getfacl --omit-header d
Now, chmod should change the group_obj entry
$ chmod 775 d
Now, chmod should change the group_obj entry
$ chmod 775 d
- $ ls -dl d | awk '{print $1}'
+ $ ls -dl d | awk '{sub(/\\./, "", $1); print $1}'
> drwxrwxr-x
$ getfacl --omit-header d
> drwxrwxr-x
$ getfacl --omit-header d
$ cd d
$ umask 027
$ touch f
$ cd d
$ umask 027
$ touch f
- $ ls -l f | awk -- '{ print $1, $3, $4 }'
+ $ ls -l f | awk -- '{sub(/\\./, "", $1); print $1, $3, $4 }'
gives user bin write access.
$ chown bin:bin f
gives user bin write access.
$ chown bin:bin f
- $ ls -l f | awk -- '{ print $1, $3, $4 }'
+ $ ls -l f | awk -- '{sub(/\\./, "", $1); print $1, $3, $4 }'
> -rw-r----- bin bin
$ su bin
$ echo bin >> f
> -rw-r----- bin bin
$ su bin
$ echo bin >> f
$ mkdir -m 600 x
$ chown daemon:daemon x
$ echo j > x/j
$ mkdir -m 600 x
$ chown daemon:daemon x
$ echo j > x/j
- $ ls -l x/j | awk -- '{ print $1, $3, $4 }'
+ $ ls -l x/j | awk -- '{sub(/\\./, "", $1); print $1, $3, $4 }'
> -rw-r----- root root
$ setfacl -m u:daemon:r x
> -rw-r----- root root
$ setfacl -m u:daemon:r x
- $ ls -l x/j | awk -- '{ print $1, $3, $4 }'
+ $ ls -l x/j | awk -- '{sub(/\\./, "", $1); print $1, $3, $4 }'
> -rw-r----- root root
(With the bug this gives: `ls: x/j: Permission denied'.)
> -rw-r----- root root
(With the bug this gives: `ls: x/j: Permission denied'.)
$ sg bin
$ umask 027
$ touch g
$ sg bin
$ umask 027
$ touch g
- $ ls -dl g | awk '{print $1}'
+ $ ls -dl g | awk '{sub(/\\./, "", $1); print $1}'
> -rw-r-----
$ setfacl -m m:- g
> -rw-r-----
$ setfacl -m m:- g