summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafal Krypa <r.krypa@samsung.com>2016-09-30 12:27:33 +0200
committerGihun Chang <gihun.chang@samsung.com>2017-02-02 14:59:39 -0800
commit95290783eda521c96eee10596456b0559b25bf13 (patch)
treef682c5c622b7e2082c731302125cc57f02d48b95
parent0ba9cafb5b81b669b4714cfacbd1566c14f2e13b (diff)
downloadttrace-95290783eda521c96eee10596456b0559b25bf13.tar.gz
ttrace-95290783eda521c96eee10596456b0559b25bf13.tar.bz2
ttrace-95290783eda521c96eee10596456b0559b25bf13.zip
Replace usage of deprecated libsmack function
The libsmack function smack_setlabel is deprecated and will be removed. Using the alternative instead. Change-Id: Ia02383700175ba1e4eb91c85e4aa17c4033290f6 Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
-rwxr-xr-xsrc/atrace/atrace.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/atrace/atrace.cpp b/src/atrace/atrace.cpp
index 3fc0952..fff7369 100755
--- a/src/atrace/atrace.cpp
+++ b/src/atrace/atrace.cpp
@@ -33,6 +33,7 @@
#include <sys/file.h>
#include <sys/stat.h>
#include <sys/smack.h>
+#include <linux/xattr.h>
#include <unistd.h>
#include "ttrace.h"
#define TTRACE_TAG_NONE 9999
@@ -255,7 +256,7 @@ static bool setFilePermission (const char *path, const mode_t perms) {
//fprintf(stderr, "path: %s, perms: %d, gid: %d\n", path,perms, group_dev.gr_gid);
if (0 > chown(path, 0, group_dev.gr_gid)) return false;
if (0 > chmod(path, perms)) return false;
- if (0 > smack_setlabel(path, "*", SMACK_LABEL_ACCESS)) return false;
+ if (0 > smack_set_label_for_path(path, XATTR_NAME_SMACK, false, "*")) return false;
return true;
}