diff options
author | Ćukasz Stelmach <l.stelmach@samsung.com> | 2013-12-19 15:15:54 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-02-24 17:36:13 +0100 |
commit | e49d3c016751c03e544697656e8e596af8a664d7 (patch) | |
tree | f9bf2c589b1a3b8d70c019355aa553b042f5c7cd /src/core/smack-setup.c | |
parent | 2453d7e447057f2652114c1822bfc8c5600236fe (diff) |
smack: set loaded_policy in smack_setup()
With loaded_policy set to true mount_setup() relabels /dev properly.
Diffstat (limited to 'src/core/smack-setup.c')
-rw-r--r-- | src/core/smack-setup.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/smack-setup.c b/src/core/smack-setup.c index 611bfdb2df..a68605c272 100644 --- a/src/core/smack-setup.c +++ b/src/core/smack-setup.c @@ -116,12 +116,14 @@ static int write_rules(const char* dstpath, const char* srcdir) { #endif -int smack_setup(void) { +int smack_setup(bool *loaded_policy) { #ifdef HAVE_SMACK int r; + assert(loaded_policy); + r = write_rules("/sys/fs/smackfs/load2", SMACK_CONFIG); switch(r) { case -ENOENT: @@ -163,6 +165,8 @@ int smack_setup(void) { return 0; } + *loaded_policy = true; + #endif return 0; |