* login.c: Ezra's patches to trim unsed arg from
authorTom Yu <tlyu@mit.edu>
Tue, 4 Jun 1996 04:23:39 +0000 (04:23 +0000)
committerTom Yu <tlyu@mit.edu>
Tue, 4 Jun 1996 04:23:39 +0000 (04:23 +0000)
verify_krb_v5_tgt, etc.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8209 dc483132-0cff-0310-8789-dd5450dbe970

src/appl/bsd/login.c

index ce1ccc2439b5225c571c3987c445509b41ce6341..4a86e5107d7a1bdad87d6f427d6eb59adf118660 100644 (file)
@@ -256,9 +256,12 @@ extern int errno;
 #ifdef KRB4_GET_TICKETS
 #define KRB_ENVIRON    "KRBTKFILE"     /* Ticket file environment variable */
 #define KRB_TK_DIR     "/tmp/tkt_"     /* Where to put the ticket */
+#endif /* KRB4_GET_TICKETS */
+
+#if defined(KRB4_GET_TICKETS) || defined(KRB5_GET_TICKETS)
 #define MAXPWSIZE      128             /* Biggest string accepted for KRB4
                                           passsword */
-#endif /* KRB4_GET_TICKETS */
+#endif
 
 #ifdef __SVR4
 #define NO_MOTD
@@ -843,9 +846,8 @@ EGRESS:
  *
  * Returns 1 for confirmation, -1 for failure, 0 for uncertainty.
  */
-int verify_krb_v5_tgt (c, realm)
+int verify_krb_v5_tgt (c)
     krb5_context c;
-    char *realm;
 {
     char phost[BUFSIZ];
     krb5_ccache ccdef;
@@ -1437,7 +1439,7 @@ int main(argc, argv)
                if (lpass_ok)
                        break;
                if (got_v5_tickets
-                   && verify_krb_v5_tgt(kcontext, realm) != -1)
+                   && verify_krb_v5_tgt(kcontext) != -1)
                        break;  /* we're ok */
 #ifdef KRB4_GET_TICKETS
                if (login_krb4_get_tickets) {
@@ -1556,8 +1558,14 @@ int main(argc, argv)
        }
 #endif
 
-#ifdef KRB5_GET_TICKETS
+#if defined(KRB5_GET_TICKETS) || defined(KRB4_GET_TICKETS)
+#if defined(KRB5_GET_TICKETS) && defined(KRB4_GET_TICKETS)
        if (login_krb4_get_tickets || login_krb5_get_tickets) {
+#elif defined(KRB4_GET_TICKETS)
+       if (login_krb4_get_tickets) {
+#else
+       if (login_krb5_get_tickets) {
+#endif
            /* Fork so that we can call kdestroy */
            dofork();
        }
@@ -2223,7 +2231,7 @@ void sleepexit(eval)
        exit(eval);
 }
 
-#ifdef KRB4_GET_TICKETS
+#if defined(KRB4_GET_TICKETS) || defined(KRB5_GET_TICKETS)
 /* call already conditionalized on login_krb4_get_tickets */
 /*
  * This routine handles cleanup stuff, and the like.