Sophie

Sophie

distrib > Fedora > 17 > i386 > media > updates-src > by-pkgid > ea668eee47f667f0dddecebf8f4c28a6 > files > 7

gogoc-1.2-17.fc17.src.rpm

diff -up gogoc-1_2-RELEASE/gogoc-tsp/src/tsp/tsp_setup.c.selinux_fix gogoc-1_2-RELEASE/gogoc-tsp/src/tsp/tsp_setup.c
--- gogoc-1_2-RELEASE/gogoc-tsp/src/tsp/tsp_setup.c.selinux_fix
+++ gogoc-1_2-RELEASE/gogoc-tsp/src/tsp/tsp_setup.c
@@ -37,14 +37,17 @@ Copyright (c) 2001-2007 gogo6 Inc. All rights reserved.
 sint32_t execScript( const char *cmd )
 {
   char buf[1024];
-  FILE* f_log;
+//  FILE* f_log;
   sint32_t retVal;
 
   // Run the command.
   memset( buf, 0, sizeof(buf) );
-  pal_snprintf( buf, sizeof(buf), "%s > %s", cmd, SCRIPT_TMP_FILE );
+  pal_snprintf( buf, sizeof(buf), "%s", cmd );
   retVal = pal_system( buf );
 
+/* Don't log the result of the command because this way
+ * causes a SELinux alarm in Fedora
+ 
   // Open resulting output file.
   f_log = fopen( SCRIPT_TMP_FILE, "r" );
   if( f_log == NULL )
@@ -66,6 +69,7 @@ sint32_t execScript( const char *cmd )
 
   // Remove command output.
   pal_unlink( SCRIPT_TMP_FILE );
+*/
 
   return retVal;
 }
diff -up gogoc-1_2-RELEASE/gogoc-tsp/template/linux.sh.selinux_fix gogoc-1_2-RELEASE/gogoc-tsp/template/linux.sh
--- gogoc-1_2-RELEASE/gogoc-tsp/template/linux.sh.selinux_fix
+++ gogoc-1_2-RELEASE/gogoc-tsp/template/linux.sh
@@ -266,6 +266,9 @@ interface $TSP_HOME_INTERFACE
 };
 EOF
 
+   # Change the SELinux context of the file so the radvd daemon can read it
+   /sbin/restorecon $rtadvdconfigfile
+
    # Start the radvd daemon.
    Display 1 "Starting radvd: $rtadvd -u radvd -C $rtadvdconfigfile"
    Exec $rtadvd -u radvd -p $rtadvd_pid -C $rtadvdconfigfile