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

568 Commits

Author SHA1 Message Date
Stefan Metzmacher
8be8d911a8 s3:smbd: allow SMB2 only if we don't use security = share
metze
2009-06-03 10:51:25 +02:00
Stefan Metzmacher
ebc860ebeb s3:smbd: move SMB1 specific stuff into a substructure of smbd_server_connection
metze
2009-05-26 10:48:12 +02:00
Stefan Metzmacher
688945a994 s3:smbd: add infrastructure for SMB2 support
This is disabled by default and activated by
"max protocol = SMB2".

metze
2009-05-20 15:42:24 +02:00
Tim Prouty
6c935f95b3 s3: Fix chained sesssetupAndX/tconn messages
A sesssetupAndX chained with a tconn will not correctly set the TID in
the response header.  I'm seeing an XP client send this chained
sesssetup/tconn when samba has security = share.  Samba's current
behavior is to return a TID of 0 in the smb header rather than the
actual TID.  This patch also updates the UID in the header as well.
2009-05-08 17:09:16 -07:00
Michael Adam
7d6e4c7e95 s3:smbd: fix the fix for mapped IPv4 address handling in release_ip().
It was too late... Thanks Metze for noticing.

Michael
2009-05-08 16:42:56 +02:00
Michael Adam
e86a534fa7 s3: make release_ip() call (ctdb) cope with IPv4 mapped addresses
Michael
2009-05-08 01:18:58 +02:00
Volker Lendecke
c344ad3043 write_data already guarantees everything was written 2009-04-12 14:51:15 +02:00
Stefan Metzmacher
c16c90a1cb s3:smbd: use new simplified snb_signing code in the server
We keep the seqnum/mid mapping in the smb_request structure.

This also moves one global variable into the
smbd_server_connection struct.

metze
2009-03-23 12:21:13 +01:00
Stefan Metzmacher
7716ad68a8 s3:smbd: if we allow trans2 on the IPC$ share, then we have to allow transs2 too.
Otherwise we'll confuse the client signing engine, when we reply an error to each transs2.

metze
2009-03-23 12:21:12 +01:00
Tim Prouty
dea223ba79 make receive_smb_raw_talloc more readable 2009-02-16 00:29:20 -08:00
Jeremy Allison
f6821a15a0 Noted by Vericode analysis. Correctly use chroot().
Jeremy.
2009-02-13 15:02:32 -08:00
todd stecher
54c51a66e3 S3: New module interface for SMB message statistics gathering
This changelist allows for the addition of custom performance
monitoring modules through smb.conf. Entrypoints in the main message
processing code have been added to capture the command, subop, ioctl,
identity and message size statistics.
2009-02-09 13:23:44 -08:00
Volker Lendecke
9941e730ca Fix memleaks in chain_reply for async requests 2009-02-07 19:25:34 +01:00
Volker Lendecke
d94e9c802c Remove the global variable "chain_size" 2009-01-31 11:09:39 +01:00
Stefan Metzmacher
52f6a4436f s3:smbd: make kernel oplocks event driven
And use signal events for Linux oplocks.

metze
2009-01-27 15:28:10 +01:00
Stefan Metzmacher
4a22713495 s3:smbd: remove pointless respond_to_all_remaining_local_messages() function
This the process_kernel_oplock() function never response to messages,
it only generates messages to ourself.

metze
2009-01-27 15:28:10 +01:00
Stefan Metzmacher
ac61f650ae s3:smbd: use signal events for SIGTERM, SIGHUP and SIGCHLD
metze
2009-01-27 15:28:07 +01:00
Stefan Metzmacher
27f812f3a8 s3:smbd: move all code that handles a client connection into smbd_process()
metze
2009-01-27 15:28:07 +01:00
Volker Lendecke
c0fea1f0f7 Fix chain_reply for pipe reads
The caller might have over-allocated reply->outbuf. Deal with that.

Sorry, Günther, for giving you so much pain ...

Volker
2009-01-25 12:18:34 +01:00
Stefan Metzmacher
830b31a41a s3:smbd: we don't need to call message_dispatch() anymore it's event triggered now
metze
2009-01-22 12:37:31 +01:00
Stefan Metzmacher
196028ab7b s3:smbd: restructure kernel oplocks code
This converts the irix oplocks code to use a fd event
and removes the last special case for file descriptors
for the main sys_select().

metze
2009-01-22 12:37:29 +01:00
Stefan Metzmacher
048f8dba14 s3: always call run_events() before and after sys_select()
And always setup the fd events.

metze
2009-01-22 12:37:29 +01:00
Volker Lendecke
55dfad40af "userdom_struct" does not need "full_name" anymore -- unused 2009-01-20 23:10:16 +01:00
Stefan Metzmacher
fcf9f72e04 s3:smbd: call message_dispatch() before processing incoming PDUs
This is a hack to fix races which happen with the RAW-RENAME and RAW-OPLOCK
tests. We should try to remove it later.

metze
2009-01-20 00:40:56 +01:00
Volker Lendecke
0d7ca8e89e remove the old chain_reply code 2009-01-16 13:00:45 +01:00
Volker Lendecke
ddaa65ef6e Correctly calculate the offset for read&x 2009-01-16 13:00:44 +01:00
Volker Lendecke
ba981128ac Add a new implementation of chain_reply
This the global variable "orig_inbuf" in the old chain_reply code. This global
variable was one of the reasons why we had the silly restriction to not allow
async requests within a request chain.
2009-01-16 13:00:28 +01:00
Volker Lendecke
d9c40172bf Fix a type-punned error 2009-01-10 13:05:35 +01:00
Volker Lendecke
50aa8a4ac8 Fix a C++ warning 2009-01-10 13:05:34 +01:00
Stefan Metzmacher
aeb798c325 s3:smbd: handle incoming smb requests via event handlers
We use a fd event and receive incoming smb requests
when the fd becomes readable. It's not completely
nonblocking yet, but it should behave like the old code.

We use timed events to trigger retries for deferred open calls.

metze
2009-01-09 08:45:40 +01:00
Stefan Metzmacher
3dde0cbb76 s3:smbd: move all globals and static variables in globals.[ch]
The goal is to move all this variables into a big context structure.

