chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
smack: set loaded_policy in smack_setup()
[elogind.git]
/
src
/
core
/
smack-setup.c
diff --git
a/src/core/smack-setup.c
b/src/core/smack-setup.c
index 611bfdb2df155b20e51bf84ff95a478246c50ec9..a68605c27216407a49e45a8d007bda77af5c9372 100644
(file)
--- 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
#endif
-int smack_setup(
void
) {
+int smack_setup(
bool *loaded_policy
) {
#ifdef HAVE_SMACK
int r;
#ifdef HAVE_SMACK
int r;
+ assert(loaded_policy);
+
r = write_rules("/sys/fs/smackfs/load2", SMACK_CONFIG);
switch(r) {
case -ENOENT:
r = write_rules("/sys/fs/smackfs/load2", SMACK_CONFIG);
switch(r) {
case -ENOENT:
@@
-163,6
+165,8
@@
int smack_setup(void) {
return 0;
}
return 0;
}
+ *loaded_policy = true;
+
#endif
return 0;
#endif
return 0;