summaryrefslogtreecommitdiffstats
path: root/source3
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove a few #ifdef EWOULDBLOCkVolker Lendecke2014-09-185-55/+6
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* s3: vfs module: Adding new vfs module for Symantec VxFS.Abhidnya Joshi2014-09-183-0/+728
| | | | | | | | | | | | | | This mainly handles ACL related functions. Modified to add requirement for -DCFLAGS=-DXATTR_USER_NTACL="user.NTACL" and to hide access to XATTR_USER_NTACL by jra. Signed-off-by: Abhidnya Joshi <abhidnya_joshi@symantec.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Sep 18 02:30:06 CEST 2014 on sn-devel-104
* nmbd: Send waiting status to systemd.Andreas Schneider2014-09-171-2/+5
| | | | | | | | | | | | | This tells the Administrator what's going on and we should log that IPv6 is not supported. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10816 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Sep 17 13:16:43 CEST 2014 on sn-devel-104
* lib: Avoid a talloc in write_data_iovVolker Lendecke2014-09-171-9/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Add test suite for iconv conversion fail of bad names over SMB1/SMB3.Jeremy Allison2014-09-161-0/+144
| | | | | | | | | | | | Bug 10775 - smbd crashes when accessing garbage filenames https://bugzilla.samba.org/show_bug.cgi?id=10775 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Tue Sep 16 04:21:49 CEST 2014 on sn-devel-104
* s3: smbd: Fix a couple of tricky slow-path cases - don't return a mangled ↵Jeremy Allison2014-09-162-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | name for a name that cannot be converted. For a name that contains an illegal Windows character, the directory listing code returns the mangled 8.3 name as the primary name for the file. If the original (non-mangled) filename cannot be converted to UCS2 on the wire via iconv due to conversion error, we should skip that name when returning a directory listing, as we can't map back from a returned 8.3 name to a usable non-mangled filename if the client sends it back to us. As this is only done in a very slow path (name must be mangled) or in the old DOS protocol listing code I don't feel too bad about using a talloc/free pair here. Bug 10775 - smbd crashes when accessing garbage filenames https://bugzilla.samba.org/show_bug.cgi?id=10775 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3: smbd: Change get_lanman2_dir_entry() to return the full NTSTATUS.Jeremy Allison2014-09-161-20/+32
| | | | | | | | | | | Handle the errors correctly at the level above inside the SMB1 server. Bug 10775 - smbd crashes when accessing garbage filenames https://bugzilla.samba.org/show_bug.cgi?id=10775 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3: smbd: Remove unneeded 'out_of_space' parameter from ↵Jeremy Allison2014-09-163-7/+6
| | | | | | | | | | | | | smbd_dirptr_lanman2_entry(). This can now be handled by checking for the STATUS_MORE_ENTRIES error return. Bug 10775 - smbd crashes when accessing garbage filenames https://bugzilla.samba.org/show_bug.cgi?id=10775 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3: smbd: SMB2 - change smbd_dirptr_lanman2_entry() to return an NTSTATUS.Jeremy Allison2014-09-163-12/+19
| | | | | | | | | | | Handle the errors correctly at the top level inside the SMB2 server. Bug 10775 - smbd crashes when accessing garbage filenames https://bugzilla.samba.org/show_bug.cgi?id=10775 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3: smbd: smbd_marshall_dir_entry() no longer needs explicit 'out_of_space' ↵Jeremy Allison2014-09-161-7/+1
| | | | | | | | | | | | | parameter. Handle this in the caller when it returns STATUS_MORE_ENTRIES. Bug 10775 - smbd crashes when accessing garbage filenames https://bugzilla.samba.org/show_bug.cgi?id=10775 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3: smbd: Change smbd_marshall_dir_entry() to return an NTSTATUS. Returns ↵Jeremy Allison2014-09-161-23/+24
| | | | | | | | | | | STATUS_MORE_ENTRIES on out of space. Bug 10775 - smbd crashes when accessing garbage filenames https://bugzilla.samba.org/show_bug.cgi?id=10775 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3: smbd: Change the function signature of srvstr_push() from returning a ↵Jeremy Allison2014-09-167-70/+215
| | | | | | | | | | | | | | | | | length to returning an NTSTATUS with a length param. srvstr_push_fn() now returns an NTSTATUS reporting any string conversion failure. We need to get serious about returning character set conversion errors inside smbd. Bug 10775 - smbd crashes when accessing garbage filenames https://bugzilla.samba.org/show_bug.cgi?id=10775 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3: smbd: Ensure types for all variables called 'len' used in srvstr_push() ↵Jeremy Allison2014-09-161-12/+10
| | | | | | | | | | | are correct. Bug 10775 - smbd crashes when accessing garbage filenames https://bugzilla.samba.org/show_bug.cgi?id=10775 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3: smbd: srvstr_push() was changed to never return -1, so don't check for ↵Jeremy Allison2014-09-161-1/+1
| | | | | | | | | | | that as an error. Bug 10775 - smbd crashes when accessing garbage filenames https://bugzilla.samba.org/show_bug.cgi?id=10775 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3: utils: Don't directly manipulate errno inside strupper_m().Jeremy Allison2014-09-161-5/+1
| | | | | | | | | | | | | | Let the internal character conversion routines set it. Caller code paths don't depend on this (checked by David Disseldorp ddiss@suse.de). Bug 10775 - smbd crashes when accessing garbage filenames https://bugzilla.samba.org/show_bug.cgi?id=10775 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* vfs_gpfs: Fix the build with profiling-dataVolker Lendecke2014-09-161-4/+4
| | | | | | | | | | This fails with -Werror=declaration-after-statement Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Sep 16 01:55:57 CEST 2014 on sn-devel-104
* s3: winbindd: Old NT Domain code sets struct winbind_domain->alt_name to be ↵Jeremy Allison2014-09-152-3/+8
| | | | | | | | | | | | | | | | | | NULL. Ensure this is safe with modern AD-DCs. There are places in the code where we're not checking that alt_name is NULL and then calling into the DC lookup code with a NULL name request. This can happen in offline mode. Fixes bug #10717 - Winbind crash on losing VPN connection https://bugzilla.samba.org/show_bug.cgi?id=10717 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Mon Sep 15 23:29:00 CEST 2014 on sn-devel-104
* messaging_dgm: Don't expose the messaging_dgm_contextVolker Lendecke2014-09-143-37/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now we can only support one messaging_dgm_context per process anyway, the code has checks for this. I would like to keep it that way, in the future we will have multiple messaging_context's or imessaging_context's filtering based upon the dst server_id. Why this change? messaging_dgm's lockfile contains the serverid->unique_id. When designing messaging_dgm, I had in mind to remove the serverid.tdb and replace it with the dgm lockfiles for server lookup and enumeration. I have a WIP-patchset that gets rid of almost all users of serverid.tdb. The problem is serverid_exists. Here we don't have a messaging_context available, and it would be pretty intrusive to make it so. This problem has plagued us since ctdb was developed, see for example the comment /* * This is a Samba3 hack/optimization. Routines like process_exists need to * talk to ctdbd, and they don't get handed a messaging context. */ in messaging_ctdb.c. This patchset removes this problem in a radical way: Treat the messaging_dgm context as one globally available structure and be done with it. The ctdb socket could go the same way in the future. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Sun Sep 14 16:29:30 CEST 2014 on sn-devel-104
* messaging_dgm: Avoid a tallocVolker Lendecke2014-09-141-10/+10
| | | | | | | Not really required, but it removes a NULL check Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* messaging_dgm: Avoid a tallocVolker Lendecke2014-09-141-7/+8
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* messaging_dgm: messaging_dgm_lockfile_remove does not use tmp_ctx anymoreVolker Lendecke2014-09-141-3/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* messaging_dgm: messaging_dgm_lockfile_create does not use tmp_ctx anymoreVolker Lendecke2014-09-141-3/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* messaging_dgm: Avoid talloc_tos()Volker Lendecke2014-09-141-56/+55
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* messaging_dgm: ReformattingVolker Lendecke2014-09-141-2/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* messaging_dgm: Remove an unnecessary castVolker Lendecke2014-09-141-2/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* namecache: fix uninitialised pointer returnsDavid Disseldorp2014-09-131-3/+3
| | | | | | | | | | asprintf_strupper_m() doesn't set *strp on error. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Sep 13 03:21:39 CEST 2014 on sn-devel-104
* s3: smbd: streams - Ensure share mode validation ignores internal opens ↵Volker Lendecke2014-09-121-1/+6
| | | | | | | | | | | (op_mid == 0). Fixes bug 10797 - smbd panic at find_oplock_types https://bugzilla.samba.org/show_bug.cgi?id=10797 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* media_harmony: Fix a crash bugVolker Lendecke2014-09-121-2/+2
| | | | | | | | | | | | Now that the dust has settled, fix a crash bug that was hidden behind the warnings... Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Simo Sorce <idra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Fri Sep 12 02:45:40 CEST 2014 on sn-devel-104
* media_harmony: Fix warningsVolker Lendecke2014-09-121-12/+9
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Simo Sorce <idra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3: smbd - open logic fix.Jeremy Allison2014-09-111-0/+11
| | | | | | | | | | | | | | | | | | | | | | | As we atomically create using O_CREAT|O_EXCL, then if new_file_created is true, then file_existed *MUST* have been false (even if the file was previously detected as being there. We use the variable file_existed again in logic below this statement, so we must set file_existed = false, if new_file_created returns are true from open_file(). Based on a fix from Michael Adam. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10809 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Thu Sep 11 22:29:22 CEST 2014 on sn-devel-104
* vfs_acl_common: dacl size must be updatedRalph Boehme2014-09-111-0/+3
| | | | | | | | | Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Sep 11 03:54:42 CEST 2014 on sn-devel-104
* s3: smbd: Ensure we don't call qsort() with a size of -1.Jeremy Allison2014-09-111-16/+16
| | | | | | | | | | | Based on a patch idea from Ken Harris <kharris@mathworks.com> Fixes bug 10798 - crash in source3/smbd/notify.c https://bugzilla.samba.org/show_bug.cgi?id=10798 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* s3:smbd:open_file: use a more natural check.Michael Adam2014-09-111-1/+3
| | | | | | | As suggested by Jeremy Allison <jra@samba.org>. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbd: fix a race in open codeMichael Adam2014-09-101-17/+42
| | | | | | | | | | | | | The race is when a file vanishes between existence check and acl check. In this case, open_file_ncreate() returns OBJECT_NAME_NOT_FOUND even if the create was called with disposition OPEN_IF. But in this case, the file should be created. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Fix a typoVolker Lendecke2014-09-101-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbd: fix a comment typoRalph Boehme2014-09-091-1/+1
| | | | | | Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* smbd: Move make_dir_struct() to reply.cVolker Lendecke2014-09-093-54/+46
| | | | | | | | This routine has nothing to do with dptr handling, it is SMB1 marshalling called only from reply_search(). Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3:smbd: close the connection if the client doesn't start with a SMB1 ↵Stefan Metzmacher2014-09-091-0/+18
| | | | | | | | | | | | | | | Negprot or old messaging call. The case where the client starts with a SMB2 Negprot is already handled in smbd_smb2_request_dispatch(). Bug: https://bugzilla.samba.org/show_bug.cgi?id=10766 Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Sep 9 13:02:21 CEST 2014 on sn-devel-104
* s3: smbd: smb2-sessionsetup. Fix use after free when the sessionsetup ↵Jeremy Allison2014-09-081-0/+6
| | | | | | | | | | request state is freed before struct smbXsrv_session struct. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Mon Sep 8 09:52:23 CEST 2014 on sn-devel-104
* s3-lib: Do not walk past the end of the dos_to_ntstatus_map arrayAndrew Bartlett2014-09-081-1/+1
| | | | | | | | Found by AddressSanitizer Change-Id: Ic8b3e2599713c37b11324f9ec2d01891f0f287b9 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
* passdb: Avoid use-after-free when setting a plaintext passwordAndrew Bartlett2014-09-081-2/+3
| | | | | | | | | | | | | | The issue here is that pdb_set_plaintext_passwd() re-used the memory from pdb_get_pw_history() as input We need to free this after we copy and set it. Found by AddressSanitizer Andrew Bartlett Change-Id: I4e148e23ccbbe5444c969ff8f91709791c7696bb Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
* s3:build: don't detect perl in source3/wscript again.Michael Adam2014-09-051-1/+0
| | | | | | This is done in the top level now. Signed-off-by: Michael Adam <obnox@samba.org>
* s3: smbd: vfs_dirsort module.Jeremy Allison2014-09-031-1/+1
| | | | | | | | | | | Fix an off-by-one check that would cause seekdir to seek off the end of the cached array. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ronnie Sahlberg <ronniesahlberg.gmail.com> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Sep 3 19:59:54 CEST 2014 on sn-devel-104
* s3-kpasswd: Fix build warning.Günther Deschner2014-09-011-1/+1
| | | | | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlet <abartlet@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Sep 1 18:15:15 CEST 2014 on sn-devel-104
* s3-kpasswd: send a netbios krb5 address to avoid invalid net address errors fromGünther Deschner2014-09-011-0/+14
| | | | | | | | | heimdal. Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlet <abartlet@samba.org>
* Remove custom password change code in libadsSimo Sorce2014-09-011-555/+59
| | | | | | | | | Use standard libkrb5 calls instead. Signed-off-by: Simo Sorce <idra@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlet <abartlet@samba.org>
* Remove duplicate definitionsSimo Sorce2014-09-011-9/+0
| | | | | | | | | Thee are already defined both in Heimdal and MIT public headers Signed-off-by: Simo Sorce <idra@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlet <abartlet@samba.org>
* s3-rpc_client: Do not give NT_STATUS_NO_MEMORY when the source string was NULLAndrew Bartlett2014-09-011-5/+6
| | | | | | | Change-Id: I25a4dcc2239267ee7c219e965693027ca2981983 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-By: Jelmer Vernooij <jelmer@samba.org>
* set_dc_type_and_flags_trustinfo: Use init_dc_connection and ↵Andrew Bartlett2014-09-011-18/+26
| | | | | | | | | | | | | wb_open_internal_pipe This means we call this code, and mark trusted domains as active directory, when we are an AD DC. Otherwise, in the previous case we would not have domain->active_directory set, and would fail on connection_ok() due to not having a full connection to our internal DC Change-Id: I7ccee569d69d6c5466334540db8920e57aafa991 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* winbindd: Add debugging to assist in locating errors creating NETLOGON pipesAndrew Bartlett2014-09-011-0/+12
| | | | | | | Change-Id: If15483c37ed43267c6474ce8b5e9d96254745bca Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-By: Jelmer Vernooij <jelmer@samba.org>