From 19ca97a70f6b7b41d251eaa76e4d3c980c6eedff Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 24 Jun 2005 20:25:18 +0000 Subject: 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) --- source3/smbd/chgpasswd.c | 4 ++-- source3/smbd/conn.c | 2 +- source3/smbd/fileio.c | 2 +- source3/smbd/ipc.c | 2 +- source3/smbd/password.c | 4 ++-- source3/smbd/process.c | 10 +++++----- source3/smbd/sesssetup.c | 2 +- source3/smbd/vfs-wrap.c | 6 +++--- 8 files changed, 16 insertions(+), 16 deletions(-) (limited to 'source3/smbd') 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; ioffset = 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); -- cgit