metze
2009-01-08 12:22:21 +01:00
Stefan Metzmacher
c34d5f445a s3:events: change event_add_timed() prototype to match samba4
metze
2009-01-05 15:07:35 +01:00
Jeremy Allison
2c0faaf5d9 Fix bug #6009 - Setting "min receivefile size = 1" breaks writes.
Jeremy.
2009-01-04 11:47:16 -08:00
Volker Lendecke
1ce9525be2 Replace "goto again" by "return NT_STATUS_RETRY" in receive_message_or_smb
This gives lower-level routines the chance to indicate a retry condition
2008-12-31 19:33:25 +01:00
Volker Lendecke
ae0c6cff25 Remove the direct inbuf reference from construct_reply_common() 2008-12-19 18:08:47 +01:00
Volker Lendecke
5a33e906f6 Make "construct_reply_common" static 2008-11-08 10:42:29 +01:00
Volker Lendecke
b9211deba8 Fix the build 2008-11-05 10:48:43 +01:00
Volker Lendecke
b8125663d9 Make "inbuf" a talloc child of "smb_request" for normal smb requests
This is necessary if we want to keep the whole smb_request for deferred ops.
The explicit settings of req->inbuf will be removed once all those deferring
operations are converted to store the whole request and not just the inbuf.
2008-11-04 20:52:06 +01:00
Volker Lendecke
e4897a5376 Add construct_reply_common_req wrapper
The goal is to remove the remaining direct calls to construct_reply_common.
2008-11-04 20:52:06 +01:00
Volker Lendecke
0953688012 Trigger (and fix) a bug in Samba3 making smbd an infinite data source
A deferred open directly followed by a ulogoffX makes smbd3 send an infinite
stream of ERRinvuid replies :-(
2008-11-04 09:41:15 +01:00
Volker Lendecke
7808a2594c Remove some inbuf references by adding "cmd" to smb_request 2008-11-02 23:17:01 +01:00
Volker Lendecke
2bab73a18d Remove a bunch of direct inbuf references by adding "vwv" to smb_request 2008-11-02 16:58:19 +01:00
Volker Lendecke
7bdb571ec4 Remove a bunch of direct inbuf references by adding "buf" to smb_request 2008-11-01 19:41:08 +01:00
Volker Lendecke
7f9d6f80ef Add a "buflen" struct member to smb_request
This removes some explicit inbuf references and also removes a pointless check
in reply_echo. The buflen can never be more than 64k, this is just a 16 bit
value.
2008-11-01 19:41:07 +01:00
Volker Lendecke
7a0ed93169 Remove unused extern declaration 2008-11-01 19:41:07 +01:00
Volker Lendecke
48d3a1d2fb "fn_new"->"fn" in smb_messages[], we got beyond that :-) 2008-10-19 21:51:17 +02:00
Volker Lendecke
1510b7b8c9 Use a direct compare instead of calling strncmp in valid_smb_header 2008-10-19 21:51:16 +02:00
Volker Lendecke
ac647d03ac Move the global hosts_allow() check out of the processing loop 2008-10-19 21:51:16 +02:00
Jelmer Vernooij
4746f79d50 Use {u,}int64_t instead of SMB_BIG_{U,}INT. 2008-10-14 01:59:36 +02:00
Volker Lendecke
a781b78417 Remove smb_np_struct 2008-10-13 20:59:33 +02:00
Volker Lendecke
d65afbe55f Remove the chain_fsp global 2008-10-13 19:32:39 +02:00
Jeremy Allison
f6c883b4b0 Simply our main loop processing. A lot :-). Correctly use events for all the previous "special" cases.
A step on the way to adding signals to the events and being able to merge the S3 event system with
the S4 one.
Jeremy.
2008-10-03 14:18:35 -07:00
Volker Lendecke
227718cd1a Fix Coverity ID 587
The following test program prints "8" on 64-bit :-)

static void print_size(const char lenbuf[4])
{
        printf("sizeof(lenbuf) = %d\n", (int)sizeof(lenbuf));
}
int main(void)
{
        const char lenbuf[4];
        print_size(lenbuf);
        return 0;
}

Jeremy, please check :-)

