[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH] fix and enhance openssh-selinux patch



[resent as my previous post from an unsubscribed address didn't mad it]

Hi,

hope I'm on the right list for submitting patches:

The attached one is an add-on to the openssh-selinux patch revision
1.17. It fixes the compilation without selinux support (gcc4 complained
about redefinitions of the selinux stubs) and extends the --with-selinux
configure switch by the libselinux installation path (useful for
cross-compiling).

Jan
diff -u openssh-4.2p1/configure.ac openssh-4.2p1/configure.ac
--- openssh-4.2p1/configure.ac	2005-10-18 15:50:12.000000000 -0400
+++ openssh-4.2p1/configure.ac	2005-10-18 15:50:12.000000000 -0400
@@ -2671,8 +2671,16 @@
 SELINUX_MSG="no"
 LIBSELINUX=""
 AC_ARG_WITH(selinux,
-	[  --with-selinux   Enable SELinux support],
+	[  --with-selinux[[=LIBSELINUX-PATH]]	Enable SELinux support],
 	[ if test "x$withval" != "xno" ; then
+		if test "x$withval" != "xyes"; then
+			CPPFLAGS="$CPPFLAGS -I${withval}/include"
+			if test -n "${need_dash_r}"; then
+				LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
+			else
+				LDFLAGS="-L${withval}/lib ${LDFLAGS}"
+			fi
+		fi
 		AC_DEFINE(WITH_SELINUX,1,[Define if you want SELinux support.])
 		SELINUX_MSG="yes"
 		AC_CHECK_HEADERS(selinux.h)
diff -u openssh-4.2p1/selinux.h openssh-4.2p1/selinux.h
--- openssh-4.2p1/selinux.h	2005-10-18 15:50:12.000000000 -0400
+++ openssh-4.2p1/selinux.h	2005-10-18 15:50:12.000000000 -0400
@@ -5,6 +5,6 @@
 extern void setup_selinux_exec_context(const char *name);
 #else
-inline void setup_selinux_pty(const char *name, const char *tty) {}
-inline void setup_selinux_exec_context(const char *name) {} 
+static inline void setup_selinux_pty(const char *name, const char *tty) {}
+static inline void setup_selinux_exec_context(const char *name) {} 
 #endif /* WITH_SELINUX */
 #endif /* __SELINUX_H_ */

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]