From: Rafal Krypa Date: Tue, 7 Jan 2014 15:25:32 +0000 (+0100) Subject: libsmack: use 16 bits for smack access codes instead of sizeof(int) * 2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=422b3e890de18be3aa6da437017759e6b76b3c8e;p=framework%2Fsecurity%2Fsmack.git libsmack: use 16 bits for smack access codes instead of sizeof(int) * 2 There are 6 access bits to be stored in the access field. Special value -1 is used to distinguish set rules from change rules. Shrinking the filed to 8 bits still leaves space for one more future access bit. Signed-off-by: Rafal Krypa --- diff --git a/libsmack/libsmack.c b/libsmack/libsmack.c index 82a2b67..0e6eaea 100644 --- a/libsmack/libsmack.c +++ b/libsmack/libsmack.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -70,10 +71,10 @@ struct label_dict { }; struct smack_rule { + int8_t allow_code; + int8_t deny_code; int subject_id; int object_id; - int allow_code; - int deny_code; struct smack_rule *next; };