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:
d53e386
)
smack: never follow symlinks when relabelling
author
Lennart Poettering
<lennart@poettering.net>
Thu, 23 Oct 2014 16:32:22 +0000
(18:32 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Thu, 23 Oct 2014 19:36:56 +0000
(21:36 +0200)
previously mac_smack_apply(path, NULL) would operate on the symlink
itself while mac_smack_apply(path, "foo") would follow the symlink.
Let's clean this up an always operate on the symlink, which appears to
be the safer option.
src/shared/smack-util.c
patch
|
blob
|
history
diff --git
a/src/shared/smack-util.c
b/src/shared/smack-util.c
index 4a94922a4309e8e33a5db744dae09838a222c735..c345488d2ed99f89afa6b5f01207514e76c59ca2 100644
(file)
--- a/
src/shared/smack-util.c
+++ b/
src/shared/smack-util.c
@@
-50,7
+50,7
@@
int mac_smack_apply(const char *path, const char *label) {
return 0;
if (label)
- r = setxattr(path, "security.SMACK64", label, strlen(label), 0);
+ r =
l
setxattr(path, "security.SMACK64", label, strlen(label), 0);
else
r = lremovexattr(path, "security.SMACK64");
if (r < 0)