bug-cvs
[Top][All Lists]
Advanced

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

[PATCH] Kerberos: HAVE_KERBEROS4 symbol


From: Alexey Mahotkin
Subject: [PATCH] Kerberos: HAVE_KERBEROS4 symbol
Date: Wed, 18 Jun 2003 00:26:30 +0400
User-agent: Gnus/5.090006 (Oort Gnus v0.06) XEmacs/21.4 (Common Lisp, i386-debian-linux)

Rename HAVE_KERBEROS to HAVE_KERBEROS4, to emphasize that we're
dealing with old Kerberos (as opposed to Kerberos 5, which works via
GSSAPI).


 ChangeLog           |    3 +++
 config.h.in         |    2 +-
 configure.in        |    2 +-
 src/ChangeLog       |    4 ++++
 src/client.c        |   18 +++++++++---------
 src/client.h        |    8 ++++----
 src/main.c          |    8 ++++----
 src/root.c          |    2 +-
 src/server.c        |   20 ++++++++++----------
 src/server.h        |    2 +-
 src/socket-client.c |    2 +-
 src/socket-client.h |    2 +-
 12 files changed, 40 insertions(+), 33 deletions(-)

--- ccvs/ChangeLog~kerberos-KERBEROS4   Wed Jun 18 00:14:23 2003
+++ ccvs-alexm/ChangeLog        Wed Jun 18 00:15:34 2003
@@ -1,5 +1,8 @@
 2003-06-18  Alexey Mahotkin  <address@hidden>
 
+       * configure.in, config.h.in: Rename HAVE_KERBEROS to
+       HAVE_KERBEROS4.
+
        * configure.in, config.h.in: Debian Woody has -lkrb4, so check for
        that.
 
--- ccvs/src/ChangeLog~kerberos-KERBEROS4       Wed Jun 18 00:14:40 2003
+++ ccvs-alexm/src/ChangeLog    Wed Jun 18 00:25:59 2003
@@ -1,5 +1,9 @@
 2003-06-18  Alexey Mahotkin  <address@hidden>
 
+       * client.c, client.h, main.c, root.c, server.c, server.h,
+       socket-client.c, socket-client.h: Rename HAVE_KERBEROS to
+       HAVE_KERBEROS4.
+
        * kerberos4-client.h, kerberos4-client.c, client.c: Rename
        start_tcp_server() to start_kerberos4_server().
 
--- ccvs/configure.in~kerberos-KERBEROS4        Wed Jun 18 00:14:27 2003
+++ ccvs-alexm/configure.in     Wed Jun 18 00:15:00 2003
@@ -398,7 +398,7 @@ if test -n "$krb_h"; then
        AC_CHECK_FUNC(krb_recvauth,[krb_lib=yes krb_libdir=])
   fi
   if test -n "$krb_lib"; then
-    AC_DEFINE([HAVE_KERBEROS], 1,
+    AC_DEFINE([HAVE_KERBEROS4], 1,
              [Define if you have MIT Kerberos version 4 available.])
     cvs_client_objects="$cvs_client_objects kerberos4-client.o"
     test -n "${krb_libdir}" && LIBS="${LIBS} -L${krb_libdir}"
--- ccvs/src/client.c~kerberos-KERBEROS4        Wed Jun 18 00:14:31 2003
+++ ccvs-alexm/src/client.c     Wed Jun 18 00:16:45 2003
@@ -34,7 +34,7 @@
 #   include "gssapi-client.h"
 # endif
 
-# ifdef HAVE_KERBEROS
+# ifdef HAVE_KERBEROS4
 #   include "kerberos4-client.h"
 # endif
 
@@ -3093,7 +3093,7 @@ supported_request (name)
 
 
 
-#if defined (AUTH_CLIENT_SUPPORT) || defined (HAVE_KERBEROS) || defined 
(HAVE_GSSAPI)
+#if defined (AUTH_CLIENT_SUPPORT) || defined (HAVE_KERBEROS4) || defined 
(HAVE_GSSAPI)
 
 
 /* Generic function to do port number lookup tasks.
@@ -3169,10 +3169,10 @@ get_cvs_port_number (root)
 # if defined (AUTH_CLIENT_SUPPORT) || defined (HAVE_GSSAPI)
            return get_port_number ("CVS_CLIENT_PORT", "cvspserver", 
CVS_AUTH_PORT);
 # endif /* defined (AUTH_CLIENT_SUPPORT) || defined (HAVE_GSSAPI) */
-# ifdef HAVE_KERBEROS
+# ifdef HAVE_KERBEROS4
        case kserver_method:
            return get_port_number ("CVS_CLIENT_PORT", "cvs", CVS_PORT);
-# endif /* HAVE_KERBEROS */
+# endif /* HAVE_KERBEROS4 */
        default:
            error(1, EINVAL, "internal error: get_cvs_port_number called for 
invalid connection method (%s)",
                    method_names[root->method]);
@@ -3241,7 +3241,7 @@ make_bufs_from_fds (tofd, fromfd, child_
                                               (BUFMEMERRPROC) NULL);
     }
 }
