From: INSUN PYO Date: Wed, 7 Mar 2018 07:40:53 +0000 (+0900) Subject: logind: change smack label /run/user/%UID/system_share to "*" X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2c40f68f6d7164a00eaaaa3d8fde3524ee072c55;p=platform%2Fupstream%2Fsystemd.git logind: change smack label /run/user/%UID/system_share to "*" --- diff --git a/src/login/logind-user.c b/src/login/logind-user.c index 15d0fed..d4b6e05 100644 --- a/src/login/logind-user.c +++ b/src/login/logind-user.c @@ -21,6 +21,7 @@ #include #include #include +#include #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; }