Volker
(This used to be commit 9daea0ccfd)
2008-09-01 13:51:11 +02:00
Volker Lendecke
1a7b6fe34d fix smb_len calculation for chained requests
I think chain_reply() is one of the most tricky parts of Samba. This recursion
needs to go away, we need to sequentially walk the chain list.
(This used to be commit af2b01d851)
2008-08-10 18:24:33 +02:00
Volker Lendecke
12b6c1f57d Fix andx offset calculation for more than 2 chained requests
Untested code is broken code.... Test follows later, it's quite an intrusive
change to libsmb/
(This used to be commit 0ff16e8573)
2008-08-10 18:24:32 +02:00
Volker Lendecke
5cd8a42720 Factor out create_outbuf, creating an outbuf just given an inbuf
(This used to be commit 50427cbf63)
2008-06-28 10:38:51 +02:00
Jeremy Allison
d36434f312 Security fix for CVE-2008-1105: Boundary failure when parsing SMB responses
can result in a buffer overrun.
Jeremy.
(This used to be commit 23b825e9d2)
2008-05-28 09:31:42 -07:00
Jeremy Allison
8ca459e067 Fix bug #5477 - recvfile code was broken.
Jeremy.
(This used to be commit 830337f054)
2008-05-20 12:09:48 -07:00
Volker Lendecke
bec1dfab27 Remove "userdom_struct user" from "struct user_struct"
(This used to be commit 420de03523)
2008-05-05 18:28:59 +02:00
Volker Lendecke
a4c0812af0 Fix some "ignoring asprintf result" warnings
(This used to be commit 155d62ddfd)
2008-04-14 13:13:46 +02:00
Jeremy Allison
8b04a33500 Ok, final move of this code :-). I think I've found the correct
place for it now where it will cause minimal disruption (only
call the extra message_dispatch just before reading the next
smb off the wire).
Jeremy.
(This used to be commit da2c19c481)
2008-03-31 17:01:27 -07:00
Jeremy Allison
6913f10134 Move the message_dispatch() call after the check for errno on
the select return. We don't want the call to message_dispatch
to mess up the errno value.
Jeremy.
(This used to be commit 26a74d01bb)
2008-03-31 16:56:21 -07:00
Jeremy Allison
e11cd466e1 Reduce the race condition in Samba4 in RAW-RENAME test. We rename a file
using trans2 setfileinfo on one connection, and then check the
file name has changed on the other. In Samba we achieve this by
sending a local message to the other process. This change causes
us to re-scan for incoming messages after we've woken up from the
select (which is cheap if there are no pending messages). This reduces
the race significantly. Volker please review.
Jeremy.
(This used to be commit a7499e994a)
2008-03-31 16:46:20 -07:00
Volker Lendecke
d634ab06b3 Convert secrets_lock_trust_account_password to talloc
This is preparing the conversion of secrets.c to ctdb
(This used to be commit 1307f0130c)
2008-03-10 21:08:45 +01:00
Jeremy Allison
47666c93a7 Fix a couple of "might be used uninitialized" warnings.
Jeremy.
(This used to be commit b3ac8073a2)
2008-02-05 13:36:17 -08:00
Volker Lendecke
e8f1edb9cd Remove smb_read_error global
YESS :-)
(This used to be commit 26771bdca0)
2008-02-02 11:03:23 +01:00
Volker Lendecke
9e5a5d49de Remove dependency on get_srv_read_error() from main loop
(This used to be commit fad8796892)
2008-02-02 11:03:23 +01:00
Volker Lendecke
eaf7621c51 Convert receive_message_or_smb to NTSTATUS
(This used to be commit 0f7d360a01)
2008-02-02 11:03:23 +01:00
Volker Lendecke
21e7344d2f Make get_srv_read_error static to process.c
(This used to be commit 9e2947039e)
2008-02-02 11:03:23 +01:00
Volker Lendecke
6ddfa6ae77 read_socket_with_timeout_ntstatus->read_socket_with_timeout
(This used to be commit 90554799af)
2008-02-02 11:03:22 +01:00
Volker Lendecke
e514cd0af5 Convert receive_smb_talloc to NTSTATUS
(This used to be commit ddbdd11a49)
2008-02-02 11:03:22 +01:00
Volker Lendecke
9fe66ddd15 Convert receive_smb_raw_talloc to NTSTATUS
(This used to be commit 187707591f)
2008-02-02 11:03:22 +01:00
Volker Lendecke
250b2b6464 Convert receive_smb_raw_talloc_partial_read to NTSTATUS
(This used to be commit 9a82350ba9)
2008-02-02 11:03:22 +01:00
Volker Lendecke
e604e137e2 Convert read_packet_remainder to return NTSTATUS
(This used to be commit 667864d442)
2008-02-02 11:03:22 +01:00
Volker Lendecke
48b1ee61db Convert read_packet_remainder to use read_socket_with_timeout_ntstatus
(This used to be commit fff31f8f35)
2008-02-02 11:03:21 +01:00
Volker Lendecke
0afbfa4284 Convert read_smb_length_return_keepalive to return NTSTATUS
(This used to be commit 73a79a957a)
2008-02-02 11:03:21 +01:00
Volker Lendecke
47e1251f72 Remove an unused external reference
(This used to be commit 147033b9df)
2008-01-27 00:35:14 +01:00
Volker Lendecke
a925a53f61 read_socket_with_timeout has timeout=0 handling
(This used to be commit 7101026061)
2008-01-23 17:09:10 +01:00
Volker Lendecke
5b35ecd930 Remove two unused variables
(This used to be commit f12ac1eced)
2008-01-23 10:33:36 +01:00
Volker Lendecke
18083f1d88 Get the inbuf on talloc_tos()
(This used to be commit 883f741576)
2008-01-12 21:09:43 +01:00
Jeremy Allison
253fbf1a6e Make use of talloc_pool in the main codepaths. Remove the sub-contexts.
Jeremy.
(This used to be commit bc932b8ad4)
2008-01-09 17:11:04 -08:00
Jeremy Allison
29562987c3 Now conn is part of smb_request, we don't need it as
an extra parameter. This cleans up quite a few places
we were passing it around without needing it.
Jeremy.
(This used to be commit 8f36def18e)
2008-01-04 15:37:24 -08:00
Jeremy Allison
9254bb4ef1 Refactor the crypto code after a very helpful conversation
with Volker. Mostly making sure we have data on the incoming
packet type, not stored in the smb header.
Jeremy.
(This used to be commit c4e5a50504)
2008-01-04 12:56:23 -08:00
Jeremy Allison
afce2b245a Add the capability to set "smb encrypt = required"
on a share (or global) and have the server reply with
ACCESS_DENIED for all non-encrypted traffic (except
that used to query encryption requirements and set
encryption state).
Jeremy.
(This used to be commit d241bfa577)
2007-12-27 23:51:03 -08:00
Jeremy Allison
afc93255d1 Add SMB encryption. Still fixing client decrypt but
negotiation works.
Jeremy.
(This used to be commit d78045601a)
2007-12-26 17:12:36 -08:00
Jeremy Allison
a34c6cd0e7 Remove last_message completely as it's no longer used.
Jeremy.
(This used to be commit c378c3edc1)
2007-12-18 18:10:09 -08:00
Jeremy Allison
d068bc64b6 Three more pstring removals.
Jeremy.
(This used to be commit c15819b757)
2007-11-11 21:46:52 -08:00
Volker Lendecke
637f9d9bf0 Fix some warnings
(This used to be commit 0a1f524e8c)
2007-11-09 15:16:26 +01:00
Jeremy Allison
36441da424 Remove the horror that was the global smb_rw_error.
Each cli struct has it's own local copy of this variable,
so use that in client code. In the smbd server, add one
static to smbd/proccess.c and use that inside smbd. Fix
a bunch of places where smb_rw_error could be set by
calling read_data() in places where we weren't reading
from the SMB client socket (ie. winbindd).
Jeremy.
(This used to be commit 255c2adf7b)
2007-11-05 11:12:56 -08:00
Jeremy Allison
58fbb512cc Forgot arg type.
Jeremy.
(This used to be commit 46f3b04dde)
2007-11-04 17:15:35 -08:00
Jeremy Allison
4721050df5 Don't believe len returned from read_smb_length_return_keepalive(),
it may be a UNIX large writeX (which wraps len in that case).
Stevef this should fix your 128k write bug.
Jeremy.
(This used to be commit de2ebffa3c)
2007-11-04 15:38:43 -08:00
Jeremy Allison
5b0b4f23ef Remove most of the remaining globals out of lib/util_sock.c.
I have a plan for dealing with the remaining..... Watch
this space.
Jeremy.
(This used to be commit 963fc76852)
2007-11-03 23:20:10 -07:00
Jeremy Allison
25074433f4 I can't get away without a 'length' arg. :-).
Jeremy.
(This used to be commit 95d01279a5)
2007-11-03 18:41:26 -07:00
Jeremy Allison
6658165d5e Stop get_peer_addr() and client_addr() from using global
statics. Part of my library cleanups.
Jeremy.
(This used to be commit e848506c85)
2007-11-03 18:15:45 -07:00
Jeremy Allison
73d4079680 Remove the smb_read_error global variable and replace
it with accessor functions. "One global or pstring a day...." :-).
Jeremy.
(This used to be commit d50d14c300)
2007-11-03 15:12:42 -07:00
Jeremy Allison
695c4a7a74 Fix vfstest link - move socket calls into smbd/process.c
not smbd/server.c
Jeremy
(This used to be commit 8fbefe18a2)
2007-10-31 14:24:52 -07:00
Jeremy Allison
c3250149e1 Add new parameter, "min receivefile size" (by default set
to zero). If non-zero, writeX calls greater than this
value will be left in the socket buffer for later handling
with recvfile (or userspace equivalent). Definition of
recvfile for your system is left as an exercise for
the reader (I'm working on getting splice working :-).
Jeremy.
(This used to be commit 11c03b75dd)
2007-10-30 16:22:24 -07:00
Jeremy Allison
30191d1a57 RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
(This used to be commit f35a266b3c)
2007-10-18 17:40:25 -07:00
Gerald (Jerry) Carter
e5a951325a [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.
(This used to be commit 5c6c8e1fe9)
2007-10-10 15:34:30 -05:00
Jeremy Allison
12f61e09d9 r25117: The mega-patch Jerry was waiting for. Remove all pstrings from
the main server code paths. We should now be able to cope with
paths up to PATH_MAX length now.
Final job will be to add the TALLOC_CTX * parameter to
unix_convert to make it explicit (for Volker).
Jeremy.
(This used to be commit 7f0db75fb0)
2007-10-10 12:30:41 -05:00
Volker Lendecke
929e1d9920 r24809: Consolidate the use of temporary talloc contexts.
This adds the two functions talloc_stackframe() and talloc_tos().

 * When a new talloc stackframe is allocated with talloc_stackframe(), then
 * the TALLOC_CTX returned with talloc_tos() is reset to that new
 * frame. Whenever that stack frame is TALLOC_FREE()'ed, then the reverse
 * happens: The previous talloc_tos() is restored.
 *
 * This API is designed to be robust in the sense that if someone forgets to
 * TALLOC_FREE() a stackframe, then the next outer one correctly cleans up and
 * resets the talloc_tos().

The original motivation for this patch was to get rid of the
sid_string_static & friends buffers. Explicitly passing talloc context
everywhere clutters code too much for my taste, so an implicit
talloc_tos() is introduced here. Many of these static buffers are
replaced by a single static pointer.

The intended use would thus be that low-level functions can rather
freely push stuff to talloc_tos, the upper layers clean up by freeing
the stackframe. The more of these stackframes are used and correctly
freed the more exact the memory cleanup happens.

This patch removes the main_loop_talloc_ctx, tmp_talloc_ctx and
lp_talloc_ctx (did I forget any?)

So, never do a

tmp_ctx = talloc_init("foo");

anymore, instead, use

tmp_ctx = talloc_stackframe()

:-)

Volker
(This used to be commit 6585ea2cb7)
2007-10-10 12:30:24 -05:00
Volker Lendecke
b578db69e9 r24702: Remove the old API pointers
(This used to be commit 17df313db4)
2007-10-10 12:30:14 -05:00
Jeremy Allison
a662a62e5a r24500: Add check that bcc is correct in an incoming packet.
Jeremy.
(This used to be commit 267a0ac48d)
2007-10-10 12:29:52 -05:00
Jeremy Allison
ed70bc0d8e r24468: Don't forget the +4 for length :-).
Jeremy.
(This used to be commit 4d01e0b744)
2007-10-10 12:29:50 -05:00
Jeremy Allison
a1f593cd73 r24467: Do range checking on incoming smb request.
Jeremy.
(This used to be commit dbd58dd647)
2007-10-10 12:29:50 -05:00
Volker Lendecke
716e01d97e r24457: Convert reply_tcon to the new API
Jeremy, I really apologize for doing this, but I just wanted to enjoy
converting the last SMB call :-)

