Filewatcher File Search
FTP Search
  
Directory (beta)
  
Content Search (beta)
   
pkg://joe-3.1-7.rhel4.src.rpm:396402/joe-3.1-selinux.patch  info  downloads

--- joe-3.1/selinux.c.foo	2004-09-25 00:04:37.000000000 -0400
+++ joe-3.1/selinux.c	2004-09-25 00:09:28.000000000 -0400
@@ -2,7 +2,9 @@
  * Example code to show how to copy the security context from one file to
  * another.
  */
-#ifdef WITH_SELINUX
+#include "config.h"
+
+#ifdef HAVE_SELINUX
 #include <selinux/selinux.h>
 static int selinux_enabled = -1;
 #endif
@@ -12,7 +14,7 @@
 copy_security_context(const char *from_file, const char *to_file)
 {
 	int status = 0;
-#ifdef WITH_SELINUX
+#ifdef HAVE_SELINUX
 	security_context_t from_context;
 	security_context_t to_context;
 
@@ -37,9 +39,8 @@
 	}
 
 	if (getfilecon(to_file, &to_context) < 0) {
-		MSG_PUTS(_("\nCould not get security context for "));
-		msg_outtrans(to_file);
-		msg_putchar('\n');
+		error(0, errno, "Could not get security context for %s",
+		      to_file);
 		freecon(from_context);
 		return 1;
 	}
@@ -62,7 +63,7 @@
 int
 match_default_security_context(const char *from_file)
 {
-#ifdef WITH_SELINUX
+#ifdef HAVE_SELINUX
 	security_context_t scontext;
 
 	if (selinux_enabled == -1)
@@ -101,7 +102,7 @@
 int
 reset_default_security_context()
 {
-#ifdef WITH_SELINUX
+#ifdef HAVE_SELINUX
 	if (selinux_enabled == -1)
 		selinux_enabled = (is_selinux_enabled() > 0);
 
@@ -120,7 +121,7 @@
 int
 output_security_context(char *from_file)
 {
-#ifdef WITH_SELINUX
+#ifdef HAVE_SELINUX
 	security_context_t scontext;
 
 	if (selinux_enabled == -1)
--- joe-3.1/ufile.c.foo	2004-09-25 00:07:15.000000000 -0400
+++ joe-3.1/ufile.c	2004-09-25 00:05:05.000000000 -0400
@@ -33,7 +33,7 @@
 #endif
 #endif
 
-#ifdef WITH_SELINUX
+#ifdef HAVE_SELINUX
 int copy_security_context(const char *from_file, const char *to_file);
 #endif
 
@@ -201,7 +201,7 @@
 	utime(to, &utbuf);
 #endif
 
-#ifdef WITH_SELINUX
+#ifdef HAVE_SELINUX
 	copy_security_context(from,to);
 #endif
 
--- joe-3.1/configure.foo	2004-09-25 00:15:09.000000000 -0400
+++ joe-3.1/configure	2004-09-25 00:15:29.000000000 -0400
@@ -5494,7 +5494,7 @@
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_SELINUX 1
 _ACEOF
-
+LIBS="$LIBS -lselinux"
 fi
 
 # Checks for typedefs, structures, and compiler characteristics.
Results 1 - 1
Help - FTP Sites List - Software Dir.
Searching half a billion files worldwide
© 1997-2008 IT MARUHN