summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* testprogs/test_ldb: check rootdse search with extended-dn controlStefan Metzmacher2014-12-121-0/+2
| | | | | | | | | | | Verifies BUG: https://bugzilla.samba.org/show_bug.cgi?id=10949 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Fri Dec 12 20:15:46 CET 2014 on sn-devel-104
* s4:dsdb/rootdse: expand extended dn values with the AS_SYSTEM controlStefan Metzmacher2014-12-121-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise we can't find the GUID of the 'serverName' attribute as ANONYMOUS. This results in root@ub1204-161:~# ldbsearch -U% -H ldap://172.31.9.161 -b '' -s base --extended-dn serverName search error - LDAP error 1 LDAP_OPERATIONS_ERROR - <00002020: operations error at ../source4/dsdb/samdb/ldb_modules/rootdse.c:567> <> While it works as system: root@ub1204-161:~# ldbsearch -U% -H /var/lib/samba/private/sam.ldb -b '' -s base --extended-dn serverName # record 1 dn: serverName: <GUID=348c35e1-04e3-4988-a32c-32478d584551>;CN=UB1204-161,CN=Serve rs,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=s4xdom,DC=base # returned 1 records # 1 entries # 0 referrals Bug: https://bugzilla.samba.org/show_bug.cgi?id=10949 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* lib/util: Fix incorrect month in timestampsMartin Schwenke2014-12-121-1/+1
| | | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=11003 Reported-by: Youzhong Yang <Youzhong.Yang@mathworks.com> Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Fri Dec 12 05:02:32 CET 2014 on sn-devel-104
* vfs_streams_xattr: add missing call to SMB_VFS_NEXT_CONNECTRalph Boehme2014-12-121-0/+6
| | | | | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Rewviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Dec 12 02:09:24 CET 2014 on sn-devel-104
* selftest: Add test for joining a Samba classic DC as a BDCAndrew Bartlett2014-12-112-0/+29
| | | | | | | | | | | | | This does not join the DC itself, so as not to pertrub the test environment mid-run, but does confirm that the join works and the password can be changed. Pair-programmed-with: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Dec 11 21:40:27 CET 2014 on sn-devel-104
* libsmb: Allow change of BDC trust account passwordAndrew Bartlett2014-12-111-0/+3
| | | | | | | | | | This account is otherwise just like the workstation trust acocunt, so use that code. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10891 Pair-programmed-with: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* auth: Allow domain join to itself when we are a PDCAndrew Bartlett2014-12-111-1/+3
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=10891 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org>
* selftest: Add 'net dom join' test which fails cause we are a DCAndreas Schneider2014-12-112-0/+27
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* netapi: Move DC check to NetJoinDomain() where it is needed.Andrew Bartlett2014-12-112-4/+4
| | | | | | | | | | This partially reverts 15f6e27bd5a9065c8b781fa21f5989ce2c355776. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10891 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org>
* vfs_glusterfs: Set connectpath as snapdir-entry-path.raghavendra talur2014-12-101-0/+11
| | | | | | | | | | | | snapview client in gluster would require connectpath in order add snapdir entry to readdir result. Signed-off-by: raghavendra talur <raghavendra.talur@gmail.com> Reviewed-by: Guenther Deschner <gd@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Wed Dec 10 16:38:27 CET 2014 on sn-devel-104
* vfs_glusterfs: Remember the connect path too for reopening.raghavendra talur2014-12-101-5/+15
| | | | | | | | | | As Samba allows us to share subdirs, lets re-use preopened connections to glusterfs only if they are for same volume AND same connectpath. Signed-off-by: raghavendra talur <raghavendra.talur@gmail.com> Reviewed-by: Guenther Deschner <gd@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* vfs_glusterfs: In vfs_gluster_sys_acl_get_file/fd, reduce the number of ↵Poornima G2014-12-101-10/+32
| | | | | | | | getxattr calls. Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-by: Ira Cooper <ira@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* torture: Fix raw.open.chained-ntcreatexVolker Lendecke2014-12-091-2/+2
| | | | | | | | | | | | sizeof(buf) is 5. On FreeBSD10/clang this overwrites "ret". Not good. Same as 574750777a 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 Dec 9 19:43:31 CET 2014 on sn-devel-104
* notify_inotify: Simplify inotify_dispatchVolker Lendecke2014-12-091-15/+17
| | | | | | | | | | | | Normally, I'm trying to simplify things with early returns. But in this case I think the reverse makes the if-condition easier to understand 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 Dec 9 06:37:24 CET 2014 on sn-devel-104
* smbd: Compile notify_inotify only if availableVolker Lendecke2014-12-092-6/+6
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* notify_inotify: inotify_watch now takes a mem_ctxVolker Lendecke2014-12-093-4/+13
| | | | | | | This will make it easier to integrate into proper memory hierarchies. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* notify: Add "dir" to notify_eventVolker Lendecke2014-12-095-3/+13
| | | | | | | | | | | | | "notify_event" only reports names relative to some path that is only implicitly known via "private_data". Right now "private_data" is the fsp of the directory holding this notify. I want to use inotify_watch in a notify-daemon that does not have a fsp available and has more problems getting the path right out of "private_data". notify_inotify has the directory under which the event happened available, so make it known to the callback. Right now no caller uses it yet. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* notify_inotify: Make inotify_watch return 0/errnoVolker Lendecke2014-12-093-26/+31
| | | | | | | | More like a cleanup, but I want to use inotify_watch in notifyd that I would like to keep as light as possible Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* notify_inotify: Slightly simplify watch_destructorVolker Lendecke2014-12-091-8/+10
| | | | | | | Another case of an early return Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* notify_inotify: Slightly simplify inotify_watchVolker Lendecke2014-12-091-15/+13
| | | | | | | | | | tallocing first avoids having to call inotify_rm_watch This even fixes a real error: We share inotifies between different instances, so the rm_watch in the error paths destroys other legitimate watches Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* notify_inotify: Make inotify_setup return 0/errnoVolker Lendecke2014-12-091-10/+15
| | | | | | | This gets rid of one NT_STATUS_HAVE_NO_MEMORY with its implicit return; :-) Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* notify_inotify: Add a NULL checkVolker Lendecke2014-12-091-1/+8
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* notify_inotify: Simplify filter_matchVolker Lendecke2014-12-091-20/+19
| | | | | | | Early returns make code simpler Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Move lp_parm_bool out of notify_inotify.cVolker Lendecke2014-12-092-4/+3
| | | | | | | | Notifyd should be as independent of Samba infrastructure as possible, and it will call notify_inotify Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Use iov_buf in unix_msgVolker Lendecke2014-12-092-24/+3
| | | | | | | Now that iov_buf does not pull in talloc we can use it Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Simplify iov_buf[len]Volker Lendecke2014-12-094-32/+31
| | | | | | | This makes iov_buf independent of talloc Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* messaging3: Avoid self-send complexityVolker Lendecke2014-12-093-112/+5
| | | | | | | | | | | | | | | | | With the notify code I've hit another case where self-sends caused a problem. This time messages were lost because we tried to do multiple dispatch_rec calls from within a single inotify callback. Only the first one was being taken care of, the others did not find receivers. This patch makes self-sends go through the kernel as well, the kernel queues everything nicely for us. With dgram messaging this should be pretty fast. If it turns out to be a performance problem, we can solve it later by doing proper queueing in user space. We need to completely decouple any processing from callbacks. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Fix blank line endingsVolker Lendecke2014-12-093-55/+55
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Fix a typoVolker Lendecke2014-12-091-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:locking: Change the data model for leases_db to cope with dynamic path ↵Jeremy Allison2014-12-095-73/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | renames. interface leases_db { typedef [public] struct { GUID client_guid; smb2_lease_key lease_key; } leases_db_key; typedef [public] struct { file_id id; [string,charset(UTF8)] char *servicepath; [string,charset(UTF8)] char *base_name; [string,charset(UTF8)] char *stream_name; } leases_db_file; typedef [public] struct { uint32 num_files; [size_is(num_files)] leases_db_file files[]; } leases_db_value; } As designed by metze. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Dec 9 03:44:04 CET 2014 on sn-devel-104
* s3:locking: pass down servicepath to leases_db_add()Jeremy Allison2014-12-093-2/+8
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:locking: Add new utility function leases_db_copy_file_ids()Jeremy Allison2014-12-092-0/+25
| | | | | | | Will be used by lease db parsers. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:locking: prepare the data model for leases_db to cope with dynamic path ↵Jeremy Allison2014-12-091-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | renames. interface leases_db { typedef [public] struct { GUID client_guid; smb2_lease_key lease_key; } leases_db_key; typedef [public] struct { file_id id; [string,charset(UTF8)] char *servicepath; [string,charset(UTF8)] char *base_name; [string,charset(UTF8)] char *stream_name; } leases_db_file; typedef [public] struct { uint32 num_files; [size_is(num_files)] leases_db_file files[]; } leases_db_value; } As designed by metze. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:locking: pass servicename_new to leases_db_rename()Jeremy Allison2014-12-093-0/+3
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* vfs: Add missing include for sys_pread() in cacheprime module.Andreas Schneider2014-12-081-0/+1
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Mon Dec 8 16:54:51 CET 2014 on sn-devel-104
* smbd: Add missing include for iov_buflen().Andreas Schneider2014-12-081-0/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* socket_wrapper: Add missing prototype check for eventfd.Andreas Schneider2014-12-081-0/+5
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=10965 Newer glibc versions use and unsinged integer for the count instead of an integer. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4-tests/env_loadparm: Throw KeyError in case SMB_CONF_PATHKamen Mazdrashki2014-12-081-1/+1
| | | | | | | | | | | A bit more specific for the caller to "know" that env key is missing Change-Id: I4d4c2121af868d79f46f865f420336222bc67347 Signed-off-by: Kamen Mazdrashki <kamenim@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Autobuild-User(master): Kamen Mazdrashki <kamenim@samba.org> Autobuild-Date(master): Mon Dec 8 05:27:34 CET 2014 on sn-devel-104
* s4-ldap: Pass on-wire transmitted control down the chainKamen Mazdrashki2014-12-081-1/+1
| | | | | | Change-Id: Ic3a117f74e8a67c45584fdb520d92e4f0cb01c5e Signed-off-by: Kamen Mazdrashki <kamenim@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3: modules: Fix *allocate* calls to follow POSIX error return convention.Jeremy Allison2014-12-084-15/+16
| | | | | | | | | | | | | | | Fix up the ceph, fruit, time_audit and streams_xattr modules to follow the -1,errno convention for errors. Reported by Jones <jones.kstw@gmail.com> who provided the initial patch. This patch tested and confirmed working by him as well. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@suse.de> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon Dec 8 02:59:43 CET 2014 on sn-devel-104
* s3: smbd: Fix *allocate* calls to follow POSIX error return convention.Jeremy Allison2014-12-081-11/+11
| | | | | | | | | | | | | | | | | Fix vfs_allocate_file_space(), vfs_slow_fallocate(), vfs_fill_sparse() to follow the -1,errno convention for errors. Standardize on the -1,errno convention. Reported by Jones <jones.kstw@gmail.com> who provided the initial patch. This patch tested and confirmed working by him as well. https://bugzilla.samba.org/show_bug.cgi?id=10982 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@suse.de>
* s3: smbd: Fix *allocate* calls to follow POSIX error return convention.Jeremy Allison2014-12-081-5/+12
| | | | | | | | | | | | | | | | | vfswrap_fallocate() is broken in that it can call posix_fallocate() which returns an int error (and doesn't set errno) but can also call Linux fallocate() which returns -1 and sets errno. Standardize on the -1,errno convention. Reported by Jones <jones.kstw@gmail.com> who provided the initial patch. This patch tested and confirmed working by him as well. https://bugzilla.samba.org/show_bug.cgi?id=10982 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@suse.de>
* lib: Simplify load_case_tables_library()Volker Lendecke2014-12-081-8/+9
| | | | | | | We don't really need a talloc context here Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Use read_data() in notify_inotifyVolker Lendecke2014-12-071-5/+6
| | | | | | | | 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): Sun Dec 7 02:37:04 CET 2014 on sn-devel-104
* lib: Add a simple read_data call without NTSTATUSVolker Lendecke2014-12-072-0/+23
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Make write_data take a const void *Volker Lendecke2014-12-072-2/+2
| | | | | | | This aligns it with write(2) Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Split out write_data[_iov]Volker Lendecke2014-12-0718-85/+156
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Split out iov_buf[len]Volker Lendecke2014-12-077-46/+104
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: read_data->read_data_ntstatusVolker Lendecke2014-12-077-11/+13
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Split out sys_[read|write] & friendsVolker Lendecke2014-12-0720-96/+158
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>