info-cvs
[Top][All Lists]
Advanced

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

patch to make pserver and fix compile bug


From: Patton, Matthew E., CTR, OSD-PA&E
Subject: patch to make pserver and fix compile bug
Date: Wed, 28 Jan 2004 16:16:08 -0500

Classification: UNCLASSIFIED

turns out --disable-password-authenticated-client won't even compile on
v1.11.11. So I went digging and among some other ancillary bugs and logic
errors, configure also had a notion of
--disable-password-authenticated-server which didn't do anything.

I patched client.c to remove the improperly placed #endif and hand-coded a
new 'configure' to do a better job. I made edits to configure.in but I don't
know how to convert that file into the proper 'configure' script so can't
test it.

Other things I noted (but didn't patch) was the declaration of HAVE_CRYPT in
config.h but nowhere in the entire source tree is it actually used. IMO
server.c needs to be annotated or we should just do away with the check. And
per some of the code comments, why do we care if crypt() happens to be a
dummy/nop?

Another side-issue I briefly noted was that 'configure' doesn't appear to
actually test whether or not the user specified --enable-xxx or
--disable-xxx but rather assumes that if it's set, then do the opposite of
the default whatever that might be - which is hardly benign behavior. This
may be more of an endemic problem with autoconf itself, however or I'm
simply confused.

comments welcome.

--- client.c.orig       2004-01-28 06:22:29.000000000 -0500
+++ client.c    2004-01-28 07:11:53.000000000 -0500
@@ -3599,6 +3599,7 @@
     /* NOTREACHED */
     return -1;
 }
+#endif /* defined (AUTH_CLIENT_SUPPORT) || defined (HAVE_KERBEROS) ||
defined(HAVE_GSSAPI) */



@@ -3659,7 +3660,6 @@
                                               (BUFMEMERRPROC) NULL);
     }
 }
-#endif /* defined (AUTH_CLIENT_SUPPORT) || defined (HAVE_KERBEROS) ||
defined(HAVE_GSSAPI) */


--- configure.orig      2004-01-28 07:28:58.000000000 -0500
+++ configure           2004-01-28 09:01:30.000000000 -0500
@@ -862,9 +862,9 @@
                           Disabling this may not work. (default)
   --enable-client         Include code for running as a remote client
                           (default)
-  --enable-password-authenticated-client
-                          Enable pserver as a remote access method in the
CVS
-                          client (default)
+  --enable-password-authentication
+                          Enable pserver as a remote access method
+                          (disabled by default)
   --enable-server         Include code for running as a server (default)
   --enable-server-flow-control
                           If you are working with a large remote repository
@@ -11070,12 +11070,6 @@
 fi


-
-
-
-
-
-
 # Check for options requesting client and server feature. If none are
 # given and we have connect(), we want the full client & server
arrangement.
 # Check whether --enable-client or --disable-client was given.
@@ -11095,26 +11089,6 @@

 fi

