* main.c (main): Add -T keyfile and -D debug_level
authorEzra Peisach <epeisach@mit.edu>
Thu, 31 Oct 1996 16:30:40 +0000 (16:30 +0000)
committerEzra Peisach <epeisach@mit.edu>
Thu, 31 Oct 1996 16:30:40 +0000 (16:30 +0000)
options. [krb5-admin/42]

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

src/kadmin/v5passwdd/ChangeLog
src/kadmin/v5passwdd/main.c

index d329893c9359dad1d69f9611c88ba7a1155e6954..7950f8f749ca5ad13e8dabcca81b05ef079594ee 100644 (file)
@@ -1,3 +1,8 @@
+Thu Oct 31 11:20:22 1996  Ezra Peisach  <epeisach@mit.edu>
+
+       * main.c (main): Add -T keyfile and -D debug_level
+               options. [krb5-admin/42] 
+
 Tue Sep 10 14:37:23 1996  Tom Yu  <tlyu@mit.edu>
 
        * v5passwd.M: remove extra args to .TH
index a37e67bfca9737542e55a91669c9b22b9a573f9b..eda3a51e10d978317ea9889d0ba71e5a3409e9fc 100644 (file)
@@ -40,13 +40,14 @@ unhandled_signal(signo)
 void usage()
 {
      fprintf(stderr, "Usage: kadmind [-r realm] [-m] [-nofork] "
-            "[-port port-number]\n");
+            "[-D debuglevel] [-T keytable] [-port port-number]\n");
      exit(1);
 }
 
 int main(int argc, char *argv[])
 {
      int ret, rlen, nofork, oldnames = 0;
+     int timeout = -1;
      krb5_error_code code;
      int debug_level = 0;
 #if    POSIX_SIGNALS
@@ -81,6 +82,19 @@ int main(int argc, char *argv[])
              usage();
            params.kadmind_port = atoi(*argv);
            params.mask |= KADM5_CONFIG_KADMIND_PORT;
+         } else if (strcmp(*argv, "-T") == 0) {
+              argc--; argv++;
+              if (!argc)
+                   usage();
+              params.admin_keytab = *argv;
+              params.mask |= KADM5_CONFIG_ADMIN_KEYTAB;
+              argc--; argv++;
+              continue;
+         } else if (strcmp(*argv, "-D") == 0) {
+              if (!argc)
+                   usage();
+              argc--; argv++;
+              debug_level = atoi(*argv);
          } else
               break;
          argc--; argv++;
@@ -168,6 +182,12 @@ int main(int argc, char *argv[])
 
        exit(1);
      }
+     if (code = proto_init(context, debug_level, timeout)) {
+            krb5_klog_syslog(LOG_ERR, "%s: %s while initializing proto",
+                             programname, error_message(code));
+            fprintf(stderr, "%s: %s while initializing  proto\n",
+                    programname, error_message(code));
+     }
 
      if (
 #if    POSIX_SETJMP