libsmack: parse whole access type string, not only first 5 bytes.
authorRafal Krypa <r.krypa@samsung.com>
Thu, 3 Jan 2013 09:34:34 +0000 (10:34 +0100)
committerRafal Krypa <r.krypa@samsung.com>
Tue, 26 Mar 2013 17:54:17 +0000 (18:54 +0100)
Previous version of this function parsed only first ACC_LEN (5)
characters of access_type. Now the whole string will be read.

This will prevent silent ignoring of access type characters in cases
like "-rwxat" or "rrwxat".

libsmack/libsmack.c

index f57bbe4..1a025c2 100644 (file)
@@ -611,7 +611,7 @@ static inline int access_type_to_int(const char *access_type)
        unsigned access;
 
        access = 0;
-       for (i = 0; i < ACC_LEN && access_type[i] != '\0'; i++)
+       for (i = 0; access_type[i] != '\0'; i++)
                switch (access_type[i]) {
                case 'r':
                case 'R':