Displaying 2 results from an estimated 2 matches for "have_setcon".
2009 Aug 13
7
[PATCHx7] Misc patches
...+++ b/daemon/selinux.c
@@ -30,8 +30,6 @@
#include "daemon.h"
#include "actions.h"
-#ifdef HAVE_LIBSELINUX
-
/* setcon is only valid under the following circumstances:
* - single threaded
* - enforcing=0
@@ -39,7 +37,7 @@
int
do_setcon (const char *context)
{
-#ifdef HAVE_SETCON
+#if defined(HAVE_LIBSELINUX) && defined(HAVE_SETCON)
if (setcon ((char *) context) == -1) {
reply_with_perror ("setcon");
return -1;
@@ -55,7 +53,7 @@ do_setcon (const char *context)
char *
do_getcon (void)
{
-#ifdef HAVE_GETCON
+#if defined(HAVE_LIBSELINUX) &...
2012 Feb 01
1
[PATCH] Clarify the error message when unavailable functions are called (RHBZ#679737).
From: "Richard W.M. Jones" <rjones at redhat.com>
Callers are supposed to use the availability API to check for
functions that may not be available in particular builds of
libguestfs. If they don't do this, currently they tend to get obscure
error messages, eg:
libguestfs: error: zerofree: /dev/vda1: zerofree: No such file or directory
This commit changes the error