chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e472d47
)
label: if the selinux policy knows no label, then silently don't do anything
author
Lennart Poettering
<lennart@poettering.net>
Mon, 18 Oct 2010 20:47:57 +0000
(22:47 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Mon, 18 Oct 2010 20:47:57 +0000
(22:47 +0200)
src/label.c
patch
|
blob
|
history
diff --git
a/src/label.c
b/src/label.c
index 8b807847fd883db4d1cba9dce41d9c0c6850c006..fb570c54a50d5c6693e0c9e464a266136d3fb161 100644
(file)
--- a/
src/label.c
+++ b/
src/label.c
@@
-76,11
+76,16
@@
int label_fix(const char *path) {
if (r == 0) {
r = selabel_lookup_raw(label_hnd, &fcon, path, st.st_mode);
+ /* If there's no label to set, then exit without warning */
+ if (r < 0 && errno == ENOENT)
+ return 0;
+
if (r == 0) {
r = setfilecon(path, fcon);
freecon(fcon);
}
}
+
if (r < 0) {
log_full(security_getenforce() == 1 ? LOG_ERR : LOG_DEBUG,
"Unable to fix label of %s: %m", path);