summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyotaek Shim <hyotaek.shim@samsung.com>2017-06-01 21:04:46 +0900
committerHyotaek Shim <hyotaek.shim@samsung.com>2017-06-01 21:04:46 +0900
commit359b85307eac41c867ac6cafaaec1154c9396f47 (patch)
treebcfffe9971d3c3ce7a2a5c8dd82147a0bb0ff935
parenta3ded0117f8e5e99367511db01b410f890df1366 (diff)
downloadsystem-plugin-359b85307eac41c867ac6cafaaec1154c9396f47.tar.gz
system-plugin-359b85307eac41c867ac6cafaaec1154c9396f47.tar.bz2
system-plugin-359b85307eac41c867ac6cafaaec1154c9396f47.zip
Change-Id: I27169864b922e528a52db25ef24ecf5121643a95 Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
-rw-r--r--src/systemd-user-helper/systemd-user-helper.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/systemd-user-helper/systemd-user-helper.c b/src/systemd-user-helper/systemd-user-helper.c
index 5fb1057..5b634a5 100644
--- a/src/systemd-user-helper/systemd-user-helper.c
+++ b/src/systemd-user-helper/systemd-user-helper.c
@@ -353,6 +353,12 @@ int run_child(int argc, const char *argv[], char* user_id)
fprintf(stderr, "failed to fork");
r = -errno;
} else if (pid == 0) {
+ r = change_smack_for_user_session();
+ if (r != 0) {
+ fprintf(stderr, "failed to change smack\n");
+ return r;
+ }
+
for (i = 0; i < _NSIG; ++i)
signal(i, SIG_DFL);
@@ -393,12 +399,6 @@ int main(int argc, char *argv[])
fprintf(stderr, "mount user_ext failed\n");
return r;
}
- r = change_smack_for_user_session();
- if(r != 0)
- {
- fprintf(stderr, "failed to change smack\n");
- return r;
- }
/* pre-processing */
r = normal_user_preprocess(username);