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

5840 Commits

Author SHA1 Message Date
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
Volker Lendecke
f83e7d8f8c s3: Remove "server_fd" global variable 2010-09-28 07:36:15 +02:00
Jeremy Allison
a738f5b846 Small tweak to bugfix for 7698 - Assert causes smbd to panic on invalid NetBIOS session request.
Don't just fail to reply on a bad NBT name, just don't do the
internal action.

Jeremy.
2010-09-27 18:24:53 -07:00
Jeremy Allison
f98d217514 Change to using TDB_INCOMPATIBLE_HASH (the jenkins hash) on all
TDB_CLEAR_IF_FIRST tdb's. For tdb's like gencache where we open
without CLEAR_IF_FIRST and then with CLEAR_IF_FIRST if corrupt
this is still safe to use as if opening an existing tdb the new
hash will be ignored - it's only used on creating a new tdb not
opening an old one.

Jeremy.
2010-09-27 17:18:54 -07:00
Volker Lendecke
3235f44ac4 s3: Make file_fnum static 2010-09-27 18:14:47 +02:00
Volker Lendecke
f1c1959f13 s3: Remove some unused code 2010-09-27 18:14:47 +02:00
Volker Lendecke
6319e0da10 s3: Fix some comments 2010-09-27 18:14:47 +02:00
Volker Lendecke
3b2efdc7d7 s3: Remove talloc_autofree_context() from notify_internal_parent_init() 2010-09-26 17:36:40 +02:00
Jeremy Allison
03841f9e44 Fix bug #7698 - Assert causes smbd to panic on invalid NetBIOS session request.
Found by the CodeNomicon test suites at the SNIA plugfest.

http://www.codenomicon.com/

If an invalid NetBIOS session request is received the code in name_len() in
libsmb/nmblib.c can hit an assert.

Re-write name_len() and name_extract() to use "buf/len" pairs and
always limit reads.

Jeremy.
2010-09-26 03:01:03 -07:00
Volker Lendecke
8a48ca4e3f s3: Remove talloc_autofree_context() from change_to_guest()
pass is freed at the exit of this routine
2010-09-26 03:29:29 +02:00
Volker Lendecke
34c0b166b6 s3: Remove talloc_autofree_context() from serverid_parent_init() 2010-09-26 03:29:28 +02:00
Volker Lendecke
8c55a9b459 s3: Remove talloc_autofree_context() from messaging_tdb_parent_init() 2010-09-26 03:29:28 +02:00
Volker Lendecke
dda1dd63d3 s3: Avoid an explicit ZERO_STRUCT 2010-09-26 01:12:37 +02:00
Volker Lendecke
6ee0d866c2 s3: Lift talloc_autofree_context() from make_auth_context_fixed() 2010-09-26 01:12:37 +02:00
Volker Lendecke
242e329610 s3: Lift talloc_autofree_context() from make_auth_context_subsystem() 2010-09-26 01:12:37 +02:00
Jeremy Allison
d8814b1a48 Fix bug 7694 - Crash bug with invalid SPNEGO token.
Found by the CodeNomicon test suites at the SNIA plugfest.

http://www.codenomicon.com/

If an invalid SPNEGO packet contains no OIDs we crash in the SMB1/SMB2 server
as we indirect the first returned value OIDs[0], which is returned as NULL.

Jeremy.
2010-09-23 21:44:24 -07:00
Jeremy Allison
7170b875c2 Thank goodness for code reviews. Volker caught - this should be lp_posix_pathnames()
not lp_unix_extensions().

Jeremy.
2010-09-22 18:34:19 -07:00
Jeremy Allison
314dc23ecf Fix bug #7693 - smbd changing mode of files on rename
When using "map archive", don't change the archive bit on
renames or writes with UNIX extensions turned on.

