chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
journal: move type_to_context() to journal-file.c
[elogind.git]
/
src
/
shared
/
fileio-label.c
diff --git
a/src/shared/fileio-label.c
b/src/shared/fileio-label.c
index 417ca5695a956e62455d3b15873e38fdabed9003..294c9e6badd47b71568a5a173222211cd36fb829 100644
(file)
--- a/
src/shared/fileio-label.c
+++ b/
src/shared/fileio-label.c
@@
-30,13
+30,13
@@
int write_string_file_atomic_label(const char *fn, const char *line) {
int r;
int write_string_file_atomic_label(const char *fn, const char *line) {
int r;
- r =
label_context_set
(fn, S_IFREG);
+ r =
mac_selinux_create_file_prepare
(fn, S_IFREG);
if (r < 0)
return r;
if (r < 0)
return r;
- write_string_file_atomic(fn, line);
+
r =
write_string_file_atomic(fn, line);
-
label_context
_clear();
+
mac_selinux_create_file
_clear();
return r;
}
return r;
}
@@
-44,13
+44,13
@@
int write_string_file_atomic_label(const char *fn, const char *line) {
int write_env_file_label(const char *fname, char **l) {
int r;
int write_env_file_label(const char *fname, char **l) {
int r;
- r =
label_context_set
(fname, S_IFREG);
+ r =
mac_selinux_create_file_prepare
(fname, S_IFREG);
if (r < 0)
return r;
if (r < 0)
return r;
- write_env_file(fname, l);
+
r =
write_env_file(fname, l);
-
label_context
_clear();
+
mac_selinux_create_file
_clear();
return r;
}
return r;
}
@@
-59,13
+59,13
@@
int fopen_temporary_label(const char *target,
const char *path, FILE **f, char **temp_path) {
int r;
const char *path, FILE **f, char **temp_path) {
int r;
- r =
label_context_set("/etc/passwd"
, S_IFREG);
+ r =
mac_selinux_create_file_prepare(target
, S_IFREG);
if (r < 0)
return r;
r = fopen_temporary(path, f, temp_path);
if (r < 0)
return r;
r = fopen_temporary(path, f, temp_path);
-
label_context
_clear();
+
mac_selinux_create_file
_clear();
return r;
}
return r;
}