I've left one little task for you there, I'm not certain that checking
the inbuf length is correct here.

Volker
(This used to be commit 1e08fddafd)
2007-10-10 12:29:49 -05:00
Volker Lendecke
24f42c5cef r24453: Remove the read and write bmpx calls
Talked to both Tridge and Jeremy about this, Tridge said that there is a
special error message persuading OS/2 to fall back to other methods.
The calls now checked in always return the error message we used to
return when "read bmpx = False" was set (the default): ERRSRV, ERRuseSTD.

If someone has a reproducable test case where this is really needed, we
can always dig it up from version control and convert it to the new API.
But that time without that silly parameter, and with a torture test case
for "make test" please :-)

Volker
(This used to be commit d941aae2df)
2007-10-10 12:29:49 -05:00
Jeremy Allison
2823bf10b5 r24445: Convert SMBwritebraw. No test suite unfortunately.... I need to write one for this.
Jeremy
(This used to be commit edc17dfcbd)
2007-10-10 12:29:48 -05:00
Volker Lendecke
527905a09a r24444: Convert reply_find[n]close to the new API
(This used to be commit 6af8595346)
2007-10-10 12:29:48 -05:00
Volker Lendecke
5edcc342c6 r24443: Convert reply_search/fclose to the new API
(This used to be commit a8a33c377e)
2007-10-10 12:29:48 -05:00
Volker Lendecke
f93b093d5f r24442: Convert reply_copy to the new API
(This used to be commit 0cb00c5475)
2007-10-10 12:29:48 -05:00
Volker Lendecke
9c2bfffece r24441: Convert reply_ioctl to the new API
(This used to be commit a5af7ebb7f)
2007-10-10 12:29:48 -05:00
Volker Lendecke
c5572072e5 r24440: Convert the reply_sendXX functions to the new API
(This used to be commit a64bc31098)
2007-10-10 12:29:48 -05:00
Volker Lendecke
90741da80b r24439: Convert reply_get/setattrE to the new API
(This used to be commit 6b0ad071d8)
2007-10-10 12:29:47 -05:00
Volker Lendecke
05fafc1df2 r24436: Convert reply_lockread/writeunlock to the new API
(This used to be commit 1b6add251c)
2007-10-10 12:29:47 -05:00
Volker Lendecke
2ea14d4e98 r24433: Convert reply_ntrename to the new API
(This used to be commit 42b07a52b9)
2007-10-10 12:29:46 -05:00
Volker Lendecke
591669ba06 r24431: Convert the reply_printXX calls to the new API
(This used to be commit e528479f56)
2007-10-10 12:29:46 -05:00
Volker Lendecke
4a989dac81 r24430: Convert reply_writeclose to the new API
(This used to be commit 6def2ee03b)
2007-10-10 12:29:46 -05:00
Volker Lendecke
0f73d64f7d r24428: Convert reply_unlock to the new API
(This used to be commit 01c7426fc0)
2007-10-10 12:29:45 -05:00
Volker Lendecke
ca70ea9310 r24427: Convert reply_lock to the new API
(This used to be commit 212f43ddea)
2007-10-10 12:29:45 -05:00
Volker Lendecke
4c7212b4e4 r24426: Convert reply_read to the new API
(This used to be commit 30aada0ef8)
2007-10-10 12:29:45 -05:00
Volker Lendecke
7c25bf4511 r24425: Convert reply_write to the new API
(This used to be commit 244965f7b6)
2007-10-10 12:29:45 -05:00
Volker Lendecke
fe502551c3 r24423: Convert reply_lseek to the new API
(This used to be commit bd22885386)
2007-10-10 12:29:44 -05:00
Volker Lendecke
dee4ab1533 r24422: Convert reply_ctemp to the new API
(This used to be commit 3cc22fd74f)
2007-10-10 12:29:44 -05:00
Volker Lendecke
06ed827edf r24417: Convert reply_setatr to the new API
(This used to be commit 56bab5ea4c)
2007-10-10 12:29:43 -05:00
Volker Lendecke
73b3ae9c55 r24415: Convert reply_getatr to the new API
(This used to be commit 1a08b97a93)
2007-10-10 12:29:43 -05:00
Volker Lendecke
5fe4384cd9 r24414: Convert reply_mv to the new API
(This used to be commit fa341e4840)
2007-10-10 12:29:42 -05:00
Volker Lendecke
2da44a2dee r24412: Convert reply_open to the new API
(This used to be commit 394987f522)
2007-10-10 12:29:42 -05:00
Volker Lendecke
29df25351d r24406: Push reply_prep_legacy into reply_lockingX
(This used to be commit bce87ebdc0)
2007-10-10 12:29:41 -05:00
Volker Lendecke
ae89ba48ec r24404: Remove get_OutBuffer usage from blocking.c
(This used to be commit cb8fab5663)
2007-10-10 12:29:41 -05:00
Jeremy Allison
d701a47c73 r24387: Convert readbraw to the new api. Volker, keep checking in
your patches please :-). I'll work on SMBreadBmpx tomorrow.
Jeremy.
(This used to be commit 27e183afa8)
2007-10-10 12:29:38 -05:00
Jeremy Allison
5cc0a6b43c r24386: Piss off Volker (not deliberately) by checking in a reply_mknew -> conversion.
Sorry vl, remove one of your 15 patches :-).
Jeremy.
(This used to be commit a7648ed9d4)
2007-10-10 12:29:38 -05:00
Volker Lendecke
6bee410431 r24358: Push reply_prep_legacy into reply_nttrans[s]
(This used to be commit 197c231079)
2007-10-10 12:29:36 -05:00
Volker Lendecke
2fb27fcb69 r24349: For large read&x we need more than 64k of outbuf.
(This used to be commit f7e2eec35f)
2007-10-10 12:29:32 -05:00
Volker Lendecke
d90f6fa1bd r24328: Restore chain_reply error handling
Get the whole smb header from the second chained function, in particular
the error fields
(This used to be commit 0eb831ca0e)
2007-10-10 12:29:30 -05:00
Volker Lendecke
26f6826dfc r24327: First round of fixes to chain_reply
The argument to smb_setlen does not contain the nbt header of 4 bytes