Jeremy.
2010-09-22 12:26:13 -07:00
Michael Adam
d25b2adf34 s3:registry: move prototype from reg_init_full.c to its own header. 2010-09-21 08:52:06 +02:00
Günther Deschner
4dbd743e46 s3-util_sid: use shared dom_sid_compare_auth and dom_sid_equal_X functions.
Guenther
2010-09-20 14:04:37 -07:00
Günther Deschner
8e16d6dbdf s3-build: only include ctdbd_conn.h where needed.
Guenther
2010-09-20 13:54:50 -07:00
Günther Deschner
c7fe04abc7 s3-build: only include async headers where needed.
Guenther
2010-09-20 13:54:42 -07:00
Andrew Bartlett
6832d5e933 libcli/auth/ntlmssp Be clear about talloc parents for session keys
The previous API was not clear as to who owned the returned session key.
This fixes a valgrind-found use-after-free in the NTLMSSP key derivation code,
and avoids making allocations - we steal and zero instead.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-16 21:09:17 +10:00
Jeremy Allison
447d96878a Fix all sid_parse returns to be checked. Tidy up some checks and error
messages.

Jeremy.
2010-09-15 15:40:15 -07:00
Günther Deschner
db8cfda320 s3-smbd: prevent call_nt_transact_ioctl() crash in FSCTL_FIND_FILES_BY_SID case.
Jeremy, please check.

Guenther
2010-09-16 00:20:47 +02:00
Jeremy Allison
627de92521 Add check for invalid data size.
Jeremy.
2010-09-15 10:50:50 -07:00
Simo Sorce
8ec7aaef48 s3-rpc_server: Moved ncacn_np declarations in common header file.
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-09-15 12:53:42 +02:00
Simo Sorce
5685914344 s3-rpc_server: Convert rpc_connect_spoolss_pipe into a generic interface.
This way we have one common way to open internal pipes whether they
are shortcircuited or piped to an external process.
2010-09-15 12:53:42 +02:00
Jeremy Allison
b3fccd10a6 Fix bug 7409 - Thousands of reduce_name: couldn't get realpath.
Don't log this at level 1 - every EACCES will generate one.
Thanks to muehlfeld@medizinische-genetik.de for pointing this out.

Jeremy.
2010-09-13 16:54:21 -07:00
Andrew Bartlett
3bb77516b8 s3-privs Convert from user_has_privileges() -> security_token_has_privilege()
This new call is available in the merged privileges code, and
takes an enum as the parameter, rather than a bitmask.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:09 +10:00
Andrew Bartlett
d1bb21b0d5 s3:auth Remove NT_USER_TOKEN
The all UPPER case typedef is no longer the preferred Samba style
and this makes it easier to see that this is the IDL-derivied structure

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:06 +10:00
Andrew Bartlett
4bfc8d3b1a s3-auth Change struct nt_user_token -> struct security_token
This common structure is defined in security.idl

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:05 +10:00
Jeremy Allison
a89b0ef53b Add check missing from previous patch after talloc_strdup().
Jeremy.
2010-09-10 23:33:18 -07:00
Jeremy Allison
1787c1dfc3 Factor out the recent changes into a function - check_parent_exists().
Fix this to ensure that if "start" is manipulated, then "dirpath"
is changed also.

Ensures that when the path:

/a/long/file/name/path.txt

is processed, we first stat:

/a/long/file/name/path.txt

and if this fails, we try to stat:

/a/long/file/name

if this path exists (the normal case when creating a new
entry in a directory) then we no longer do the individual
path name walk, but only do case insensitive lookup on the
last component. If the stat fails we do the full pathname
walk as normal in 3.5.x and below. Metze, examine this
change for your back-port.

Jeremy.
2010-09-10 23:28:15 -07:00
Andreas Schneider
fc1a5dbffb s3-spoolss: Don't leak memory on the session counter list.
Thanks Günther, please check.
2010-09-10 16:10:46 +02:00
Jeremy Allison
e6b85c2a7b More paranoia to ensure SD's can't be set on read-only shares.
Jeremy.
2010-09-09 15:28:43 -07:00
Andreas Schneider
021539570b s3-msdfs: Make auth_serversupplied_info const. 2010-09-09 16:00:08 +02:00
Jeremy Allison
bec9baf88a Don't rely on the underlying ACL modules to enforce share level
security when setting ACLs, check at the call level as well.

