fs-util: replace symlink_atomic_full_label() by a flag to symlinkat_atomic_full()
More porting work to label_ops_pre()/label_ops_post() This also enables labelling of the /etc/localtime symlink in systemd-firstboot, which should address one small facet of #37857
This commit is contained in:
@@ -2471,9 +2471,7 @@ static int create_symlink(Context *c, Item *i) {
|
||||
|
||||
fd = safe_close(fd);
|
||||
|
||||
mac_selinux_create_file_prepare(i->path, S_IFLNK);
|
||||
r = symlinkat_atomic_full(i->argument, pfd, bn, /* make_relative= */ false);
|
||||
mac_selinux_create_file_clear();
|
||||
r = symlinkat_atomic_full(i->argument, pfd, bn, SYMLINK_LABEL);
|
||||
if (IN_SET(r, -EISDIR, -EEXIST, -ENOTEMPTY)) {
|
||||
r = rm_rf_child(pfd, bn, REMOVE_PHYSICAL);
|
||||
if (r < 0)
|
||||
|
||||
Reference in New Issue
Block a user