summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Typo: s/preceeded/preceded/Jelmer Vernooij2014-04-142-4/+4
| | | | | | | | | | | Caught by lintian, the Debian package linter :) Change-Id: Ia7162ea8c2b1845155345526b66d71ae64f15227 Reviewed-on: https://gerrit.samba.org/216 Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org> Autobuild-Date(master): Mon Apr 14 03:51:15 CEST 2014 on sn-devel-104
* Typo: Commiting -> CommittingJelmer Vernooij2014-04-142-4/+4
| | | | | | | Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Change-Id: I9d71706ce6d6782da72a26fa37e33fe5b527788e Reviewed-on: https://gerrit.samba.org/217 Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Typo: speciefied -> specified.Jelmer Vernooij2014-04-131-1/+1
| | | | | | | | | | Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Change-Id: I0357440cde2ef70945ff4a9ba87b62ab88b271a8 Reviewed-on: https://gerrit.samba.org/218 Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org> Autobuild-Date(master): Sun Apr 13 19:12:22 CEST 2014 on sn-devel-104
* Typo: s/prefered/preferred/Jelmer Vernooij2014-04-132-2/+2
| | | | | | | Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Change-Id: Ib82b71111fd208990aa876a8bf06431cfed21a6c Reviewed-on: https://gerrit.samba.org/220 Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Typo: sucessfully -> successfullyJelmer Vernooij2014-04-132-3/+3
| | | | | | | Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Change-Id: I23258edf9c197081c882ba85dedf833292e56e4e Reviewed-on: https://gerrit.samba.org/219 Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Typo: Specifing -> specifying.Jelmer Vernooij2014-04-131-1/+1
| | | | | | | Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Change-Id: I80286441b32cd0b8384610b5b6db7790b8a22d48 Reviewed-on: https://gerrit.samba.org/221 Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:smb2_server: remove unused get_min_receive_file_size() wrapper functionStefan Metzmacher2014-04-111-13/+2
| | | | | | | | | | smb2req always comes from talloc_zero(). Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Apr 11 23:55:17 CEST 2014 on sn-devel-104
* s3:smb2_server: only allocate the required buffer in the smb2 recvfile() ↵Stefan Metzmacher2014-04-112-19/+30
| | | | | | | | | | code path This way the buffer will likely be allocated within the existing talloc_pool, which avoids one malloc() per request. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smb2_server: prepare smbd_smb2_request_verify_sizes() for the optimized ↵Stefan Metzmacher2014-04-111-0/+9
| | | | | | | | | recvfile() case For recvfile we haven't read and may not allocated the dyn buffer. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smb2_write: allow SMBD_SMB2_IN_DYN_LEN() to be 0 for the recvfile case.Stefan Metzmacher2014-04-111-2/+18
| | | | | | | For recvfile we haven't read and may not allocated the dyn buffer. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smb2_server: make sure we don't try recvfile for special NBT messagesStefan Metzmacher2014-04-111-0/+3
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smb2_server: use the same logic to avoid recvfile() for IPC/PRINT sharesStefan Metzmacher2014-04-111-0/+41
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbd: use smb1srv_open_lookup() in is_valid_writeX_buffer()Stefan Metzmacher2014-04-111-9/+20
| | | | | | | | | It's more logical to check the fnum instead of tid here. This will make it easier to reuse the logic for SMB2 and allows per fsp recvfile detection. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbXsrv_open: allow now==0 to skip the idle_time update.Stefan Metzmacher2014-04-111-1/+3
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:lib: use stack buffers in drain_socket() and default_sys_recvfile()Stefan Metzmacher2014-04-111-16/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libs: s3 and s4: make our dns lookup code signal-safe.Jeremy Allison2014-04-101-5/+24
| | | | | | | | | | | | | | Cope with -1,EINTR returns. Needed as this code can be called from inside smbd. Also fixes a bug in not checking the return from poll() correctly. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Kai Blin <kai@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Apr 10 22:06:08 CEST 2014 on sn-devel-104
* s3: smbd: Performance optimization for RECVFILE.Jeremy Allison2014-04-101-13/+43
| | | | | | | | | | | | | | | | | | | | | Based on work proposed by Jones <jones.kstw@gmail.com>. Removes set_blocking()/set_unblocking() fcntl calls around RECVFILE on the non-blocking socket. Instead uses RECVFILE in a loop, and only drops back to set_blocking()/set_unblocking() once RECVFILE returns -1/EAGAIN/EWOULDBLOCK. From the samba-technical list: ------------------------------------------------ The iometer 512b sequential write shows following result, Before applying this patch: 75333 IOps After applying this patch: 82691 IOps ------------------------------------------------ Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4-wbclient: Fix wbc_sids_to_xids to correctly indicate the length of the ↵Andrew Bartlett2014-04-091-1/+1
| | | | | | | | | | | | | | | | | | SID list This uses the fact that we know the end of the string in p to avoid needing a strlen() call. Otherwise the winbindd validation that the extra_data is terminated may fail, if the un-initiliased memory is not zero. Andrew Bartlett Change-Id: I9b28068e4fbd3754c8d14724af93638d657810dd Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Wed Apr 9 18:26:40 CEST 2014 on sn-devel-104
* tdb: consolidate tdb allocation code - re-use dead records at hash top.Michael Adam2014-04-092-43/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | When in tdb_store we re-use a dead record reactivated from the target hash chain itself, we currently leave it in its place in the chain. When we re-use a dead record from a different chain or from the freelist instead, we insert it at the beginning of the target chain. This patch changes the behaviour to always newly store a record at the beginning of the hash chain. This removes a special case and hence simplifies the allocation code. On the other hand side, it introduces two additioal tdb_ofs_write calls for the in-chain-case. Note the subtelty of the patch that by moving the case of the candidate record's chain as new case "i=0" into the for loop, we also reverse the order of the two steps in the for-loop body (non blocking freelist alloc and searching for dead record in a chain) in order to keep the overall order of execution identical. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Wed Apr 9 10:37:08 CEST 2014 on sn-devel-104
* torture: add local verification trailer parsing testDavid Disseldorp2014-04-093-1/+104
| | | | | | | | Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Apr 9 03:44:15 CEST 2014 on sn-devel-104
* s3-lib/util: fix logic inside set_namearray loops.Jeremy Allison2014-04-091-10/+16
| | | | | | | | | | | | | Additional fix for bug #10544 - s3-lib/util: set_namearray reads across end of namelist string. Not strictly needed as the initial fix addresses the problem, but corrects the internal logic inside the loops. https://bugzilla.samba.org/show_bug.cgi?id=10544 Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
* s3-lib/util: fix read across end of namelist stringBjörn Baumbach2014-04-081-2/+5
| | | | | | | | | | | | If the namelist is not terminated with a '/', we try to read the next character after the string termination '\0'. Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Apr 8 21:44:16 CEST 2014 on sn-devel-104
* wafsamba: replace dots in library namesRalph Boehme2014-04-081-1/+1
| | | | | | | | | | | | Certain libraries use a version number with a dot in the library name, eg libtracker-sparql-0.16. The dot is passed to the HAVE_LIBXXX macro but dots aren't allowed in C macros, compiler diagnostic: warning: missing whitespace after the macro name Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4-wbclient: Cope with winbind returning an errorAndrew Bartlett2014-04-081-0/+4
| | | | | | | | | Change-Id: I8eaf858f9e9e55eec20aa2c585db5459fb73b887 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Apr 8 12:53:13 CEST 2014 on sn-devel-104
* ctdb-daemon: Always update database priority cluster wideAmitay Isaacs2014-04-074-17/+17
| | | | | | | | | | | | | Database priority is a global property and all the nodes should have the priority set for the databases. Just setting priority on one node can lead to problems in the recovery as a database can be frozen at wrong priority and then freezing database would not succeed. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Mon Apr 7 14:06:26 CEST 2014 on sn-devel-104
* s3: smbd/nmbd/winbindd - fix append on trailing slash on system paths.Jeremy Allison2014-04-051-1/+1
| | | | | | | | | | | | | | | | | | The xx_path() function incorrectly uses talloc_asprintf_append() instead of talloc_asprintf() on a path that may have been modified by the trim_string() call previously. talloc_asprintf_append() always sticks the new text at the *end* of the allocated buffer, not at the end of the string. Fix bug #10538 - Daemons crashing when lock/state/cache directory parameter has a trailing slash https://bugzilla.samba.org/show_bug.cgi?id=10538 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Sat Apr 5 13:40:30 CEST 2014 on sn-devel-104
* s3: enforce a positive allocation_file_size for non-empty filesBjörn Baumbach2014-04-051-0/+12
| | | | | | | | | | | | | | Some file systems do not allocate a block for very small files. But for non-empty file should report a positive size. Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Apr 5 03:09:00 CEST 2014 on sn-devel-104
* vfs: Store ACL control flags in gpfs vfs module.Alexander Werth2014-04-051-23/+114
| | | | | | | | Use literals to allow a compile and execution on gpfs 3.4. Signed-off-by: Alexander Werth <alexander.werth@de.ibm.com> Reviewed-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs: Support NFS control flags in nfs4_acls.c.Alexander Werth2014-04-052-1/+27
| | | | | | | | | | | The ACL control flags stores in particular the dacl protected bit which is responsible for the "Include inherited permissions from this object's parent" checkbox. This stores the information in the ACL struct passed to and from file system specific vfs modules. Signed-off-by: Alexander Werth <alexander.werth@de.ibm.com> Reviewed-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* talloc: Update flags in pytalloc-util pkgconfig fileLukas Slebodnik2014-04-041-2/+2
| | | | | | | | | | | | | | After exapnding, @LIB_RPATH@ will be -Wl,-rpatch,/usr/local/lib if rpath is used on install. But "-Wl," will be passed to linker and should not be among CFLAGS. Other pkgconfig files have @LIB_RPATH@ in the right place. @see commit 735c1cd2da15167748e92ba6de48fdb5169db587 Signed-off-by: Lukas Slebodnik <lslebodn@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Apr 4 23:50:25 CEST 2014 on sn-devel-104
* tevent: Update flags in tevent pkgconfig fileLukas Slebodnik2014-04-041-2/+2
| | | | | | | | | | | After exapnding, @LIB_RPATH@ will be -Wl,-rpatch,/usr/local/lib if rpath is used on install. But "-Wl," will be passed to linker and should not be among CFLAGS. Other pkgconfig files have @LIB_RPATH@ in the right place. @see commit 735c1cd2da15167748e92ba6de48fdb5169db587 Signed-off-by: Lukas Slebodnik <lslebodn@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-kerberos: make ipv6 support for generated krb5 config files more robust.Günther Deschner2014-04-041-2/+27
| | | | | | | | | | | | | Older MIT Kerberos libraries will add any secondary ipv6 address as ipv4 address, defining the (default) krb5 port 88 circumvents that. Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Fri Apr 4 16:33:12 CEST 2014 on sn-devel-104
* s3: rpc_server/srvsvc: count open files in NetConnEnumShekhar Amlekar2014-04-031-11/+47
| | | | | | | | | Signed-off-by: Shekhar Amlekar <samlekar@in.ibm.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Apr 3 21:19:43 CEST 2014 on sn-devel-104
* s3: rpc_server/srvsvc: count share connections in NetConnEnumShekhar Amlekar2014-04-031-9/+45
| | | | | | Signed-off-by: Shekhar Amlekar <samlekar@in.ibm.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* s3: rpc_server/srvsvc: added routines to compute opens on share connections.Shekhar Amlekar2014-04-031-0/+49
| | | | | | | | | Added routines count_share_opens() and share_file_fn() to count opens on share connections. Signed-off-by: Shekhar Amlekar <samlekar@in.ibm.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* s3: rpc_server/srvsvc: Added routines to count share connections.Shekhar Amlekar2014-04-031-0/+64
| | | | | | | | | Added routines count_share_conns() and share_conn_fn() to count connections to a share. Signed-off-by: Shekhar Amlekar <samlekar@in.ibm.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* autorid: use the db argument in the initialize traverse action.Michael Adam2014-04-031-2/+2
| | | | | | | | | | | | | | By a copy and paste error, the global autorid_db was used. This was not currently a problem in behaviour, because this autorid_db is passed as the argument. This change fixes the callback function for consistency. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Apr 3 08:36:55 CEST 2014 on sn-devel-104
* s3: messages: Implement cleanup of dead records.Jeremy Allison2014-04-034-0/+68
| | | | | | | | | | | | When a smbd process dies, pending messages.tdb records for this process might not get cleaned up. Implement a cleanup for dead records that is triggered after a smbd dies uncleanly; the records for that PID are deleted. Based on a patchset from Christof Schmitt <cs@samba.org>. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* autorid: make the whole initialization atomic with one transaction.Michael Adam2014-04-031-10/+38
| | | | | | | | | | | | | | | | | | | | | | | | Originally, there were several writing operations: - store the range HWM - store the alloc uid HWM - store the alloc gid HWM - store the config - create mappings for a whole list of wellknown sids Each of these consisted of its own transaction, the wellknown preallocation even of one transaction per sid. This change wrapps all of these in one big transaction. Thereby making the whole initialization atomic, and with respect to the creation of the wellknown mappings also more deterministic. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Apr 3 02:41:25 CEST 2014 on sn-devel-104
* autorid: initialize: fix typo in and further improve a debug message.Michael Adam2014-04-031-2/+2
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* autorid: initialize: use the split db_open and init_hwms function instead of ↵Michael Adam2014-04-031-1/+6
| | | | | | | | | db_init This way, we can later put all of the storing functions inside one transaction. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* autorid: initialize: open the autorid db as late as possible.Michael Adam2014-04-031-8/+9
| | | | | | | But make sure to link the db context to commonconfig afterwards. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* autorid: initialize: link config to commonconfig as soon as it is allocated.Michael Adam2014-04-031-1/+1
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* autorid: initialize: link commonconfig to dom as soon as it is allocatedMichael Adam2014-04-031-2/+1
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* autorid: initialize: store config directly before allocating well knowns.Michael Adam2014-04-031-7/+6
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* autorid: split idmap_autorid_db_open and idmap_autorid_init_hwms out of ↵Michael Adam2014-04-032-9/+50
| | | | | | | | | idmap_autorid_db_init These will be used separately in the full initialization function. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* autorid: in idmap_autorid_saveconfig, add a debug msg when loading gives errorMichael Adam2014-04-031-0/+2
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* autorid: improve the precision of the DEBUG at the end of add_rangeMichael Adam2014-04-031-2/+5
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* autorid: add a DEBUG upon talloc fail in the add_range function.Michael Adam2014-04-031-0/+1
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* autorid: when storing a new range, always check it does not exist.Michael Adam2014-04-031-15/+22
| | | | | | | | | | | Also check for existence when the range is >= the HWM, typically the "acquire" case where we bump the HWM. In case of external modification, we would previously simply overwrite an an existing range mapping. Now we check and throw INTERNAL_DB_CORRUPTION in this case. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>