]> git.ipfire.org Git - thirdparty/coreutils.git/commit
chcon: use security_check_context() for context validation
authorNamhyung Kim <namhyung@gmail.com>
Mon, 30 Jun 2014 15:12:41 +0000 (00:12 +0900)
committerPádraig Brady <P@draigBrady.com>
Tue, 1 Jul 2014 14:45:53 +0000 (15:45 +0100)
commite4081e44e0dcc4bfe11d0da0ae47518df087349d
treeabb29dd2a28dc5cd95d3511ba25251cea2ed6af7
parent3e89d5bb9b34861c17cd23f5efd8323eec4f0bab
chcon: use security_check_context() for context validation

context_new() and _free() are used for checking validity of a
specified context.  libselinux provides security_check_context
for this purpose so use it.

Note that context_new() can fail for a valid context - e.g. ENOMEM.

* src/chcon.c (main): Use security_check_context().
src/chcon.c