[Initng-svn] r3809 - in initng/trunk: src
svn at initng.thinktux.net
svn at initng.thinktux.net
Sun Apr 16 11:21:14 CEST 2006
Author: dragoran
Date: Sun Apr 16 11:21:13 2006
New Revision: 3809
Modified:
initng/trunk/CMakeLists.txt
initng/trunk/src/main.c
Log:
More SELINUX Stuff
Modified: initng/trunk/CMakeLists.txt
==============================================================================
--- initng/trunk/CMakeLists.txt (original)
+++ initng/trunk/CMakeLists.txt Sun Apr 16 11:21:13 2006
@@ -96,6 +96,17 @@
ADD_DEFINITIONS(-DDEBUG -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wimplicit -Wredundant-decls -Wnested-externs -Wwrite-strings -Wsign-compare -Winline -Wswitch -Wreturn-type -Wparentheses -Wmissing-braces -Wformat -Wformat-nonliteral -Wformat-security -Wsequence-point -Wundef -Wunused -Wcomment)
ENDIF(DEBUG)
+IF(SELINUX OR SELINUXOLD)
+ CHECK_INCLUDE_FILES(/usr/include/selinux/selinux.h HAVE_SELINUX_H)
+ IF(NOT HAVE_SELINUX_H)
+ MESSAGE(SEND_ERROR "Could not find selinux header files")
+ ENDIF(NOT HAVE_SELINUX_H)
+ ADD_DEFINITIONS(-DSELINUX)
+ IF(SELINUXOLD)
+ ADD_DEFINITIONS(-DOLDSELINUX)
+ ENDIF(SELINUXOLD)
+ENDIF(SELINUX OR SELINUXOLD)
+
IF(COUNT_ME)
EXEC_PROGRAM(${CMAKE_CURRENT_SOURCE_DIR}/count_me.sh)
ENDIF(COUNT_ME)
Modified: initng/trunk/src/main.c
==============================================================================
--- initng/trunk/src/main.c (original)
+++ initng/trunk/src/main.c Sun Apr 16 11:21:13 2006
@@ -414,8 +414,11 @@
#endif
#ifndef OLDSELINUX
int enforce = 0;
+ char *envstr;
if (getenv("SELINUX_INIT") == NULL) {
- putenv("SELINUX_INIT=YES");
+ envstr=malloc(sizeof("SELINUX_INIT=YES"));
+ strcpy(envstr,"SELINUX_INIT=YES");
+ putenv(envstr);
if (selinux_init_load_policy(&enforce) == 0 ) {
execv(argv[0], argv);
} else {
More information about the Initng-svn
mailing list