-#endif /* defined (AUTH_CLIENT_SUPPORT) || defined (HAVE_KERBEROS) || 
defined(HAVE_GSSAPI) */
+#endif /* defined (AUTH_CLIENT_SUPPORT) || defined (HAVE_KERBEROS4) || 
defined(HAVE_GSSAPI) */
 
 
 
@@ -3580,11 +3580,11 @@ start_server ()
            break;
 #endif /* AUTH_CLIENT_SUPPORT */
 
-#if HAVE_KERBEROS
+#if HAVE_KERBEROS4
        case kserver_method:
            start_kerberos4_server (current_parsed_root, &global_to_server, 
&global_from_server);
            break;
-#endif /* HAVE_KERBEROS */
+#endif /* HAVE_KERBEROS4 */
 
 #ifdef HAVE_GSSAPI
        case gserver_method:
@@ -3782,7 +3782,7 @@ start_server ()
            we want to encrypt the compressed stream.  If we can't turn
            on encryption, bomb out; don't let the user think the data
            is being encrypted when it is not.  */
-#ifdef HAVE_KERBEROS
+#ifdef HAVE_KERBEROS4
        if (current_parsed_root->method == kserver_method)
        {
            if (! supported_request ("Kerberos-encrypt"))
@@ -3791,7 +3791,7 @@ start_server ()
            initialize_kerberos4_encryption_buffers(&global_to_server, 
&global_from_server);
        }
        else
-#endif /* HAVE_KERBEROS */
+#endif /* HAVE_KERBEROS4 */
 #ifdef HAVE_GSSAPI
        if (current_parsed_root->method == gserver_method)
        {
--- ccvs/src/server.c~kerberos-KERBEROS4        Wed Jun 18 00:14:33 2003
+++ ccvs-alexm/src/server.c     Wed Jun 18 00:17:10 2003
@@ -46,7 +46,7 @@ static int cvs_gssapi_wrapping;
 #include <winsock.h>
 #endif
 
-#if defined (AUTH_SERVER_SUPPORT) || defined (HAVE_KERBEROS) || defined 
(HAVE_GSSAPI)
+#if defined (AUTH_SERVER_SUPPORT) || defined (HAVE_KERBEROS4) || defined 
(HAVE_GSSAPI)
 #include <sys/socket.h>
 #endif
 
@@ -57,7 +57,7 @@ static int cvs_gssapi_wrapping;
 # endif
 #endif
 
-#ifdef HAVE_KERBEROS
+#ifdef HAVE_KERBEROS4
 # include <netinet/in.h>
 # include <krb.h>
 # ifndef HAVE_KRB_GET_ERR_TEXT
@@ -2195,7 +2195,7 @@ serve_set (arg)
 
 #ifdef ENCRYPTION
 
-#ifdef HAVE_KERBEROS
+#ifdef HAVE_KERBEROS4
 
 static void
 serve_kerberos_encrypt (arg)
@@ -2211,7 +2211,7 @@ serve_kerberos_encrypt (arg)
                                                  buf_from_net->memory_error);
 }
 
-#endif /* HAVE_KERBEROS */
+#endif /* HAVE_KERBEROS4 */
 
 #ifdef HAVE_GSSAPI
 
@@ -4679,7 +4679,7 @@ struct request requests[] =
           0),
   REQ_LINE("Set", serve_set, RQ_ROOTLESS),
 #ifdef ENCRYPTION
-#  ifdef HAVE_KERBEROS
+#  ifdef HAVE_KERBEROS4
   REQ_LINE("Kerberos-encrypt", serve_kerberos_encrypt, 0),
 #  endif
 #  ifdef HAVE_GSSAPI
