1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

5716 Commits

Author SHA1 Message Date
Volker Lendecke
703e438599 s3: Hang the irix kernel oplocks off the NULL ctx
Just a fd_event to be cleaned up. The pipe is closed implicitly.
2010-10-08 21:11:46 +02:00
Volker Lendecke
613a0b6c00 s3: Hang the linux kernel oplocks off the NULL ctx
The destructor that is called removes the signal handler. But at process
exit the signal handling is lost anyway.
2010-10-08 21:11:46 +02:00
Volker Lendecke
ef96bfe885 s3: Call printer_list_parent_init in the parent
Simo, please check!
2010-10-08 21:11:46 +02:00
Volker Lendecke
b5ed09c3af Move talloc_enable_null_tracking() to the s3 daemons 2010-10-08 21:11:45 +02:00
Volker Lendecke
7915142848 s3: Fix input check in is_encrypted_packet
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Oct  8 07:40:52 UTC 2010 on sn-devel-104
2010-10-08 07:40:51 +00:00
Jeremy Allison
cd04af78d5 Fix bug 7716 - acl_xattr and acl_tdb modules don't store unmodified copies of security descriptors.
As pointed out by an OEM, the code within smbd/posix_acl.c, even though passed
a const pointer to a security descriptor, still modifies the ACE entries within
it (which are not const pointers).

This means ACLs stored in the extended attribute by the acl_xattr module have
already been modified by the POSIX acl layer, and are not the original intent
of storing the "unmodified" ACL from the client.

Use dup_sec_desc to make a copy of the incoming ACL on talloc_tos() - that
is what is then modified inside smbd/posix_acl.c, leaving the original ACL
to be correctly stored in the xattr.

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Oct  8 00:37:53 UTC 2010 on sn-devel-104
2010-10-08 00:37:53 +00:00
Volker Lendecke
fd9effce2b s3: Fix the async echo responder for netbios keepalives
This fixes a crash in the echo responder when the client started to send the
NetBIOS-Level 0x85-style keepalive packets. We did not correctly check the
packet length, so the code writing the signing seqnum overwrote memory after
the malloc'ed area for the 4 byte keepalive packet.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Oct  7 19:47:35 UTC 2010 on sn-devel-104
2010-10-07 19:47:35 +00:00
Jeremy Allison
0cec0f0912 Fix crash in SMB2 rename found by gentest. We must always have an lcomp
in the destination struct for a rename, so set the flag appropriately.

Jeremy.
2010-10-06 22:59:15 +00:00
Volker Lendecke
342c79e265 s3: Make the write end of the echo responder pipe non-blocking
Without this, we can get a writable pipe end, but the writev call on the pipe
will block.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Oct  6 13:57:30 UTC 2010 on sn-devel-104
2010-10-06 13:57:30 +00:00
Jeremy Allison
77622acadd Fix crash in SMB2 rename found by gentest. We must always have an lcomp
in the destination struct for a rename, so set the flag appropriately.

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Oct  6 00:29:51 UTC 2010 on sn-devel-104
2010-10-06 00:29:51 +00:00
Volker Lendecke
ea08cd280c s3: Stop using the write cache after an oplock break
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Oct  5 10:09:38 UTC 2010 on sn-devel-104
2010-10-05 10:09:38 +00:00
Volker Lendecke
79a4be4f77 s3: Remove smbd_server_conn from msg_force_tdis 2010-10-03 18:17:09 +02:00
Volker Lendecke
e128b23165 s3: Remove smbd_server_conn from process_blocking_lock_cancel_message 2010-10-03 18:17:09 +02:00
Volker Lendecke
c0eb35c0a2 s3: Remove smbd_server_conn from smb1 receive_unlock_msg 2010-10-03 18:17:09 +02:00
Volker Lendecke
db607331d3 s3: Remove smbd_server_conn from msg_file_was_renamed 2010-10-03 18:17:09 +02:00
Volker Lendecke
3cf3d54fbc s3: Remove smbd_server_conn from validate_my_share_entries 2010-10-03 18:17:09 +02:00
Volker Lendecke
924357ab52 s3: Remove smbd_server_conn from msg_close_file 2010-10-03 18:17:09 +02:00
Volker Lendecke
898f7c9603 s3: Remove smbd_server_conn from smb2 receive_unlock_msg 2010-10-03 18:17:08 +02:00
Volker Lendecke
554f5e7c60 s3: Remove smbd_server_conn from process_kernel_oplock_break 2010-10-03 18:17:08 +02:00
Volker Lendecke
5d1d575e87 s3: Remove smbd_server_conn from process_oplock_break_message 2010-10-03 18:17:08 +02:00
Volker Lendecke
35d6d44e5a s3: Remove smbd_server_conn from process_oplock_async_level2_break_message 2010-10-03 18:17:08 +02:00
Volker Lendecke
1d3aa74e4c s3: Lift smbd_server_conn from initial_break_processing 2010-10-03 18:17:08 +02:00
Volker Lendecke
fb2f0c5bdd s3: Add msg_ctx_to_sconn 2010-10-03 18:17:08 +02:00
Volker Lendecke
4a768fbef7 s3: I thought I had compiled this.... 2010-10-03 13:22:03 +02:00
Volker Lendecke
ff48f7c00c s3: Attempt to fix the IRIX build 2010-10-03 10:54:28 +02:00
Volker Lendecke
97b76364e7 s3: Attempt to fix a ton of warnings on the build farm 2010-10-03 10:51:08 +02:00
Volker Lendecke
c87d4e5ddb s3: Remove talloc_autofree_context() from dmapi.c
This is a place where an explicit dmapi_destroy_session would be needed. But we
don't use a destructor for this.
2010-10-03 10:45:57 +02:00
Steven Danneman
100843ac23 s3:smbd: Increase unsupported IOCTL debug message to 2
Even printing once per connection, level 0 was too spammy with
Windows clients frequently sending FSCTL_GET_OBJECT_ID which
is unsupported.
2010-10-01 13:31:33 -07:00
Steven Danneman
455fccf86b s3:events: Call all ready fd event handlers on each iteration of the main loop
Previously, only one fd handler was being called per main message loop
in all smbd child processes.

