diff options
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/notify_kernel.c | 10 | ||||
-rw-r--r-- | source3/smbd/oplock_linux.c | 12 | ||||
-rw-r--r-- | source3/smbd/sesssetup.c | 4 |
3 files changed, 18 insertions, 8 deletions
diff --git a/source3/smbd/notify_kernel.c b/source3/smbd/notify_kernel.c index 8fcc18a09f..c368fd79a1 100644 --- a/source3/smbd/notify_kernel.c +++ b/source3/smbd/notify_kernel.c @@ -101,8 +101,9 @@ static BOOL kernel_check_notify(connection_struct *conn, uint16 vuid, char *path close((int)fd_pending_array[i]); fd_pending_array[i] = (SIG_ATOMIC_T)-1; if (signals_received - i - 1) { - memmove((void *)&fd_pending_array[i], (void *)&fd_pending_array[i+1], - sizeof(SIG_ATOMIC_T)*(signals_received-i-1)); + memmove(CONST_DISCARD(void *, &fd_pending_array[i]), + CONST_DISCARD(void *, &fd_pending_array[i+1]), + sizeof(SIG_ATOMIC_T)*(signals_received-i-1)); } data->directory_handle = -1; signals_received--; @@ -129,8 +130,9 @@ static void kernel_remove_notify(void *datap) if (fd == (int)fd_pending_array[i]) { fd_pending_array[i] = (SIG_ATOMIC_T)-1; if (signals_received - i - 1) { - memmove((void *)&fd_pending_array[i], (void *)&fd_pending_array[i+1], - sizeof(SIG_ATOMIC_T)*(signals_received-i-1)); + memmove(CONST_DISCARD(void *, &fd_pending_array[i]), + CONST_DISCARD(void *, &fd_pending_array[i+1]), + sizeof(SIG_ATOMIC_T)*(signals_received-i-1)); } data->directory_handle = -1; signals_received--; diff --git a/source3/smbd/oplock_linux.c b/source3/smbd/oplock_linux.c index 5de9dd56e6..fe324577e1 100644 --- a/source3/smbd/oplock_linux.c +++ b/source3/smbd/oplock_linux.c @@ -69,16 +69,21 @@ static void set_capability(unsigned capability) #define _LINUX_CAPABILITY_VERSION 0x19980330 #endif /* these can be removed when they are in glibc headers */ - struct { + struct cap_user_header { uint32 version; int pid; } header; - struct { + struct cap_user_data { uint32 effective; uint32 permitted; uint32 inheritable; } data; + extern int capget(struct cap_user_header * hdrp, + struct cap_user_data * datap); + extern int capset(struct cap_user_header * hdrp, + const struct cap_user_data * datap); + header.version = _LINUX_CAPABILITY_VERSION; header.pid = 0; @@ -133,7 +138,8 @@ static BOOL linux_oplock_receive_message(fd_set *fds, char *buffer, int buffer_l fsp = file_find_fd(fd); fd_pending_array[0] = (SIG_ATOMIC_T)-1; if (signals_received > 1) - memmove((void *)&fd_pending_array[0], (void *)&fd_pending_array[1], + memmove(CONST_DISCARD(void *, &fd_pending_array[0]), + CONST_DISCARD(void *, &fd_pending_array[1]), sizeof(SIG_ATOMIC_T)*(signals_received-1)); signals_received--; /* now we can receive more signals */ diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c index 48524b472d..60867df653 100644 --- a/source3/smbd/sesssetup.c +++ b/source3/smbd/sesssetup.c @@ -313,7 +313,9 @@ static int reply_spnego_kerberos(connection_struct *conn, /* wrap that up in a nice GSS-API wrapping */ if (NT_STATUS_IS_OK(ret)) { - ap_rep_wrapped = spnego_gen_krb5_wrap(ap_rep, TOK_ID_KRB_AP_REP); + ap_rep_wrapped = spnego_gen_krb5_wrap( + ap_rep, + CONST_ADD(const uint8 *, TOK_ID_KRB_AP_REP)); } else { ap_rep_wrapped = data_blob(NULL, 0); } |