r1028: More consistancy fixes, which should also fix the build.
authorAndrew Bartlett <abartlet@samba.org>
Sat, 5 Jun 2004 04:32:50 +0000 (04:32 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:56:30 +0000 (12:56 -0500)
Andrew Bartlett

source/auth/auth_sam.c
source/libcli/auth/ntlm_check.c
source/rpc_server/samr/dcesrv_samr.c

index 13b289c412f98c08527700302c64752f53919929..2481b97ce6e338727964641de0c7f0d85e459efc 100644 (file)
@@ -53,8 +53,8 @@ static NTSTATUS sam_password_ok(const struct auth_context *auth_context,
 
        return ntlm_password_check(mem_ctx, &auth_context->challenge, 
                                   &user_info->lm_resp, &user_info->nt_resp, 
-                                  &user_info->lm_interactive_pwd, 
-                                  &user_info->nt_interactive_pwd,
+                                  &user_info->lm_interactive_password, 
+                                  &user_info->nt_interactive_password,
                                   username, 
                                   user_info->smb_name.str, 
                                   user_info->client_domain.str, 
index d12a2714200c15905bcf6ea6c81fc44c5ec2c599..eab150ad4d3a93f6de80db40af15b317f718540d 100644 (file)
@@ -169,8 +169,8 @@ NTSTATUS ntlm_password_check(TALLOC_CTX *mem_ctx,
                             const DATA_BLOB *challenge,
                             const DATA_BLOB *lm_response,
                             const DATA_BLOB *nt_response,
-                            const DATA_BLOB *lm_interactive_pwd,
-                            const DATA_BLOB *nt_interactive_pwd,
+                            const DATA_BLOB *lm_interactive_password,
+                            const DATA_BLOB *nt_interactive_password,
                             const char *username, 
                             const char *client_username, 
                             const char *client_domain,
@@ -184,14 +184,14 @@ NTSTATUS ntlm_password_check(TALLOC_CTX *mem_ctx,
                         username));
        }
 
-       if (nt_interactive_pwd && nt_interactive_pwd->length && nt_pw) { 
-               if (nt_interactive_pwd->length != 16) {
-                       DEBUG(3,("ntlm_password_check: Interactive logon: Invalid NT password length (%d) supplied for user %s\n", (int)nt_interactive_pwd->length,
+       if (nt_interactive_password && nt_interactive_password->length && nt_pw) { 
+               if (nt_interactive_password->length != 16) {
+                       DEBUG(3,("ntlm_password_check: Interactive logon: Invalid NT password length (%d) supplied for user %s\n", (int)nt_interactive_password->length,
                                 username));
                        return NT_STATUS_WRONG_PASSWORD;
                }
 
-               if (memcmp(nt_interactive_pwd->data, nt_pw, 16) == 0) {
+               if (memcmp(nt_interactive_password->data, nt_pw, 16) == 0) {
                        if (user_sess_key) {
                                *user_sess_key = data_blob(NULL, 16);
                                SMBsesskeygen_ntv1(nt_pw, user_sess_key->data);
@@ -203,9 +203,9 @@ NTSTATUS ntlm_password_check(TALLOC_CTX *mem_ctx,
                        return NT_STATUS_WRONG_PASSWORD;
                }
 
-       } else if (lm_interactive_pwd && lm_interactive_pwd->length && lm_pw) { 
-               if (lm_interactive_pwd->length != 16) {
-                       DEBUG(3,("ntlm_password_check: Interactive logon: Invalid LANMAN password length (%d) supplied for user %s\n", (int)lm_interactive_pwd->length,
+       } else if (lm_interactive_password && lm_interactive_password->length && lm_pw) { 
+               if (lm_interactive_password->length != 16) {
+                       DEBUG(3,("ntlm_password_check: Interactive logon: Invalid LANMAN password length (%d) supplied for user %s\n", (int)lm_interactive_password->length,
                                 username));
                        return NT_STATUS_WRONG_PASSWORD;
                }
@@ -216,7 +216,7 @@ NTSTATUS ntlm_password_check(TALLOC_CTX *mem_ctx,
                        return NT_STATUS_WRONG_PASSWORD;
                }
 
-               if (memcmp(lm_interactive_pwd->data, lm_pw, 16) == 0) {
+               if (memcmp(lm_interactive_password->data, lm_pw, 16) == 0) {
                        return NT_STATUS_OK;
                } else {
                        DEBUG(3,("ntlm_password_check: Interactive logon: LANMAN password check failed for user %s\n",
index 3b590baa6e991307ef4dba13df7c70700d6ff90b..195a2b75f9a0b09cfbae3051967f0d8ddd72e403 100644 (file)
@@ -1627,7 +1627,7 @@ static NTSTATUS samr_QueryUserInfo(struct dcesrv_call_state *dce_call, TALLOC_CT
                break;
 
        case 12:
-               QUERY_STRING(msg, info12.profile.name,        "profilePath");
+               QUERY_STRING(msg, info12.profile_path.name,   "profilePath");
                break;
 
        case 13:
@@ -1654,14 +1654,14 @@ static NTSTATUS samr_QueryUserInfo(struct dcesrv_call_state *dce_call, TALLOC_CT
                QUERY_NTTIME(msg, info21.last_logoff,         "lastLogoff");
                QUERY_NTTIME(msg, info21.last_password_change,     "pwdLastSet");
                QUERY_NTTIME(msg, info21.acct_expiry,         "accountExpires");
-               QUERY_APASSC(msg, info21.allow_password_change,    "pwdLastSet");
-               QUERY_FPASSC(msg, info21.force_password_change,    "pwdLastSet");
-               QUERY_STRING(msg, info21.account_name.name,       "sAMAccountName");
+               QUERY_APASSC(msg, info21.allow_password_change,"pwdLastSet");
+               QUERY_FPASSC(msg, info21.force_password_change,"pwdLastSet");
+               QUERY_STRING(msg, info21.account_name.name,   "sAMAccountName");
                QUERY_STRING(msg, info21.full_name.name,      "displayName");
                QUERY_STRING(msg, info21.home_directory.name, "homeDirectory");
                QUERY_STRING(msg, info21.home_drive.name,     "homeDrive");
                QUERY_STRING(msg, info21.logon_script.name,   "scriptPath");
-               QUERY_STRING(msg, info21.profile.name,        "profilePath");
+               QUERY_STRING(msg, info21.profile_path.name,   "profilePath");
                QUERY_STRING(msg, info21.description.name,    "description");
                QUERY_STRING(msg, info21.workstations.name,   "userWorkstations");
                QUERY_STRING(msg, info21.comment.name,        "comment");
@@ -1742,7 +1742,7 @@ static NTSTATUS samr_SetUserInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX
                break;
 
        case 12:
-               SET_STRING(msg, info12.profile.name,        "profilePath");
+               SET_STRING(msg, info12.profile_path.name,   "profilePath");
                break;
 
        case 13:
@@ -1771,8 +1771,8 @@ static NTSTATUS samr_SetUserInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX
                        SET_STRING(msg, info21.comment.name,      "comment");
                IFSET(SAMR_FIELD_LOGON_SCRIPT) 
                        SET_STRING(msg, info21.logon_script.name, "scriptPath");
-               IFSET(SAMR_FIELD_PROFILE)      
-                       SET_STRING(msg, info21.profile.name,      "profilePath");
+               IFSET(SAMR_FIELD_PROFILE_PATH)      
+                       SET_STRING(msg, info21.profile_path.name, "profilePath");
                IFSET(SAMR_FIELD_WORKSTATION)  
                        SET_STRING(msg, info21.workstations.name, "userWorkstations");
                IFSET(SAMR_FIELD_LOGON_HOURS)  
@@ -1796,8 +1796,8 @@ static NTSTATUS samr_SetUserInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX
                        SET_STRING(msg, info23.info.comment.name,      "comment");
                IFSET(SAMR_FIELD_LOGON_SCRIPT) 
                        SET_STRING(msg, info23.info.logon_script.name, "scriptPath");
-               IFSET(SAMR_FIELD_PROFILE)      
-                       SET_STRING(msg, info23.info.profile.name,      "profilePath");
+               IFSET(SAMR_FIELD_PROFILE_PATH)      
+                       SET_STRING(msg, info23.info.profile_path.name, "profilePath");
                IFSET(SAMR_FIELD_WORKSTATION)  
                        SET_STRING(msg, info23.info.workstations.name, "userWorkstations");
                IFSET(SAMR_FIELD_LOGON_HOURS)  
@@ -1839,8 +1839,8 @@ static NTSTATUS samr_SetUserInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX
                        SET_STRING(msg, info25.info.comment.name,      "comment");
                IFSET(SAMR_FIELD_LOGON_SCRIPT) 
                        SET_STRING(msg, info25.info.logon_script.name, "scriptPath");
-               IFSET(SAMR_FIELD_PROFILE)      
-                       SET_STRING(msg, info25.info.profile.name,      "profilePath");
+               IFSET(SAMR_FIELD_PROFILE_PATH)      
+                       SET_STRING(msg, info25.info.profile_path.name, "profilePath");
                IFSET(SAMR_FIELD_WORKSTATION)  
                        SET_STRING(msg, info25.info.workstations.name, "userWorkstations");
                IFSET(SAMR_FIELD_LOGON_HOURS)