Jeremy.
2010-09-08 20:54:38 -07:00
Jeremy Allison
fcac46a612 Optimization suggested by Metze. Without this patch,
FindFirst with 'path\to\some\dir\with\files\*'

triggers the following stat calls

path\to\some\dir\with\files\* => ENOENT
path\
path\to\
path\to\some\
path\to\some\dir\
path\to\some\dir\with\
path\to\some\dir\with\files\
path\to\some\dir\with\files\* => ENOENT

With this patch we get :

path\to\some\dir\with\files\* => ENOENT
path\to\some\dir\with\files = OK

Jeremy.
2010-09-08 16:55:24 -07:00
Björn Jacke
f69085e5ff s3: use monotonic clock for aio timeout 2010-09-07 20:29:13 +02:00
Volker Lendecke
df19469295 s3: On Solaris, iov_len is an int
We can't use &iov.iov_len passing it to a size_t *
2010-09-05 16:41:28 +02:00
Volker Lendecke
5648c3f67e s3: messaging_ctdbd_connection() was only called with procid_self()
Eventually we'll get this right...
2010-08-31 17:07:41 +02:00
Björn Jacke
079baa7688 s3: use fine grained time in netprot response 2010-08-31 15:51:11 +02:00
Andrew Bartlett
8c15cf54ae s3-auth Rename NT_USER_TOKEN user_sids -> sids
This is closer to the struct security_token from security.idl
2010-08-31 10:20:14 +10:00
Volker Lendecke
6beb5563f3 s3: Fix a segfault in the printer code using create_conn_struct 2010-08-30 23:06:32 +02:00
Volker Lendecke
1d3bd5b1c0 s3: Fix some uninitialized variable warnings 2010-08-30 15:57:14 +02:00
Simo Sorce
f3501cf848 s3-smbd: use make_server_info_krb5() in smb2 too.
Signed-off-by: Günther Deschner <gd@samba.org>
2010-08-30 14:24:46 +02:00
Simo Sorce
a413a86daa s3-smbd: use make_server_info_krb5()
Signed-off-by: Günther Deschner <gd@samba.org>
2010-08-30 14:24:38 +02:00
Simo Sorce
ce60d6d9cf s3-smbd: User helper function to resolve kerberos user for smb2
Signed-off-by: Günther Deschner <gd@samba.org>
2010-08-30 14:22:13 +02:00
Simo Sorce
94adbf3726 s3-smbd: Use helper function to resolve kerberos user
Signed-off-by: Günther Deschner <gd@samba.org>
2010-08-30 14:21:53 +02:00
Volker Lendecke
fbf3d03550 s3: Fix an uninitialized variable 2010-08-29 23:14:49 +02:00
Volker Lendecke
f687d43454 s3: Fix the build without cluster 2010-08-29 23:14:49 +02:00
Volker Lendecke
e466bb4af4 s3: Remove smbd_server_fd()
This breaks the perfcol_onefs() build.

