Code review comment for lp:~gandelman-a/ubuntu/precise/keystone/lp900553

Revision history for this message
Scott Moser (smoser) wrote :

the only comment i have is really on the previous code that was here:
If the user had set up for one of these directories to be symlinked
elsewhere, the chown will not correctly affect the target.

example:
$ mkdir /tmp/tmpx
$ touch /tmp/tmpx/foo
$ ls -l /tmp/tmpx/foo
-rw-rw-r-- 1 smoser smoser 0 Dec 6 15:16 /tmp/tmpx/foo
$ ln -snf /tmp/tmpx /tmp/tmpx.link
$ ls -l /tmp/tmpx/foo /tmp/tmpx.link
-rw-rw-r-- 1 smoser smoser 0 Dec 6 15:16 /tmp/tmpx/foo
lrwxrwxrwx 1 smoser smoser 9 Dec 6 15:17 /tmp/tmpx.link -> /tmp/tmpx
$ sudo chown -R root:root /tmp/tmpx.link
$ ls -l /tmp/tmpx/foo /tmp/tmpx.link
-rw-rw-r-- 1 smoser smoser 0 Dec 6 15:16 /tmp/tmpx/foo
lrwxrwxrwx 1 root root 9 Dec 6 15:17 /tmp/tmpx.link -> /tmp/tmpx
$ sudo chown -R root:root /tmp/tmpx.link/
$ ls -l /tmp/tmpx/foo /tmp/tmpx.link
-rw-rw-r-- 1 root root 0 Dec 6 15:16 /tmp/tmpx/foo
lrwxrwxrwx 1 root root 9 Dec 6 15:17 /tmp/tmpx.link -> /tmp/tmpx

Basically, I think you should have the trailing / on the directories.

« Back to merge proposal