The chained function might allocate outbuf itself (as now happens with
reply_read_and_X). This would erroneously overwrite the caller's outbuf.
Give it an outbuf pointer of it's own
(This used to be commit f923bba908)
2007-10-10 12:29:29 -05:00
Volker Lendecke
61ee2d3720 r24322: Wrap reply_read_and_X in reply_prep_legacy
(This used to be commit 7926b5dfb8)
2007-10-10 12:29:28 -05:00
Volker Lendecke
c898c51984 r24318: Print a prominent warning when reply_prep_legacy is called
This is a temporary function anyway
(This used to be commit 9269e3d588)
2007-10-10 12:29:27 -05:00
Volker Lendecke
b0dc209c19 r24271: Push reply_prep_legacy into reply_write_and_X
(This used to be commit 607e7d2447)
2007-10-10 12:29:24 -05:00
Volker Lendecke
1d3c1de502 r24231: Push allocating InBuffer/OutBuffer into reply_transs
(This used to be commit 74ae19cca6)
2007-10-10 12:29:18 -05:00
Volker Lendecke
133ef281c0 r24229: Push allocating InBuffer/OutBuffer into reply_transs
(This used to be commit 39a7809aa4)
2007-10-10 12:29:18 -05:00
Volker Lendecke
5d2031915e r24225: Convert reply_flush to the new API
(This used to be commit f843c02f07)
2007-10-10 12:29:18 -05:00
Volker Lendecke
c847b2afe7 r24223: Convert reply_echo to the new API
(This used to be commit 4863ff2899)
2007-10-10 12:29:17 -05:00
Volker Lendecke
1d8851f4c7 r24159: Convert reply_transs2 to the new API
(This used to be commit a55a4d71ff)
2007-10-10 12:29:15 -05:00
Volker Lendecke
e2f0b5dd2a r24156: Convert reply_trans2 to the new API
(This used to be commit a9c2d75b42)
2007-10-10 12:29:15 -05:00
Volker Lendecke
b91704d47b r24135: Convert call_trans2open to the new API
This itself won't help much, because send_trans2_replies_new still allocates
the big buffers, but stay tuned :-)

Also add/update my copyright on stuff I recently touched.

Volker
(This used to be commit 248f15ff14)
2007-10-10 12:29:10 -05:00
Volker Lendecke
a0a9a301d2 r24119: Convert reply_exit to the new API
(This used to be commit d4d550aa2b)
2007-10-10 12:29:08 -05:00
Volker Lendecke
4473a5ec54 r24100: Convert reply_ntcancel to the new API
(This used to be commit 6e5f39379f)
2007-10-10 12:29:06 -05:00
Volker Lendecke
d95725370f r24091: Convert reply_ntcreate_and_X to the new API
The routines called will follow
(This used to be commit 28025fc17e)
2007-10-10 12:29:05 -05:00
Volker Lendecke
15dc8917db r24089: Add reply_prep/post_legacy
Routines to ease the transition to the new API
(This used to be commit 1bb2b341e2)
2007-10-10 12:29:04 -05:00
Volker Lendecke
4254af7180 r24088: Convert reply_unlink to the new API
(This used to be commit fb0a1b7bd0)
2007-10-10 12:29:04 -05:00
Volker Lendecke
8084a39ce0 r24086: Convert reply_ulogoffX to the new API
(This used to be commit bbc99e1c3b)
2007-10-10 12:29:04 -05:00
Volker Lendecke
4694e757ba r24085: Convert reply_rmdir to the new API
(This used to be commit 7689048d71)
2007-10-10 12:29:03 -05:00
Volker Lendecke
68513d521d r24084: Convert reply_mkdir to the new API
(This used to be commit e93f3996fc)
2007-10-10 12:29:03 -05:00
Volker Lendecke
ef97e2dece r24079: Convert reply_dskattr to the new API
(This used to be commit c8e0aa5752)
2007-10-10 12:29:03 -05:00
Volker Lendecke
09b3d25252 r24077: Convert reply_tdis to the new API
(This used to be commit bd0cb48dde)
2007-10-10 12:29:02 -05:00
Volker Lendecke
7d2d4ddfa2 r24056: Another big one: This converts reply_sesssetup_and_X to the new API. As usual,
its history can be found on http://samba.org/~vlendec/sesssetup/. This very
obviously needs close review.

Volker
(This used to be commit 35675a6a33)
2007-10-10 12:29:00 -05:00
Volker Lendecke
e5cdc454aa r24046: Fix a 64-bit warning
(This used to be commit a2ecc34aa4)
2007-10-10 12:28:59 -05:00
Volker Lendecke
01d5091c26 r24004: Convert reply_checkpath to the new API
(This used to be commit e5c7c6406a)
2007-10-10 12:28:55 -05:00
Volker Lendecke
db9f25c1c5 r24003: Convert reply_tcon_and_X to the new API
(This used to be commit 9422385d9c)
2007-10-10 12:28:55 -05:00
Volker Lendecke
3d12c53eb3 r24002: Convert reply_negprot to the new API
(This used to be commit bd981f5328)
2007-10-10 12:28:54 -05:00
Volker Lendecke
9e40557047 r23999: Convert reply_open_and_X
This is an example of chained code that is executed in make test
(This used to be commit e3a10e9ffb)
2007-10-10 12:28:54 -05:00
Volker Lendecke
47cdfc0413 r23998: Convert reply_close to the new API
(This used to be commit dbf74cb747)
2007-10-10 12:28:54 -05:00
Volker Lendecke
cc6a41017c r23997: Check in the infrastructure for getting rid of the global InBuffer/OutBuffer
The complete history of this patch can be found under
http://www.samba.org/~vlendec/inbuf-checkin/.

Jeremy, Jerry: If possible I would like to see this in 3.2.0. I'm only
checking into 3_2 at the moment, as it currently will slow down operations for
all non-converted (i.e. all at this moment) operations, as it will copy the
talloc'ed inbuf over the global InBuffer. It will need quite a bit of effort
to convert everything necessary for the normal operations an XP box does.

I have patches for negprot, session setup, tcon_and_X, open_and_X, close. More
to come, but I would appreciate some help here.

Volker
(This used to be commit 5594af2b20)
2007-10-10 12:28:53 -05:00
Volker Lendecke
8579dd4ded r23990: Reformatting for 80 cols and trailing whitespace
(This used to be commit 0484de27d9)
2007-10-10 12:28:53 -05:00
Volker Lendecke
941db29ab4 r23988: Looks a lot more scary than it is: This just unwraps the else-branch of
if (smb_messages[type].fn == NULL) { into the function top-level. Makes
this function a bit easier to understand IMO.

Volker
(This used to be commit ada23b7f06)
2007-10-10 12:28:52 -05:00
Volker Lendecke
799c3ec8d4 r23987: Remove static pid in switch_message()
There's no point in duplicating functionality that exists in
sys_getpid() that also only used in a debug statement
(This used to be commit ebf1b1e97c)
2007-10-10 12:28:52 -05:00
Volker Lendecke
fa919f24f0 r23813: Remove unused global variable
(This used to be commit 3b811134c0)
2007-10-10 12:28:29 -05:00
Andrew Tridgell
5e54558c6d r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit b0132e94fc)
2007-10-10 12:28:22 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
Volker Lendecke
5391750ce6 r23725: Remove get_current_mid()
Jeremy, next one to review :-)
(This used to be commit a50555dda7)
2007-10-10 12:23:49 -05:00
Volker Lendecke
0bc56a2e5f r23724: Reduce access to the global inbuf a tiny bit. Add a struct smb_request
that contains some of the fields from the SMB header, removing the need
to access inbuf directly. This right now is used only in the open file
code & friends, and creating that header is only done when needed. This
needs more work, but it is a start.

Jeremy, I'm only checking this into 3_0, please review before I merge it
to _26.

Volker
(This used to be commit ca988f4e79)
2007-10-10 12:23:48 -05:00
Volker Lendecke
864cad1353 r23537: Revert the inbuf/outbuf part of r23528: This caused the Solaris CC make test
to break. The Solaris CC put the static char InBuffer[TOTAL_BUFFER_SIZE] on an
odd address, the malloc'ed one is always aligned. The problem showed up in
pull_ucs2, ucs2_align uses the address of InBuffer as an indication whether to
bump up the src of the string by one. Unfortunately in the trans calls the
data portion is malloced and thus has different alignment guarantees than a
static variable. This one is bigger....

