summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-07-15s4-openldap: Remove use of talloc_reference in ldb_map_outbound.cNadezhda Ivanova1-9/+13
Instead of referencing the values array of the element to the new element, copy them, to avoid use of talloc_reference and remove a warning of talloc_steal with reference. The issue is only relevant when openldap backend is used. Signed-off-by: Nadezhda Ivanova <nivanova@symas.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 75705776929d87f1a694582261c07d1724574370)
2014-07-15Add LDB_MAP_RENDROP optionHoward Chu5-9/+24
Like LDB_MAP_RENAME, but drop the attribute if it occurs in an Add request. Used for distinguishedName attribute, is read-only and generated but for some bizarre reason AD allows it in an Add request. Signed-off-by: Howard Chu <hyc@symas.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@symas.com> (cherry picked from commit 93f3aba5e083976a791b982b2064b619800ce110)
2014-07-15Fix SEGV from improperly formed SUBSTRING/PRESENCE filterHoward Chu1-1/+1
Signed-off-by: Howard Chu <hyc@symas.com> Reviewed-by: Simo Sorce <idra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Thu Sep 19 01:42:43 CEST 2013 on sn-devel-104 (cherry picked from commit d9bf88dc749cdbc34f70345b156b0117ecf2932b)
2014-07-15Cleanup map return codesHoward Chu1-18/+17
-1 was never a valid LDB return code, just use OPERATIONS_ERROR Signed-off-by: Howard Chu <hyc@symas.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Nadezhda Ivanova <nivanova@samba.org> Autobuild-Date(master): Tue Sep 17 07:51:45 CEST 2013 on sn-devel-104 (cherry picked from commit 6ed5b1c159867466e54a54a10adcc6c49a0a7837)
2014-07-15ldb: Show the type of failing operation in default error messageAndrew Bartlett1-1/+26
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 347b2c65a4b8c219cfdae3306fdc3d793980cbed)
2014-07-15ldb: Do not build libldb-cmdline when using system ldb.Jeroen Dekkers3-6/+5
Cleanup leftover include and linking of libldb-cmdline in oLschema2ldif. Do not build libldb-cmdline anymore when using the system ldb, oLschema2ldif was the only reason for building libldb-cmdline. Signed-off-by: Jeroen Dekkers <jeroen@dekkers.ch> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Sep 10 12:52:26 CEST 2013 on sn-devel-104 (cherry picked from commit 0af09f0179c024099e0776d3794f4b3d7fb3f6f6)
2014-07-15ldb_map: Fix CID 1034791 Dereference null return valueVolker Lendecke1-0/+6
Add NULL checks Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit cb598ddab6935820975042a8a307c75dba9d7e31)
2014-07-15pyldb: Fix CID 1034792 Dereference null return valueVolker Lendecke1-0/+4
Add a NULL check Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit cbb5c1ce39640ffd01aeed6d87a57940e344792c)
2014-07-15ldb: Fix CID 1034793 Dereference null return valueVolker Lendecke1-0/+4
Add a proper NULL check Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit 15bd82550dab7a4709e92d639ee563dbc4780366)
2014-07-15ldb: Fix a const warningVolker Lendecke2-3/+3
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Simo Sorce <idra@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Sun Aug 18 10:26:27 CEST 2013 on sn-devel-104 (cherry picked from commit 06273504586733ac548ddadad6c7bc757d2d5e25)
2014-07-15pyldb: decrement ref counters on py_results and quiet warningsMatthieu Patou1-0/+4
Signed-off-by: Matthieu Patou <mat@matws.net> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Autobuild-User(master): Matthieu Patou <mat@samba.org> Autobuild-Date(master): Tue Aug 6 00:32:46 CEST 2013 on sn-devel-104 (cherry picked from commit 0602009b999142187d74b74be13de8c7f64c7b24)
2014-07-15provision: capture slightly less generic exceptions during the test for aclsGarming Sam1-2/+2
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> (cherry picked from commit f279a297a4a94c5cbc049c9b2cde14b02960a76f) The last 4 patches address bug #10703 - backport provision fixes from master.
2014-07-15pysmbd: improve the return of error codes in the python smbd bindingsGarming Sam1-31/+27
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> (cherry picked from commit ad773cc01435e65fa5d8e84758b0642069e96c40)
2014-07-15provision: improve error message when connecting to samdb without the ↵Garming Sam1-1/+7
correct permissions Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> (cherry picked from commit b27543aa729ca893270831d5c4fc74ea7ac6d407)
2014-07-15provision: Fix failures on re-provision incorrectly blamed on posix acl support.Garming Sam1-26/+25
By doing the test later, there is an actual sam.ldb file that can be connected to. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> (cherry picked from commit a89060a0217f8740798d1dac4466222301a4d81b)
2014-07-15passdb: Do not routinely clear the global memory returned by ↵Andrew Bartlett2-15/+41
get_global_sam_sid() This avoids use-after-free errors and tdb database churn. Andrew Bartlett Change-Id: If7ab2e24556d9dffc7ad22c0489d665dd75a0cab Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org> (cherry picked from commit cda32d4e47aa3efb040eb60f1a0332ea8dd58417) The last 9 patches address bug #10701 - backport dsdb related crash fixes and build fixes.
2014-07-15samdb: Fix CID 1034910 Dereference before null checkVolker Lendecke1-3/+3
strncmp("tdb://", secrets_ldb, 6) dereferences secrets_ldb. Check for NULL before that. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit 35330aa2c8b255d74e94bc9dd742e621953c21f9)
2014-07-15samdb: Fix CID 1034910 Dereference before null checkVolker Lendecke1-3/+3
strncmp("tdb://", sam_name, 6) dereferences sam_name. Check for NULL before that. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit 8c4e6f0cba164c91661a654e2ccc13c265a06953)
2014-07-15s4:dsdb/ldb_modules: avoid invalid pointer type warningsStefan Metzmacher2-5/+4
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit ee06cbce30ccdb057ffc5b3da2d7fb1010a13837)
2014-07-15s4:dsdb fix compiler warningsChristian Ambach1-1/+1
about potentially uninitialized variables Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 2bd15d1b830b177ea234aa29ff696379abbcd683)
2014-07-15s4-dsdb: Fix a use after free segfault.Andreas Schneider1-3/+4
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Tue Nov 12 19:22:28 CET 2013 on sn-devel-104 (cherry picked from commit 744abc882284bfde41b087bc06e13160b915f371)
2014-07-15s4:dsdb fix compiler warningsChristian Ambach1-1/+1
about potentially uninitialized variables Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit e5cb10f59122acc56a465c19885fe74a39985700)
2014-07-15s4:dsdb fix compiler warningsChristian Ambach1-1/+1
about potentially uninitialized variables Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 9c2951a9ca8228c714a1c1c834392077d050b569)
2014-07-15s4:dsdb/ldb_modules: avoid declaration after code warningsStefan Metzmacher2-2/+5
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit de773f3785d8fedba605437fbd434a49b9d18b0e)
2014-07-15s4-rpc_server/drsuapi: Print ldb error showing why we failed to perform the ↵Andrew Bartlett1-1/+1
access check Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit f75dc8f4a54581ed207e7caa2e52211ea24e3554) The lat 6 patches address bug #10700 - backport access check related fixes from master.
2014-07-15s4-dsacl: Fixed incorrect handling of privileges in sec_access_check_dsNadezhda Ivanova3-9/+35
Restore and backup privileges are not relevant to ldap access checks, and the TakeOwnership privilege should grant write_owner right Signed-off-by: Nadezhda Ivanova <nivanova@symas.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit daefca2a1aaa9f4e0ca2f17ef4c9a71412c081ea)
2014-07-15dsdb: Return LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS rather than OPERATIONS_ERROR ↵Andrew Bartlett1-4/+7
on EACCES and EPERM This makes provision errors clearer in Samba. Andrew Bartlett Reviewed-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> (cherry picked from commit 262c3de3f880bb08b1220d1e755bb31365dab49b)
2014-07-15dsdb: Do not give an error is metadata.tdb does not yet existAndrew Bartlett1-2/+2
Change-Id: I88ee188c776364fd66da388ce01fc9288aa2ded0 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> (cherry picked from commit 822b4927288231b7a90579af9792608a0bdef706)
2014-07-15dsdb: Provide a clearer error when we fail to store the sequence number in ↵Andrew Bartlett1-6/+19
metadata.tdb Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 6da2dcd17ee46d339d7d80df3dccd456703e7fe2)
2014-07-15samdb: Fix CID 1034910 Dereference before null checkVolker Lendecke1-3/+3
strncmp("tdb://", sam_name, 6) dereferences sam_name. Check for NULL before that. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit 6417d9e0355f840ca4cf3b740ad5aabfc534d834)
2014-07-15drs-cracksname: fix problems that prevented to pass our torture testsMatthieu Patou1-6/+21
Some of the problems where also reported by Microsoft testing tools Signed-off-by: Matthieu Patou <mat@matws.net> Reviewed-by: Andrew Bartlett <abarlett@samba.org> (cherry picked from commit 7fe4630bad232c09e29739beedda2e2fb63747ed) The last 4 patches address bug #10698 - backport drs-crackname fixes from master.
2014-07-15drs-crackname: Fix error code so that we have the same as windowsMatthieu Patou1-0/+1
Signed-off-by: Matthieu Patou <mat@matws.net> Reviewed-by: Andrew Bartlett <abarlett@samba.org> (cherry picked from commit 029e80da9d1ab5096cd0981110b588245f8fd50d)
2014-07-15drs-cracknames: When cracking NT4 names we should just look at netbios for ↵Matthieu Patou1-2/+1
the match Looking at dnsRoot will yield a result for domain.tld\username when it shouldn't work. Signed-off-by: Matthieu Patou <mat@matws.net> Reviewed-by: Andrew Bartlett <abarlett@samba.org> (cherry picked from commit 552b4f3e022dca594e1dada7979fe351eee8cf9b)
2014-07-15drs-crackname: Fix cracknames for the format UNKNOWN when the data is ↵Matthieu Patou1-1/+4
actually a GUID The cannonical crackname expect a "/" or it returns DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR, when doing UNKNOWN format it's not an error to not have a "/" in the name to crack it's just a sign the name is not a cannonical one. Signed-off-by: Matthieu Patou <mat@matws.net> Reviewed-by: Andrew Bartlett <abarlett@samba.org> (cherry picked from commit aa17a2c01dbab2e522a8ccccaed7943963bab5b9)
2014-07-15selftest/subunithelper.py: correctly pass testsuite-uxsuccess to end_testsuite()Stefan Metzmacher1-1/+4
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): Thu Mar 13 23:49:36 CET 2014 on sn-devel-104 (cherry picked from commit 3632c59e250396b3974bccf7ad74cbe5c84fdba3) The last 4 patches address bug #10696 - backport autobuild/selftest fixes from master.
2014-07-15selftest/subunithelper.py: correctly handle fail_immediately in ↵Stefan Metzmacher1-0/+6
end_testsuite of FilterOps This way --fail-immediately also works if a command segfaults. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit fee156f5b9235b5f766cb773433ddb7d0ccd98a1)
2014-07-15selftest/subunithelper.py: correctly handle unexpected success in FilterOpsStefan Metzmacher1-1/+13
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 14246953b2e91578e5f51faedfdf31926a5b1950)
2014-07-15script/autobuild: use --force-rebase optionStefan Metzmacher1-2/+2
This makes sure the current user will be the committer. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit ab9f02193188af8e482052ee6b55c30aac2c8340)
2014-07-15s4:repl_meta_data: fix array assignment in replmd_process_linked_attribute()Stefan Metzmacher1-2/+2
Change-Id: I10357236108f68ab749ba0e1f07558302c573887 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit 5b22222421c77c8c379c828c5da7e6c8c38cfb88) Bug: https://bugzilla.samba.org/show_bug.cgi?id=10294 Failed to Join Domain - uncaught exception - attribute 'isRecycled'
2014-07-15torture3: Fix bug 10687Volker Lendecke1-1/+1
'RW2' smbtorture test fails when -N <numprocs> is set to 2 due to the invalid status check in the second client. Signed-off-by: Volker Lendecke <vl@samba.org>
2014-07-15libsmb: Provide a talloc_stackframe() to external users of libsmb_setget.cAndrew Bartlett1-2/+15
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit bc5bd4010e8fedf19047ed6f7a793cd373f9f14f) The last 3 patches address bug #8449 (simple use case results in "no talloc stackframe around, leaking memory" error).
2014-07-15libsmbclient: Wrap more function calls in talloc_stackframe() to protect ↵Andrew Bartlett1-0/+17
against talloc_tos() calls BUG: https://bugzilla.samba.org/show_bug.cgi?id=8449 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Apr 2 02:36:08 CEST 2014 on sn-devel-104 (cherry picked from commit 014342746f5af1aaaf1c2f8b44098c3a944e4f0a)
2014-07-15pam_smbpass: Wrap calls in talloc_stackframe() to avoid warnings about ↵Andrew Bartlett3-1/+31
leaking memory Any code in source3 is permitted to use talloc_tos() at any point, so we must protect all the library interfaces against memory leaks this way. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 8f3a516acb8c95cd6d88bf80abd495ac0cafaae3)
2014-07-15smbd: Avoid double-free in get_print_db_bynameVolker Lendecke1-2/+2
Signed-off-by: Volker Lendecke <vl@samba.org> Bug: https://bugzilla.samba.org/show_bug.cgi?id=10699
2014-07-15s3: smbd: Locking, fix off-by one calculation in brl_pending_overlap().Jeremy Allison1-1/+1
Consider: lock = start=110,size=10 pend_lock = 100, size=10 Should not overlap. However, (lock->start <= pend_lock->start + pend_lock->size) 110 100 10 is true, so it returns true (overlap). lock->start <= pend_lock->start + pend_lock->size should be: lock->start < pend_lock->start + pend_lock->size https://bugzilla.samba.org/show_bug.cgi?id=10685 Signed-off-by: Jeremy Allison <jra@samba.org>
2014-07-15smbstatus: Fix an uninitialized variableVolker Lendecke1-0/+1
We only print valid share mode entries, stale ones don't count. In traverse, let the callback decide about staleness. https://bugzilla.samba.org/show_bug.cgi?id=10680 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 9f2e90754bcb7bf5f7159d07f0bc5fe754e71bf5)
2014-07-15s3: fix missing braces in nfs4_acls.cAbhidnya Joshi1-1/+2
Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Aug 28 20:25:56 CEST 2013 on sn-devel-104 Bug: https://bugzilla.samba.org/show_bug.cgi?id=10688 (missing braces in nfs4_acls.c)
2014-07-15s3:winbindd - fix bad bugfix for bug #10280 - winbind panic if AD server is ↵Jeremy Allison1-2/+2
down. Previous bug fix reversed the sense of the test for out of memory. https://bugzilla.samba.org/show_bug.cgi?id=10280 Signed-off-by: Jeremy Allison <jra@samba.org>
2014-07-15s3/s4: smbd, rpc, ldap, cldap, kdc services.Jeremy Allison6-12/+49
Allow us to start if we bind to *either* :: or 0.0.0.0. Allows us to cope with systems configured as only IPv4 or only IPv6. Bug #10653 - Samba won't start on a machine configured with only IPv4. https://bugzilla.samba.org/show_bug.cgi?id=10653 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-By: Amitay Isaacs <amitay@gmail.com> Reviewed-By: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Jun 7 01:01:44 CEST 2014 on sn-devel-104 (cherry picked from commit 463311422ca1caad2e228deb630e9d12e212fae1)
2014-07-15samba-tool: add --site parameter to provision command (bug #10674)Björn Baumbach1-1/+4
This new parameter offers the option to specify a default initial site name. Otherwise it will be "Default-First-Site-Name". Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org> (cherry picked from commit 4ca1d69d7daa8f4f92d44cd505aa0983f2ab56bf)