krb5 commit: Improve error for kadmind -proponly without iprop

Greg Hudson <[email protected]>
Newsgroups gmane.comp.encryption.kerberos.cvs
Message-ID <[email protected]>
https://github.com/krb5/krb5/commit/20c0296e536b791d051db523cd067398a1c6441d
commit 20c0296e536b791d051db523cd067398a1c6441d
Author: sashan <[email protected]>
Date:   Wed Apr 18 22:40:33 2018 +0200

    Improve error for kadmind -proponly without iprop
    
    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".
    
    [[email protected]: rewrote commit message; edited error message]
    
    ticket: 8673 (new)

 src/kadmin/server/ovsec_kadmd.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/kadmin/server/ovsec_kadmd.c b/src/kadmin/server/ovsec_kadmd.c
index 3d578ca..6a6b214 100644
--- a/src/kadmin/server/ovsec_kadmd.c
+++ b/src/kadmin/server/ovsec_kadmd.c
@@ -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)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.