Tim, Steve, this use of smbd_server_fd is replacable by calls into
substitute.c. I don't have a onefs environment around to build a fix, so I've
decided to insert an #error, making it not compile. The fix should be pretty
obvious, you can get the socket data via "%I" and "%i" substitutions.
2010-08-29 21:55:25 +02:00
Volker Lendecke
e784e160ec s3: Remove two uses of smbd_server_fd()
Actually, this is a bit cheating. But those two files depend on
smbd_server_conn anyway, it does not make things worse.
2010-08-29 21:55:25 +02:00
Volker Lendecke
744cc26451 s3: Remove smbd_server_fd() from smbd_register_ips 2010-08-29 21:55:24 +02:00
Volker Lendecke
5bbc4df168 s3: Lift smbd_server_fd() from msg_release_ip() 2010-08-29 21:55:24 +02:00
Volker Lendecke
467208e9f4 s3: Lift smbd_server_fd() from release_ip() 2010-08-29 21:55:24 +02:00
Volker Lendecke
6432383926 s3: Remove a use of smbd_server_fd() in smbd main()
The effect this might have is that we set the socket options a bit later in
inetd mode.
2010-08-29 21:55:24 +02:00
Volker Lendecke
70df6fcb2a s3: Pass sconn to check_reload
This removes a use of smbd_server_fd()
2010-08-29 21:55:24 +02:00
Volker Lendecke
babfe23717 s3: Pass sconn instead of msg_ctx to housekeeping_fn 2010-08-29 21:55:24 +02:00
Volker Lendecke
4a58c640cc s3: Set the client_id in substitute.c once
This never changes during a client connection's life, so we can set it
once.
2010-08-29 21:55:23 +02:00
Volker Lendecke
0a8d49575c s3: Remove some references to smbd_server_fd() 2010-08-28 15:05:27 +02:00
Volker Lendecke
755ef5cf11 s3: Remove smbd_server_fd() from set_local_machine_name() 2010-08-28 14:06:10 +02:00
Stefan Metzmacher
db6d1c6276 s3:smbd: s/sa_len/sa_socklen , because sa_len is a macro on IRIX
metze
2010-08-28 08:28:01 +02:00
Jeremy Allison
04f021e692 Fix bug #7653 - When SMB2 is on, Windows 7 clients can not connect as guest to a share.
Fix "security = share" with SMB2 by mapping internally
to "security = user" and "map to guest = Bad User".

Jeremy.
2010-08-27 15:25:04 -07:00
Jeremy Allison
5115f789c0 Fix bug #7651 - mknod and mkfifo fails with "No such file or directory"
Ensure we check the correct stat struct once we've created the
special fix. Thanks to izh1979@gmail.com for pointing out the
bug.

Jeremy.
2010-08-26 16:46:45 -07:00
Günther Deschner
7a05ca2c9c s3-build: use dbwrap.h only where needed.
Guenther
2010-08-26 00:25:55 +02:00
Günther Deschner
184339825d s3-build: include mangle.h only where needed.
Guenther
2010-08-26 00:20:29 +02:00
Günther Deschner
b5bdcdd65e s3-build: only include "fake_file.h" where needed.
Guenther
2010-08-26 00:20:28 +02:00
Günther Deschner
aba1bf4b5e s3-build: only include memcache.h where needed.
Guenther
2010-08-26 00:20:28 +02:00
Günther Deschner
e978a3d3f4 s3-lsa: separate out init_lsa headers.
Guenther
2010-08-25 22:50:39 +02:00
Michael Adam
be598569bb s3:smbd: add nfs quota support to the linux-non-sysquota code
This is based on the implementation for solaris and FreeBSD.
It makes rpc calls out to the nfs server to retrieve quota
information.
2010-08-25 14:05:51 +02:00
Volker Lendecke
d3a0ff311e s3: Make char_flags and base_reverse const arrays
This moves those arrays from dynamic to static, shared memory, removing them
from globals.c.