Volker
(This used to be commit 6affd7818f)
2007-10-10 12:23:26 -05:00
Volker Lendecke
5e8a4c12f9 r23528: Two changes to make the valgrind massif (heap profiler) output readable:
Remove the allocated inbuf/output. In async I/O we copy the buffers
explicitly now, so NewInBuffer is called exactly once. This does not
reduce memory footprint, but removes one of the larger chunks that
clobber the rest of the massif output

In getgroups_unix_user on Linux 2.6 we allocated 64k groups x 4 bytes
per group x 2 (once in the routine itself and once in libc) = 512k just
to throw it away directly again. This reduces it do a more typical limit
of 32 groups per user. We certainly cope with overflow fine if 32 is not
enough. Not 100% sure about this one, a DEVELOPER only thing?
(This used to be commit 009af09099)
2007-10-10 12:23:26 -05:00
Volker Lendecke
ac3f08ddbe r23055: Rewrite messages.c to use auto-generated marshalling in the tdb. I'm
doing this because for the clustering the marshalling is needed in more
than one place, so I wanted a decent routine to marshall a message_rec
struct which was not there before.

Tridge, this seems about the same speed as it used to be before, the
librpc/ndr overhead in my tests was under the noise.

Volker
(This used to be commit eaefd00563)
2007-10-10 12:22:17 -05:00
Volker Lendecke
fad7dd8a60 r22868: Replace some message_send_pid calls with messaging_send_pid calls. More
tomorrow.
(This used to be commit 74fa57ca5d)
2007-10-10 12:22:04 -05:00
Volker Lendecke
bf7008abb8 r22695: Dummy checkin (reformatting) to make the AIX hosts retry.
(This used to be commit cd55ccef6a)
2007-10-10 12:21:46 -05:00
Volker Lendecke
fb56443427 r22691: Fix a 64-bit warning and a const const discard warning
(This used to be commit 3a2ca1b1b8)
2007-10-10 12:21:46 -05:00
Volker Lendecke
2541e0d590 r22458: Fix a comment
(This used to be commit f5ccec4228)
2007-10-10 12:19:34 -05:00
Jeremy Allison
0829e1ad1c r22391: Looks bigger than it is. Make "inbuf" available
to all callers of smb_setlen (via set_message()
calls). This will allow the server to reflect back
the correct encryption context.
Jeremy.
(This used to be commit 2d80a96120)
2007-10-10 12:19:30 -05:00
Jeremy Allison
dc90cd89a7 r22389: Start preparing for multiple encryption contexts in the
server. Allow server to reflect back to calling client
the encryption context that was sent.
Jeremy.
(This used to be commit b49e90335d)
2007-10-10 12:19:30 -05:00
Volker Lendecke
a633b42592 r22213: We can't use become_root() here, as it does DEBUG()
itself. become_root_uid_only did not :-)

Revert 21868, we need to find a better way.

Volker
(This used to be commit 629f966714)
2007-10-10 12:19:20 -05:00
Jeremy Allison
a098724734 r22145: Fix bug #4494 - reported by Kevin Jamieson <bugzilla@kevinjamieson.com>.
If returning a mapped UNIX error from sendfile, don't call chain_reply.
Jeremy.
(This used to be commit 38404c990d)
2007-10-10 12:19:16 -05:00
Volker Lendecke
496dbdf435 r21879: Move process_blocking_lock_queue to a timed event.
The idea is that we have blocking.c:brl_timeout as a timed
event that is present whenever we do have a blocking lock
pending. It fires brl_timeout_fn() which calls
process_blocking_lock_queue().

Whenever we make changes to blocking_lock_queue, we trigger
a recalc_brl_timeout() which sets a new brl_timout event if
necessary. This makes the call to
blocking_locks_timeout_ms() in setup_select_timeout()
unnecessary, this is implicitly done in
event_add_to_select_args() from the timed events.

Volker
(This used to be commit 7e31b8ce21)
2007-10-10 12:18:42 -05:00
Volker Lendecke
fe0b56ead1 r21871: Move deadtime processing into an idle event. While there, simplify
conn_idle_all() a bit.

Volker
(This used to be commit 3fc00977a9)
2007-10-10 12:18:41 -05:00
Volker Lendecke
c0e37a7496 r21870: Move sending auth_server keepalives out of the main loop into an idle event.
Volker
(This used to be commit 6226b30f38)
2007-10-10 12:18:41 -05:00
Volker Lendecke
7c2bc9c070 r21869: Move sending keepalives out of the main processing loop into idle event.
On the way, make lp_keepalive() a proper parameter.

Volker
(This used to be commit 9499fd9c80)
2007-10-10 12:18:41 -05:00
Volker Lendecke
8d0cfddb26 r21868: Remove check_log_size from the central smbd processing loop. This can be done
with a become_root/unbecome_root in debug.c.
(This used to be commit 4632a0caaf)
2007-10-10 12:18:41 -05:00
Volker Lendecke
2864d86b37 r21867: Simplify calling convention of timeout_processing. lp_deadtime is only
referenced in conn_idle_all().
(This used to be commit c0aaee6d36)
2007-10-10 12:18:40 -05:00
Volker Lendecke
0d91334fe7 r21784: Replace smb_register_idle_event() with event_add_timed(). This fixes winbind
who did not run the idle events to drop ldap connections.

Volker
(This used to be commit af3308ce5a)
2007-10-10 12:18:33 -05:00
Jeremy Allison
235b0f97f2 r21731: Fix long-standing bug in our chain processing code.
Should fix a bug with WinPE. Probably a candidate
for the Vista patchset.
Jeremy.
(This used to be commit ef32de6b59)
2007-10-10 12:18:26 -05:00
Volker Lendecke
fe881c3e38 r21278: The main goal of this was to get rid of the NetInBuffer / set_InBuffer. But it
turns out that this patch actually speeds up the async writes considerably.

I tested writing 100.000 times 65535 bytes with the allowed 10 ops in
parallel. Without this patch it took about 32 seconds on my dual-core 1.6GHz
laptop. With this patch it dropped to about 26 seconds. I can only explain it
by better cache locality, NewInBuffer allocates more than 128k, so we jump
around in memory more.

Jeremy, please check!

Volker
(This used to be commit 452d51bc6f)
2007-10-10 12:17:53 -05:00
Volker Lendecke
c59a49d83b r21184: Dummy checkin to let the build farm pick up r21183 of Samba4
(This used to be commit 22c9511314)
2007-10-10 12:17:46 -05:00
Jeremy Allison
14785319cc r21166: Ensure we return the correct "EROFS" error on a non-writable
filesystem.
Jeremy.
(This used to be commit 1e25501e8e)
2007-10-10 12:17:45 -05:00
Volker Lendecke
d5206610cd r20931: This changes the notify infrastructure from a polling-based to an event-driven
based approach. The only remaining hook into the backend is now

	void *(*notify_add)(TALLOC_CTX *mem_ctx,
			    struct event_context *event_ctx,
			    files_struct *fsp, uint32 *filter);

(Should we put this through the VFS, so that others can more easily plug in?)

The trick here is that the backend can pick filter bits that the main smbd
should not handle anymore. Thanks to tridge for this idea.

The backend can notify the main smbd process via

void notify_fsp(files_struct *fsp, uint32 action, char *name);

The core patch is not big, what makes this more than 1800 lines are the
individual backends that are considerably changed but can be reviewed
one by one.

Based on this I'll continue with inotify now.