@@ -5137,7 +5137,7 @@ error ENOMEM Virtual memory exhausted.\n
 }
 
 
-#if defined (HAVE_KERBEROS) || defined (AUTH_SERVER_SUPPORT) || defined 
(HAVE_GSSAPI)
+#if defined (HAVE_KERBEROS4) || defined (AUTH_SERVER_SUPPORT) || defined 
(HAVE_GSSAPI)
 static void switch_to_user PROTO((const char *));
 
 static void
@@ -5764,7 +5764,7 @@ pserver_authenticate_connection ()
 #endif /* AUTH_SERVER_SUPPORT || HAVE_GSSAPI */
 
 
-#ifdef HAVE_KERBEROS
+#ifdef HAVE_KERBEROS4
 void
 kserver_authenticate_connection ()
 {
@@ -5832,7 +5832,7 @@ error 0 kerberos: can't get local name: 
     /* Switch to run as this user. */
     switch_to_user (user);
 }
-#endif /* HAVE_KERBEROS */
+#endif /* HAVE_KERBEROS4 */
 
 #ifdef HAVE_GSSAPI
 
@@ -5964,7 +5964,7 @@ int cvsauthenticate;
 
 #ifdef ENCRYPTION
 
-#ifdef HAVE_KERBEROS
+#ifdef HAVE_KERBEROS4
 
 /* An encryption interface using Kerberos.  This is built on top of a
    packetizing buffer.  */
@@ -6075,7 +6075,7 @@ krb_encrypt_output (fnclosure, input, ou
     return 0;
 }
 
-#endif /* HAVE_KERBEROS */
+#endif /* HAVE_KERBEROS4 */
 #endif /* ENCRYPTION */
 #endif /* defined (CLIENT_SUPPORT) || defined (SERVER_SUPPORT) */
 
--- ccvs/config.h.in~kerberos-KERBEROS4 Wed Jun 18 00:15:12 2003
+++ ccvs-alexm/config.h.in      Wed Jun 18 00:20:08 2003
@@ -225,7 +225,7 @@
 #undef HAVE_IO_H
 
 /* Define if you have MIT Kerberos version 4 available. */
-#undef HAVE_KERBEROS
+#undef HAVE_KERBEROS4
 
 /* Define to 1 if you have the <krb5.h> header file. */
 #undef HAVE_KRB5_H
--- ccvs/src/client.h~kerberos-KERBEROS4        Wed Jun 18 00:16:07 2003
+++ ccvs-alexm/src/client.h     Wed Jun 18 00:16:52 2003
@@ -27,13 +27,13 @@ extern int cvsauthenticate;
 
 # ifdef ENCRYPTION
 
-#   ifdef HAVE_KERBEROS
+#   ifdef HAVE_KERBEROS4
 
 /* We can't declare the arguments without including krb.h, and I don't
    want to do that in every file.  */
 extern struct buffer *krb_encrypt_buffer_initialize ();
 
-#   endif /* HAVE_KERBEROS */
+#   endif /* HAVE_KERBEROS4 */
 
 # endif /* ENCRYPTION */
 
