]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib:cmdline: Set kerberos=required for --use-krb5-ccache=CCACHE
authorAndreas Schneider <asn@samba.org>
Thu, 12 Nov 2020 10:45:05 +0000 (11:45 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 28 Apr 2021 03:43:34 +0000 (03:43 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/cmdline/cmdline.c

index 41c6463a3b8ff1e35be7d60edfdd64a0d1fdfc19..090207488cdd6bbd6d96046111166c63a836b22d 100644 (file)
@@ -653,6 +653,15 @@ static void popt_common_credentials_callback(poptContext popt_ctx,
                        const char *error_string = NULL;
                        int rc;
 
+                       ok = cli_credentials_set_kerberos_state(creds,
+                                                               CRED_USE_KERBEROS_REQUIRED,
+                                                               CRED_SPECIFIED);
+                       if (!ok) {
+                               fprintf(stderr,
+                                       "Failed to set Kerberos state to %s!\n", arg);
+                               exit(1);
+                       }
+
                        rc = cli_credentials_set_ccache(creds,
                                                        lp_ctx,
                                                        arg,