summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* pyregistry: Adjust to use of PY_SSIZE_T_CLEANAndrew Bartlett2016-01-071-1/+1
| | | | | | | This changes the type used for # arguments to PyArg_ParseTuple Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
* pymessaging: Adjust to use of PY_SSIZE_T_CLEANAndrew Bartlett2016-01-071-1/+1
| | | | | | | This changes the type used for # arguments to PyArg_ParseTupleAndKeywords Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
* pylibsmb: Adjust to use of PY_SSIZE_T_CLEANAndrew Bartlett2016-01-071-1/+1
| | | | | | | This changes the type used for # arguments to PyArg_ParseTupleAndKeywords Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
* pidl: Use PY_SSIZE_T_CLEANAndrew Bartlett2016-01-071-1/+2
| | | | | | | This changes the type used for # arguments to PyArg_ParseTupleAndKeywords Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
* ldb: Adjust to PY_SSIZE_T_CLEAN and use Py_ssize_t consistently with ↵Andrew Bartlett2016-01-071-2/+2
| | | | | | | | | | | | | | | PyArg_ParseTuple*() This was inconsistent after dd7baa2ae2f98d5c1e82fa97f223925025da5ca0, and may be the cause of test errors on s390x. (The change to py_ldb_dn_set_component() kept the Py_ssize_t type for 'size' without setting the PY_SSIZE_T_CLEAN macro to have PyArg_ParseTuple() expect a Py_ssize_t. Instead, PyArg_ParseTuple() expected an int. See in particular debian bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=808769 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
* python: Assert that we use Py_ssize_t consistently for PyParseArgs*()Andrew Bartlett2016-01-071-0/+11
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
* asn1: Clean up includesVolker Lendecke2016-01-072-2/+10
| | | | | | | | 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): Thu Jan 7 19:12:22 CET 2016 on sn-devel-144
* smbcontrol: Use procid_is_localVolker Lendecke2016-01-071-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* net: Use procid_is_localVolker Lendecke2016-01-071-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3: smbclient: asn1_extract_blob() stops further asn1 processing by setting ↵Jeremy Allison2016-01-071-5/+10
| | | | | | | | | | | | | | has_error. Don't call asn1_has_error() after asn1_extract_blob() has been successful otherwise we get an "Failed to build negTokenInit at offset" message on success. 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): Thu Jan 7 16:00:02 CET 2016 on sn-devel-144
* docs:smbdotconf: fix the description of 'machine password timeout'Michael Adam2016-01-071-4/+7
| | | | | | | This parameter also covers 'security = ads'. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* selftest: Add tests for ntlm-server-1 and --password mode in ntlm_authAndrew Bartlett2016-01-071-4/+192
| | | | | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Jan 7 07:41:22 CET 2016 on sn-devel-144
* ntlm_auth: Allow --password force a local password check for ntlm-server-1 modeAndrew Bartlett2016-01-071-22/+60
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* s3:smbd/oplock obey kernel oplock setting when releasing oplocksChristian Ambach2016-01-061-1/+2
| | | | | | | | | | | | otherwise smbd asks the kernel to release an oplock that was never requested Bug: https://bugzilla.samba.org/show_bug.cgi?id=11400 Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Jan 6 08:58:56 CET 2016 on sn-devel-144
* selftest: more dfree command and smbclient disk usage testsUri Simchoni2016-01-063-6/+21
| | | | | | | | | | | | | Add tests that cover disk usage printing by smbclient, as well as passing directory info to the "dfree command" script. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11662 Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Jan 6 03:58:59 CET 2016 on sn-devel-144
* smbclient: query disk usage relative to current directoryUri Simchoni2016-01-066-7/+11
| | | | | | | | | | | When querying disk usage in the "dir" and "du" commands, use the current directory. This behavior is compatible with Windows command shell "dir" command. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11662 Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* asn1: Make 'struct asn1_data' privateVolker Lendecke2016-01-062-9/+10
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* asn1: Remove a reference to asn1_data internalsVolker Lendecke2016-01-061-2/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libcli: Remove a reference to asn1->ofsVolker Lendecke2016-01-061-7/+5
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Use asn1_current_ofs()Volker Lendecke2016-01-063-6/+12
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* asn1: Add asn1_current_ofs()Volker Lendecke2016-01-062-0/+6
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Use asn1_has_nestingVolker Lendecke2016-01-061-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* asn1: Add asn1_has_nestingVolker Lendecke2016-01-062-0/+6
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Use asn1_extract_blob()Volker Lendecke2016-01-065-34/+45
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* asn1: Add asn1_extract_blob()Volker Lendecke2016-01-062-0/+22
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Use asn1_set_error()Volker Lendecke2016-01-063-12/+12
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* asn1: Add asn1_set_error()Volker Lendecke2016-01-062-0/+6
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Use asn1_has_error()Volker Lendecke2016-01-066-31/+35
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* asn1: Add asn1_has_error()Volker Lendecke2016-01-062-0/+6
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* asn1: Make "struct nesting" privateVolker Lendecke2016-01-062-5/+7
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* asn1: Add some early returnsVolker Lendecke2016-01-061-1/+11
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* asn1: Add overflow check to asn1_writeVolker Lendecke2016-01-061-0/+6
| | | | | | | Found by pure code reading :-) Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* asn1: Make asn1_peek_full_tag return 0/errnoVolker Lendecke2016-01-064-13/+18
| | | | | | | | We don't need the full power of NTSTATUS here. This was the only NTSTATUS in asn1.h, so I think it's worth removing it. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* asn1: Remove an unused asn1 functionVolker Lendecke2016-01-062-29/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* ldb: validate ldb_dn_set_component input parameters even more strictlyAndrew Bartlett2016-01-061-0/+8
| | | | | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Jan 6 00:33:21 CET 2016 on sn-devel-144
* ldb: Explain why this use of talloc_memdup() is safeAndrew Bartlett2016-01-051-0/+11
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
* ldb: Be strict about talloc_memdup() and passed in buffers in ↵Andrew Bartlett2016-01-051-1/+13
| | | | | | | | | | | ldb_dn_set_component() This ensures we do not over-read the source buffer, but still NUL terminate. This may be related to debuain bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=808769 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
* travis: Add metadata file for the Travis CI Open Source cloud build/test serviceAndrew Bartlett2016-01-051-0/+31
| | | | | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Jan 5 12:21:40 CET 2016 on sn-devel-144
* autobuild: Use make -j on samba-libs/samba-static build as wellAndrew Bartlett2016-01-051-4/+4
| | | | | | | We need this build to be fast when split out as a seperate VM Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* autobuild: Put the static build in another stanzaAndrew Bartlett2016-01-051-7/+9
| | | | | | | | | | | | This will allow it to run on a different VM in travis-ci and so keep us below the 50min limit. Because we do not rebuild the libs (and real world static builds are likely to have internal libs), this changes us to build them internally. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* autobuild: Use cp --recursive --link --archiveAndrew Bartlett2016-01-051-4/+7
| | | | | | | | | | | | | | | | | | | | | This works on waf based builds as source files are not modified during the build TODO: In order to make sure build doesn't influence each other, we need to add something like: try: if options.rebase is not None: rebase_tree(options.rebase, rebase_branch=options.branch) + run_cmd("find -type f | xargs chmod -w", show=True, dir=test_master) except Exception: But that means we need to change the way 'make distcheck' works for the standalone libraries. For now this will help to reduce the (mem)disk usage of an autobuild a lot. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* autobuild: Give a clearer failure messageAndrew Bartlett2016-01-051-0/+18
| | | | | | | | | | | | This helps when autobuild.py is used in --tail mode and where there is neither e-mail nor access to the logs.tar.gz Working back to find where the error happened is typically quite difficult, as many failures are actually due to the cleanup. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* build:wafsamba: Use the upstream version of gccdepsThomas Nagy2016-01-022-127/+5
| | | | | | | | | | | | | This removes the duplicate gccdeps file provided in the Samba tree. The two files buildtools/wafsamba/gccdeps.py and thirdparty/wafadmin/3rdparty/gccdeps.py are identical except for the whitespaces (compare them with `diff -burN`) Signed-off-by: Thomas Nagy <tnagy@waf.io> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org> Autobuild-User(master): Uri Simchoni <uri@samba.org> Autobuild-Date(master): Sat Jan 2 22:31:56 CET 2016 on sn-devel-144
* thirdparty:waf: Update gccdeps from upstreamThomas Nagy2016-01-021-1/+1
| | | | | | | | | | The version from upstream was updated. It is not used at this moment in Samba because there is a copy kept in builtools/wafsamba/gccdeps.py which will be removed soon. Signed-off-by: Thomas Nagy <tnagy@waf.io> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
* Happy New Year 2016!Stefan Metzmacher2016-01-012-2/+2
| | | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Jan 1 03:23:14 CET 2016 on sn-devel-144
* torture:smb2: fix copy'n'paste error in durable-open:open2:lease testMichael Adam2015-12-291-1/+1
| | | | | | | | | | | | | Checking against the correct smb2_create object also lets us check the correct create action (EXISTED vs CREATED). Observed when this showed up in flakey test results. 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): Tue Dec 29 08:34:03 CET 2015 on sn-devel-144
* smbd: remove function name from a DBG_INFO in a recent commitUri Simchoni2015-12-291-2/+2
| | | | | | | | | | | We now have <function_name:> embedded automatically into DBG_XXX- generated messages. Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Tue Dec 29 04:18:19 CET 2015 on sn-devel-144
* smbd: do not disable "store dos attributes" on-the-flyUri Simchoni2015-12-253-36/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Smbd would disable "store dos attributes" on-the-fly if the attempt to set/get user.DOSATTRIB fails with ENOTSUP or ENOSYS. The rationale behind it was that the file system does not support extended attributes, so there's no need to fill up the log with failure messages. However, a "wide symlink" could point to a spot that doesn't support extended attributes. Even with the default banned wide links, we currenly allow stat'ing those files and follow the symlink, and this in turn would disable "store dos attributes" for the whole share. The user.DOSATTRIB attribute also stores file creation time, so that is also affected. Another case where this behavior would turn storage of DOS attributes off is that of the ".." entry at the root of the share, if the parent folder for the share's root path does not support extended attributes. On the other hand, the information on the file system and its support of extended attributes is readily available, so the fix for explosion of the log should be not to configure "store dos attributes" on such a share. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11649 Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Fri Dec 25 13:20:58 CET 2015 on sn-devel-144
* dsdb subnets: warn when an IPv6 address is in IPv4 embedding rangeDouglas Bagnall2015-12-242-0/+43
| | | | | | | | | | | | | | We fail on these ones, and it isn't immediately obvious why. Windows also fails on *most* of them, but succeeds on "::ffff:0:0" which is a bit strange but there you go. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Pair-programmed-with: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Dec 24 07:16:25 CET 2015 on sn-devel-144
* samldb: ensure subnets have proper net rangesDouglas Bagnall2015-12-243-0/+580
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A subnet name needs to be a valid CIDR address range -- that's the ones that look like 10.9.8.0/22, where the number after the / determines how many bits are in the address suffix. It can be IPv4 or IPv6. There are a few odd constraints (see MS-ADTS v20150630 6.1.1.2.2.2.1 "Subnet Object") -- for example, with IPv4, the implied bit mask can't equal the address. That is, you can't have a subnet named "255.255.255.0/24" in a Windows subnet. This rule does not apply to IPv6. Windows and Samba both make some ensure that subnets have a unique valid name, though unfortunately Windows 2008R2 is rather slack when it comes to IPv6. We follow Windows 2012R2, which roughly follows RFC5952 -- with one caveat: Windows will allow an address like "::ffff:0:1:2", which translates to the IPv4 address "0.1.0.2" using the SIIT translation scheme, and which inet_ntop() would render as "::ffff:0:0.1.0.2". In the Samba implementation we use an inet_pton()/ inet_ntop() round-trip to establish canonicality, so these addresses fail. Windows wisely does not allow the SIIT style addresses (the acronym is widely agreed to be off-by-one in the second letter), and it will regard "::ffff:0:1:2" as simply "::ffff:0:1:2" and allow it. We would like to do that too. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>