summaryrefslogtreecommitdiffstats
path: root/source3
Commit message (Collapse)AuthorAgeFilesLines
...
* libsmb: Fix removing invalid samlogon cache entriesVolker Lendecke2014-12-121-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* 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>
* 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-092-3/+9
| | | | | | | | | | | | | "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>
* 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>
* 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>
* 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>
* Fix signed/unsigned comparisonsVolker Lendecke2014-12-071-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* ctdbd_conn: Accept msgs to all registered srvidsVolker Lendecke2014-12-071-5/+38
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* inotify: Properly handle cross-dir renamesVolker Lendecke2014-12-051-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | When watching two subdirectories with inotify and a file is moved between both, we get a IN_MOVED_FROM for the source watch and a IN_MOVED_TO for the destination watch. Without this patch we create a NOTIFY_ACTION_OLD_NAME for the old directory. We hold this back in notify_fsp, expecting the NEW_NAME immediately after it. In the cross-directory rename case this does not work, we'll not get the NEW_NAME, there is no NEW_NAME in that directory. This patch changes us to create NOTIFY_ACTION_REMOVED and NOTIFY_ACTION_ADDED in this case. Not sure this is right, but at least it is better than before: We get something at all. This is more likely to happen with the notifyd approach, as there we inotify-watch many subdirectories from one process. Without nootifyd you had to have two explorer windows open and do a nfs or local mv between those two directories to find this. 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): Fri Dec 5 21:01:54 CET 2014 on sn-devel-104
* s3: leases: Make SMB2 setinfo SMB2_FILE_RENAME_INFORMATION_INTERNAL async.Jeremy Allison2014-12-051-0/+218
| | | | | | | | | | If there are any RH leases we must break them to read and must wait for the client response before doing the rename. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3: leases: send_break_message() public.Jeremy Allison2014-12-052-1/+4
| | | | | | | | | We're going to need this to allow async SMB2 setinfo renames to send lease break messages as well as the open code. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3: leases: Make aio_add_req_to_fsp() public.Jeremy Allison2014-12-052-1/+2
| | | | | | | | We're going to need this to stop handle closures with outstanding async SMB2 renames causing a crash. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3: leases : Cope with renaming leased open files.Jeremy Allison2014-12-051-1/+24
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3: leases: Add leases_db_rename() to cope with renaming a leased file.Jeremy Allison2014-12-052-1/+27
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:smbd: add SMB_VFS_READDIR_ATTR() to marshall direntryRalph Boehme2014-12-041-6/+58
| | | | | | | | | | | | | | SMB_VFS_READDIR_ATTR is a last minute hook to fetch additional metadata for a directory entry when we're already marshalling the SMB reply buffer. This would we used, when there's a need to repurpose some fields in the the reply, like it's done with Apple's SMB2 extension "AAPL". We then fetch AAPL metadata with the shiny new SMB_VFS_READDIR_ATTR() VFS call and marshall appropiately. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>