Files
systemd/src
Djalal Harouni af7fce1cdb install: create_symlink() check unlink() return value
create_symlink() do not check the return value of unlink(), this may
confuse the user.

Before the unlink() call we check the 'force' argument. If it is not set
we fail with -EEXIST, otherwise we unlink() the file, therefore the next
symlink() should not fail with -EEXIST (do not count races...).

However since callers may not have appropriate privileges to unlink()
the file we lose the -EPERM or any other errno code of unlink(), and
return the -EEXIST of the next symlink(). Fix this by checking unlink()
results.

Before:
$ systemctl --force --root=~/container-03 set-default multi-user.target
Failed to set default target: File exists

After:
$ systemctl --force --root=~/container-03 set-default multi-user.target
Failed to set default target: Permission denied
2014-04-16 23:13:22 -04:00
..
2014-03-17 01:55:48 -04:00
2014-04-07 21:02:33 -04:00
2014-02-19 17:53:50 +01:00
2014-04-14 21:02:20 +02:00
2014-02-19 17:53:50 +01:00
2014-03-24 23:46:13 +01:00
2014-04-12 17:23:13 -04:00
2013-11-18 20:28:55 -05:00
2013-10-03 22:13:55 -04:00
…