From: Stefan Metzmacher Date: Thu, 7 Mar 2024 13:47:06 +0000 (+0100) Subject: s3:net: make use of c->explicit_credentials in order to check for valid credentials X-Git-Tag: tdb-1.4.11~743 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e690666fd108667595caf6f062b6665fb8aa604d;p=thirdparty%2Fsamba.git s3:net: make use of c->explicit_credentials in order to check for valid credentials Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider --- diff --git a/source3/utils/net.c b/source3/utils/net.c index 2d9df0a5723..7747aff9171 100644 --- a/source3/utils/net.c +++ b/source3/utils/net.c @@ -295,7 +295,7 @@ static int net_setauthuser(struct net_context *c, int argc, const char **argv) return 0; } - if (!c->opt_user_specified) { + if (!c->explicit_credentials) { d_fprintf(stderr, _("Usage:\n")); d_fprintf(stderr, _(" net setauthuser -U user[%%password]\n" diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c index 614de0f0c5f..6a106af3f89 100644 --- a/source3/utils/net_ads.c +++ b/source3/utils/net_ads.c @@ -2995,7 +2995,7 @@ static int net_ads_keytab_flush(struct net_context *c, return -1; } - if (!c->opt_user_specified && c->opt_password == NULL) { + if (!c->explicit_credentials) { net_use_krb_machine_account(c); } @@ -3036,7 +3036,7 @@ static int net_ads_keytab_add(struct net_context *c, d_printf(_("Processing principals to add...\n")); - if (!c->opt_user_specified && c->opt_password == NULL) { + if (!c->explicit_credentials) { net_use_krb_machine_account(c); } @@ -3092,7 +3092,7 @@ static int net_ads_keytab_delete(struct net_context *c, d_printf(_("Processing principals to delete...\n")); - if (!c->opt_user_specified && c->opt_password == NULL) { + if (!c->explicit_credentials) { net_use_krb_machine_account(c); } @@ -3128,7 +3128,7 @@ static int net_ads_keytab_create(struct net_context *c, int argc, const char **a net_warn_member_options(); - if (!c->opt_user_specified && c->opt_password == NULL) { + if (!c->explicit_credentials) { net_use_krb_machine_account(c); }