Volker
(This used to be commit 9cd6a8a827)
2007-10-10 12:17:21 -05:00
Volker Lendecke
bf219447a3 r20846: Before this gets out of control...
This add a struct event_context and infrastructure for fd events to smbd. This
is step zero to import lib/events.

Jeremy, I rely on you to watch the change in receive_message_or_smb()
closely. For the normal code path this should be the only relevant change. The
rest is either not yet used or is cosmetic.

Volker
(This used to be commit cd07f93a8a)
2007-10-10 12:17:13 -05:00
Jeremy Allison
ab46f9cdd2 r20742: Rename chkpth -> checkpath for sanity's sake :-).
Start removing unneeded "BOOL ok" from this reply.c
(this logic is old, old, old..... :-).
Jeremy.
(This used to be commit 3d52268095)
2007-10-10 12:17:07 -05:00
Volker Lendecke
7a915ec3a6 r20700: In the main processing loop we select() on the fam socket. If it fires, it
might be possible that we hang in the receive_smb() although that socket is
not the reason for the select() to return.

This immediately reacts to the fam socket to become readable, and goes into
the select loop again. This fixes delays in files showing up in Windows.

Jeremy, James please review this and merge to 3_0_24 if appropriate.

Thanks,

Volker
(This used to be commit c846153b2e)
2007-10-10 12:17:04 -05:00
Volker Lendecke
ab7fc62edf r20432: Apply some const
(This used to be commit 22163fee59)
2007-10-10 12:16:49 -05:00
Stefan Metzmacher
258a465e20 r18605: sync dlinklist.h with samba4, that means DLIST_ADD_END()
and DLIST_DEMOTE() now take the type of the tmp pointer
not the tmp pointer itself anymore.

metze
(This used to be commit 2f58645b70)
2007-10-10 11:51:59 -05:00
Volker Lendecke
0be131725f r17569: Make 'max smbd processes' more robust. Counting on the child to decrement a
tdb entry is not the most reliable way to count children correctly.

This increments the number of children after a fork and decrements it upon
SIGCLD. I'm keeping a list of children just for consistency checks, so that we
at least get a debug level 0 message if something goes wrong.

Volker
(This used to be commit eb45de167d)
2007-10-10 11:38:39 -05:00
Jeremy Allison
b737f26764 r17105: Fix the race Volker found - we had a non-locked
region between detecting a pending lock was needed
and when we added the blocking lock record. Make
sure that we hold the lock over all this period.
Removed the old code for doing blocking locks on
SMB requests that never block (the old SMBlock
and friends).
Discovered something interesting about the strange
NT_STATUS_FILE_LOCK_CONFLICT return. If we asked
for a lock with zero timeout, and we got an error
of NT_STATUS_FILE_LOCK_CONFLICT, treat it as though
it was a blocking lock with a timeout of 150 - 300ms.
This only happens when timeout is sent as zero and
can be seen quite clearly in ethereal. This is the
real replacement for old do_lock_spin() code.
Re-worked the blocking lock select timeout to correctly
use milliseconds instead of the old second level
resolution (far too coarse for this work).
Jeremy.
(This used to be commit b81d6d1ae9)
2007-10-10 11:38:12 -05:00
Jeremy Allison
fbdcf2663b r16945: Sync trunk -> 3.0 for 3.0.24 code. Still need
to do the upper layer directories but this is what
everyone is waiting for....

Jeremy.
(This used to be commit 9dafb7f48c)
2007-10-10 11:19:14 -05:00
Jeremy Allison
ce61fb21d9 r16397: Fix Klocwork #11767 and drasticly simplify the
logic in smbd/process.c. All interested (Volker,
Jerry, James etc). PLEASE REVIEW THIS CHANGE.
The logic should be identical but *much* easier
to follow and change (and shouldn't confuse Klockwork :-).
Jeremy.
(This used to be commit d357f8b335)
2007-10-10 11:18:52 -05:00
Volker Lendecke
b3a5633de0 r15495: current_user_info is not referenced in process.c
(This used to be commit 8cedbbfbcf)
2007-10-10 11:16:54 -05:00
Jeremy Allison
010c725b36 r15088: Remove all time() and gettimeofday() calls out of the mainline
packet processing code. Only do these when needed (ie. in the
idle timeout code). We drop an unneccessary global here too.
Jeremy.
(This used to be commit 8272a5ab06)
2007-10-10 11:16:22 -05:00
Jeremy Allison
cc203f3e59 r15084: Try and squeeze more out of the non-read/write code path.
Jeremy.
(This used to be commit 23dcff4d50)
2007-10-10 11:16:22 -05:00
Jeremy Allison
fc13f28417 r15030: On a performace hunt... Remove as many extraneous
memset's as possible.
Jeremy.
(This used to be commit 1217ed392b)
2007-10-10 11:15:58 -05:00
Jeremy Allison
eecdc6c956 r15022: Fix core dumps on normal server exit.
Jeremy.
(This used to be commit 13c3abf031)
2007-10-10 11:15:57 -05:00
Jeremy Allison
22dbd67708 r15018: Merge Volker's ipc/trans2/nttrans changes over
into 3.0. Also merge the new POSIX lock code - this
is not enabled unless -DDEVELOPER is defined.
This doesn't yet map onto underlying system POSIX
locks. Updates vfs to allow lock queries.
Jeremy.
(This used to be commit 08e52ead03)
2007-10-10 11:15:57 -05:00
James Peach
4fa5559800 r14898: This change is an attempt to improve the quality of the information that
is produced when a process exits abnormally.

First, we coalesce the core dumping code so that we greatly improve our
odds of being able to produce a core file, even in the case of a memory
fault. I've removed duplicates of dump_core() and split it in two to
reduce the amount of work needed to actually do the dump.

Second, we refactor the exit_server code path to always log an explanation
and a stack trace. My goal is to always produce enough log information
for us to be able to explain any server exit, though there is a risk
that this could produce too much log information on a flaky network.

Finally, smbcontrol has gained a smbd fault injection operation to test
the changes above. This is only enabled for developer builds.
(This used to be commit 56bc02d644)
2007-10-10 11:15:53 -05:00
Volker Lendecke
49ecd176ee r14559: Oplocks have changed, process_smb can be static again
(This used to be commit 19e9bc03f8)
2007-10-10 11:15:37 -05:00
Jeremy Allison
ff122b308b r14229: Something Coverity hasn't caught (yet) but I've gotten
sensitive to null derefs. get_timed_events_timeout()
can potentially return NULL. Cope with this.
Jeremy.
(This used to be commit 0483807872)
2007-10-10 11:15:18 -05:00
Gerald Carter
fb5362c069 r13571: Replace all calls to talloc_free() with thye TALLOC_FREE()
macro which sets the freed pointer to NULL.
(This used to be commit b65be8874a)
2007-10-10 11:10:14 -05:00
Jeremy Allison
5c149702b0 r13498: Fix the kernel oplocks code for IRIX. Should fix #3515.
Jeremy.
(This used to be commit 006cf9c365)
2007-10-10 11:10:07 -05:00
James Peach
8fbdd112b2 r13482: Push the FAM notification file descriptor into the select
set to avoid unnecessary polling.
(This used to be commit 1dce945ccb)
2007-10-10 11:10:05 -05:00
Gerald Carter
0af1500fc0 r13316: Let the carnage begin....
Sync with trunk as off r13315
(This used to be commit 17e63ac4ed)
2007-10-10 11:06:23 -05:00
Gerald Carter
54abd2aa66 r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
(This used to be commit 939c3cb5d7)
2007-10-10 11:04:48 -05:00
Jeremy Allison
c46b4cabf4 r10188: 64-bit warning fix.
Jeremy.
(This used to be commit 3b8a8e2947)
2007-10-10 11:03:36 -05:00
Jeremy Allison
3dae794632 r9126: Fix valgrind bug Volker found in interaction with new aio buffer
flipping and oplocks.
Jeremy.
(This used to be commit a18c5ff3ea)
2007-10-10 11:00:26 -05:00
Volker Lendecke
880d62843a r8798: Save one system call per SMB. smb_run_idle_events right now is only used to
close idle pdb_ldap connections, and from my point of view this can wait until
normal timeout handling, this does not need to be done per client request.

Volker
(This used to be commit 404b817d72)
2007-10-10 11:00:17 -05:00
Jeremy Allison
a344155b8d r8782: Fix bug #2918. The problem was using Inbuffer to push a deferred open message onto the queue
when we're in a chained message set - we're actually processing a different
buffer then. Added current_inbuf as a static inside smbd/process.c to ensure the
correct message gets pushed and processed.
Jeremy.
(This used to be commit ccef758171)
2007-10-10 11:00:16 -05:00
Jeremy Allison
f2f55d703d r7963: Add aio support to 3.0.
Jeremy.
(This used to be commit 1de27da470)
2007-10-10 10:58:05 -05:00
Simo Sorce
7ebd74e6c5 r7961: randomize reloading so that smbds do not pverload cupsd
by reloading printers all at the same time.
						sss
(This used to be commit da227d5f43)
2007-10-10 10:58:05 -05:00
Jeremy Allison
19ca97a70f 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 9506b8e145)
2007-10-10 10:58:00 -05:00
Jeremy Allison
a59149b86a r7550: Steal the correct error return for invalid TID on NTcreateX from Samba4
(thanks tridge !).
Jeremy.
(This used to be commit 0288823aac)
2007-10-10 10:57:13 -05:00
Volker Lendecke
b6fb046249 r7344: Correctly return if malloc fails.
Jeremy, you might want to check this.

