Add support for new access mode for setting locks ("l")
authorRafal Krypa <r.krypa@samsung.com>
Fri, 26 Jul 2013 10:39:16 +0000 (12:39 +0200)
committerRafal Krypa <r.krypa@samsung.com>
Mon, 19 Aug 2013 12:13:59 +0000 (14:13 +0200)
[Issue#]       SSDWSSP-372
[Feature]      Properly work on system with new access mode enabled.
[Cause]        Additional Smack access implemented in kernel.
[Solution]     Extend appropriate arrays.
[Verification] Build, install, run tests.

Change-Id: I745ade7ae15aa231882e9d7cacfa35ed4fc2f29e

src/privilege-control.c

index 488f0f5..8486250 100644 (file)
@@ -69,7 +69,7 @@
 #define SMACK_DATA_SUFFIX       "_data"
 #define WRT_BASE_DEVCAP         "WRT"
 #define WRT_CLIENT_PATH         "/usr/bin/wrt-client"
-#define ACC_LEN                 5
+#define ACC_LEN                 6
 #define TIZEN_PRIVILEGE_ANTIVIRUS  "http://tizen.org/privilege/antivirus"
 #define TIZEN_PRIVILEGE_APPSETTING "http://tizen.org/privilege/appsetting"
 #define PATH_RULES_PUBLIC_RO       "PATH_RULES_PUBLIC_RO.smack"
@@ -1478,7 +1478,7 @@ API int app_label_dir(const char* label, const char* path)//deprecated
 
 int smack_get_access_new(const char* subject, const char* object, char** label)
 {
-       char buff[ACC_LEN] = {'r', 'w', 'x', 'a', 't'};
+       char buff[ACC_LEN] = {'r', 'w', 'x', 'a', 't', 'l'};
        char perm[2] = {'-'};
        int i;