summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-03-11 00:51:54 +0000
committerJeremy Allison <jra@samba.org>2001-03-11 00:51:54 +0000
commita2e5dbb1120e726ba80b00a159dad1a1ca2e3a18 (patch)
tree86036fde69c9bb29a22d7250b78b80b1fa1b2e8e /source3
parentc4a84783a672734f695defbac25733e5cbf29430 (diff)
downloadsamba-a2e5dbb1120e726ba80b00a159dad1a1ca2e3a18.tar.gz
samba-a2e5dbb1120e726ba80b00a159dad1a1ca2e3a18.tar.bz2
samba-a2e5dbb1120e726ba80b00a159dad1a1ca2e3a18.zip
Remove "BYTE" - we already have uint8 - don't need more conflicts with
system header files... Jeremy. (This used to be commit 31e0ce310ec38b3a3a05b344d6450d442c6be471)
Diffstat (limited to 'source3')
-rw-r--r--source3/include/proto.h8
-rw-r--r--source3/include/smb.h2
-rw-r--r--source3/passdb/passdb.c14
-rw-r--r--source3/passdb/pdb_smbpasswd.c10
-rw-r--r--source3/passdb/pdb_tdb.c12
-rw-r--r--source3/rpc_server/srv_netlog_nt.c4
-rw-r--r--source3/rpc_server/srv_samr_nt.c4
-rw-r--r--source3/smbd/chgpasswd.c6
-rw-r--r--source3/smbd/password.c2
9 files changed, 30 insertions, 32 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 6f37f8ffc9..c1271e7d27 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1857,8 +1857,8 @@ time_t pdb_get_pass_must_change_time (SAM_ACCOUNT *sampass);
uint16 pdb_get_logon_divs (SAM_ACCOUNT *sampass);
uint32 pdb_get_hours_len (SAM_ACCOUNT *sampass);
uint8* pdb_get_hours (SAM_ACCOUNT *sampass);
-BYTE* pdb_get_nt_passwd (SAM_ACCOUNT *sampass);
-BYTE* pdb_get_lanman_passwd (SAM_ACCOUNT *sampass);
+uint8* pdb_get_nt_passwd (SAM_ACCOUNT *sampass);
+uint8* pdb_get_lanman_passwd (SAM_ACCOUNT *sampass);
uint32 pdb_get_user_rid (SAM_ACCOUNT *sampass);
uint32 pdb_get_group_rid (SAM_ACCOUNT *sampass);
uid_t pdb_get_uid (SAM_ACCOUNT *sampass);
@@ -1902,8 +1902,8 @@ BOOL pdb_set_homedir (SAM_ACCOUNT *sampass, char *homedir);
BOOL pdb_set_acct_desc (SAM_ACCOUNT *sampass, char *acct_desc);
BOOL pdb_set_workstations (SAM_ACCOUNT *sampass, char *workstations);
BOOL pdb_set_munged_dial (SAM_ACCOUNT *sampass, char *munged_dial);
-BOOL pdb_set_nt_passwd (SAM_ACCOUNT *sampass, BYTE *pwd);
-BOOL pdb_set_lanman_passwd (SAM_ACCOUNT *sampass, BYTE *pwd);
+BOOL pdb_set_nt_passwd (SAM_ACCOUNT *sampass, uint8 *pwd);
+BOOL pdb_set_lanman_passwd (SAM_ACCOUNT *sampass, uint8 *pwd);
/*The following definitions come from passdb/pdb_smbpasswd.c */
diff --git a/source3/include/smb.h b/source3/include/smb.h
index d16c7661fe..9b2d0ee5f9 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -36,8 +36,6 @@
#define True (1)
#define Auto (2)
-typedef unsigned char BYTE;
-
#ifndef _BOOL
typedef int BOOL;
#define _BOOL /* So we don't typedef BOOL again in vfs.h */
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;
diff --git a/source3/rpc_server/srv_netlog_nt.c b/source3/rpc_server/srv_netlog_nt.c
index 613f8f54b2..764f76e0e4 100644
--- a/source3/rpc_server/srv_netlog_nt.c
+++ b/source3/rpc_server/srv_netlog_nt.c
@@ -130,7 +130,7 @@ static void init_net_r_srv_pwset(NET_R_SRV_PWSET *r_s,
static BOOL get_md4pw(char *md4pw, char *mach_acct)
{
SAM_ACCOUNT *sampass = NULL;
- BYTE *pass;
+ uint8 *pass;
#if 0
/*
@@ -399,7 +399,7 @@ static uint32 net_login_interactive(NET_ID_INFO_1 *id1, SAM_ACCOUNT *sampass, us
static uint32 net_login_network(NET_ID_INFO_2 *id2, SAM_ACCOUNT *sampass)
{
- BYTE *nt_pwd, *lanman_pwd;
+ uint8 *nt_pwd, *lanman_pwd;
DEBUG(5,("net_login_network: lm_len: %d nt_len: %d\n",
id2->hdr_lm_chal_resp.str_str_len,
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index ff484a8ff1..181e1140eb 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -2014,8 +2014,8 @@ static BOOL set_user_info_23(SAM_USER_INFO_23 *id23, uint32 rid)
{
SAM_ACCOUNT *pwd = pdb_getsampwrid(rid);
SAM_ACCOUNT new_pwd;
- BYTE nt_hash[16];
- BYTE lm_hash[16];
+ uint8 nt_hash[16];
+ uint8 lm_hash[16];
pstring buf;
uint32 len;
uint16 acct_ctrl;
diff --git a/source3/smbd/chgpasswd.c b/source3/smbd/chgpasswd.c
index 418ad6a675..21b7722307 100644
--- a/source3/smbd/chgpasswd.c
+++ b/source3/smbd/chgpasswd.c
@@ -547,7 +547,7 @@ BOOL check_lanman_password(char *user, uchar * pass1,
uchar unenc_old_pw[16];
SAM_ACCOUNT *sampass = NULL;
uint16 acct_ctrl;
- BYTE *lanman_pw;
+ uint8 *lanman_pw;
become_root();
sampass = pdb_getsampwnam(user);
@@ -614,7 +614,7 @@ BOOL change_lanman_password(SAM_ACCOUNT *sampass, uchar * pass1,
uchar unenc_new_pw[16];
BOOL ret;
uint16 acct_ctrl;
- BYTE *pwd;
+ uint8 *pwd;
if (sampass == NULL)
{
@@ -710,7 +710,7 @@ BOOL check_oem_password(char *user,
static uchar null_pw[16];
static uchar null_ntpw[16];
SAM_ACCOUNT *sampass = NULL;
- BYTE *lanman_pw, *nt_pw;
+ uint8 *lanman_pw, *nt_pw;
uint16 acct_ctrl;
int new_pw_len;
uchar new_ntp16[16];
diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index 849aa87a75..9731b4140c 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -428,7 +428,7 @@ BOOL smb_password_ok(SAM_ACCOUNT *sampass, uchar chal[8],
{
uchar challenge[8];
char* user_name;
- BYTE *nt_pw, *lm_pw;
+ uint8 *nt_pw, *lm_pw;
if (!lm_pass || !sampass)
return(False);