In the case where multiple fds are available for reading the fd
corresponding to the event closest to the beginning of the event list
would be run.  Obviously this is arbitrary and could cause unfairness.

Usually, the first event fd is the network socket, meaning heavy load
of client requests can starve out other fd events such as oplock
or notify upcalls from the kernel.

In this patch, I have changed the behavior of run_events() to unset
any fd that it has already called a handler function, as well
as decrement the number of fds that were returned from select().
This allows the caller of run_events() to iterate it, until all
available fds have been handled.

I then changed the main loop in smbd child processes to iterate
run_events().  This way, all available fds are handled on each wake
of select, while still checking for timed or signalled events between
each handler function call.  I also added an explicit check for
EINTR from select(), which previously was masked by the fact that
run_events() would handle any signal event before the return code
was checked.

This required a signature change to run_events() but all other callers
should have no change in their behavior.  I also fixed a bug in
run_events() where it could be called with a selrtn value of -1,
doing unecessary looping through the fd_event list when no fds were
available.

Also, remove the temporary echo handler hack, as all fds should be
treated fairly now.
2010-10-01 13:31:33 -07:00
Günther Deschner
b38d0542e1 samba: share select wrappers.
Guenther
2010-10-01 22:30:22 +02:00
Volker Lendecke
a3e211ca3f s3: Attempt to fix bug 7518
If select returns -1, we can't rely on the fd sets. The current code might loop
endlessly because when putting an invalid fd (the closed socket?) on the read
set, a select implementation might choose not to touch it but directly return
with EINVAL. Thus run_events will see the socket readable, which leads to a
"return true", and thus a NT_STATUS_RETRY -> same game again.

We should never get into this situation, but to me the logfiles given in bug
7518 do not reveal enough information to understand how this can happen.
2010-09-28 19:22:50 +02:00
Volker Lendecke
51bc104c5c s3: Increase the debuglevel for connection termination msgs 2010-09-28 10:40:17 +02:00
Volker Lendecke
94dc2c106b s3: Lift smbd_messaging_context() from open_sockets_smbd() 2010-09-28 07:36:18 +02:00
Volker Lendecke
790ad3d1a4 s3: Remove two calls to procid_self() 2010-09-28 07:36:18 +02:00
Volker Lendecke
49b4d2e652 s3: Remove some remaining files.c globals to sconn 2010-09-28 07:36:18 +02:00
Volker Lendecke
d26d79b640 s3: Remove talloc_autofree_context() from files.c 2010-09-28 07:36:18 +02:00
Volker Lendecke
eadc4b5b78 s3: Lift smbd_server_conn from file_find_fd 2010-09-28 07:36:18 +02:00
Volker Lendecke
54f7b70212 s3: Remove smbd_server_conn from file_fsp 2010-09-28 07:36:18 +02:00
Volker Lendecke
3009178ee5 s3: Slightly simplify file_fnum
req==NULL should never happen, see the comment
2010-09-28 07:36:18 +02:00
Volker Lendecke
e57811440a s3: Remove smbd_server_conn from file_sync_all 2010-09-28 07:36:17 +02:00
Volker Lendecke
e2222fc19c s3: Remove smbd_server_conn from file_find_subpath 2010-09-28 07:36:17 +02:00
Volker Lendecke
75c6e0e5c7 s3: Lift smbd_server_conn from file_find_di_first 2010-09-28 07:36:17 +02:00
Volker Lendecke
b448e42de4 s3: Lift smbd_server_conn from file_find_dif 2010-09-28 07:36:16 +02:00
Volker Lendecke
fb8686962a s3: Remove smbd_server_conn from files_forall 2010-09-28 07:36:16 +02:00
Volker Lendecke
9fc9ff9bfa s3: Remove smbd_server_conn from file_close_user 2010-09-28 07:36:16 +02:00
Volker Lendecke
25ca1cd1a8 s3: Remove smbd_server_conn from file_close_pid 2010-09-28 07:36:16 +02:00
Volker Lendecke
6a1c4bad13 s3: Remove smbd_server_conn from file_close_conn 2010-09-28 07:36:16 +02:00
Volker Lendecke
c5d2799543 s3: Remove smbd_server_conn from file_new and file_free 2010-09-28 07:36:15 +02:00
Volker Lendecke
5276608151 s3: Lift smbd_server_conn from file_fnum 2010-09-28 07:36:15 +02:00
Volker Lendecke
5e26e4d30f s3: Move "Files" to smbd_server_connection 2010-09-28 07:36:15 +02:00