Commit Graph

3 Commits

Author SHA1 Message Date
Richard Haines
dd29dc9c43 setools-V4: libqpol policy V30 updates (xen/xperm statements)
Updated libqpol services to use the latest checkpolicy 2.4 source
files to support Xen and extended permissions (allowxperm etc.).

TODO: Add support for querying the xperm values.

Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
2016-03-21 10:56:37 -04:00
Nicolas Iooss
edca1ac4c7 Treat literal strings as constant
Literal strings are located in read-only memory and should be "const
char*".  "gcc -Wwrite-strings" warns when using non-const literal
strings with messages like:

    libqpol/policy_parse.y: In function 'yyparse':
    libqpol/policy_parse.y:381:21: warning: passing argument 1 of
    'insert_id' discards 'const' qualifier from pointer target type
         { if (insert_id("T",0)) return -1; }
                     ^

Fix these warnings by using "const char*" instead of "char*" for some
function parameters.

This makes gcc report other warnings about hashtab_search (from
libsepol).  This function incorrectly defines its second parameter as
"char *const key" instead of "const char* key" (this fact is hidden
behind hashtab_key_t typedef).
2014-11-02 13:02:59 -05:00
Chris PeBenito
8363f8edf7 Import libqpol from setools3.
Break setools3 dependence. Also fix SWIG wrapper to work with SWIG 2.x.
2014-10-24 21:00:24 -04:00