summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-06-24 20:25:18 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:58:00 -0500
commit19ca97a70f6b7b41d251eaa76e4d3c980c6eedff (patch)
tree18d7d81e2c1aa7cf9325899b7e8fc90b41c14c8b /source3/rpc_server
parent8387af752f81e26f1c141f6053bf6d106f0af5eb (diff)
downloadsamba-19ca97a70f6b7b41d251eaa76e4d3c980c6eedff.tar.gz
samba-19ca97a70f6b7b41d251eaa76e4d3c980c6eedff.tar.bz2
samba-19ca97a70f6b7b41d251eaa76e4d3c980c6eedff.zip
r7882: Looks like a large patch - but what it actually does is make Samba
safe for using our headers and linking with C++ modules. Stops us from using C++ reserved keywords in our code. Jeremy (This used to be commit 9506b8e145982b1160a2f0aee5c9b7a54980940a)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_eventlog_nt.c38
-rw-r--r--source3/rpc_server/srv_samr_util.c8
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c16
3 files changed, 31 insertions, 31 deletions
diff --git a/source3/rpc_server/srv_eventlog_nt.c b/source3/rpc_server/srv_eventlog_nt.c
index 3c6e9a100f..a9b0c9bed8 100644
--- a/source3/rpc_server/srv_eventlog_nt.c
+++ b/source3/rpc_server/srv_eventlog_nt.c
@@ -713,10 +713,10 @@ static Eventlog_entry *_eventlog_read_package_entry(prs_struct *ps,
Eventlog_entry *entry)
{
uint8 *offset;
- Eventlog_entry *new = NULL;
+ Eventlog_entry *ee_new = NULL;
- new = PRS_ALLOC_MEM(ps, Eventlog_entry, 1);
- if(new == NULL)
+ ee_new = PRS_ALLOC_MEM(ps, Eventlog_entry, 1);
+ if(ee_new == NULL)
return NULL;
entry->data_record.sid_padding = ((4 - ((entry->data_record.source_name_len
@@ -767,14 +767,14 @@ static Eventlog_entry *_eventlog_read_package_entry(prs_struct *ps,
memcpy(offset, &(entry->data_record.user_data), entry->data_record.user_data_len);
offset += entry->data_record.user_data_len;
- memcpy(&(new->record), &entry->record, sizeof(Eventlog_record));
- memcpy(&(new->data_record), &entry->data_record, sizeof(Eventlog_data_record));
- new->data = entry->data;
+ memcpy(&(ee_new->record), &entry->record, sizeof(Eventlog_record));
+ memcpy(&(ee_new->data_record), &entry->data_record, sizeof(Eventlog_data_record));
+ ee_new->data = entry->data;
- return new;
+ return ee_new;
}
-static BOOL _eventlog_add_record_to_resp(EVENTLOG_R_READ_EVENTLOG *r_u, Eventlog_entry *new)
+static BOOL _eventlog_add_record_to_resp(EVENTLOG_R_READ_EVENTLOG *r_u, Eventlog_entry *ee_new)
{
Eventlog_entry *insert_point;
@@ -782,8 +782,8 @@ static BOOL _eventlog_add_record_to_resp(EVENTLOG_R_READ_EVENTLOG *r_u, Eventlog
if (NULL == insert_point)
{
- r_u->entry = new;
- new->next = NULL;
+ r_u->entry = ee_new;
+ ee_new->next = NULL;
}
else
{
@@ -791,11 +791,11 @@ static BOOL _eventlog_add_record_to_resp(EVENTLOG_R_READ_EVENTLOG *r_u, Eventlog
{
insert_point=insert_point->next;
}
- new->next = NULL;
- insert_point->next = new;
+ ee_new->next = NULL;
+ insert_point->next = ee_new;
}
r_u->num_records++;
- r_u->num_bytes_in_resp += new->record.length;
+ r_u->num_bytes_in_resp += ee_new->record.length;
return True;
}
@@ -806,7 +806,7 @@ WERROR _eventlog_read_eventlog(pipes_struct *p,
{
Eventlog_info *info = NULL;
POLICY_HND *handle;
- Eventlog_entry entry, *new;
+ Eventlog_entry entry, *ee_new;
BOOL eof = False, eor = False;
const char *direction = "";
uint32 num_records_read = 0;
@@ -854,20 +854,20 @@ WERROR _eventlog_read_eventlog(pipes_struct *p,
_eventlog_read_parse_line(buffer[i], &entry, &eor);
if(eor == True)
{
- /* package new entry */
- if((new = _eventlog_read_package_entry(ps, q_u, r_u, &entry)) == NULL)
+ /* package ee_new entry */
+ if((ee_new = _eventlog_read_package_entry(ps, q_u, r_u, &entry)) == NULL)
{
free(buffer);
return WERR_NOMEM;
}
/* Now see if there is enough room to add */
- if(r_u->num_bytes_in_resp + new->record.length > q_u->max_read_size)
+ if(r_u->num_bytes_in_resp + ee_new->record.length > q_u->max_read_size)
{
- r_u->bytes_in_next_record = new->record.length;
+ r_u->bytes_in_next_record = ee_new->record.length;
/* response would be too big to fit in client-size buffer */
break;
}
- _eventlog_add_record_to_resp(r_u, new);
+ _eventlog_add_record_to_resp(r_u, ee_new);
ZERO_STRUCT(entry);
eor=False;
num_records_read = r_u->num_records - num_records_read;
diff --git a/source3/rpc_server/srv_samr_util.c b/source3/rpc_server/srv_samr_util.c
index 61160ccaa0..66cf1cc46d 100644
--- a/source3/rpc_server/srv_samr_util.c
+++ b/source3/rpc_server/srv_samr_util.c
@@ -251,7 +251,7 @@ void copy_id21_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_21 *from)
}
if (from->fields_present & ACCT_LOGON_HOURS) {
- pstring old, new;
+ pstring oldstr, newstr;
DEBUG(15,("INFO_21 LOGON_DIVS: %08X -> %08X\n",pdb_get_logon_divs(to),from->logon_divs));
if (from->logon_divs != pdb_get_logon_divs(to)) {
pdb_set_logon_divs(to, from->logon_divs, PDB_CHANGED);
@@ -263,9 +263,9 @@ void copy_id21_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_21 *from)
}
DEBUG(15,("INFO_21 LOGON_HRS.HOURS: %s -> %s\n",pdb_get_hours(to),from->logon_hrs.hours));
- pdb_sethexhours(old, pdb_get_hours(to));
- pdb_sethexhours(new, from->logon_hrs.hours);
- if (!strequal(old, new)) {
+ pdb_sethexhours(oldstr, pdb_get_hours(to));
+ pdb_sethexhours(newstr, from->logon_hrs.hours);
+ if (!strequal(oldstr, newstr)) {
pdb_set_hours(to, from->logon_hrs.hours, PDB_CHANGED);
}
}
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 972f6e9730..e05bfa1eaa 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -1445,7 +1445,7 @@ static DEVICEMODE* dup_devicemode(TALLOC_CTX *ctx, DEVICEMODE *devmode)
return NULL;
}
- d->private = TALLOC_MEMDUP(ctx, devmode->private, devmode->driverextra);
+ d->dev_private = TALLOC_MEMDUP(ctx, devmode->dev_private, devmode->driverextra);
return d;
}
@@ -1885,12 +1885,12 @@ BOOL convert_devicemode(const char *printername, const DEVICEMODE *devmode,
* has a new one. JRA.
*/
- if ((devmode->driverextra != 0) && (devmode->private != NULL)) {
- SAFE_FREE(nt_devmode->private);
+ if ((devmode->driverextra != 0) && (devmode->dev_private != NULL)) {
+ SAFE_FREE(nt_devmode->nt_dev_private);
nt_devmode->driverextra=devmode->driverextra;
- if((nt_devmode->private=SMB_MALLOC_ARRAY(uint8, nt_devmode->driverextra)) == NULL)
+ if((nt_devmode->nt_dev_private=SMB_MALLOC_ARRAY(uint8, nt_devmode->driverextra)) == NULL)
return False;
- memcpy(nt_devmode->private, devmode->private, nt_devmode->driverextra);
+ memcpy(nt_devmode->nt_dev_private, devmode->dev_private, nt_devmode->driverextra);
}
*pp_nt_devmode = nt_devmode;
@@ -4089,7 +4089,7 @@ static void free_dev_mode(DEVICEMODE *dev)
if (dev == NULL)
return;
- SAFE_FREE(dev->private);
+ SAFE_FREE(dev->dev_private);
SAFE_FREE(dev);
}
@@ -4132,8 +4132,8 @@ static BOOL convert_nt_devicemode( DEVICEMODE *devmode, NT_DEVICEMODE *ntdevmode
devmode->mediatype = ntdevmode->mediatype;
devmode->dithertype = ntdevmode->dithertype;
- if (ntdevmode->private != NULL) {
- if ((devmode->private=(uint8 *)memdup(ntdevmode->private, ntdevmode->driverextra)) == NULL)
+ if (ntdevmode->nt_dev_private != NULL) {
+ if ((devmode->dev_private=(uint8 *)memdup(ntdevmode->nt_dev_private, ntdevmode->driverextra)) == NULL)
return False;
}