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

319 Commits

Author SHA1 Message Date
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