projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dad1df1
)
logind: change smack label /run/user/%UID/system_share to "*"
author
INSUN PYO
<insun.pyo@samsung.com>
Wed, 7 Mar 2018 07:40:53 +0000
(16:40 +0900)
committer
Łukasz Stelmach
<l.stelmach@samsung.com>
Mon, 12 Feb 2024 15:37:43 +0000
(16:37 +0100)
src/login/logind-user.c
patch
|
blob
|
history
diff --git
a/src/login/logind-user.c
b/src/login/logind-user.c
index
15d0fed
..
d4b6e05
100644
(file)
--- a/
src/login/logind-user.c
+++ b/
src/login/logind-user.c
@@
-21,6
+21,7
@@
#include <string.h>
#include <sys/mount.h>
#include <unistd.h>
+#include <sys/xattr.h>
#include "alloc-util.h"
#include "bus-common-errors.h"
@@
-351,6
+352,12
@@
static int user_mkdir_system_share_path(User *u) {
if (r < 0)
return log_error_errno(r, "Failed to create '%s': %m", t);
+ if (mac_smack_use()) {
+ r = lsetxattr(t, "security.SMACK64", SMACK_STAR_LABEL, strlen(SMACK_STAR_LABEL), 0);
+ if (r < 0)
+ return log_error_errno(r, "Failed to apply smack label * to '%s': %m", t);
+ }
+
return 0;
}