summaryrefslogtreecommitdiff
path: root/source3/smbd
AgeCommit message (Collapse)AuthorFilesLines
2011-05-29s3: Reply correctly to a bad nbt session requestVolker Lendecke1-1/+15
2011-05-27Fix bug #6911 - Kerberos authentication from vista to samba fails when ↵Jeremy Allison1-3/+25
security blob size is greater than 16 kB We were not correctly checking the output of asn1_start_tag(). asn1_start_tag() returns -1 and sets data->has_error if the remaining blob size is too short to contain the tag length. We were checking data->has_error and returning NT_STATUS_OK (to allow the second asn.1 parse to fail in that case). We should not be checking data->has_error in this case, but falling through to the code that already checks the length. Thanks to Jim for reproducing this for me. We don't get bitten by this as we announce a max buffer size of 16k, greater than Windows's 4k, which means that most krb5 spnego packets already fit. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri May 27 02:57:27 CEST 2011 on sn-devel-104
2011-05-20Fix bug 8133 - strange behavior for the file (whose filename first character ↵Jeremy Allison1-2/+3
is period ) in SMB2 case. When doing SMB2 renames, we need to match all filetypes (no attributes field in the SMB2 call). By default a file starting with a period is returned as FILE_ATTRIBUTE_HIDDEN in Samba. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri May 20 19:26:04 CEST 2011 on sn-devel-104
2011-05-20Optimization. If the attributes passed to can_rename() include both ↵Jeremy Allison1-5/+8
FILE_ATTRIBUTE_HIDDEN and FILE_ATTRIBUTE_SYSTEM then there's no point in reading the source DOS attribute, as we're not going to deny the rename on attribute match.
2011-05-20s3:smbd remove unused codeChristian Ambach1-11/+0
in the early CTDB days, the RELEASE_IP message was defined and some code was added to react on such a message to make smbd exit if the IP address it was using for the server socket is removed by CTDB. Later, it was discovered that we need to stop smbd immediately and logic was added to ctdb_conn to call release_ip() without going through the messaging system. So this code is not used and can be removed Autobuild-User: Christian Ambach <ambi@samba.org> Autobuild-Date: Fri May 20 16:18:24 CEST 2011 on sn-devel-104
2011-05-20s3: Fork the echo handler only after SMB1 negprot is doneVolker Lendecke3-7/+8
This enables activating the echo responder also if SMB2 is enabled, albeit it will only be used for SMB1 at this moment. Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Fri May 20 15:06:03 CEST 2011 on sn-devel-104
2011-05-20s3: Fix an uninitialized variableVolker Lendecke1-1/+1
2011-05-19Fix Bug 8152 - smbd crash in release_ip()Christian Ambach1-0/+3
release_ip() needs the private_data, but it was never saved away to feed it into release_ip() later Autobuild-User: Christian Ambach <ambi@samba.org> Autobuild-Date: Thu May 19 21:21:14 CEST 2011 on sn-devel-104
2011-05-18s3-lib Replace StrnCaseCmp() with strncasecmp_m()Andrew Bartlett1-1/+1
strncasecmp_m() never needs to call to talloc, and via next_codepoint() still has an ASCII fast-path bypassing iconv() calls. Andrew Bartlett
2011-05-18s3-lib Replace StrCaseCmp() with strcasecmp_m()Andrew Bartlett3-6/+6
strcasecmp_m() never needs to call to talloc, and via next_codepoint() still has an ASCII fast-path bypassing iconv() calls. Andrew Bartlett
2011-05-18Fix bug #8144 - touch /mnt/newfile fails to set timestamp with CIFS client.Jeremy Allison1-10/+15
The extra checks added for Windows correctness in our metadata changing paths to ensure the file handle has been opened with the correct access mask to allow FILE_WRITE_ATTRIBUTES etc. caused problems with the POSIX open code. The old POSIX open code maped O_RDONLY into FILE_READ, O_WRONLY into FILE_WRITE, and O_RDWR into FILE_READ|FILE_WRITE. This patch extends the mapping to add FILE_WRITE_ATTRIBUTES, FILE_READ_ATTRIBUTES and FILE_WRITE_EA, FILE_READ_EA to allow POSIX opens to set these values. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed May 18 02:22:32 CEST 2011 on sn-devel-104
2011-05-17s3: conn->sconn in smbd_server_connection_read/write_handlerVolker Lendecke1-9/+10
"struct smbd_server_connection" is called sconn elsewhere, avoid confusion Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Tue May 17 19:00:20 CEST 2011 on sn-devel-104
2011-05-16Fix the SMB2 showstopper, found by an extended torture test from Volker.Jeremy Allison1-3/+25
In the oplock refactoring, the algorithm underwent an unnoticed change. In 3.5.x stat_opens were silently (i.e. no explicit code had comments explaining this) ignored when looking for oplock breaks and share mode violations. After the refactoring, the function find_oplock_types() no longer ignored stat_open entries in the share mode table when looking for batch and exclusive oplocks. This patch adds two changes to find_oplock_types() to ignore the case where the incoming open request is a stat open being tested against existing opens, and also when the incoming open request is a non-stat open being tested against existing stat opens. Neither of these cause an oplock break or share mode violation. Thanks a *lot* to Volker, who persevered in reproducing this problem. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Mon May 16 22:38:20 CEST 2011 on sn-devel-104
2011-05-16Ensure we always write the correct incoming mid into the share modeJeremy Allison1-2/+4
table entries.
2011-05-13rpc_server: Always use rpc_pipe_open_interface()Simo Sorce1-8/+8
This way we can configure which rpc service we actually want to connect to. By default it uses an "embedded" interface and calls rpc_pipe_open_internal() Signed-off-by: Günther Deschner <gd@samba.org> Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Fri May 13 14:40:26 CEST 2011 on sn-devel-104
2011-05-12s3: Slightly simplify smbd_smb2_request_next_vectorVolker Lendecke1-3/+5
Metze, Jeremy, please check!
2011-05-08s3-smbd: expose smbd_set_server_fd()Andrew Tridgell2-29/+29
this allows the fd to be setup by subsystems that want to use the s3 server core code Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Sun May 8 12:01:13 CEST 2011 on sn-devel-104
2011-05-06s3-libsmb: move protos to libsmb/proto.hGünther Deschner4-0/+4
Guenther
2011-05-06s3: only include tdb headers where needed.Günther Deschner7-3/+10
Guenther
2011-05-06s3-smbd ntstatus_to_dos() pulls the DOS error codes out internallyAndrew Bartlett1-5/+4
This means we don't need to duplicate that logic here. Andrew Bartlett
2011-05-06s3-lib Remove unused dos error codes from errmap_unixAndrew Bartlett1-3/+0
This also makes unix_nt_errmap private to errmap_unix.c and errormap.c so the tables themselves cannot be duplicate symbols until merged. Andrew Bartlett
2011-05-06lib/util Move source3 tdb_wrap_open() into the common code.Andrew Bartlett1-0/+1
This #if _SAMBA_BUILD == 3 is very unfortunate, as it means that in the top level build, these options are not available for these databases. However, having two different tdb_wrap lists is a worse fate, so this will do for now. Andrew Bartlett
2011-05-06s3-auth: fixed bug with usernames longer than sizeof(char *)Andrew Tridgell1-3/+3
using sizeof(user) when user is "fstring user" as a C parameter actually returns sizeof(char *), which means that long usernames aren't allowed. Jeremy, you need a longer username :-) Cheers, Tridge Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-05-06More const fixes. Remove CONST_DISCARD.Jeremy Allison2-3/+3
2011-05-05More simple const fixes.Jeremy Allison7-14/+14
2011-05-05Fixup build without --with-aio.Jeremy Allison1-1/+1
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Thu May 5 21:38:23 CEST 2011 on sn-devel-104
2011-05-05Fix many const compiler warnings.Jeremy Allison13-40/+40
2011-05-05s3: Fix a typoVolker Lendecke1-1/+1
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Thu May 5 16:10:35 CEST 2011 on sn-devel-104
2011-05-05s3: Fix dup_smb2_vec3Volker Lendecke1-1/+1
Metze, Jeremy, please check! Thanks, Volker Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Thu May 5 13:39:40 CEST 2011 on sn-devel-104
2011-05-04Fix warning messages caused by addition of null check in fstrcpy macro.Jeremy Allison2-5/+5
2011-05-04Fix off-by-one when used with safe_strcpy.Jeremy Allison1-1/+1
2011-05-04Simple +1 changes in hardcoded lengths when changing from safe_strcpy to ↵Jeremy Allison3-6/+6
strlcpy.
2011-05-04BUGFIX when converting from safe_strcpy to strlcpy.Jeremy Allison1-1/+5
We must have a blob legth > 0 in order to safely copy the (possibly) 16 bytes + 1 byte zero character safely.
2011-05-03s3: Handle EINTR from sys_poll correctlyVolker Lendecke1-1/+4
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Tue May 3 18:06:48 CEST 2011 on sn-devel-104
2011-05-03s3: reply_readbraw_error needs an sconn as argument also in the non-LFS code ↵Björn Jacke1-1/+1
path Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User: Björn Jacke <bj@sernet.de> Autobuild-Date: Tue May 3 13:04:11 CEST 2011 on sn-devel-104
2011-05-02s3: include ntdomain.h before including generated srv_ headers.Günther Deschner1-1/+1
Guenther
2011-05-02s3-smbd: avoid using pipes_struct when only session_info is needed.Günther Deschner2-6/+5
Guenther
2011-05-02s3-proto: move remaining spoolss protos to own header file.Günther Deschner1-0/+1
Guenther
2011-05-02s3-proto: move more rpc_server prototypes out of proto.hGünther Deschner6-0/+6
Guenther
2011-04-29Fix bug #8112 - POSIX extension opens of a directory are denied with EISDIR.Jeremy Allison1-2/+10
Ensure create_options are passed down to SMB_VFS_CREATE_FILE(). Correctly set create_options is SMB_O_DIRECTORY is set or pathname is known to be a directory. Jeremy.
2011-04-29Fix bug 8111 - CIFS VFS: unexpected error on SMB posix openJeremy Allison1-12/+49
We are conflating the O_CREAT|O_EXCL with the O_TRUNC processing, they need to be separate. We need to chose using (O_CREAT|O_EXCL) first, then modify if O_TRUNC is set. This needs two separate switch statements. Jeremy
2011-04-29s3-proto: move more headers to rpc_server/rpc_ncacn_np.h where they origin from.Günther Deschner1-0/+1
Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Fri Apr 29 22:05:07 CEST 2011 on sn-devel-104
2011-04-29s3-proto: remove duplicate prototypes.Günther Deschner1-0/+1
Guenther
2011-04-29s3-tevent: only include ../lib/util/tevent wrappers where needed.Günther Deschner13-0/+13
Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Fri Apr 29 14:00:30 CEST 2011 on sn-devel-104
2011-04-29s3-tsocket: only include ../lib/tsocket/tsocket.h where needed.Günther Deschner3-0/+3
Guenther
2011-04-29s3-build: remove some unused headers.Günther Deschner3-6/+0
Guenther
2011-04-29s3-smb Use FILE_ATTRIBUTE_ARCHIVE intead of aARCHAndrew Bartlett6-16/+16
This means we use just one constant for this file attribute. Andrew Bartlett
2011-04-29s3-smb Use FILE_ATTRIBUTE_DIRECTORY intead of aDIRAndrew Bartlett6-40/+40
This means we use just one constant for this file attribute. Andrew Bartlett
2011-04-29s3-smb Use FILE_ATTRIBUTE_VOLUME intead of aVOLIDAndrew Bartlett1-3/+3
This means we use just one constant for this file attribute. Andrew Bartlett
2011-04-29s3-smb Use FILE_ATTRIBUTE_SYSTEM intead of aSYSTEMAndrew Bartlett5-14/+14
This means we use just one constant for this file attribute. Andrew Bartlett