mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-06 21:51:37 +00:00
Revert "timedated: correctly set context on /etc/localtime"
This reverts commit 22eade6dd8.
This commit was never supposed to be pushed.
This commit is contained in:
@@ -78,21 +78,3 @@ int symlink_label(const char *old_path, const char *new_path) {
|
||||
|
||||
return mac_smack_fix(new_path, false, false);
|
||||
}
|
||||
|
||||
int symlink_label_atomic(const char *old_path, const char *new_path) {
|
||||
int r;
|
||||
|
||||
assert(old_path);
|
||||
assert(new_path);
|
||||
|
||||
r = mac_selinux_create_file_prepare(new_path, S_IFLNK);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
r = symlink_atomic(old_path, new_path);
|
||||
mac_selinux_create_file_clear();
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
return mac_smack_fix(new_path, false, false);
|
||||
}
|
||||
|
||||
@@ -28,4 +28,3 @@ int label_fix(const char *path, bool ignore_enoent, bool ignore_erofs);
|
||||
|
||||
int mkdir_label(const char *path, mode_t mode);
|
||||
int symlink_label(const char *old_path, const char *new_path);
|
||||
int symlink_label_atomic(const char *old_path, const char *new_path);
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
#include "clock-util.h"
|
||||
#include "conf-files.h"
|
||||
#include "path-util.h"
|
||||
#include "label.h"
|
||||
#include "fileio-label.h"
|
||||
#include "label.h"
|
||||
#include "bus-util.h"
|
||||
@@ -124,8 +123,7 @@ static int context_write_data_timezone(Context *c) {
|
||||
if (!p)
|
||||
return log_oom();
|
||||
|
||||
mac_selinux_init("/etc");
|
||||
r = symlink_label_atomic(p, "/etc/localtime");
|
||||
r = symlink_atomic(p, "/etc/localtime");
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user