summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/common/credentials.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/credentials.cpp b/src/common/credentials.cpp
index 171326ea..9bf8d708 100644
--- a/src/common/credentials.cpp
+++ b/src/common/credentials.cpp
@@ -22,6 +22,7 @@
#include <unistd.h>
#include <sys/socket.h>
+#include "smack-check.h"
#include "smack-labels.h"
#include "credentials.h"
@@ -30,7 +31,7 @@ namespace SecurityManager {
Credentials Credentials::getCredentialsFromSelf(void)
{
return Credentials(getpid(), geteuid(), getegid(),
- SmackLabels::getSmackLabelFromSelf());
+ smack_check() ? SmackLabels::getSmackLabelFromSelf() : "");
}
Credentials Credentials::getCredentialsFromSocket(int sock)