]> granicus.if.org Git - shadow/commitdiff
Extend checks for changing U/GID in home directory
authorNicolas François <nicolas.francois@centraliens.net>
Sat, 20 Sep 2014 21:59:46 +0000 (23:59 +0200)
committerNicolas François <nicolas.francois@centraliens.net>
Sat, 20 Sep 2014 22:36:23 +0000 (00:36 +0200)
Add files with user or group owner different from the user.

tests/usertools/usermod/50_usermod_change_uid+move_homedir/data/home_ls-a
tests/usertools/usermod/50_usermod_change_uid+move_homedir/usermod.test

index 89bbbd9a456de4825db82d577fe79e8ec80c3ce3..161c30fcffb89b0998680c5413e528a241668ed2 100644 (file)
@@ -1,3 +1,5 @@
 -rw-r--r-- foo:foo `/home/foo2/toto'
+-rw-r--r-- foo:root `/home/foo2/groot'
+-rw-r--r-- root:foo `/home/foo2/uroot'
 drwxr-xr-x foo:foo `/home/foo2/.'
 drwxr-xr-x root:root `/home/foo2/..'
index addb39044fe7e70b0df6e62105c05dee19a49b5f..6ac347c7fa42499ba416ecce28252f56defda171 100755 (executable)
@@ -18,7 +18,11 @@ change_config
 
 mkdir /home/foo
 echo toto > /home/foo/toto
+echo root > /home/foo/uroot
+echo root > /home/foo/groot
 chown -R foo:foo /home/foo
+chown root /home/foo/uroot
+chgrp root /home/foo/groot
 
 echo -n "Change the user's home directory (usermod -m -d /home/foo2 -u 1001 foo)..."
 usermod -m -d /home/foo2 -u 1001 foo