Thanks,

Volker
(This used to be commit 560f9d3735)
2007-10-10 10:57:06 -05:00
Jeremy Allison
f60ad8ded6 r6346: Add a counter for the number of SMB operations per connection/file.
You will need to do a make clean after SVN updating this. Next will
come a smbcontrol message to dump this info. This should be interesting
to profile client activity.
Jeremy.
(This used to be commit 743174da86)
2007-10-10 10:56:37 -05:00
Herb Lewis
978ca84860 r6225: get rid of warnings from my compiler about nested externs
(This used to be commit efea76ac71)
2007-10-10 10:56:30 -05:00
Jeremy Allison
0557c6cba2 r6172: Tidy up error processing significantly. Remove unix_ERR_XXX global nastyness.
Jeremy.
(This used to be commit d3379fe61b)
2007-10-10 10:56:27 -05:00
Gerald Carter
d097ea4905 r4539: patch from Rob -- adding real printcap name cache function to speed up printcap reloads
(This used to be commit 1cad525093)
2007-10-10 10:53:46 -05:00
Jeremy Allison
32f9ee7c20 r4190: When changing length calculations, get them right......
Jeremy.
(This used to be commit 63cfa904ad)
2007-10-10 10:53:37 -05:00
Jeremy Allison
5b713a206b r4186: Fix client & server to allow 127k READX calls.
Jeremy.
(This used to be commit 831cb21a87)
2007-10-10 10:53:36 -05:00
Jeremy Allison
acf9d61421 r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
(This used to be commit 620f2e608f)
2007-10-10 10:53:32 -05:00
Jeremy Allison
6219c997cb r1936: Fix bug noticed by Steve - ensure extended security bit is on only
if we negotiated extended security. Do not merge for 3.0.6. Works
with W2K but needs further testing.
Jeremy.
(This used to be commit 284689aa18)
2007-10-10 10:52:24 -05:00
Jeremy Allison
3e0f586298 r1263: Make "defer sharing violations" a global parameter.
Jeremy.
(This used to be commit 42cdeccc36)
2007-10-10 10:52:04 -05:00
Jeremy Allison
2acd084866 r1154: Change default setting for case sensitivity to "auto". If set to auto
then is the client supports it (current clients supported are Samba and
CIFSVFS - detected by the negprot strings "Samba", "POSIX 2" and a bare
"NT LM 0.12" string) then the setting of the per packet flag smb_flag
FLAG_CASELESS_PATHNAMES is taken into account per packet. This allows
the linux CIFS client to use Samba in a case sensitive manner.
Additional command in smbclient "case_sensitive", toggles the
flag in subsequent packets.
Docs to follow.
Jeremy.
(This used to be commit cf84c0fe1a)
2007-10-10 10:51:57 -05:00
Jeremy Allison
effd4a3385 r1089: Removed spurious oplock message in deferred open processing.
Fix smb signing sequence counts.
Jeremy.
(This used to be commit 7e2a5c3661)
2007-10-10 10:51:54 -05:00
Jeremy Allison
2fc57c9a2c r1085: Now it's had some proper user testing, merge in the deferred open fix. I'm
still doing more testing, but it fixes a behaviour that we've been wrong
on ever since the start of Samba.
Jeremy.
(This used to be commit 894cc6d162)
2007-10-10 10:51:54 -05:00
Jeremy Allison
a6f5c88563 r998: Arrrgggh. Do it right this time :-(.
Jeremy.
(This used to be commit 7ac7cd4162)
2007-10-10 10:51:53 -05:00
Jeremy Allison
b7ac82294f r996: Fix error in change to queuing code (dlink).
Jeremy.
(This used to be commit 6bd6359090)
2007-10-10 10:51:53 -05:00
Jeremy Allison
03d4344432 r971: Auto remove store dos attributes if underlying filesystem
doesn't support EA's.
Jeremy.
(This used to be commit 9de6b25c9e)
2007-10-10 10:51:51 -05:00
Herb Lewis
99d8aa8b17 r814: conn is 0 during ioctl (at least during smbtorture IOCTL test)
fix smbd panic
(This used to be commit 61da0bb1f6)
2007-10-10 10:51:47 -05:00
Gerald Carter
67d474861d r799: BUG 1259 -- add 'printcap cache time' patch from Lars
(This used to be commit fac9074113)
2007-10-10 10:51:46 -05:00
Jeremy Allison
89db7e1001 r656: Make widelinks use realpath(). Tidy up cases where we need to become a service.
Jeremy.
(This used to be commit a03b6a05e0)
2007-10-10 10:51:33 -05:00
Jeremy Allison
1843f6905c r478: Added Volkers fix to be able to force DOS errors when needed.
Jeremy.
(This used to be commit a9d1738eba)
2007-10-10 10:51:24 -05:00
Jeremy Allison
b88f446352 Added NTrename SMB (0xA5) - how did we miss this.... ?
Jeremy.
(This used to be commit dfd7d1c2b7)
2004-02-24 00:06:08 +00:00
Jeremy Allison
27891bdef1 Subtract NT_STATUS from common flag, don't add it...
Jeremy.
(This used to be commit 4e73faa7b4)
2003-12-01 06:19:17 +00:00
Jeremy Allison
6bb8f54e01 Don't automatically set nt status code flag unless client tells us it can
cope.
Jeremy.
(This used to be commit 0d82ac57a5)
2003-12-01 02:25:56 +00:00
Jeremy Allison
9c8d23e5d5 Fix debug message warning.
Jeremy.
(This used to be commit 154793981a)
2003-11-05 00:16:01 +00:00