summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-05-31 13:46:45 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:57:02 -0500
commitf24d88cf9da46680d52b42b92bd484e7b09ce99b (patch)
treeb30342fd7677a0d17306130077995110bfae344a /source3/smbd
parent450e8d5749504f8392c0cfe8b79218f03b88076a (diff)
downloadsamba-f24d88cf9da46680d52b42b92bd484e7b09ce99b.tar.gz
samba-f24d88cf9da46680d52b42b92bd484e7b09ce99b.tar.bz2
samba-f24d88cf9da46680d52b42b92bd484e7b09ce99b.zip
r7139: trying to reduce the number of diffs between trunk and 3.0; changing version to 3.0.20pre1
(This used to be commit 9727d05241574042dd3aa8844ae5c701d22e2da1)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/notify_kernel.c10
-rw-r--r--source3/smbd/service.c6
-rw-r--r--source3/smbd/sesssetup.c15
3 files changed, 14 insertions, 17 deletions
diff --git a/source3/smbd/notify_kernel.c b/source3/smbd/notify_kernel.c
index 5c9d885eed..b2ccfc2796 100644
--- a/source3/smbd/notify_kernel.c
+++ b/source3/smbd/notify_kernel.c
@@ -101,9 +101,8 @@ 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(CONST_DISCARD(void *, &fd_pending_array[i]),
- CONST_DISCARD(void *, &fd_pending_array[i+1]),
- sizeof(SIG_ATOMIC_T)*(signals_received-i-1));
+ memmove((void *)&fd_pending_array[i], (void *)&fd_pending_array[i+1],
+ sizeof(SIG_ATOMIC_T)*(signals_received-i-1));
}
data->directory_handle = -1;
signals_received--;
@@ -130,9 +129,8 @@ 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(CONST_DISCARD(void *, &fd_pending_array[i]),
- CONST_DISCARD(void *, &fd_pending_array[i+1]),
- sizeof(SIG_ATOMIC_T)*(signals_received-i-1));
+ memmove((void *)&fd_pending_array[i], (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/service.c b/source3/smbd/service.c
index 1708c51ff9..c63a43bac0 100644
--- a/source3/smbd/service.c
+++ b/source3/smbd/service.c
@@ -362,7 +362,7 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser,
conn->service = snum;
conn->used = True;
conn->printer = (strncmp(dev,"LPT",3) == 0);
- conn->ipc = ((strncmp(dev,"IPC",3) == 0) || strequal(dev,"ADMIN$"));
+ conn->ipc = ( (strncmp(dev,"IPC",3) == 0) || ( lp_enable_asu_support() && strequal(dev,"ADMIN$")) );
conn->dirptr = NULL;
/* Case options for the share. */
@@ -783,7 +783,9 @@ connection_struct *make_connection(const char *service_in, DATA_BLOB password,
snum = find_service(service);
if (snum < 0) {
- if (strequal(service,"IPC$") || strequal(service,"ADMIN$")) {
+ if (strequal(service,"IPC$")
+ || (lp_enable_asu_support() && strequal(service,"ADMIN$")))
+ {
DEBUG(3,("refusing IPC connection to %s\n", service));
*status = NT_STATUS_ACCESS_DENIED;
return NULL;
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index 9fbf0b1d51..48524b472d 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -25,12 +25,6 @@
uint32 global_client_caps = 0;
-extern BOOL global_encrypted_passwords_negotiated;
-extern BOOL global_spnego_negotiated;
-extern enum protocol_types Protocol;
-extern int max_send;
-extern struct auth_context *negprot_global_auth_context;
-
static struct auth_ntlmssp_state *global_ntlmssp_state;
/*
@@ -319,9 +313,7 @@ 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,
- CONST_ADD(const uint8 *, TOK_ID_KRB_AP_REP));
+ ap_rep_wrapped = spnego_gen_krb5_wrap(ap_rep, TOK_ID_KRB_AP_REP);
} else {
ap_rep_wrapped = data_blob(NULL, 0);
}
@@ -643,8 +635,13 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,
fstring native_lanman;
fstring primary_domain;
static BOOL done_sesssetup = False;
+ extern BOOL global_encrypted_passwords_negotiated;
+ extern BOOL global_spnego_negotiated;
+ extern enum protocol_types Protocol;
+ extern int max_send;
auth_usersupplied_info *user_info = NULL;
+ extern struct auth_context *negprot_global_auth_context;
auth_serversupplied_info *server_info = NULL;
NTSTATUS nt_status;