Source-Changes-HG archive

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

[src/trunk]: src/libexec/ftpd make this compile with KERBEROS5 defined. Note...



details:   https://anonhg.NetBSD.org/src/rev/81d610af25ed
branches:  trunk
changeset: 487056:81d610af25ed
user:      explorer <explorer%NetBSD.org@localhost>
date:      Fri Jun 02 14:47:19 2000 +0000

description:
make this compile with KERBEROS5 defined.  Note:  only one of KERBEROS or KERBEROS5 may be defined in this file...

diffstat:

 libexec/ftpd/ftpd.c |  24 +++++++++++++++++++-----
 1 files changed, 19 insertions(+), 5 deletions(-)

diffs (76 lines):

diff -r 639859b4ae72 -r 81d610af25ed libexec/ftpd/ftpd.c
--- a/libexec/ftpd/ftpd.c       Fri Jun 02 13:37:12 2000 +0000
+++ b/libexec/ftpd/ftpd.c       Fri Jun 02 14:47:19 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ftpd.c,v 1.91 2000/06/02 00:19:04 fredb Exp $  */
+/*     $NetBSD: ftpd.c,v 1.92 2000/06/02 14:47:19 explorer Exp $       */
 
 /*
  * Copyright (c) 1997-2000 The NetBSD Foundation, Inc.
@@ -109,7 +109,7 @@
 #if 0
 static char sccsid[] = "@(#)ftpd.c     8.5 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: ftpd.c,v 1.91 2000/06/02 00:19:04 fredb Exp $");
+__RCSID("$NetBSD: ftpd.c,v 1.92 2000/06/02 14:47:19 explorer Exp $");
 #endif
 #endif /* not lint */
 
@@ -188,6 +188,7 @@
 int    notickets = 1;
 char   *krbtkfile_env = NULL;
 char   *tty = ttyline;
+int    login_krb5_forwardable_tgt = 0;
 #endif
 
 int epsvall = 0;
@@ -226,10 +227,14 @@
 
 int    main(int, char *[]);
 
-#if defined(KERBEROS) || defined(KERBEROS5)
+#if defined(KERBEROS)
 int    klogin(struct passwd *, char *, char *, char *);
 void   kdestroy(void);
 #endif
+#if defined(KERBEROS5)
+int    k5login(struct passwd *, char *, char *, char *);
+void   k5destroy(void);
+#endif
 
 int
 main(int argc, char *argv[])
@@ -516,9 +521,12 @@
                }
        }
 
-#if defined(KERBEROS) || defined(KERBEROS5)
+#if defined(KERBEROS)
        kdestroy();
 #endif
+#if defined(KERBEROS5)
+       k5destroy();
+#endif
 
        curclass.type = CLASS_REAL;
        if (strcmp(name, "ftp") == 0 || strcmp(name, "anonymous") == 0) {
@@ -757,12 +765,18 @@
                        rval = 1;       /* failure below */
                        goto skip;
                }
-#if defined(KERBEROS) || defined(KERBEROS5)
+#if defined(KERBEROS)
                if (klogin(pw, "", hostname, (char *)passwd) == 0) {
                        rval = 0;
                        goto skip;
                }
 #endif
+#if defined(KERBEROS5)
+               if (k5login(pw, "", hostname, (char *)passwd) == 0) {
+                       rval = 0;
+                       goto skip;
+               }
+#endif
 #ifdef SKEY
                if (skey_haskey(pw->pw_name) == 0) {
                        char *p;



Home | Main Index | Thread Index | Old Index