]> git.samba.org - samba.git/commitdiff
s3:rpc_client: allow passing NetlogonNetwork[Transitive]Information to rpccli_netlogo...
authorStefan Metzmacher <metze@samba.org>
Mon, 15 Jan 2018 11:00:19 +0000 (12:00 +0100)
committerRalph Boehme <slow@samba.org>
Sat, 10 Feb 2018 07:35:15 +0000 (08:35 +0100)
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13234

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/rpc_client/cli_netlogon.c
source3/rpc_client/cli_netlogon.h
source3/winbindd/winbindd_pam.c

index 7dc69c066c7dfcabbd3207228cea8a9ce84a5ae0..d8ccce72e0decbeaac89cec1b8269a073aeb1baa 100644 (file)
@@ -610,6 +610,7 @@ NTSTATUS rpccli_netlogon_network_logon(
        const uint8_t chal[8],
        DATA_BLOB lm_response,
        DATA_BLOB nt_response,
+       enum netr_LogonInfoClass logon_type,
        uint8_t *authoritative,
        uint32_t *flags,
        uint16_t *_validation_level,
@@ -629,6 +630,16 @@ NTSTATUS rpccli_netlogon_network_logon(
        ZERO_STRUCT(lm);
        ZERO_STRUCT(nt);
 
+       switch (logon_type) {
+       case NetlogonNetworkInformation:
+       case NetlogonNetworkTransitiveInformation:
+               break;
+       default:
+               DEBUG(0, ("switch value %d not supported\n",
+                       logon_type));
+               return NT_STATUS_INVALID_INFO_CLASS;
+       }
+
        logon = talloc_zero(mem_ctx, union netr_LogonLevel);
        if (!logon) {
                return NT_STATUS_NO_MEMORY;
@@ -674,7 +685,7 @@ NTSTATUS rpccli_netlogon_network_logon(
 
        status = netlogon_creds_cli_LogonSamLogon(creds_ctx,
                                                  binding_handle,
-                                                 NetlogonNetworkInformation,
+                                                 logon_type,
                                                  logon,
                                                  mem_ctx,
                                                  &validation_level,
index d31bdee461f44fdd1e3ee7c0d7f229479e69d30b..dc04c0b0676d5c09fe98b44f08ae0c1af2caf07f 100644 (file)
@@ -84,6 +84,7 @@ NTSTATUS rpccli_netlogon_network_logon(
        const uint8_t chal[8],
        DATA_BLOB lm_response,
        DATA_BLOB nt_response,
+       enum netr_LogonInfoClass logon_type,
        uint8_t *authoritative,
        uint32_t *flags,
        uint16_t *_validation_level,
index 97425e859f349884b1a8bd1d77bdb1261546da46..b2622a0e92e279caaff02c8eefa46cb5fabd7456 100644 (file)
@@ -1520,6 +1520,7 @@ static NTSTATUS winbind_samlogon_retry_loop(struct winbindd_domain *domain,
                                chal,
                                lm_response,
                                nt_response,
+                               NetlogonNetworkInformation,
                                authoritative,
                                flags,
                                &validation_level,