s3: fix samlogon client and server calls.
authorGünther Deschner <gd@samba.org>
Wed, 15 Oct 2008 14:14:15 +0000 (16:14 +0200)
committerGünther Deschner <gd@samba.org>
Wed, 15 Oct 2008 14:14:20 +0000 (16:14 +0200)
Guenther

source3/rpc_client/cli_netlogon.c
source3/rpc_server/srv_netlog_nt.c
source3/rpcclient/cmd_netlogon.c

index 23618efd9fc9482a4a5037ed23176976e5fcc461..5f115e537bbe24a2177975c3593ec3988c97dcc3 100644 (file)
@@ -146,7 +146,7 @@ NTSTATUS rpccli_netlogon_sam_logon(struct rpc_pipe_client *cli,
        NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
        struct netr_Authenticator clnt_creds;
        struct netr_Authenticator ret_creds;
-       union netr_LogonInfo *logon;
+       union netr_LogonLevel *logon;
        union netr_Validation validation;
        uint8_t authoritative;
        int validation_level = 3;
@@ -156,7 +156,7 @@ NTSTATUS rpccli_netlogon_sam_logon(struct rpc_pipe_client *cli,
        ZERO_STRUCT(ret_creds);
        ZERO_STRUCT(zeros);
 
-       logon = TALLOC_ZERO_P(mem_ctx, union netr_LogonInfo);
+       logon = TALLOC_ZERO_P(mem_ctx, union netr_LogonLevel);
        if (!logon) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -172,7 +172,7 @@ NTSTATUS rpccli_netlogon_sam_logon(struct rpc_pipe_client *cli,
        netlogon_creds_client_step(cli->dc, &clnt_creds);
 
        switch (logon_type) {
-       case INTERACTIVE_LOGON_TYPE: {
+       case NetlogonInteractiveInformation: {
 
                struct netr_PasswordInfo *password_info;
 
@@ -231,7 +231,7 @@ NTSTATUS rpccli_netlogon_sam_logon(struct rpc_pipe_client *cli,
 
                break;
        }
-       case NET_LOGON_TYPE: {
+       case NetlogonNetworkInformation: {
                struct netr_NetworkInfo *network_info;
                uint8 chal[8];
                unsigned char local_lm_response[24];
@@ -327,7 +327,7 @@ NTSTATUS rpccli_netlogon_sam_network_logon(struct rpc_pipe_client *cli,
        uint8 zeros[16];
        struct netr_Authenticator clnt_creds;
        struct netr_Authenticator ret_creds;
-       union netr_LogonInfo *logon = NULL;
+       union netr_LogonLevel *logon = NULL;
        struct netr_NetworkInfo *network_info;
        uint8_t authoritative;
        union netr_Validation validation;
@@ -342,7 +342,7 @@ NTSTATUS rpccli_netlogon_sam_network_logon(struct rpc_pipe_client *cli,
        ZERO_STRUCT(lm);
        ZERO_STRUCT(nt);
 
-       logon = TALLOC_ZERO_P(mem_ctx, union netr_LogonInfo);
+       logon = TALLOC_ZERO_P(mem_ctx, union netr_LogonLevel);
        if (!logon) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -398,7 +398,7 @@ NTSTATUS rpccli_netlogon_sam_network_logon(struct rpc_pipe_client *cli,
                                           global_myname(),
                                           &clnt_creds,
                                           &ret_creds,
-                                          NET_LOGON_TYPE,
+                                          NetlogonNetworkInformation,
                                           logon,
                                           validation_level,
                                           &validation,
@@ -447,7 +447,7 @@ NTSTATUS rpccli_netlogon_sam_network_logon_ex(struct rpc_pipe_client *cli,
        const char *workstation_name_slash;
        const char *server_name_slash;
        uint8 zeros[16];
-       union netr_LogonInfo *logon = NULL;
+       union netr_LogonLevel *logon = NULL;
        struct netr_NetworkInfo *network_info;
        uint8_t authoritative;
        union netr_Validation validation;
@@ -462,7 +462,7 @@ NTSTATUS rpccli_netlogon_sam_network_logon_ex(struct rpc_pipe_client *cli,
        ZERO_STRUCT(lm);
        ZERO_STRUCT(nt);
 
-       logon = TALLOC_ZERO_P(mem_ctx, union netr_LogonInfo);
+       logon = TALLOC_ZERO_P(mem_ctx, union netr_LogonLevel);
        if (!logon) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -514,7 +514,7 @@ NTSTATUS rpccli_netlogon_sam_network_logon_ex(struct rpc_pipe_client *cli,
        result = rpccli_netr_LogonSamLogonEx(cli, mem_ctx,
                                             server_name_slash,
                                             global_myname(),
-                                            NET_LOGON_TYPE,
+                                            NetlogonNetworkInformation,
                                             logon,
                                             validation_level,
                                             &validation,
index 4e211cfb81fa3555f60c9e301f639e4cd35eefcb..2dc6cd639383fee09eb0003a592743e8e870f39d 100644 (file)
@@ -756,7 +756,7 @@ NTSTATUS _netr_LogonSamLogon(pipes_struct *p,
 {
        NTSTATUS status = NT_STATUS_OK;
        struct netr_SamInfo3 *sam3 = NULL;
-       union netr_LogonInfo *logon = r->in.logon;
+       union netr_LogonLevel *logon = r->in.logon;
        fstring nt_username, nt_domain, nt_workstation;
        auth_usersupplied_info *user_info = NULL;
        auth_serversupplied_info *server_info = NULL;
@@ -838,7 +838,7 @@ NTSTATUS _netr_LogonSamLogon(pipes_struct *p,
        }
 
        switch (r->in.logon_level) {
-       case INTERACTIVE_LOGON_TYPE:
+       case NetlogonInteractiveInformation:
                fstrcpy(nt_username,
                        logon->password->identity_info.account_name.string);
                fstrcpy(nt_domain,
@@ -848,7 +848,7 @@ NTSTATUS _netr_LogonSamLogon(pipes_struct *p,
 
                DEBUG(3,("SAM Logon (Interactive). Domain:[%s].  ", lp_workgroup()));
                break;
-       case NET_LOGON_TYPE:
+       case NetlogonNetworkInformation:
                fstrcpy(nt_username,
                        logon->network->identity_info.account_name.string);
                fstrcpy(nt_domain,
@@ -873,7 +873,7 @@ NTSTATUS _netr_LogonSamLogon(pipes_struct *p,
        status = NT_STATUS_OK;
 
        switch (r->in.logon_level) {
-       case NET_LOGON_TYPE:
+       case NetlogonNetworkInformation:
        {
                const char *wksname = nt_workstation;
 
@@ -902,7 +902,7 @@ NTSTATUS _netr_LogonSamLogon(pipes_struct *p,
                }
                break;
        }
-       case INTERACTIVE_LOGON_TYPE:
+       case NetlogonInteractiveInformation:
                /* 'Interactive' authentication, supplies the password in its
                   MD4 form, encrypted with the session key.  We will convert
                   this to challenge/response for the auth subsystem to chew
index 87ba65c14b57da2daa275810b711c4c5a03456b6..cdcc0ec28dbccf32b201cc9ec9d185866b9f2393 100644 (file)
@@ -688,7 +688,7 @@ static NTSTATUS cmd_netlogon_sam_logon(struct rpc_pipe_client *cli,
                                       const char **argv)
 {
        NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
-       int logon_type = NET_LOGON_TYPE;
+       int logon_type = NetlogonNetworkInformation;
        const char *username, *password;
        int auth_level = 2;
        uint32 logon_param = 0;