mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
libads: Pass "required_flags" through ads_cldap_netlogon_5()
... down to netlogon_pings(). Passing 0 right now, this will change for some callers Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
808b79b4a9
commit
759665fcf2
@ -146,13 +146,15 @@ static bool ads_cldap_netlogon(TALLOC_CTX *mem_ctx,
|
||||
bool ads_cldap_netlogon_5(TALLOC_CTX *mem_ctx,
|
||||
struct sockaddr_storage *ss,
|
||||
const char *realm,
|
||||
uint32_t required_flags,
|
||||
struct NETLOGON_SAM_LOGON_RESPONSE_EX *reply5)
|
||||
{
|
||||
uint32_t nt_version = NETLOGON_NT_VERSION_5 | NETLOGON_NT_VERSION_5EX;
|
||||
struct netlogon_samlogon_response *reply = NULL;
|
||||
bool ret;
|
||||
|
||||
ret = ads_cldap_netlogon(mem_ctx, ss, realm, nt_version, 0, &reply);
|
||||
ret = ads_cldap_netlogon(
|
||||
mem_ctx, ss, realm, nt_version, required_flags, &reply);
|
||||
if (!ret) {
|
||||
return false;
|
||||
}
|
||||
|
@ -33,6 +33,7 @@ bool check_cldap_reply_required_flags(uint32_t ret_flags,
|
||||
bool ads_cldap_netlogon_5(TALLOC_CTX *mem_ctx,
|
||||
struct sockaddr_storage *ss,
|
||||
const char *realm,
|
||||
uint32_t required_flags,
|
||||
struct NETLOGON_SAM_LOGON_RESPONSE_EX *reply5);
|
||||
|
||||
#endif /* _LIBADS_CLDAP_H_ */
|
||||
|
@ -389,7 +389,8 @@ static bool ads_try_connect(ADS_STRUCT *ads, bool gc,
|
||||
DBG_INFO("ads_try_connect: sending CLDAP request to %s (realm: %s)\n",
|
||||
addr, ads->server.realm);
|
||||
|
||||
ok = ads_cldap_netlogon_5(frame, ss, ads->server.realm, &cldap_reply);
|
||||
ok = ads_cldap_netlogon_5(
|
||||
frame, ss, ads->server.realm, 0, &cldap_reply);
|
||||
if (!ok) {
|
||||
DBG_NOTICE("ads_cldap_netlogon_5(%s, %s) failed.\n",
|
||||
addr, ads->server.realm);
|
||||
|
@ -361,10 +361,13 @@ static int net_ads_cldap_netlogon(struct net_context *c, ADS_STRUCT *ads)
|
||||
{
|
||||
char addr[INET6_ADDRSTRLEN];
|
||||
struct NETLOGON_SAM_LOGON_RESPONSE_EX reply;
|
||||
bool ok;
|
||||
|
||||
print_sockaddr(addr, sizeof(addr), &ads->ldap.ss);
|
||||
|
||||
if ( !ads_cldap_netlogon_5(talloc_tos(), &ads->ldap.ss, ads->server.realm, &reply ) ) {
|
||||
ok = ads_cldap_netlogon_5(
|
||||
talloc_tos(), &ads->ldap.ss, ads->server.realm, 0, &reply);
|
||||
if (!ok) {
|
||||
d_fprintf(stderr, _("CLDAP query failed!\n"));
|
||||
return -1;
|
||||
}
|
||||
@ -832,8 +835,8 @@ static int net_ads_workgroup(struct net_context *c, int argc, const char **argv)
|
||||
ads->ldap.port = 389;
|
||||
}
|
||||
|
||||
ok = ads_cldap_netlogon_5(tmp_ctx,
|
||||
&ads->ldap.ss, ads->server.realm, &reply);
|
||||
ok = ads_cldap_netlogon_5(
|
||||
tmp_ctx, &ads->ldap.ss, ads->server.realm, 0, &reply);
|
||||
if (!ok) {
|
||||
d_fprintf(stderr, _("CLDAP query failed!\n"));
|
||||
goto out;
|
||||
|
Loading…
Reference in New Issue
Block a user