summaryrefslogtreecommitdiffstats
path: root/source4
Commit message (Collapse)AuthorAgeFilesLines
...
* torture: Add test for 16 bit alignment of readx dataChristof Schmitt2014-08-301-0/+23
| | | | | | | | | | | | | | MS-CIFS requires a one byte pad to guarantee 16 bit alignment of the data: Pad (1 byte): This field is optional. When using the NT LAN Manager dialect, this field can be used to align the Data field to a 16-bit boundary relative to the start of the SMB Header. If Unicode strings are being used, this field MUST be present. When used, this field MUST be one padding byte long. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s4:libcli/raw: Make flags2 and offset available to callers of readxChristof Schmitt2014-08-302-0/+4
| | | | | | | This will be used by smbtorture. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* ntvfs/posix: don't advertise FS_ATTR_SPARSE_FILESDavid Disseldorp2014-08-291-2/+1
| | | | | | | | | | | | | Handling of the FSCTL_SET_SPARSE ioctl in ntvfs is broken. Removing FS_ATTR_SPARSE_FILES from the filesystem attributes ensures that clients, including the smbtorture ioctl tests, don't attempt to use this functionality. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allson <jra@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Fri Aug 29 22:06:21 CEST 2014 on sn-devel-104
* torture: trivial test_ioctl_network_interface_info cleanupDavid Disseldorp2014-08-291-2/+2
| | | | | Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allson <jra@samba.org>
* torture: test FSCTL_SET_SPARSE without SetSparse bufferDavid Disseldorp2014-08-291-0/+76
| | | | | | | | | | | This test checks for the following MS-FSCC 2.3.63 behaviour: If there is no data element, the sparse flag for the file is set, exactly as if the FILE_SET_SPARSE_BUFFER element was supplied and had a SetSparse value of TRUE. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allson <jra@samba.org>
* torture: test FSCTL_SET_SPARSE against a directoryDavid Disseldorp2014-08-291-2/+39
| | | | | | | | | | Expect STATUS_INVALID_PARAMETER, as is returned by Windows Server 2012 and 2008. Samba is currently broken, in that it currently processes the request and sets the sparse DOS attribute on the directory - fix to follow. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allson <jra@samba.org>
* torture: test FSCTL_SET_SPARSEDavid Disseldorp2014-08-291-1/+157
| | | | | | | | | Check that the FILE_ATTRIBUTE_SPARSE is set following FSCTL_SET_SPARSE. Also confirm that adding the attribute on create doesn't carry through to subsequent SMB2_GETINFO_FILE requests. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allson <jra@samba.org>
* s4:dlz_bind9: let dlz_bind9 use dns_common_lookup() before add/modifyStefan Metzmacher2014-08-271-56/+21
| | | | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749 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 Aug 27 15:21:19 CEST 2014 on sn-devel-104
* s4:dlz_bind9: let dlz_bind9 use dns_common_lookup() before removing recordsStefan Metzmacher2014-08-271-46/+7
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:dlz_bind9: let dlz_bind9 use dns_common_replace()Stefan Metzmacher2014-08-271-77/+50
| | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749 Change-Id: I2fd2503230cbf89445594e49f39ac321769ff06e Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:dlz_bind9: let dlz_bind9 use dns_common_extract()Stefan Metzmacher2014-08-271-57/+61
| | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749 Change-Id: I7c661964a3da1a1981f022a06b9bef25bbd33479 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:dlz_bind9: let dlz_bind9 use dns_common_lookup() for name lookupStefan Metzmacher2014-08-272-53/+21
| | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749 Change-Id: I2632fa0ce120a978f6f400fa5cbf18a7fbbd64a3 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* torture-dns: Add test for dlz_bind9 updatesStefan Metzmacher2014-08-271-0/+517
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* torture-dns: Add test for dlz_bind9 zonedumpsStefan Metzmacher2014-08-271-0/+106
| | | | | | Change-Id: I074b3e4cdad1a0b69c085dcaa44d6f48e68e863b Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* torture-dns: Add test for dlz_bind9 lookupsAndrew Bartlett2014-08-271-0/+224
| | | | | | | Change-Id: I3b9d1b56e3aa873fb8540b98e196b713b82332ca Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s4:torture:dlz_bind9: fix spnego testsStefan Metzmacher2014-08-271-2/+12
| | | | | | | | | | | | | | The dlz_bind9 module uses the special dns-${NETBIOSNAME} account, and this is only available under the dns/hostname.domain SPN, not host/hostname. Also the dlz_ssumatch() function returns isc_boolean_t instead of isc_result_t. As ISC_R_SUCCESS and ISC_FALSE have the same value we didn't notice this problem. Change-Id: I48539c3f48f5dde9eaa2fff6da0f3be2f9f66311 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:setup/dns_update_list: make use of the new substitution variablesStefan Metzmacher2014-08-261-36/+46
| | | | | | | | | | | | | | | | | | | This let us register the same names as Windows Servers. We only exception are the NS records. In future we could add them by using something like this: samba-tool dns add ${HOSTNAME} ${DNSDOMAIN} @ NS ${HOSTNAME} samba-tool dns add ${HOSTNAME} _msdcs.${DNSFOREST} @ NS ${HOSTNAME} samba-tool dns add ${HOSTNAME} ${DNSFOREST} _msdcs NS ${HOSTNAME} Bug: https://bugzilla.samba.org/show_bug.cgi?id=9831 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): Tue Aug 26 11:38:54 CEST 2014 on sn-devel-104
* s4:samba_dnsupdate: provide more substitution variables e.g. IF_RODCStefan Metzmacher2014-08-261-0/+57
| | | | | | | | | This will make the dns_update_list more flexible. Bug: https://bugzilla.samba.org/show_bug.cgi?id=9831 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:samba_dnsupdate: don't try to be smart when verifying NS recordsStefan Metzmacher2014-08-261-19/+0
| | | | | | | | | | | We can't rely on the DNS delegation to be correct in the parent domain. What we really want is to check if we already have registered ourself as a NS record in our own domain. Bug: https://bugzilla.samba.org/show_bug.cgi?id=9831 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:samba_dnsupdate: cache the already registered recordsStefan Metzmacher2014-08-262-16/+114
| | | | | | | | | | | This way we can delete records which are not used anymore. E.g. if the ip address changed. Bug: https://bugzilla.samba.org/show_bug.cgi?id=9831 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:samba_dnsupdate: fix dnsobj.__str__()Stefan Metzmacher2014-08-261-5/+5
| | | | | | | | | We should not implicitly use the global variable 'd'. Bug: https://bugzilla.samba.org/show_bug.cgi?id=9831 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:samba_dnsupdate: don't lower case the registered namesStefan Metzmacher2014-08-261-5/+5
| | | | | | | | | This matches Windows... Bug: https://bugzilla.samba.org/show_bug.cgi?id=9831 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:dlz_bind9: do an early talloc_free(el_ctx) in dlz_allnodes()Stefan Metzmacher2014-08-261-0/+2
| | | | | | | We don't have to keep everything arround while walking the whole zone. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:dlz_bind9: avoid some compiler warningsStefan Metzmacher2014-08-263-7/+8
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:dns_server: handle tombstones in handle_one_update()Stefan Metzmacher2014-08-261-16/+25
| | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:dns_server: add DNS_TYPE_TOMBSTONE support to dns_common_replace()Stefan Metzmacher2014-08-261-4/+77
| | | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749 Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:dns_server: make sure dns_common_lookup() doesn't return tombstonesStefan Metzmacher2014-08-263-6/+53
| | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:dns_server: use .wType = DNS_TYPE_TOMBSTONE instead of ZERO_STRUCT()Stefan Metzmacher2014-08-261-5/+15
| | | | | | | | | | The result is the same, but it is clearer. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:dns_server: split out dns_common_replace()Stefan Metzmacher2014-08-264-68/+90
| | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:dns_server: remove const from dns_replace_records()Stefan Metzmacher2014-08-262-2/+2
| | | | | | | | | | All callers are find we the record array gets modified. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:dns_server: split out dns_common_extract() and dns_common_lookup()Stefan Metzmacher2014-08-263-44/+92
| | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:dns_server: split out a private 'dnsserver_common' libraryStefan Metzmacher2014-08-265-36/+105
| | | | | | | | | | | This will contain common code for the internal dns server, the dlz_bind9 module and the rpc dns management server. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:dns_server: map LDB_ERR_NO_SUCH_OBJECT to WERR_DNS_ERROR_NAME_DOES_NOT_EXISTStefan Metzmacher2014-08-262-14/+24
| | | | | | | | | | | | | | | | This is the correct fix for commit 8b24c43b382740106474e26dec59e1419ba77306 and Bug: https://bugzilla.samba.org/show_bug.cgi?id=9559 With this change we have a consistent behavior between internal server and the bind dlz module. We keep a dangling LDAP object without dnsRecord attribute arround forever. This will be fixed in the following commits. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:dns_server: handle WERR_DNS_ERROR_NAME_DOES_NOT_EXIST in werr_to_dns_err()Stefan Metzmacher2014-08-261-0/+2
| | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4-rpc: dnsserver: Do not return NS_GLUE records with VIEW_GLUE_DATA filterAmitay Isaacs2014-08-211-1/+1
| | | | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10751 Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu Aug 21 11:36:55 CEST 2014 on sn-devel-104
* s4-rpc: dnsserver: Correctly set rank for glue NS recordsAmitay Isaacs2014-08-211-3/+6
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10751 Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:torture:vfs_fruit: add tests for resource fork IORalph Boehme2014-08-181-0/+110
| | | | | | | | | Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Aug 18 20:08:32 CEST 2014 on sn-devel-104
* s4:torture:vfs_fruit: add test writing Netatalk metadataRalph Boehme2014-08-181-0/+138
| | | | | | Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s4:torture:vfs_fruit: add test reading Netatalk metadataRalph Boehme2014-08-182-2/+355
| | | | | | Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s4:torture: add boilerplate code for vfs_fruitRalph Boehme2014-08-182-0/+46
| | | | | | Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s4:torture: add wrapper functionsRalph Boehme2014-08-181-0/+77
| | | | | | | | | Add wrapper functions that connect two trees with sharenames taken from passed option. Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s4:torture: add boilerplate code for testing specific VFS modulesRalph Boehme2014-08-182-1/+46
| | | | | | Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s4:torture:smb2: add utility function torture_smb2_con_sopt()Ralph Boehme2014-08-181-0/+42
| | | | | | | | | | Add a utility function that takes an option name as parameter and then uses the value of the option 'torture:NAME' as share name in a tree connect. Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s4:torture: use torture_assert instead of torture_comment and return in ↵Michael Adam2014-08-181-5/+11
| | | | | | | | | | | | defer_open test The fix missed one instance, as autobuild has just told me... Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Mon Aug 18 17:42:00 CEST 2014 on sn-devel-104
* dsdb: Also redact the clearTextPassword input-only attributeAndrew Bartlett2014-08-161-1/+2
| | | | | | | | | | | | | | | | | We go to a great deal of effort to avoid administrators posting their passwords in Samba logs, and one of the ways we do that is to remove them from internal ldif dumps Samba produces while operating as an AD DC. clearTextPassword is not a real attribute, but it functions as one for an input path. Change-Id: Iaacf3354fc9bfff18d6774f49b17a9ba962347d5 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): Sat Aug 16 01:05:07 CEST 2014 on sn-devel-104
* librpc: Remove obsolete idl-deps script.Jelmer Vernooij2014-08-151-37/+0
| | | | | | | | Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Aug 15 05:47:51 CEST 2014 on sn-devel-104
* third_party/popt: Initial support for popt.Ira Cooper2014-08-092-9/+9
| | | | | | | ctdb, ldb, and samba are supported builds for third_party popt. Signed-off-by: Ira Cooper <ira@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4-auth: Initialize the tokens by default.Andreas Schneider2014-08-081-1/+3
| | | | | | | | | | | Found with valgrind. Signed-off-by: Andreas Schneider <asn@samba.org> Pair-Programmed-With: Guenther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Fri Aug 8 19:01:56 CEST 2014 on sn-devel-104
* s4-dsdb/cracknames: free realm from smb_krb5_principal_get_realm().Günther Deschner2014-08-081-3/+4
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* wscript: Only build gensec_krb5 with heimdal.Andreas Schneider2014-08-081-1/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>