kadmin_startup(): Turn off KLL automatic prompting support in kadmin
authorAlexandra Ellwood <lxs@mit.edu>
Tue, 18 Jul 2006 20:03:10 +0000 (20:03 +0000)
committerAlexandra Ellwood <lxs@mit.edu>
Tue, 18 Jul 2006 20:03:10 +0000 (20:03 +0000)
ticket: 4023

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

src/kadmin/cli/kadmin.c

index 64b4c3f1c0cb3f9f2bb1b63e3658c2f6af28470c..7c07a3d276046015d69394aaf1143b2f9dcd75a5 100644 (file)
 #include <time.h>
 #include "kadmin.h"
 
+#if defined(USE_LOGIN_LIBRARY)
+#include <Kerberos/KerberosLoginPrivate.h>
+#endif
+
 /* special struct to convert flag names for principals
    to actual krb5_flags for a principal */
 struct pflag {
@@ -209,6 +213,15 @@ char *kadmin_startup(argc, argv)
 
     memset((char *) &params, 0, sizeof(params));
     
+#if defined(USE_LOGIN_LIBRARY)
+    /* Turn off all password prompting from the KLL */
+    retval = __KLSetPromptMechanism (klPromptMechanism_None);
+    if (retval) {
+        com_err(whoami, retval, "while calling __KLSetPromptMechanism()");
+        exit(1);
+    }    
+#endif
+    
     if (strcmp (whoami, "kadmin.local") == 0)
        set_com_err_hook(extended_com_err_fn);