summaryrefslogtreecommitdiffstats
path: root/source3
Commit message (Collapse)AuthorAgeFilesLines
* s3: use smb_xmemdup instead of smb_memdup and smb_panicBjörn Baumbach2014-04-161-5/+2
| | | | | | | | Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Apr 16 22:53:42 CEST 2014 on sn-devel-104
* lib-util: rename memdup to smb_memdup and fix all callersBjörn Baumbach2014-04-167-10/+10
| | | | | Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3:smbd: always allow SMB1 signing, but only announce it if configured.Stefan Metzmacher2014-04-162-5/+8
| | | | | | | | | | | Always allow the client to turn on SMB1 signing using FLAGS2_SMB_SECURITY_SIGNATURES_REQUIRED. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Apr 16 10:07:56 CEST 2014 on sn-devel-104
* auth: Remove support for HAVE_TRUNCATED_SALT from pass_check.cAndrew Bartlett2014-04-151-14/+0
| | | | | | | | | | | The comments indicate that this was needed for HP-UX at one point, but the configure code was never ported to WAF. 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): Tue Apr 15 12:32:09 CEST 2014 on sn-devel-104
* auth: Remove USE_BOTH_CRYPT_CALLS block from pass_check.cAndrew Bartlett2014-04-151-20/+0
| | | | | | | | This code is dead since the move to the WAF build system, but was set for HP-UX 9, 10 and 11 in the autoconf build system. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* auth: Remove linux_bigcrypt support from pass_check.cAndrew Bartlett2014-04-151-32/+0
| | | | | | | This is dead code, and probably has been for quite some time. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* auth: Remove support for plaintext auth on systems that use getprpwnam()Andrew Bartlett2014-04-151-10/+0
| | | | | | | | The WAF build does not have the code to detect getprpwnam, so this is dead code. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* auth: Remove plaintext OSF1 password supportAndrew Bartlett2014-04-152-67/+0
| | | | | | | | The WAF build does not have the code to detect getprpwnam on which this is based, and so this is dead code. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* auth: Remove afs_auth() from pass_check.c and s4's auth_unixAndrew Bartlett2014-04-151-35/+0
| | | | | | | | The waf build does not have code to detect support for AFS plaintext authentication, so this is dead code. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* auth: Remove dfs_auth() from pass_check.c and s4's auth_unixAndrew Bartlett2014-04-151-315/+0
| | | | | | | | The waf build has no logic to detect DCE/DFS, so this plaintext authentication mechanism is dead code. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* auth: Remove unused PASSWORD_LENTH macro from pass_check.cAndrew Bartlett2014-04-151-6/+0
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* auth: Remove static variable ths_user from password_check() codeAndrew Bartlett2014-04-151-36/+9
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* Typo: Commiting -> CommittingJelmer Vernooij2014-04-141-1/+1
| | | | | | | 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-131-1/+1
| | | | | | | 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>
* 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>
* 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
* 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>
* 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>