summaryrefslogtreecommitdiff
path: root/source3/smbd
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/smbd
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/smbd')
-rw-r--r--source3/smbd/chgpasswd.c4
-rw-r--r--source3/smbd/conn.c2
-rw-r--r--source3/smbd/fileio.c2
-rw-r--r--source3/smbd/ipc.c2
-rw-r--r--source3/smbd/password.c4
-rw-r--r--source3/smbd/process.c10
-rw-r--r--source3/smbd/sesssetup.c2
-rw-r--r--source3/smbd/vfs-wrap.c6
8 files changed, 16 insertions, 16 deletions
diff --git a/source3/smbd/chgpasswd.c b/source3/smbd/chgpasswd.c
index d0e0f6e143..56e5727b7d 100644
--- a/source3/smbd/chgpasswd.c
+++ b/source3/smbd/chgpasswd.c
@@ -970,8 +970,8 @@ static BOOL check_passwd_history(SAM_ACCOUNT *sampass, const char *plaintext)
return True;
}
- dump_data(100, new_nt_p16, NT_HASH_LEN);
- dump_data(100, pwhistory, PW_HISTORY_ENTRY_LEN*pwHisLen);
+ dump_data(100, (const char *)new_nt_p16, NT_HASH_LEN);
+ dump_data(100, (const char *)pwhistory, PW_HISTORY_ENTRY_LEN*pwHisLen);
memset(zero_md5_nt_pw, '\0', SALTED_MD5_HASH_LEN);
for (i=0; i<pwHisLen; i++) {
diff --git a/source3/smbd/conn.c b/source3/smbd/conn.c
index 26529c77a1..dc7dec4e97 100644
--- a/source3/smbd/conn.c
+++ b/source3/smbd/conn.c
@@ -283,7 +283,7 @@ void msg_force_tdis(int msg_type, pid_t pid, void *buf, size_t len)
connection_struct *conn, *next;
fstring sharename;
- fstrcpy(sharename, buf);
+ fstrcpy(sharename, (const char *)buf);
if (strcmp(sharename, "*") == 0) {
DEBUG(1,("Forcing close of all shares\n"));
diff --git a/source3/smbd/fileio.c b/source3/smbd/fileio.c
index 69b8b57642..ba0766c298 100644
--- a/source3/smbd/fileio.c
+++ b/source3/smbd/fileio.c
@@ -752,7 +752,7 @@ static BOOL setup_write_cache(files_struct *fsp, SMB_OFF_T file_size)
wcp->offset = 0;
wcp->alloc_size = alloc_size;
wcp->data_size = 0;
- if((wcp->data = SMB_MALLOC(wcp->alloc_size)) == NULL) {
+ if((wcp->data = (char *)SMB_MALLOC(wcp->alloc_size)) == NULL) {
DEBUG(0,("setup_write_cache: malloc fail for buffer size %u.\n",
(unsigned int)wcp->alloc_size ));
SAFE_FREE(wcp);
diff --git a/source3/smbd/ipc.c b/source3/smbd/ipc.c
index e3f6521fba..86c6d056a0 100644
--- a/source3/smbd/ipc.c
+++ b/source3/smbd/ipc.c
@@ -163,7 +163,7 @@ void send_trans_reply(char *outbuf,
static BOOL api_rpc_trans_reply(char *outbuf, smb_np_struct *p)
{
BOOL is_data_outstanding;
- char *rdata = SMB_MALLOC(p->max_trans_reply);
+ char *rdata = (char *)SMB_MALLOC(p->max_trans_reply);
int data_len;
if(rdata == NULL) {
diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index 213ef98ea3..2ee8c1232e 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -168,7 +168,7 @@ int register_vuid(auth_serversupplied_info *server_info, DATA_BLOB session_key,
vuser->n_groups = server_info->n_groups;
if (vuser->n_groups) {
- if (!(vuser->groups = memdup(server_info->groups, sizeof(gid_t) * vuser->n_groups))) {
+ if (!(vuser->groups = (gid_t *)memdup(server_info->groups, sizeof(gid_t) * vuser->n_groups))) {
DEBUG(0,("register_vuid: failed to memdup vuser->groups\n"));
data_blob_free(&session_key);
free(vuser);
@@ -316,7 +316,7 @@ void add_session_user(const char *user)
DEBUG(3,("add_session_user: session userlist already too large.\n"));
return;
}
- newlist = SMB_REALLOC( session_userlist, len_session_userlist + PSTRING_LEN );
+ newlist = (char *)SMB_REALLOC( session_userlist, len_session_userlist + PSTRING_LEN );
if( newlist == NULL ) {
DEBUG(1,("Unable to resize session_userlist\n"));
return;
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 0373cd471c..1ec176bd08 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -87,7 +87,7 @@ static void free_queued_message(struct pending_message_list *msg)
for processing.
****************************************************************************/
-static BOOL push_queued_message(enum q_type qt, char *buf, int msg_len, struct timeval *ptv, char *private, size_t private_len)
+static BOOL push_queued_message(enum q_type qt, char *buf, int msg_len, struct timeval *ptv, char *private_data, size_t private_len)
{
struct pending_message_list *tmp_msg;
struct pending_message_list *msg = SMB_MALLOC_P(struct pending_message_list);
@@ -110,8 +110,8 @@ static BOOL push_queued_message(enum q_type qt, char *buf, int msg_len, struct t
msg->msg_time = *ptv;
}
- if (private) {
- msg->private_data = data_blob(private, private_len);
+ if (private_data) {
+ msg->private_data = data_blob(private_data, private_len);
if (msg->private_data.data == NULL) {
DEBUG(0,("push_message: malloc fail (3)\n"));
data_blob_free(&msg->buf);
@@ -249,7 +249,7 @@ struct pending_message_list *get_open_deferred_message(uint16 mid)
for processing.
****************************************************************************/
-BOOL push_sharing_violation_open_smb_message(struct timeval *ptv, char *private, size_t priv_len)
+BOOL push_sharing_violation_open_smb_message(struct timeval *ptv, char *private_data, size_t priv_len)
{
uint16 mid = SVAL(InBuffer,smb_mid);
struct timeval tv;
@@ -275,7 +275,7 @@ BOOL push_sharing_violation_open_smb_message(struct timeval *ptv, char *private,
(unsigned int)tv.tv_sec, (unsigned int)tv.tv_usec));
return push_queued_message(SHARE_VIOLATION_QUEUE, InBuffer,
- smb_len(InBuffer)+4, &tv, private, priv_len);
+ smb_len(InBuffer)+4, &tv, private_data, priv_len);
}
/****************************************************************************
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index 3b33db24e8..95fe571cff 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -223,7 +223,7 @@ static int reply_spnego_kerberos(connection_struct *conn,
fstrcpy(wb_request.domain_name, domain);
- wb_result = winbindd_request(WINBINDD_DOMAIN_INFO,
+ wb_result = winbindd_request_response(WINBINDD_DOMAIN_INFO,
&wb_request, &wb_response);
if (wb_result == NSS_STATUS_SUCCESS) {
diff --git a/source3/smbd/vfs-wrap.c b/source3/smbd/vfs-wrap.c
index abc17a37a2..57442edee6 100644
--- a/source3/smbd/vfs-wrap.c
+++ b/source3/smbd/vfs-wrap.c
@@ -432,15 +432,15 @@ static int copy_reg(const char *source, const char *dest)
return -1;
}
-int vfswrap_rename(vfs_handle_struct *handle, connection_struct *conn, const char *old, const char *new)
+int vfswrap_rename(vfs_handle_struct *handle, connection_struct *conn, const char *oldname, const char *newname)
{
int result;
START_PROFILE(syscall_rename);
- result = rename(old, new);
+ result = rename(oldname, newname);
if (errno == EXDEV) {
/* Rename across filesystems needed. */
- result = copy_reg(old, new);
+ result = copy_reg(oldname, newname);
}
END_PROFILE(syscall_rename);