From: <ssm...@us...> - 2007-09-18 19:40:10
|
Revision: 2563 http://selinux.svn.sourceforge.net/selinux/?rev=2563&view=rev Author: ssmalley Date: 2007-09-18 12:40:06 -0700 (Tue, 18 Sep 2007) Log Message: ----------- Author: Stephen Smalley Email: sd...@ty... Subject: libselinux, setfiles: fix selabel option flag setting Date: Tue, 18 Sep 2007 14:20:48 -0400 Fix selabel option flag setting to eliminate a build error on 64-bit. Modified Paths: -------------- trunk/libselinux/src/matchpathcon.c trunk/policycoreutils/setfiles/setfiles.c Modified: trunk/libselinux/src/matchpathcon.c =================================================================== --- trunk/libselinux/src/matchpathcon.c 2007-09-18 14:26:11 UTC (rev 2562) +++ trunk/libselinux/src/matchpathcon.c 2007-09-18 19:40:06 UTC (rev 2563) @@ -119,10 +119,10 @@ memset(options, 0, sizeof(options)); i = SELABEL_OPT_BASEONLY; options[i].type = i; - options[i].value = (char *)(flags & MATCHPATHCON_BASEONLY); + options[i].value = (flags & MATCHPATHCON_BASEONLY) ? (char*)1 : NULL; i = SELABEL_OPT_VALIDATE; options[i].type = i; - options[i].value = (char *)(flags & MATCHPATHCON_VALIDATE); + options[i].value = (flags & MATCHPATHCON_VALIDATE) ? (char*)1 : NULL; notrans = flags & MATCHPATHCON_NOTRANS; } Modified: trunk/policycoreutils/setfiles/setfiles.c =================================================================== --- trunk/policycoreutils/setfiles/setfiles.c 2007-09-18 14:26:11 UTC (rev 2562) +++ trunk/policycoreutils/setfiles/setfiles.c 2007-09-18 19:40:06 UTC (rev 2563) @@ -967,8 +967,8 @@ } /* Load the file contexts configuration and check it. */ - opts[0].value = (char *)ctx_validate; - opts[1].value = (char *)base_only; + opts[0].value = (ctx_validate ? (char*)1 : NULL); + opts[1].value = (base_only ? (char *)1 : NULL); opts[2].value = altpath; hnd = selabel_open(SELABEL_CTX_FILE, opts, 3); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |