mirror of
https://github.com/samba-team/samba.git
synced 2025-01-07 17:18:11 +03:00
s3:utils: let 'net ads testjoin' fail without valid machine credentials
This will allow doing tests and make sure using anonymous credentials
doesn't cause false positive results...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15714
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
(cherry picked from commit ab3fc1595c
)
This commit is contained in:
parent
52772aed8b
commit
d583d40ca3
4
selftest/knownfail.d/net_ads_testjoin
Normal file
4
selftest/knownfail.d/net_ads_testjoin
Normal file
@ -0,0 +1,4 @@
|
||||
^samba3.blackbox.update_keytab_clustered.net_ads_testjoin_initial.clusteredmember
|
||||
^samba3.blackbox.update_keytab_clustered.net_ads_testjoin_after_sync.clusteredmember
|
||||
^samba3.blackbox.update_keytab_clustered.wbinfo_change_secret_after_sync.clusteredmember
|
||||
^samba3.blackbox.update_keytab_clustered.net_ads_testjoin_final.clusteredmember
|
@ -1556,6 +1556,12 @@ static ADS_STATUS net_ads_join_ok(struct net_context *c)
|
||||
|
||||
net_use_krb_machine_account(c);
|
||||
|
||||
if (!cli_credentials_authentication_requested(c->creds)) {
|
||||
DBG_ERR("Failed to get machine credentials\n");
|
||||
TALLOC_FREE(tmp_ctx);
|
||||
return ADS_ERROR_NT(NT_STATUS_ACCESS_DENIED);
|
||||
}
|
||||
|
||||
get_dc_name(lp_workgroup(), lp_realm(), dc_name, &dcip);
|
||||
|
||||
status = ads_startup(c, true, tmp_ctx, &ads);
|
||||
|
Loading…
Reference in New Issue
Block a user