I did it by dumping the result of init_tables() with dump_data(). Some massage
by an editor macro made it the initializer.
2010-08-24 22:45:41 +02:00
Volker Lendecke
2d81721a3f s3: Move "trans_num" to smbd_server_connection 2010-08-24 21:06:41 +02:00
Volker Lendecke
1808dd0a85 s3: Make srv_send_smb take an sconn instead of a sock fd 2010-08-24 21:06:41 +02:00
Volker Lendecke
177e394f93 s3: Pass the rhost through smb_pam_accountcheck 2010-08-22 22:42:21 +02:00
Volker Lendecke
70c5bed4b2 s3: Replace calls to check_access by allow_access
We already have both the name and address of the client stored now
2010-08-22 14:28:34 +02:00
Volker Lendecke
f35811bfe0 s3: Use sconn->client_id in session_claim 2010-08-20 21:28:44 +02:00
Volker Lendecke
8f7bf85c40 s3: Remove an unused variable 2010-08-18 17:13:48 +02:00
Volker Lendecke
4b5e252354 s3: Add "client_id" to pipes_struct 2010-08-18 11:18:23 +02:00
Volker Lendecke
6d10684556 s3: Remove unneeded "client_address" from connection_struct 2010-08-18 11:18:23 +02:00
Volker Lendecke
7b6835ec1d s3: Add smbd_server_connection->client_id 2010-08-18 11:18:22 +02:00
Volker Lendecke
ac7b63384d s3: Lift smbd_server_fd from reload_services() 2010-08-18 11:18:21 +02:00
Günther Deschner
59289d4fa9 s3-build: only include smb_signing.h where needed.
Guenther
2010-08-18 09:20:13 +02:00
Volker Lendecke
26ff858934 s3: Remove smbd_server_fd() from session_claim 2010-08-17 22:52:03 +02:00
Volker Lendecke
f8ecec21e2 s3: Remove smbd_server_fd() from read_smb_length() 2010-08-17 22:44:04 +02:00
Volker Lendecke
840b0f523b s3: Move read_smb_length() to smbd/reply.c 2010-08-17 22:44:04 +02:00
Volker Lendecke
a58cea0026 s3: Lift smbd_server_fd() from receive_smb_raw_talloc 2010-08-17 22:44:03 +02:00
Volker Lendecke
1f0afe1aed s3: Lift smbd_server_fd() from read_smb_length_return_keepalive 2010-08-17 22:44:03 +02:00
Volker Lendecke
7d164498db s3: Lift smbd_server_fd() from read_data()
All callers have appropriate debug messages themselves
2010-08-17 22:44:03 +02:00
Volker Lendecke
9671547d17 s3: Lift smbd_server_fd() from read_fd_with_timeout() 2010-08-17 22:44:03 +02:00
Volker Lendecke
40ae8b74b6 s3: Remove smbd_server_fd() from write_data()
This completely removes the DEBUG(0, ..) error message from write_data(). I've
gone through all callers of write_data() and made sure that they have their own
equivalent error message printing.
2010-08-17 12:46:53 +02:00
Volker Lendecke
68e86969fa s3: Remove smbd_server_fd() from smbd_process 2010-08-16 22:39:25 +02:00
Volker Lendecke
0bd39c73be s3: Remove smbd_server_fd() from smbd_echo_loop 2010-08-16 22:39:25 +02:00
Volker Lendecke
2cd643865d s3: Remove smbd_server_fd() from smbd_echo_reader 2010-08-16 22:39:25 +02:00
Volker Lendecke
a23483310d s3: Remove smbd_server_fd() from smbd_echo_reply 2010-08-16 22:39:25 +02:00
Volker Lendecke
bb867df269 s3: Remove smbd_server_fd() from keepalive_fn 2010-08-16 22:39:25 +02:00
Volker Lendecke
a2bf46e9ec s3: Remove smbd_server_fd() from smbd_server_connection_handler 2010-08-16 22:39:25 +02:00
Volker Lendecke
8e7a92bc24 s3: Remove smbd_server_fd() from smbd_server_connection_read_handler 2010-08-16 22:39:25 +02:00
Volker Lendecke
6737c3dd32 s3: Remove smbd_server_fd() from chain_reply 2010-08-16 22:39:25 +02:00
Volker Lendecke
b9d052c728 s3: Remove smbd_server_fd() from construct_reply 2010-08-16 22:39:24 +02:00
Volker Lendecke
61989a9e54 s3: Remove smbd_server_fd() from switch_message 2010-08-16 22:39:24 +02:00
Volker Lendecke
ee796255ce s3: Remove smbd_server_fd() from smbd_server_connection_loop_once 2010-08-16 22:39:24 +02:00
Volker Lendecke
95b232a008 s3: Remove smbd_server_fd() from receive_smb_raw_talloc_partial_read 2010-08-16 22:39:24 +02:00
Volker Lendecke
4a27c10903 s3: Remove smbd_server_fd() from make_connection 2010-08-16 22:39:24 +02:00
Volker Lendecke
897d09174d s3: Remove smbd_server_fd() from share_sanity_checks 2010-08-16 22:39:24 +02:00
Volker Lendecke
05604b315b s3: Remove smbd_server_fd() from setup_new_vc_session 2010-08-16 22:39:24 +02:00
Volker Lendecke
a98604d7f2 s3: Remove smbd_server_fd() from make_connection_snum 2010-08-16 22:39:24 +02:00
Volker Lendecke
910e3df7dd s3: Remove smbd_server_fd() from reply_echo 2010-08-16 22:39:23 +02:00
Volker Lendecke
495bb1efb3 s3: Remove smbd_server_fd() from reply_writebraw 2010-08-16 22:39:23 +02:00
Volker Lendecke
36cfc1d145 s3: Remove smbd_server_fd() from send_file_readX 2010-08-16 22:39:23 +02:00
Volker Lendecke
209b3aee1c s3: Remove smbd_server_fd() from send_file_readbraw 2010-08-16 22:39:23 +02:00
Volker Lendecke
cc5f838319 s3: Remove smbd_server_fd() from reply_readbraw_error 2010-08-16 22:39:23 +02:00
Volker Lendecke
59645506a0 s3: Remove smbd_server_fd() from sendfile_short_send 2010-08-16 22:39:23 +02:00
Volker Lendecke
6f85247494 s3: Remove smbd_server_fd() from fake_sendfile 2010-08-16 22:39:23 +02:00
Volker Lendecke
3e28c05e98 s3: Remove smbd_server_fd from netbios_session_retarget 2010-08-16 22:39:22 +02:00
Volker Lendecke
2d571fdddb s3: Remove smbd_server_fd from vfs_pwrite_data 2010-08-16 22:39:22 +02:00
Volker Lendecke
30ce02299b s3: Remove smbd_server_fd from vfs_write_data 2010-08-16 22:39:22 +02:00
Volker Lendecke
a92efa0e47 s3: Remove smbd_server_fd from send_trans2_replies 2010-08-16 22:39:17 +02:00
Volker Lendecke
50b3ee57e2 s3: Remove smbd_server_fd from smbd_initialize_smb2 2010-08-16 22:39:17 +02:00
Volker Lendecke
0e12c216dc s3: Remove smbd_server_fd from reply_special 2010-08-16 22:39:17 +02:00
Volker Lendecke
7a1c32c98a s3: Remove smbd_server_fd from pipe_write_done 2010-08-16 22:39:16 +02:00
Volker Lendecke
7c0c7f3337 s3: Remove smbd_server_fd from send_break_message_smb1 2010-08-16 22:39:16 +02:00
Volker Lendecke
e34c5e235d s3: Remove smbd_server_fd from api_dcerpc_cmd_read/write_done 2010-08-16 22:39:16 +02:00
Volker Lendecke
215d803cdb s3: Remove smbd_server_fd from send_trans_reply 2010-08-16 22:39:16 +02:00
Volker Lendecke
9878fa6f72 s3: Remove smbd_server_fd from send_nt_replies 2010-08-16 22:39:16 +02:00
Volker Lendecke
774bae74d1 s3: Remove smbd_server_fd from blocking_lock_reply_error 2010-08-16 22:39:16 +02:00
Volker Lendecke
9115beb88c s3: Remove smbd_server_fd from generic_blocking_lock_error 2010-08-16 22:39:16 +02:00
Volker Lendecke
c9458a756c s3: Remove smbd_server_fd from handle_aio_read/write_complete 2010-08-16 22:39:16 +02:00
Volker Lendecke
bda7c70bc0 s3: Remove smbd_server_fd from schedule_aio_write_and_X 2010-08-16 22:39:16 +02:00
Volker Lendecke
2f53d1deb7 s3: Add "sock" to smbd_server_connection 2010-08-16 22:39:16 +02:00
Volker Lendecke
96ae457023 s3: Remove get_client_fd() 2010-08-16 13:13:10 +02:00
Volker Lendecke
98187fe309 s3: Increase debug level for shutdown_other_smbds 2010-08-15 09:50:13 +02:00
Volker Lendecke
02002a52f2 s3: Add debugs to shutdown_other_smbds 2010-08-15 09:50:12 +02:00
Volker Lendecke
13a4922ae6 s3: Remove a conn NULL check from claim_connection
We've already dereferenced conn before
2010-08-14 12:27:17 +02:00
Volker Lendecke
ad871b73a2 s3: Fix some error messages 2010-08-13 22:53:06 +02:00
Andreas Schneider
ca8db7fd63 s3-smbd: Publish nt printers.
Reloading of the printers requires rpc services up and running! The
first call in reload_services will be skipped.

