diff options
Diffstat (limited to 'source3/passdb')
-rw-r--r-- | source3/passdb/passdb.c | 14 | ||||
-rw-r--r-- | source3/passdb/pdb_smbpasswd.c | 10 | ||||
-rw-r--r-- | source3/passdb/pdb_tdb.c | 12 |
3 files changed, 18 insertions, 18 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index 949f4b0498..48424b5fa2 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -785,7 +785,7 @@ void copy_sam_passwd(SAM_ACCOUNT *to, const SAM_ACCOUNT *from) static fstring workstations=""; static fstring unknown_str=""; static fstring munged_dial=""; - static BYTE lm_pw[16], nt_pw[16]; + static uint8 lm_pw[16], nt_pw[16]; if (from == NULL || to == NULL) return; @@ -1128,7 +1128,7 @@ uint8* pdb_get_hours (SAM_ACCOUNT *sampass) return (NULL); } -BYTE* pdb_get_nt_passwd (SAM_ACCOUNT *sampass) +uint8* pdb_get_nt_passwd (SAM_ACCOUNT *sampass) { if (sampass) return (sampass->nt_pw); @@ -1136,7 +1136,7 @@ BYTE* pdb_get_nt_passwd (SAM_ACCOUNT *sampass) return (NULL); } -BYTE* pdb_get_lanman_passwd (SAM_ACCOUNT *sampass) +uint8* pdb_get_lanman_passwd (SAM_ACCOUNT *sampass) { if (sampass) return (sampass->lm_pw); @@ -1646,7 +1646,7 @@ BOOL pdb_set_munged_dial (SAM_ACCOUNT *sampass, char *munged_dial) return True; } -BOOL pdb_set_nt_passwd (SAM_ACCOUNT *sampass, BYTE *pwd) +BOOL pdb_set_nt_passwd (SAM_ACCOUNT *sampass, uint8 *pwd) { if ( (!sampass) ||(pwd == NULL) ) return False; @@ -1655,7 +1655,7 @@ BOOL pdb_set_nt_passwd (SAM_ACCOUNT *sampass, BYTE *pwd) sampass->nt_pw = pwd; else { - if ((sampass->nt_pw=(BYTE*)malloc(sizeof(BYTE)*16)) == NULL) + if ((sampass->nt_pw=(uint8*)malloc(sizeof(uint8)*16)) == NULL) { DEBUG(0,("pdb_set_nt_passwd: ERROR - out of memory for nt_pw!\n")); return False; @@ -1667,7 +1667,7 @@ BOOL pdb_set_nt_passwd (SAM_ACCOUNT *sampass, BYTE *pwd) return True; } -BOOL pdb_set_lanman_passwd (SAM_ACCOUNT *sampass, BYTE *pwd) +BOOL pdb_set_lanman_passwd (SAM_ACCOUNT *sampass, uint8 *pwd) { if ( (!sampass) ||(pwd == NULL) ) return False; @@ -1676,7 +1676,7 @@ BOOL pdb_set_lanman_passwd (SAM_ACCOUNT *sampass, BYTE *pwd) sampass->lm_pw = pwd; else { - if ((sampass->lm_pw=(BYTE*)malloc(sizeof(BYTE)*16)) == NULL) + if ((sampass->lm_pw=(uint8*)malloc(sizeof(uint8)*16)) == NULL) { DEBUG(0,("pdb_set_lanman_passwd: ERROR - out of memory for lm_pw!\n")); return False; diff --git a/source3/passdb/pdb_smbpasswd.c b/source3/passdb/pdb_smbpasswd.c index ad07b8a11e..f0b3ef68cd 100644 --- a/source3/passdb/pdb_smbpasswd.c +++ b/source3/passdb/pdb_smbpasswd.c @@ -1157,7 +1157,7 @@ Error was %s\n", pwd->smb_name, pfile2, strerror(errno))); ********************************************************************/ static BOOL build_smb_pass (struct smb_passwd *smb_pw, SAM_ACCOUNT *sampass) { - BYTE *ptr; + uint8 *ptr; if (sampass == NULL) return False; @@ -1169,22 +1169,22 @@ static BOOL build_smb_pass (struct smb_passwd *smb_pw, SAM_ACCOUNT *sampass) if ((ptr=pdb_get_lanman_passwd(sampass)) != NULL) { - if ((smb_pw->smb_passwd=(BYTE*)malloc(sizeof(BYTE)*16)) == NULL) + if ((smb_pw->smb_passwd=(uint8*)malloc(sizeof(uint8)*16)) == NULL) { DEBUG (0,("build_smb_pass: ERROR - Unable to malloc memory!\n")); return False; } - memcpy (smb_pw->smb_passwd, ptr, sizeof(BYTE)*16); + memcpy (smb_pw->smb_passwd, ptr, sizeof(uint8)*16); } if ((ptr=pdb_get_nt_passwd(sampass)) != NULL) { - if ((smb_pw->smb_nt_passwd=(BYTE*)malloc(sizeof(BYTE)*16)) == NULL) + if ((smb_pw->smb_nt_passwd=(uint8*)malloc(sizeof(uint8)*16)) == NULL) { DEBUG (0,("build_smb_pass: ERROR - Unable to malloc memory!\n")); return False; } - memcpy (smb_pw->smb_nt_passwd, ptr, sizeof(BYTE)*16); + memcpy (smb_pw->smb_nt_passwd, ptr, sizeof(uint8)*16); } smb_pw->acct_ctrl = pdb_get_acct_ctrl(sampass); diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c index 1b0cce08fb..740d8b1c5f 100644 --- a/source3/passdb/pdb_tdb.c +++ b/source3/passdb/pdb_tdb.c @@ -46,7 +46,7 @@ static SAM_ACCOUNT global_sam_pass; /********************************************************************** Intialize a SAM_ACCOUNT struct from a BYTE buffer of size len *********************************************************************/ -static BOOL init_sam_from_buffer (SAM_ACCOUNT *sampass, BYTE *buf, +static BOOL init_sam_from_buffer (SAM_ACCOUNT *sampass, uint8 *buf, uint32 buflen) { static fstring username, @@ -61,7 +61,7 @@ static BOOL init_sam_from_buffer (SAM_ACCOUNT *sampass, BYTE *buf, profile_path, acct_desc, workstations; - static BYTE *lm_pw_ptr, + static uint8 *lm_pw_ptr, *nt_pw_ptr, lm_pw[16], nt_pw[16]; @@ -146,7 +146,7 @@ static BOOL init_sam_from_buffer (SAM_ACCOUNT *sampass, BYTE *buf, /********************************************************************** Intialize a BYTE buffer from a SAM_ACCOUNT struct *********************************************************************/ -static uint32 init_buffer_from_sam (BYTE **buf, SAM_ACCOUNT *sampass) +static uint32 init_buffer_from_sam (uint8 **buf, SAM_ACCOUNT *sampass) { size_t len, buflen; @@ -162,7 +162,7 @@ static uint32 init_buffer_from_sam (BYTE **buf, SAM_ACCOUNT *sampass) profile_path, acct_desc, workstations; - BYTE lm_pw[16], + uint8 lm_pw[16], nt_pw[16]; char null_pw[] = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; @@ -232,7 +232,7 @@ static uint32 init_buffer_from_sam (BYTE **buf, SAM_ACCOUNT *sampass) /* malloc the space needed */ - if ( (*buf=(BYTE*)malloc(len)) == NULL) + if ( (*buf=(uint8*)malloc(len)) == NULL) { DEBUG(0,("init_buffer_from_sam: Unable to malloc() memory for buffer!\n")); return (-1); @@ -624,7 +624,7 @@ static BOOL tdb_update_sam(SAM_ACCOUNT* newpwd, BOOL override, int flag) { TDB_CONTEXT *pwd_tdb; TDB_DATA key, data; - BYTE *buf = NULL; + uint8 *buf = NULL; fstring keystr; pstring tdbfile; fstring name; |