summaryrefslogtreecommitdiffstats
path: root/source3
Commit message (Collapse)AuthorAgeFilesLines
* build: check for fallocate hole-punch supportDavid Disseldorp2015-03-091-0/+5
| | | | | | | | Add a configure time check for the FALLOC_FL_PUNCH_HOLE Linux specific fallocate() flag. It's been around since 2.6.38. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3/vfs: change fallocate mode flags from enum->uint32_tDavid Disseldorp2015-03-0912-44/+43
| | | | | | | | | | | | | | | | | | | | The Linux fallocate syscall offers a mode parameter which can take the following flags: FALLOC_FL_KEEP_SIZE FALLOC_FL_PUNCH_HOLE (since 2.6.38) FALLOC_FL_COLLAPSE_RANGE (since 3.15) FALLOC_FL_ZERO_RANGE (since 3.14) The flags are not exclusive, e.g. FALLOC_FL_PUNCH_HOLE must be specified alongside FALLOC_FL_KEEP_SIZE. Samba currently takes a vfs_fallocate_mode enum parameter for the VFS fallocate hook, taking either an EXTEND_SIZE or KEEP_SIZE value. This commit changes the fallocate hook such that it accepts a uint32_t flags parameter, in preparation for PUNCH_HOLE and ZERO_RANGE support. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/system: remove useless HAVE_LINUX_FALLOCATE64 logicDavid Disseldorp2015-03-091-3/+1
| | | | | Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-winbind: Fix chached user group lookup of trusted domains.Michael Adam2015-03-091-0/+11
| | | | | | | | | | | | | | | | | If a user group lookup has aleady been done before with a machine account we did always return the incomplete information from the cache. This patch makes sure we return the correct group information from the netsamlogon cache. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11143 Pair-Programmed-With: Andreas Schneider <asn@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Mar 9 19:23:25 CET 2015 on sn-devel-104
* winbind: Make wb_sids2xids_recv work on an arrayVolker Lendecke2015-03-078-21/+27
| | | | | | | | | | | | | | | | | | The trigger for this is that Coverity got confused by the dual use of &xid as an array with the implicit length equality between wb_sids2xids_send and the array passed in to wb_sids2xids_recv for the result. I don't want to start doing things just for the Coverity scan, but this makes the code clearer to me by removing this implicit expected array length equality. Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Sat Mar 7 15:28:59 CET 2015 on sn-devel-104
* vfs_fruit: Fix CID 1273290 Uninitialized scalar variableVolker Lendecke2015-03-061-1/+2
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Fri Mar 6 23:56:36 CET 2015 on sn-devel-104
* s3:smbprofile: profile the system and user space cpu timeStefan Metzmacher2015-03-063-0/+25
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3:smbprofile: Replace sysv shmem with tdbVolker Lendecke2015-03-067-110/+446
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | What? This patch gets rid of the central shared memory segment referenced by "profile_p". Instead, every smbd gets a static profile_area where it collects profiling data. Once a second, every smbd writes this profiling data into a record of its own in a "smbprofile.tdb". smbstatus -P does a tdb_traverse on this database and sums up what it finds. Why? At least in my perception sysv IPC has not the best reputation on earth. The code before this patch uses shmat(). Samba ages ago has developed a good abstraction of shared memory: It's called tdb. The main reason why I started this is that I have a request to become more flexible with profiling data. Samba should be able to collect data per share or per user, something which is almost impossible to do with a fixed structure. My idea is to for example install a profile area per share and every second marshall this into one tdb record indexed by share name. smbstatus -P would then also collect the data and either aggregate them or put them into individual per-share statistics. This flexibility in the data model is not really possible with one fixed structure. But isn't it slow? Well, I don't think so. I can't really prove it, but I do believe that on large boxes atomically incrementing a shared memory value for every SMB does show up due to NUMA effects. With this patch the hot code path is completely process-local. Once a second every smbd writes into a central tdb, this of course does atomic operations. But it's once a second, not on every SMB2 read. There's two places where I would like to improve things: With the current code all smbds wake up once a second. With 10,000 potentially idle smbds this will become noticable. That's why the current only starts the timer when something has changed. The second place is the tdb traverse: Right now traverse is blocking in the sense that when it has to switch hash chains it will block. With mutexes, this means a syscall. I have a traverse light in mind that works as follows: It assumes a locked hash chain and then walks the complete chain in one run without unlocking in between. This way the caller can do nonblocking locks in the first round and only do blocking locks in a second round. Also, a lot of syscall overhead will vanish. This way smbstatus -P will have almost zero impact on normal operations. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3:smbprofile: specify SMBPROFILE_STATS_SECTION_START() with name vs. ↵Stefan Metzmacher2015-03-062-12/+12
| | | | | | | | display[name] Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* perfcount: Fix CID 1035494 Out-of-bounds readVolker Lendecke2015-03-051-1/+1
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org> Autobuild-User(master): Ira Cooper <ira@samba.org> Autobuild-Date(master): Thu Mar 5 18:28:44 CET 2015 on sn-devel-104
* perfcount: Fix CID 1035493 Out-of-bounds readVolker Lendecke2015-03-051-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* perfcount: Fix CID 1035492 Out-of-bounds readVolker Lendecke2015-03-051-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* perfcount: Fix CID 1274043 Division or modulo by zeroVolker Lendecke2015-03-051-0/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* printing: increse log level for unreachable cups serversBjörn Jacke2015-03-051-2/+2
| | | | | | | | | | | | | this annoying messages hitting the logs very often on non-cups servers by default in log level 0 otherwise. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11133 Signed-off-by: Bjoern Jacke <bj@sernet.de> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): Björn Jacke <bj@sernet.de> Autobuild-Date(master): Thu Mar 5 14:38:42 CET 2015 on sn-devel-104
* rpc_server: Fix CID 1273433 Unused valueVolker Lendecke2015-03-041-1/+1
| | | | | | | | 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): Wed Mar 4 23:29:01 CET 2015 on sn-devel-104
* rpc_server: Fix CID 1035535 Uninitialized scalar variableVolker Lendecke2015-03-041-1/+1
| | | | | | | | | | I believe this can't happen, but better be safe than sorry Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Wed Mar 4 17:14:53 CET 2015 on sn-devel-104
* rpc_server: Fix CID 1035534 Uninitialized scalar variableVolker Lendecke2015-03-041-1/+1
| | | | | | | I believe this can't happen, but better be safe than sorry Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* winbind: Fix CID 1273294 Uninitialized scalar variableVolker Lendecke2015-03-041-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* winbind: Fix CID 1273295 Uninitialized scalar variableVolker Lendecke2015-03-041-1/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* libads: Fix CID 1273305 Uninitialized scalar variableVolker Lendecke2015-03-041-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* libads: Fix CID 1273306 Uninitialized scalar variableVolker Lendecke2015-03-041-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* lib: Fix CID 1273292 Uninitialized pointer readVolker Lendecke2015-03-041-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* lib: Fix CID 1273056 Negative array index readVolker Lendecke2015-03-041-1/+6
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* lib: Fix CID 1128561 Pointer to local outside scopeVolker Lendecke2015-03-041-2/+3
| | | | | | | | This is not strictly a bug, but it is confusing enough to justify a small patch I guess. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* Fix whitespaceVolker Lendecke2015-03-041-4/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* lib: Fix CID 1128552 Buffer not null terminatedVolker Lendecke2015-03-041-6/+8
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* smbd: Fix CID 1273088 Resource leakVolker Lendecke2015-03-031-0/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* aio_fork: Fix CID 1273291 Uninitialized scalar variableVolker Lendecke2015-03-031-3/+1
| | | | | | | The previous code left msg.msg_flags uninitialized Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* Fix the O3 developer buildVolker Lendecke2015-03-035-8/+8
| | | | | | | | | | Different gcc versions complain at different places Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Mar 3 13:14:53 CET 2015 on sn-devel-104
* smbd: Make SMB3 clients use encryption with "smb encrypt = auto"Volker Lendecke2015-03-032-0/+10
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Mar 3 10:40:42 CET 2015 on sn-devel-104
* gpfs: Add include guard to gpfswrap.hChristof Schmitt2015-03-031-0/+5
| | | | | | | | Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org> Autobuild-User(master): Christof Schmitt <cs@samba.org> Autobuild-Date(master): Tue Mar 3 01:01:25 CET 2015 on sn-devel-104
* gpfs: Rename library wrapper to gpfswrapChristof Schmitt2015-03-024-3/+3
| | | | | | | | | The code in gpfs.c and vfs_gpfs.h now only wraps the gpfs library. Rename the files to gpfswrap to make it clear that this is the only purpose of that file. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* gpfs: Update file headersChristof Schmitt2015-03-023-45/+43
| | | | | | | | Update file headers to reflect the new code organization and reformat for consistency. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* gpfs: Remove unncessary includes from gpfs.cChristof Schmitt2015-03-021-5/+1
| | | | | | | replace.h provides everything that is required (errno and ENOSYS). Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* gpfs: Move DBGC_CLASS definition below includesChristof Schmitt2015-03-021-4/+3
| | | | | Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* gpfs: Include gpfs_fcntl.h only from vfs_gpfs header fileChristof Schmitt2015-03-023-2/+2
| | | | | Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* gpfs: Move definition of GPFS_GETACL_NATIVE to vfs_gpfs.cChristof Schmitt2015-03-022-4/+4
| | | | | Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* gpfs: Move smbd_gpfs_set_times_path to vfs_gpfs.cChristof Schmitt2015-03-023-39/+38
| | | | | Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* gpfs: Move get_gpfs_fset_id to vfs_gpfs.cChristof Schmitt2015-03-023-45/+44
| | | | | Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* gpfs: Move get_gpfs_quota to vfs_gpfs.cChristof Schmitt2015-03-023-29/+27
| | | | | Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* gpfs: Move set_gpfs_lease to vfs_gpfs.cChristof Schmitt2015-03-023-21/+20
| | | | | Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* gpfs: Move set_gpfs_sharemode to vfs_gpfs.cChristof Schmitt2015-03-023-48/+46
| | | | | Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* gpfs: Introduce wrapper for gpfs_getfilesetidChristof Schmitt2015-03-022-9/+15
| | | | | Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* gpfs: Introduce wrapper for gpfs_fcntlChristof Schmitt2015-03-022-5/+18
| | | | | Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* gpfs: Introduce wrapper for gpfs_quotactlChristof Schmitt2015-03-022-9/+15
| | | | | Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* gpfs: Introduce wrapper for gpfs_set_times_pathChristof Schmitt2015-03-022-7/+15
| | | | | Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* gpfs: Rename wrapper for gpfs_lib_initChristof Schmitt2015-03-023-14/+12
| | | | | Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* gpfs: Rename wrapper for gpfs_ftruncateChristof Schmitt2015-03-023-12/+12
| | | | | Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* gpfs: Rename wrapper for gpfs_preallocChristof Schmitt2015-03-023-13/+13
| | | | | Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* gpfs: Rename wrapper for gpfs_get_winattrsChristof Schmitt2015-03-023-12/+12
| | | | | Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>