]> git.ipfire.org Git - thirdparty/lxc.git/commit
Check for symlinks before attempting create.
authorMichael H. Warfield <mhw@WittsEnd.com>
Fri, 25 Apr 2014 16:06:44 +0000 (12:06 -0400)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Mon, 28 Apr 2014 15:19:01 +0000 (10:19 -0500)
commit09227be2868d5d4e73dace2e286ce36d7c51cb01
treea664f2bdefba1ac7ffe002e7e7571620db5aa185
parent276a086264a0fc1703128578d38c0574127a1c2f
Check for symlinks before attempting create.

Check for symlinks before attempting create.

When attempting to create the compulsory symlinks in /dev,
check for the existence of the link using stat first before
blindly attempting to create the link.

This works around an apparent quirk in the kernel VFS on read-only
file systems where the returned error code might be EEXIST or EROFS
depending on previous access to the /dev directory and its entries.

Reported-by: William Dauchy <william@gandi.net>
Signed-off-by: Michael H. Warfield <mhw@WittsEnd.com>
Tested-by: William Dauchy <william@gandi.net>
src/lxc/conf.c