Signed-off-by: Simo Sorce <idra@samba.org>
2010-08-13 12:20:10 -04:00
Andreas Schneider
aff002e829 s3-smbd: Move rpc services init to smbd parent.
The move to the parent makes it possible to use an internal rpc pipe
really early and as we migrated serveral parts of samba to rpc function
this is required. This should speed up the fork of a smbd a bit cause
the rpc services are already running.

We still have several problems here which aren't solved. We don't have a
dependency tree here. For example we have to make sure that the registry
is initialized before we can use the winreg pipe. The spoolss server
requires winreg, so we have to start winreg before we can start the
spoolss server. I'm sure there are more dependencies.

Signed-off-by: Simo Sorce <idra@samba.org>
2010-08-13 12:20:10 -04:00
Andreas Schneider
62a2a9e27f s3-smbd: Regroup some init functions.
Signed-off-by: Simo Sorce <idra@samba.org>
2010-08-13 12:20:10 -04:00
Andreas Schneider
9ab62b774f s3-smbd: Fixed indent.
Signed-off-by: Simo Sorce <idra@samba.org>
2010-08-13 12:20:10 -04:00
Andreas Schneider
e18039062c s3-smbd: Cleanup the order of the init functions.
Signed-off-by: Simo Sorce <idra@samba.org>
2010-08-13 12:20:10 -04:00
Andreas Schneider
120bd9775a s3-smbd: Make sure the event context is initialized.
Signed-off-by: Simo Sorce <idra@samba.org>
2010-08-13 12:20:10 -04:00
Volker Lendecke
f7e14a8e5e s3: Reduce the load on the echo handler
If the parent is fast enough, the echo handler should not step in. When the
socket becomes readable, the echo handler goes to sleep for a second. If within
that second, the parent has picked up the SMB request from the net, the echo
handler will just go back to select().
2010-08-12 13:32:16 +02:00
Volker Lendecke
c672797a0a s3: Slightly simplify the logic in smbd_server_echo_handler 2010-08-12 13:31:51 +02:00
Volker Lendecke
c7a2e52ef1 s3: Slightly simplify the logic in smbd_server_connection_handler 2010-08-12 13:31:51 +02:00
Volker Lendecke
277248a4a7 s3: ?true:false is a *bit* pointless :-) 2010-08-12 12:26:56 +02:00
Jeremy Allison
e0f79dabee Fix bug #7608 - Win7 SMB2 authentication causes smbd panic
We need to call setup_ntlmssp_server_info() if status==NT_STATUS_OK,
or if status is anything except NT_STATUS_MORE_PROCESSING_REQUIRED,
as this can trigger map to guest.

