]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Improve error for kadmind -proponly without iprop 764/head
authorsashan <anedvedicky@gmail.com>
Wed, 18 Apr 2018 20:40:33 +0000 (22:40 +0200)
committerGreg Hudson <ghudson@mit.edu>
Wed, 25 Apr 2018 15:32:53 +0000 (11:32 -0400)
If kadmind is run with the -proponly flag, check that iprop_enable is
set and output a reasonable error message if it isn't.  Otherwise we
see the confusing message "Invalid argument while initializing
network".

[ghudson@mit.edu: rewrote commit message; edited error message]

ticket: 8673 (new)

src/kadmin/server/ovsec_kadmd.c

index 3d578ca392c43d30fa743b2823e4a05fa9028731..6a6b21401ef333bcb579ab4210bcbd302fb86d46 100644 (file)
@@ -468,6 +468,10 @@ main(int argc, char *argv[])
         fail_to_start(0, _("Missing required realm configuration"));
     if (!(params.mask & KADM5_CONFIG_ACL_FILE))
         fail_to_start(0, _("Missing required ACL file configuration"));
+    if (proponly && !params.iprop_enabled) {
+        fail_to_start(0, _("-proponly can only be used when "
+                           "iprop_enable is true"));
+    }
 
     ret = setup_loop(&params, proponly, &vctx);
     if (ret)