summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* dsdb: Fix Coverity ID 1034907 Dereference before null checkVolker Lendecke2013-11-111-1/+1
| | | | | | | "module" has already been dereferenced by ldb_module_get_private(module) Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* oLschema2ldif: Add some NULL checksVolker Lendecke2013-11-111-0/+6
| | | | | | | This should fix Coverity ID 1034812 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* s4:torture:smb2: add new lease.upgrade3 test to test the contended upgradeMichael Adam2013-11-111-0/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test what upgrades work when there is another lease already held, in addition to the lease to be upgraded. The summary of the behaviour is this: ------------------------------------- If we have two leases (lease1 and lease2) on the same file, then attempt to upgrade lease1 results in a change if and only if the requested lease state: - is valid, - is strictly a superset of lease1, and - can held together with lease2. In that case, the resuling lease state of the upgraded lease1 is the state requested in the upgrade. lease2 is not broken and remains unchanged. Note that this contrasts the case of directly opening with an initial requested lease state, in which case you get that portion of the requested state that can be shared with the already existing leases (or the states that they get broken to). Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Mon Nov 11 18:04:47 CET 2013 on sn-devel-104
* s4:torture:smb2: add comment explaining lease upgrade in the non-contended caseMichael Adam2013-11-111-0/+11
| | | | | | | | | | | | | | | The summary of the behaviour is this: ------------------------------------- An uncontended lease upgrade results in a change if and only if the requested lease state is - valid, and - strictly a superset of the lease state already held. In that case the resulting lease state is the one requested in the upgrade. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* README.Coding: Add __func__Volker Lendecke2013-11-111-0/+14
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Mon Nov 11 16:08:09 CET 2013 on sn-devel-104
* smbd: Fix DEBUG in do_break_to_noneVolker Lendecke2013-11-111-8/+6
| | | | | | | | | The name of this function has changed, but the DEBUG statements have not been adapted. This is the case in a lot of our code. With __func__ this problem goes away: __func__ is C99, and we also use it already. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* CVE-2013-4476: s4:libtls: check for safe permissions of tls private key file ↵Björn Baumbach2013-11-112-0/+33
| | | | | | | | | | | | | | | | | | (key.pem) If the tls key is not owned by root or has not mode 0600 samba will not start up. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10234 Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Björn Baumbach <bb@sernet.de> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Karolin Seeger <kseeger@samba.org> Autobuild-Date(master): Mon Nov 11 13:07:16 CET 2013 on sn-devel-104
* CVE-2013-4476: s4:libtls: Create tls private key file (key.pem) with mode 0600Björn Baumbach2013-11-111-1/+1
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10234 Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* CVE-2013-4476: selftest/Samba4: use umask 0077 within mk_keyblobs()Stefan Metzmacher2013-11-111-1/+5
| | | | | | | | | | | | We should generate private keys with 0600. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10234 Pair-Programmed-With: Björn Baumbach <bb@sernet.de> Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* CVE-2013-4476: samba-tool provision: create ${private_dir}/tls with mode 0700Björn Baumbach2013-11-111-1/+1
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10234 Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* CVE-2013-4476: lib-util: split out file_save_mode() from file_save()Björn Baumbach2013-11-112-5/+13
| | | | | | | | | file_save_mode() writes files with specified mode. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10234 Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* CVE-2013-4476: lib-util: add file_check_permissions()Björn Baumbach2013-11-112-0/+53
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10234 Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* xattr: fix listing EAs on *BSD for non-root usersBjörn Jacke2013-11-081-0/+4
| | | | | | | | | | | | Thanks to Stefan Rompf for reporting. This fixes bug #10247 Signed-off-by: Bjoern Jacke <bj@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Nov 8 20:43:30 CET 2013 on sn-devel-104
* s4-smb_server: Fix a use after free.Andreas Schneider2013-11-081-1/+5
| | | | | | | If we haven't allocated the smbsrv_session then we should not free it. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-vfs: Fix stream_depot vfs module on btrfs.Andreas Schneider2013-11-081-8/+8
| | | | | | | | | | | | Checking if the directory is empty using 'nlink == 2' only checks if there are no subdirectories. It doesn't indicate if there are files in the directory. However checking link count for no subdirectories is wrong and applications shouldn't rely on it, see: https://lkml.org/lkml/2012/2/1/756 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfstest: fix uninitialised variable usage in openDavid Disseldorp2013-11-081-2/+3
| | | | | | | | The vfstest open command currently fails intermittently due to a read of a potentially uninitialised status variable. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* net: remove net idmap secretAtul Kulkarni2013-11-081-8/+0
| | | | | | | | | | | This is moved to net idmap set secret for consistency. Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Nov 8 01:03:25 CET 2013 on sn-devel-104
* doc: update the net manpage for net idmap set, get and deleteAtul Kulkarni2013-11-071-2/+67
| | | | | | Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* idmap_autorid: fix failure in reverse lookup if ID is from domain range index #0Abhidnya Joshi2013-11-071-1/+1
| | | | | | | | | Domain range index #0 is not included in the database record. So in this special case we only have the SID, not SID#IDX... Signed-off-by: Abhidnya Joshi <achirmul@in.ibm.com> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* idmap_autorid: fix status code when trying to load range for an invalid inputMichael Adam2013-11-071-0/+6
| | | | | | | | | | | | | | The "sid" input needs to be verified (it can currently be a SID or "ALLOC"). When handing in string that is valid for other kinds of records, but not for the SID[#IDX]-->RANGE direction of mappings, like for instance a range number, then we get "NT_STATUS_INTERNAL_DB_CORRUPTION" because parse records finds the record, but it does not have the expected size... This patch fixes this problem by pre-validating the input before fetching the record from the database. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* net: correct typos in net idmap delete ranges help messageAtul Kulkarni2013-11-071-2/+2
| | | | | | Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* idmap_autorid: add space between two words in a debug messageAtul Kulkarni2013-11-071-2/+2
| | | | | | Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4-lsa: Make sure we also duplicate the domain_name.Andreas Schneider2013-11-071-4/+20
| | | | | | | | 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): Thu Nov 7 18:58:44 CET 2013 on sn-devel-104
* s4-lsa: Add missing null checks in dcesrv_lsa_lookup_name().Andreas Schneider2013-11-071-0/+12
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s4-lsa: Fix a user after free in dcesrv_lsa_lookup_name().Andreas Schneider2013-11-071-3/+9
| | | | | | Pair-Programmed-With: Volker Lendecke <vl@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* test_smbclient_tarmode.pl: remove unneccesary arg defaultsDavid Disseldorp2013-11-051-6/+9
| | | | | | | | | | | The host, share and localpath arguments should not take default values. Check that these required arguments are specified. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org> Autobuild-User(master): Jim McDonough <jmcd@samba.org> Autobuild-Date(master): Tue Nov 5 16:40:20 CET 2013 on sn-devel-104
* test_smbclient_tarmode.pl: depend only on perl v5.10Aurélien Aptel2013-11-051-10/+17
| | | | | | Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
* test_smbclient_tarmode.pl: remove all ./ prefix when dealing with remote filesAurélien Aptel2013-11-051-3/+11
| | | | | | Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
* test_smbclient_tarmode.pl: sanitize $DIR + whitespaceAurélien Aptel2013-11-051-1/+2
| | | | | | Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
* test_smbclient_tarmode.pl: use -n flag for specifiying hostname (was ↵Aurélien Aptel2013-11-051-3/+6
| | | | | | | | ambiguous with help) Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
* test_smbclient_tarmode.pl: enable create with exclude testsAurélien Aptel2013-11-051-1/+1
| | | | | | [ddiss@samba.org: split from clitar implementation commit] Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
* test_smbclient_tarmode.pl: add subunit output flagAurélien Aptel2013-11-051-6/+51
| | | | | | Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
* test_smbclient_tarmode.pl: add test for interactive sessionAurélien Aptel2013-11-051-20/+29
| | | | | | Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
* test_smbclient_tarmode.pl: add extraction regex tests, verbose flagAurélien Aptel2013-11-051-15/+90
| | | | | | | | | | * reset_remote() now removes the whole share content * verbose flag to control stdout of each test * extraction with regex test Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
* test_smbclient_tarmode.pl: test regex flag behaviourAurélien Aptel2013-11-051-67/+65
| | | | | | [ddiss@samba.org: split from clitar implementation commit] Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
* test_smbclient_tarmode.pl: add large file and long path testsAurélien Aptel2013-11-051-15/+50
| | | | | | Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
* test_smbclient_tarmode.pl: add simple wildcard testAurélien Aptel2013-11-051-3/+46
| | | | | | Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
* test_smbclient_tarmode.pl: test interactive commandAurélien Aptel2013-11-051-1/+7
| | | | | | [ddiss@samba.org: split from clitar implementation commit] Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
* test_smbclient_tarmode.pl: whitespaceAurélien Aptel2013-11-051-1/+0
| | | | | | Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
* test_smbclient_tarmode.pl: let --test run multiple testsAurélien Aptel2013-11-051-7/+45
| | | | | | Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
* test_smbclient_tarmode.pl: sanitize input, use File::Temp instead of ↵Aurélien Aptel2013-11-051-8/+19
| | | | | | | | hardcoding temp dir Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
* test_smbclient_tarmode.pl: cosmetic changesAurélien Aptel2013-11-051-70/+68
| | | | | | | | | - Add whitespace around paren in if/for/while/... blocks - Don't split if/elsif/else cascade Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
* test_smbclient_tarmode.pl: add copyright headerAurélien Aptel2013-11-051-0/+17
| | | | | | Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
* test_smbclient_tarmode.pl: samba 3.6.9 can print a empty attribute stringAurélien Aptel2013-11-051-1/+1
| | | | | | | | | While changing my setup, I discovered that for some unknown reasons samba (serv/client) doesn't print any attributes for normal files. Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
* test_smbclient_tarmode.pl: disable failing tests for nowAurélien Aptel2013-11-051-3/+3
| | | | | | Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
* test_smbclient_tarmode.pl: make script work on older Perl (now only need 5.14)Aurélien Aptel2013-11-051-2/+7
| | | | | | Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
* test_smbclient_tarmode.pl: fix a few minor typosDavid Disseldorp2013-11-051-7/+7
| | | | | Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
* test_smbclient_tarmode.pl: refactor, cleanup and document in PODAurélien Aptel2013-11-051-178/+459
| | | | | | Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
* test_smbclient_tarmode.pl: add tests for wildcard pattern (cI, cX, cF, xF).Aurélien Aptel2013-11-051-33/+161
| | | | | | | | | | | * add some test for wildcard pattern and r switch, when possible (-r is very buggy) * change default DIR to "tar_test_dir" * add tests for attributes (nohidden, nosystem which are undocumented) Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
* test_smbclient_tarmode.pl: add a first simple wildcard testAurélien Aptel2013-11-051-40/+145
| | | | | | | | | | | | | * File::list() now takes an absolute path * check_remote() now takes the dir to check * added an optional File destructor * added cleanpath() to remove unecessary slashes * File::new_remote() can take an absolute path * File->{dir} is now absolute from the localpath Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>