[Pvfs2-cvs] commit by dbonnie in pvfs2: configure configure.in
pvfs2-config.h.in
CVS commit program
cvs at parl.clemson.edu
Wed May 21 16:33:53 EDT 2008
Update of /anoncvs/pvfs2
In directory parlweb1:/tmp/cvs-serv17158
Modified Files:
Tag: cu-security-branch
configure configure.in pvfs2-config.h.in
Log Message:
Added --enable-security=[none, rsa, dsa] into configure.in to enable toggling of security features for export/import.
Index: configure
===================================================================
RCS file: /anoncvs/pvfs2/configure,v
diff -p -u -r1.388.2.2 -r1.388.2.3
--- configure 16 May 2008 15:14:59 -0000 1.388.2.2
+++ configure 21 May 2008 20:33:47 -0000 1.388.2.3
@@ -846,6 +846,10 @@ Optional Features:
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-thread-safety Disables thread safety in the client library
--disable-server Disables building of PVFS2 server
+ --enable-security=state type Specify the states type:
+ none default: No encryption
+ rsa: RSA encryption
+ dsa: DSA encryption
--disable-karma-mem-usage-stats Disables memory usage stats in karma
--disable-perf-counters Disables pvfs2-server performance counters
--enable-mmap-racache Enables mmap-readahead in kernel interface
@@ -6364,6 +6368,47 @@ done
fi;
+# Check whether --enable-security or --disable-security was given.
+if test "${enable_security+set}" = set; then
+ enableval="$enable_security"
+ if test "x$enableval" = "xnone" ; then
+ SECURITY_TYPE=0
+
+cat >>confdefs.h <<\_ACEOF
+#define SECURITY_ENCRYPTION_NONE
+_ACEOF
+
+ elif test "x$enableval" = "xrsa" ; then
+ SECURITY_TYPE=1
+
+cat >>confdefs.h <<\_ACEOF
+#define SECURITY_ENCRYPTION_RSA
+_ACEOF
+
+ elif test "x$enableval" = "xdsa" ; then
+ SECURITY_TYPE=2
+
+cat >>confdefs.h <<\_ACEOF
+#define SECURITY_ENCRYPTION_DSA
+_ACEOF
+
+ else
+ echo
+ echo "Error!"
+ echo "Unknown encryption type!"
+ exit -1
+ fi
+
+else
+ SECURITY_TYPE=0
+
+cat >>confdefs.h <<\_ACEOF
+#define SECURITY_ENCRYPTION_NONE
+_ACEOF
+
+
+fi;
+
# Check whether --enable-karma-mem-usage-stats or --disable-karma-mem-usage-stats was given.
if test "${enable_karma_mem_usage_stats+set}" = set; then
enableval="$enable_karma_mem_usage_stats"
@@ -19686,6 +19731,17 @@ echo "${ECHO_T}PVFS2 will use workaround
else
echo "$as_me:$LINENO: result: PVFS2 will use workaround for buggy NPTL : yes" >&5
echo "${ECHO_T}PVFS2 will use workaround for buggy NPTL : yes" >&6
+fi
+
+if test "x$SECURITY_TYPE" = "x0" ; then
+ echo "$as_me:$LINENO: result: PVFS2 encryption type :none" >&5
+echo "${ECHO_T}PVFS2 encryption type :none" >&6
+elif test "x$SECURITY_TYPE" = "x1" ; then
+ echo "$as_me:$LINENO: result: PVFS2 encryption type : rsa" >&5
+echo "${ECHO_T}PVFS2 encryption type : rsa" >&6
+elif test "x$SECURITY_TYPE" = "x2" ; then
+ echo "$as_me:$LINENO: result: PVFS2 encryption type : dsa" >&5
+echo "${ECHO_T}PVFS2 encryption type : dsa" >&6
fi
if test "x$BUILD_SERVER" = "x1"; then
Index: configure.in
===================================================================
RCS file: /anoncvs/pvfs2/configure.in,v
diff -p -u -r1.340.2.2 -r1.340.2.3
--- configure.in 16 May 2008 15:15:03 -0000 1.340.2.2
+++ configure.in 21 May 2008 20:33:53 -0000 1.340.2.3
@@ -180,6 +180,30 @@ AC_ARG_WITH(openssl,
--without-openssl Don't build with openssl.],
[AX_OPENSSL(${withval})],
[AX_OPENSSL_OPTIONAL])
+
+AC_ARG_ENABLE(security,
+ [ --enable-security[=state type] Specify the states type:
+ none [default]: No encryption
+ rsa: RSA encryption
+ dsa: DSA encryption],
+ [ if test "x$enableval" = "xnone" ; then
+ SECURITY_TYPE=0
+ AC_DEFINE([SECURITY_ENCRYPTION_NONE], [], [No encryption])
+ elif test "x$enableval" = "xrsa" ; then
+ SECURITY_TYPE=1
+ AC_DEFINE([SECURITY_ENCRYPTION_RSA], [], [RSA encryption])
+ elif test "x$enableval" = "xdsa" ; then
+ SECURITY_TYPE=2
+ AC_DEFINE([SECURITY_ENCRYPTION_DSA], [], [DSA encryption])
+ else
+ echo
+ echo "Error!"
+ echo "Unknown encryption type!"
+ exit -1
+ fi
+ ], [SECURITY_TYPE=0
+ AC_DEFINE([SECURITY_ENCRYPTION_NONE], [], [No encryption])
+ ])
dnl a mechanism to turn off memory usage statistics in karma (may be
dnl confusing for some classes of users)
@@ -1161,6 +1185,14 @@ if test "x$NPTL_WORKAROUND" = "x"; then
AC_MSG_RESULT([PVFS2 will use workaround for buggy NPTL : no])
else
AC_MSG_RESULT([PVFS2 will use workaround for buggy NPTL : yes])
+fi
+
+if test "x$SECURITY_TYPE" = "x0" ; then
+ AC_MSG_RESULT([PVFS2 encryption type :none])
+elif test "x$SECURITY_TYPE" = "x1" ; then
+ AC_MSG_RESULT([PVFS2 encryption type : rsa])
+elif test "x$SECURITY_TYPE" = "x2" ; then
+ AC_MSG_RESULT([PVFS2 encryption type : dsa])
fi
if test "x$BUILD_SERVER" = "x1"; then
Index: pvfs2-config.h.in
===================================================================
RCS file: /anoncvs/pvfs2/pvfs2-config.h.in,v
diff -p -u -r1.117.2.1 -r1.117.2.2
--- pvfs2-config.h.in 16 May 2008 15:15:03 -0000 1.117.2.1
+++ pvfs2-config.h.in 21 May 2008 20:33:53 -0000 1.117.2.2
@@ -406,6 +406,15 @@
/* sub version number */
#undef PVFS2_VERSION_SUB
+/* DSA encryption */
+#undef SECURITY_ENCRYPTION_DSA
+
+/* No encryption */
+#undef SECURITY_ENCRYPTION_NONE
+
+/* RSA encryption */
+#undef SECURITY_ENCRYPTION_RSA
+
/* The size of a `long int', as computed by sizeof. */
#undef SIZEOF_LONG_INT
More information about the Pvfs2-cvs
mailing list