-# Check whether --enable-password-authenticated-client or
--disable-password-au
thenticated-client was given.
-if test "${enable_password_authenticated_client+set}" = set; then
-  enableval="$enable_password_authenticated_client"
-
-fi;
-
-if test no != "$enable_password_authenticated_client"; then
-  if test no != "$enable_client"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define AUTH_CLIENT_SUPPORT 1
-_ACEOF
-
-  else
-    { echo "$as_me:$LINENO: WARNING: --enable-password-authenticated-server
is
meaningless with
-       the CVS client disabled (--disable-client)" >&5
-echo "$as_me: WARNING: --enable-password-authenticated-server is
meaningless wi
th
-       the CVS client disabled (--disable-client)" >&2;}
-  fi
-fi


 # Check whether --enable-server or --disable-server was given.
@@ -11262,11 +11236,6 @@
 #define HAVE_CRYPT 1
 _ACEOF

-
-cat >>confdefs.h <<\_ACEOF
-#define AUTH_SERVER_SUPPORT 1
-_ACEOF
-
 fi
           # Check whether --enable-server-flow-control or
--disable-server-flow
-control was given.
@@ -11330,6 +11299,28 @@



+# Check whether --enable-password-authentication was given.
+if test "${enable_password_authentication+set}" = set; then
+  enableval="$enable_password_authentication"
+else
+  enable_password_authentication=no
+fi;
+
+if test no != "$enable_password_authentication"; then
+  if test no != "$enable_client"; then
+cat >>confdefs.h <<\_ACEOF
+#define AUTH_CLIENT_SUPPORT 1
+_ACEOF
+  fi
+  if no != "$enable_server"; then
+cat >>confdefs.h <<\_ACEOF
+#define AUTH_SERVER_SUPPORT 1
+_ACEOF
+  fi
+fi
+
+
+
 # Check whether --enable-case-sensitivity or --disable-case-sensitivity was
giv
en.
 if test "${enable_case_sensitivity+set}" = set; then
   enableval="$enable_case_sensitivity"
@@ -11395,17 +11386,17 @@
   enable_encryption=no
 fi;
 if test "$enable_encryption" = yes; then
-  if test no != "$with_client" || test no != "$with_server"; then
+  if test no != "$enable_client" || test no != "$enable_server"; then

 cat >>confdefs.h <<\_ACEOF
 #define ENCRYPTION 1
 _ACEOF

   else
-    { echo "$as_me:$LINENO: WARNING: --enable-encryption is meaningless
with ne
ither the CVS client
-       nor the CVS server is enabled (--disable-client and
--disable-server)."
>&5
-echo "$as_me: WARNING: --enable-encryption is meaningless with neither the
CVS
client
-       nor the CVS server is enabled (--disable-client and
--disable-server)."
>&2;}
+    { echo "$as_me:$LINENO: WARNING: --enable-encryption is meaningless
with ei
ther of the CVS client
+       or server disabled (--disable-client and --disable-server)." >&5
+echo "$as_me: WARNING: --enable-encryption is meaningless with either of
the CV
S client
+       or server disabled (--disable-client and --disable-server)." >&2;}
   fi
 fi



--- configure.in.orig     2003-12-18 14:41:45.000000000 -0500
+++ configure.in        2004-01-28 09:50:51.000000000 -0500
@@ -656,7 +656,19 @@
 dnl


-# Check for options requesting client and server feature. If none are
+dnl
+dnl support password authentication?
+dnl
+AC_ARG_ENABLE(
+  [password-authentication],
+  AC_HELP_STRING(
+    [--enable-password-authentication],
+    [Enable pserver as a remote access method in the CVS client
+     (disabled by default)]), ,
+  [enable_password_authentication=no])
+
+
+# Check for options requesting client and server features. If none are
 # given and we have connect(), we want the full client & server
arrangement.
 AC_ARG_ENABLE(
   [client],
@@ -670,25 +682,11 @@
   AC_DEFINE(
     [CLIENT_SUPPORT], [1],
     [Define if you want CVS to be able to be a remote repository client.])
-fi
-
-AC_ARG_ENABLE(
-  [password-authenticated-client],
-  AC_HELP_STRING(
-    [--enable-password-authenticated-client],
-    [Enable pserver as a remote access method in the CVS client
-     (default)]))
-
-if test no != "$enable_password_authenticated_client"; then
-  if test no != "$enable_client"; then
+  if test no != "$enable_password_authentication"; then
     AC_DEFINE(
       [AUTH_CLIENT_SUPPORT], [1],
       [Enable AUTH_CLIENT_SUPPORT to enable pserver as a remote access
-       method in the CVS client (default)])
-  else
-    AC_MSG_WARN(
-      [--enable-password-authenticated-server is meaningless with
-       the CVS client disabled (--disable-client)])
+       method in the CVS client (disabled by default)])
   fi
 fi

@@ -716,6 +714,7 @@
   dnl file entries, so we only #define AUTH_SERVER_SUPPORT if we can
   dnl find the crypt function.
   dnl
+if test no != "enable_password_authentication"; then
   AC_SEARCH_LIBS(
     [crypt], [crypt],
     [AC_DEFINE(
@@ -725,6 +724,7 @@
        [AUTH_SERVER_SUPPORT], [1],
        [Define if you want to use the password authenticated server.])dnl
   ])dnl AC_SEARCH_LIBS
+fi

   dnl
   dnl Allow the configurer to enable server flowcontrol.  Read the help
@@ -872,14 +872,14 @@
     [Enable encryption support (disabled by default)]), ,
   [enable_encryption=no])
 if test "$enable_encryption" = yes; then
-  if test no != "$with_client" || test no != "$with_server"; then
+  if test no != "$enable_client" || test no != "$enable_server"; then
     AC_DEFINE(
       [ENCRYPTION], [1],
       [Define to enable encryption support.])
   else
     AC_MSG_WARN(
-      [--enable-encryption is meaningless with neither the CVS client
-       nor the CVS server is enabled (--disable-client and
--disable-server).])
+      [--enable-encryption is meaningless with neither of CVS client
+       or server enabled (--disable-client and --disable-server).])
   fi
 fi




reply via email to

[Prev in Thread] Current Thread [Next in Thread]