mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +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>
This commit is contained in:
parent
690c800c33
commit
ab3fc1595c
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…
x
Reference in New Issue
Block a user