Displaying 2 results from an estimated 2 matches for "do_setcon".
Did you mean:
do_getcon
2009 Aug 13
7
[PATCHx7] Misc patches
...eaa1..575baf5 100644
--- a/daemon/selinux.c
+++ 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 HA...
2012 Feb 01
1
[PATCH] Clarify the error message when unavailable functions are called (RHBZ#679737).
...c
@@ -1,5 +1,5 @@
/* libguestfs - the guestfsd daemon
- * Copyright (C) 2009 Red Hat Inc.
+ * Copyright (C) 2009-2012 Red Hat Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -60,7 +60,7 @@ do_setcon (const char *context)
return 0;
#else
- NOT_AVAILABLE (-1);
+ NOT_AVAILABLE (selinux, -1);
#endif
}
@@ -85,6 +85,6 @@ do_getcon (void)
return r; /* caller frees */
#else
- NOT_AVAILABLE (NULL);
+ NOT_AVAILABLE (selinux, NULL);
#endif
}
diff --git a/daemon/s...