Filewatcher File Search
FTP Search
  
Directory (beta)
  
Content Search (beta)
   
pkg://joe-3.5-5.fc9.src.rpm:629469/joe-3.4-selinux.patch  info  downloads

--- joe-3.4/ufile.c.selinux	2006-05-26 19:42:31.000000000 +0200
+++ joe-3.4/ufile.c	2006-05-31 11:37:29.000000000 +0200
@@ -17,7 +17,7 @@
 #endif
 #endif
 
-#ifdef WITH_SELINUX
+#ifdef HAVE_SELINUX
 int copy_security_context(const char *from_file, const char *to_file);
 #endif
 
@@ -159,7 +159,7 @@
 	utime(to, &utbuf);
 #endif
 
-#ifdef WITH_SELINUX
+#ifdef HAVE_SELINUX
 	copy_security_context(from,to);
 #endif
 
--- joe-3.4/configure.selinux	2006-05-30 20:05:13.000000000 +0200
+++ joe-3.4/configure	2006-05-31 11:39:15.000000000 +0200
@@ -5659,7 +5659,7 @@
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_SELINUX 1
 _ACEOF
-
+LIBS="$LIBS -lselinux"
 fi
 
 # Checks for typedefs, structures, and compiler characteristics.
--- joe-3.4/selinux.c.selinux	2006-05-22 15:33:09.000000000 +0200
+++ joe-3.4/selinux.c	2006-05-31 11:36:50.000000000 +0200
@@ -4,7 +4,9 @@
  */
 #include "types.h"
 
-#ifdef WITH_SELINUX
+#include "config.h"
+
+#ifdef HAVE_SELINUX
 #include <selinux/selinux.h>
 static int selinux_enabled = -1;
 #endif
@@ -13,7 +15,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;
 
@@ -38,9 +40,7 @@
 	}
 
 	if (getfilecon(to_file, &to_context) < 0) {
-		MSG_PUTS(_(joe_gettext(_("\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;
 	}
@@ -63,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)
@@ -102,7 +102,7 @@
 int
 reset_default_security_context()
 {
-#ifdef WITH_SELINUX
+#ifdef HAVE_SELINUX
 	if (selinux_enabled == -1)
 		selinux_enabled = (is_selinux_enabled() > 0);
 
@@ -121,7 +121,7 @@
 int
 output_security_context(char *from_file)
 {
-#ifdef WITH_SELINUX
+#ifdef HAVE_SELINUX
 	security_context_t scontext;
 
 	if (selinux_enabled == -1)
@@ -153,7 +153,7 @@
 
 /*
   Test program compile using the following command
-  cc -o t t.c -DWITH_SELINUX -DTEST -lselinux
+  cc -o t t.c -DHAVE_SELINUX -DTEST -lselinux
  */
 
 #include <stdio.h>
Results 1 - 1
Help - FTP Sites List - Software Dir.
Searching half a billion files worldwide
© 1997-2008 IT MARUHN