@@ -62,11 +62,11 @@ void connect_to_pserver PROTO ((cvsroot_
 #   endif /* CVS_AUTH_PORT */
 # endif /* (AUTH_CLIENT_SUPPORT) || defined (HAVE_GSSAPI) */
 
-# if HAVE_KERBEROS
+# if HAVE_KERBEROS4
 #   ifndef CVS_PORT
 #     define CVS_PORT 1999
 #   endif
-# endif /* HAVE_KERBEROS */
+# endif /* HAVE_KERBEROS4 */
 
 /* Talking to the server. */
 void send_to_server PROTO((char *str, size_t len));
--- ccvs/src/socket-client.h~kerberos-KERBEROS4 Wed Jun 18 00:16:10 2003
+++ ccvs-alexm/src/socket-client.h      Wed Jun 18 00:17:16 2003
@@ -18,7 +18,7 @@
 struct buffer *socket_buffer_initialize
   PROTO ((int, int, void (*) (struct buffer *)));
 
-# if defined(AUTH_CLIENT_SUPPORT) || defined(HAVE_KERBEROS) || 
defined(HAVE_GSSAPI) || defined(SOCK_ERRNO) || defined(SOCK_STRERROR)
+# if defined(AUTH_CLIENT_SUPPORT) || defined(HAVE_KERBEROS4) || 
defined(HAVE_GSSAPI) || defined(SOCK_ERRNO) || defined(SOCK_STRERROR)
 #   ifdef HAVE_WINSOCK_H
 #     include <winsock.h>
 #   else /* No winsock.h */
--- ccvs/src/socket-client.c~kerberos-KERBEROS4 Wed Jun 18 00:16:18 2003
+++ ccvs-alexm/src/socket-client.c      Wed Jun 18 00:17:23 2003
@@ -20,7 +20,7 @@
 #include "socket-client.h"
 
 
-#if defined (AUTH_CLIENT_SUPPORT) || defined (HAVE_KERBEROS) || defined 
(HAVE_GSSAPI)
+#if defined (AUTH_CLIENT_SUPPORT) || defined (HAVE_KERBEROS4) || defined 
(HAVE_GSSAPI)
 
 struct hostent *
 init_sockaddr (name, hostname, port)
--- ccvs/src/main.c~kerberos-KERBEROS4  Wed Jun 18 00:17:36 2003
+++ ccvs-alexm/src/main.c       Wed Jun 18 00:17:45 2003
@@ -117,7 +117,7 @@ static const struct cmd
     { "history",  "hi",       "his",       history,   CVS_CMD_USES_WORK_DIR },
     { "import",   "im",       "imp",       import,    
CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR | CVS_CMD_IGNORE_ADMROOT},
     { "init",     NULL,       NULL,        init,      
CVS_CMD_MODIFIES_REPOSITORY },
-#if defined (HAVE_KERBEROS) && defined (SERVER_SUPPORT)
+#if defined (HAVE_KERBEROS4) && defined (SERVER_SUPPORT)
     { "kserver",  NULL,       NULL,        server,    
CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR }, /* placeholder */
 #endif
     { "log",      "lo",       NULL,        cvslog,    CVS_CMD_USES_WORK_DIR },
@@ -208,7 +208,7 @@ static const char *const cmd_usage[] =
     "        history      Show repository access history\n",
     "        import       Import sources into CVS, using vendor branches\n",
     "        init         Create a CVS repository if it doesn't exist\n",
-#if defined (HAVE_KERBEROS) && defined (SERVER_SUPPORT)
+#if defined (HAVE_KERBEROS4) && defined (SERVER_SUPPORT)
     "        kserver      Kerberos server mode\n",
 #endif
     "        log          Print out history information for files\n",
@@ -702,7 +702,7 @@ cause intermittent sandbox corruption.")
 
 #ifdef SERVER_SUPPORT
 
-# ifdef HAVE_KERBEROS
+# ifdef HAVE_KERBEROS4
        /* If we are invoked with a single argument "kserver", then we are
           running as Kerberos server as root.  Do the authentication as
           the very first thing, to minimize the amount of time we are
@@ -714,7 +714,7 @@ cause intermittent sandbox corruption.")
            /* Pretend we were invoked as a plain server.  */
            command_name = "server";
        }
-# endif /* HAVE_KERBEROS */
+# endif /* HAVE_KERBEROS4 */
 
 
 # if defined (AUTH_SERVER_SUPPORT) || defined (HAVE_GSSAPI)
--- ccvs/src/root.c~kerberos-KERBEROS4  Wed Jun 18 00:18:32 2003
+++ ccvs-alexm/src/root.c       Wed Jun 18 00:18:50 2003
@@ -627,7 +627,7 @@ parse_cvsroot (root_in)
        /* no_password already set */
        break;
     case kserver_method:
-# ifndef HAVE_KERBEROS
+# ifndef HAVE_KERBEROS4
                error (0, 0, "CVSROOT is set for a kerberos access method but 
your");
        error (0, 0, "CVS executable doesn't support it.");
        goto error_exit;
--- ccvs/src/server.h~kerberos-KERBEROS4        Wed Jun 18 00:18:36 2003
+++ ccvs-alexm/src/server.h     Wed Jun 18 00:18:43 2003
@@ -31,7 +31,7 @@ extern int server_active;
 extern int server PROTO((int argc, char **argv));
 
 /* kserver user authentication.  */
-# ifdef HAVE_KERBEROS
+# ifdef HAVE_KERBEROS4
 extern void kserver_authenticate_connection PROTO ((void));
 # endif
 

_

--alexm




reply via email to

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