Jeremy.
2010-08-09 16:16:24 -07:00
Volker Lendecke
016418d6c2 s3: Remove the smbd_messaging_context from load_printers 2010-08-08 23:37:47 +02:00
Volker Lendecke
1c1d83a532 s3: Remove the smbd_messaging_context from pcap_cache_reload 2010-08-08 23:37:47 +02:00
Volker Lendecke
d0ac5c69fb s3: Remove the smbd_messaging_context from smb_conf_updated 2010-08-08 23:37:47 +02:00
Volker Lendecke
10a76f5d42 s3: Remove the smbd_messaging_context from spoolss_init_cb 2010-08-08 23:37:47 +02:00
Volker Lendecke
b71f2af1a6 s3: Remove some smbd_messaging_context references from smbd_process 2010-08-08 23:37:47 +02:00
Volker Lendecke
37d71a56fd s3: Pass sconn to smbd_process 2010-08-08 23:37:47 +02:00
Volker Lendecke
1702b17494 s3: Lift the server_messaging_context from housekeeping_fn 2010-08-08 23:37:46 +02:00
Volker Lendecke
e64bd85d90 s3: Lift the server_messaging_context from check_reload 2010-08-08 23:37:46 +02:00
Volker Lendecke
53ed39de4a s3: Make check_reload() static 2010-08-08 23:37:46 +02:00
Volker Lendecke
1b60ead64a s3: Lift the server_messaging_context from update_monitored_printq_cache 2010-08-08 18:09:38 +02:00
Volker Lendecke
bc760e79c8 s3: Lift the smbd_messaging_context from start_background_queue 2010-08-08 18:09:33 +02:00
Volker Lendecke
75b4dfd14d s3: Lift the smbd_messaging_context from smbd_setup_sig_hup_handler 2010-08-08 18:09:33 +02:00
Volker Lendecke
5281e62941 s3: Lift the smbd_messaging_context from smbd_sig_hup_handler 2010-08-08 18:09:33 +02:00
Volker Lendecke
39da717fe1 s3: Lift the smbd_messaging_context from reload_services 2010-08-08 18:09:33 +02:00
Volker Lendecke
7c7ffb70fb s3: Lift the smbd_messaging_context from reload_printers 2010-08-08 18:09:33 +02:00
Volker Lendecke
99b2da4504 s3: Lift the smbd_messaging_context from is_printer_published 2010-08-08 16:03:26 +02:00
Volker Lendecke
7d08c25f98 s3: Lift the smbd_messaging_context from nt_printer_publish 2010-08-08 16:03:25 +02:00
Volker Lendecke
e43ffde91f s3: Lift the smbd_messaging_context from nt_printer_remove 2010-08-08 16:03:25 +02:00
Volker Lendecke
80cda2e807 s3: Lift the smbd_messaging_context from nt_printing_tdb_migrate 2010-08-08 16:03:15 +02:00
Volker Lendecke
2d3623529f s3: Lift the smbd_messaging_context from rpc_pipe_open_internal 2010-08-08 16:03:15 +02:00
Volker Lendecke
33256d6478 s3: Lift the smbd_messaging_context from np_open 2010-08-08 16:03:15 +02:00
Volker Lendecke
d5b8a993e0 s3: Remove a direct reference to smbd_server_conn 2010-08-08 16:03:15 +02:00
Stefan Metzmacher
ac9f06c9b9 s3:smbd: fix valgrind warning, sizeof(16) != 16...
metze
2010-08-08 11:05:16 +02:00
Volker Lendecke
72fd7fb49d s3: Remove some references to smbd_messaging_context() 2010-08-07 14:36:59 +02:00
Volker Lendecke
c9b654f581 s3: Remove smbd_messaging_context() from send_stat_cache_delete_message() 2010-08-07 13:16:48 +02:00
Volker Lendecke
b03bc8822b s3: Remove a pointless "else" 2010-08-07 10:30:20 +02:00
Günther Deschner
0f8e032628 s3-netlogon: remove global include of netlogon.h.
This reduces precompiled headers by another 4 MB and also slightly speeds up the
build.

Guenther
2010-08-06 15:46:16 +02:00
Günther Deschner
257a1f1097 s3-krb5: include krb5pac.h where needed.
Guenther
2010-08-06 15:43:37 +02:00
Andreas Schneider
ce2a086119 s3-popt: Only include popt-common.h when needed. 2010-08-05 12:08:31 +02:00
Günther Deschner
c136b84f0d s3-secrets: only include secrets.h when needed.
Guenther
2010-08-05 10:12:25 +02:00