summaryrefslogtreecommitdiff
path: root/source4
Commit message (Collapse)AuthorAgeFilesLines
* dsdb: Improve code clarity for ldb_extended_dn_in_openldap modeAndrew Bartlett2014-12-221-3/+7
| | | | | | Pair-programmed-with: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s4:dsdb/extended_dn_in: Fix DNs and filter expressions in extended match opsSamuel Cabrero2014-12-221-13/+35
| | | | | | Signed-off-by: Samuel Cabrero <samuelcabrero@kernevil.me> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* torture/spoolss: issue GetJob after StartDocPrinterDavid Disseldorp2014-12-191-0/+8
| | | | | | | | | | | | This reflects Windows XP spoolss client behaviour. This fails if the job is not yet instantiated on the server, and prior to the bso#10984 fix resulted in an unsable DCERPC pipe. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri Dec 19 18:03:20 CET 2014 on sn-devel-104
* s4:kdc: add aes key support for trusted domainsStefan Metzmacher2014-12-191-37/+148
| | | | | | | | | | | We have a look at "msDS-SupportedEncryptionTypes" and >= DS_DOMAIN_FUNCTION_2008 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Günther Deschner <gd@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Dec 19 15:39:40 CET 2014 on sn-devel-104
* s4:rpc_server/lsa: fix segfault in check_ft_info()Stefan Metzmacher2014-12-191-0/+2
| | | | | | | | | | | This is triggered by lsa_lsaRSetForestTrustInformation() with ForestTrustInfo elements using FOREST_TRUST_TOP_LEVEL_NAME. The nb_name variable was uninitialized and dereferenced without checking. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
* s4:rpc_server/lsa: remove unused allow_warnings=TrueStefan Metzmacher2014-12-191-1/+0
| | | | | | | | We compile without warnings now. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
* s4:rpc_server/lsa: remove trustAuthIncoming/trustAuthOutgoing when the ↵Stefan Metzmacher2014-12-191-12/+20
| | | | | | | | | | | related flag is removed. When LSA_TRUST_DIRECTION_INBOUND or LSA_TRUST_DIRECTION_OUTBOUND flags is cleared we should also remove the related credentials. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
* s4:rpc_server/lsa: pass the correct variable to setInfoTrustedDomain_base()Stefan Metzmacher2014-12-191-4/+3
| | | | | | | | | | | | This requires 'struct lsa_policy_state', we now pass this directly instead of a instead of an opaque 'struct dcesrv_handle'. dcesrv_lsa_SetInformationTrustedDomain() passes in a 'struct dcesrv_handle' with 'struct lsa_trusted_domain_state' before, which results in segfaults. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
* selftest: use shared/libnss_wrapper_winbind.so.2Stefan Metzmacher2014-12-191-1/+1
| | | | | | | | | | | This library is always available in make test. nss-wrapper strictly requires the linux nss api. Bug: https://bugzilla.samba.org/show_bug.cgi?id=9299 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:heimdal_build: remove unused openpty checkStefan Metzmacher2014-12-181-1/+0
| | | | | | | | | commit 638a8edd7ce708cf550c054ac16dade795b6448b removed HEIMDAL_BINARY('rkpty', 'lib/roken/rkpty.c',...) (the only heimdal user of openpty(). Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4-libcli: Remove obsolete support for file resolving.Andreas Schneider2014-12-183-163/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* addns: Remove support for dns_host_file.Andreas Schneider2014-12-181-1/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* samba_dnsupdate: Allow the tool to work in 'make test'.Andreas Schneider2014-12-181-2/+5
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* samba_dnsupdate: Always fill out the nameservers of a dns object.Andreas Schneider2014-12-181-3/+7
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* torture: improve rpc.remote_pac test so we check if LogonSamLogon actually ↵Andrew Bartlett2014-12-181-0/+2
| | | | | | | | | | | succeeds Signed-off-by: Andrew Bartlett <abartlet@samba.org> Pair-programmed-with: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Dec 18 02:51:02 CET 2014 on sn-devel-104
* torture: Improve winbindd.pac test to check multiple GENSEC mechanimsAndrew Bartlett2014-12-181-10/+57
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
* gensec_krb5: Match behaviour of gensec_gssapi for password-based keytabsAndrew Bartlett2014-12-181-0/+10
| | | | | | | | | This allows the winbind.pac.krb5 test to pass against the s3member environment, which uses the password from secrets.tdb. Andrew Bartlett Reviewed-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s4:dsdb/rootdse: expand extended dn values with the AS_SYSTEM controlStefan Metzmacher2014-12-121-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise we can't find the GUID of the 'serverName' attribute as ANONYMOUS. This results in root@ub1204-161:~# ldbsearch -U% -H ldap://172.31.9.161 -b '' -s base --extended-dn serverName search error - LDAP error 1 LDAP_OPERATIONS_ERROR - <00002020: operations error at ../source4/dsdb/samdb/ldb_modules/rootdse.c:567> <> While it works as system: root@ub1204-161:~# ldbsearch -U% -H /var/lib/samba/private/sam.ldb -b '' -s base --extended-dn serverName # record 1 dn: serverName: <GUID=348c35e1-04e3-4988-a32c-32478d584551>;CN=UB1204-161,CN=Serve rs,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=s4xdom,DC=base # returned 1 records # 1 entries # 0 referrals Bug: https://bugzilla.samba.org/show_bug.cgi?id=10949 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* torture: Fix raw.open.chained-ntcreatexVolker Lendecke2014-12-091-2/+2
| | | | | | | | | | | | sizeof(buf) is 5. On FreeBSD10/clang this overwrites "ret". Not good. Same as 574750777a 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): Tue Dec 9 19:43:31 CET 2014 on sn-devel-104
* notify: Add "dir" to notify_eventVolker Lendecke2014-12-092-0/+3
| | | | | | | | | | | | | "notify_event" only reports names relative to some path that is only implicitly known via "private_data". Right now "private_data" is the fsp of the directory holding this notify. I want to use inotify_watch in a notify-daemon that does not have a fsp available and has more problems getting the path right out of "private_data". notify_inotify has the directory under which the event happened available, so make it known to the callback. Right now no caller uses it yet. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4-ldap: Pass on-wire transmitted control down the chainKamen Mazdrashki2014-12-081-1/+1
| | | | | | Change-Id: Ic3a117f74e8a67c45584fdb520d92e4f0cb01c5e Signed-off-by: Kamen Mazdrashki <kamenim@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4: torture: leases. Simple lease_v2 rename test "v2_rename".Jeremy Allison2014-12-051-0/+134
| | | | | | | | | | | Proves that renaming files can break handle leases. With the previous patches we now pass this. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s4:torture:vfs_fruit: smb2/create context AAPL testRalph Boehme2014-12-041-0/+273
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:libcli/raw: make short_name available in bufferRalph Boehme2014-12-042-0/+2
| | | | | | | | | | This will be used in smb2/create AAPL context torture tests, where the server returns an Mac OS X specific data blob in the short name buffer. It's not a string, so the existing string extraction doesn't cut it. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture:smb2: let smb2.lease.[v2_]complex1 check the R->NONE breaksStefan Metzmacher2014-12-041-6/+6
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture:smb2: Add smb2.lease.v2_breaking3 test.Jeremy Allison2014-12-041-1/+207
| | | | | | | This verifies the epoch handling in the multi step break. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:torture:smb2: Add test that shows the client can respond to a lease break ↵Jeremy Allison2014-12-041-0/+111
| | | | | | | over a different connection. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* idmap: return the correct id type to *id_to_sid methodsGarming Sam2014-12-031-1/+19
| | | | | | | | | | | | | | We have a pointer to a unixid which is sent down instead of a uid or gid. We can use this as an in-out variable so that pdb_samba_dsdb can be returned ID_TYPE_BOTH to cache correctly instead of leaving it as ID_TYPE_UID or ID_TYPE_GID. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10720 Change-Id: I0cef2e419cbb337531244b7b41c708cf2ab883e3 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Reduce number of places where sys.path is (possibly) updated for external ↵Jelmer Vernooij2014-11-302-7/+2
| | | | | | | | | | | | module paths. Change-Id: I69d060f27ea090d14405e884d1ce271975358c56 Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org> Autobuild-Date(master): Sun Nov 30 20:54:04 CET 2014 on sn-devel-104
* Be consistent about what functions add $LISTOPT and $LOADLIST to the ↵Jelmer Vernooij2014-11-301-2/+2
| | | | | | | | | | | command-line. Change-Id: Ife86624b53a99d48ce9f00d146b14f798c9bdb24 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org> Autobuild-Date(master): Sun Nov 30 16:43:52 CET 2014 on sn-devel-104
* selftest: Add separate command line for listing tests, allowing us of ↵Jelmer Vernooij2014-11-302-1/+3
| | | | | | | | subunit-filter (which doesn't support subunit v2). Change-Id: Icb877214a422c63fd38ef92425c7b4fe7ee19ad5 Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* torture: Fix raw.open.chained-openxVolker Lendecke2014-11-281-2/+2
| | | | | | | | | | sizeof(buf) is 5. On FreeBSD10/clang this overwrites "ret". Not good. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Fri Nov 28 13:30:18 CET 2014 on sn-devel-104
* messaging4: Fix typesVolker Lendecke2014-11-271-2/+12
| | | | | | | | | | | | | | | | According to python docs, PyArg_ParseTuple takes "int" and "unsigned long long". With pointers down to functions, in particular with varargs, there is no automatic conversion. So we need to be very strict about types. Automatic conversion to for example uint64_t happes only with assignment. This fixes a crash on FreeBSD10/clang. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Böhme <rb@sernet.de> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu Nov 27 21:32:18 CET 2014 on sn-devel-104
* s4: torture: leases - Add test for leases and blocking locks.Jeremy Allison2014-11-271-0/+173
| | | | | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu Nov 27 19:08:24 CET 2014 on sn-devel-104
* s4: smb2 : torture: Add new dynamic_share leases test.Jeremy Allison2014-11-271-0/+190
| | | | | | | | | | | | Depends on new share "dynamic_share" being set up containing an %R in the path= statement. Shows we will break leases and fail to grant new ones if we get a lease_key+client guid pair match on files with different fileid's, as can happen on dynamic shares. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3: leases - torture test for timeout of responding to lease break request.Jeremy Allison2014-11-271-0/+130
| | | | | | | Passes against W2K12. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:torture/smb2: smb2.lease.breaking6 testStefan Metzmacher2014-11-271-0/+108
| | | | | | | | The client is allowed to downgrade a lease to a lower value than required. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture/smb2: smb2.lease.breaking5 testStefan Metzmacher2014-11-271-0/+120
| | | | | | | | This is like breaking4, but with an initial "R" lease instead of "RH". Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture/smb2: smb2.lease.breaking4 testStefan Metzmacher2014-11-271-0/+146
| | | | | | | | This demonstrates that a confliciting open with NTCREATEX_DISP_OVERWRITE isn't delayed by a "RH" lease, even if a lease is in 'breaking' mode. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture/smb2: smb2.lease.breaking3 testStefan Metzmacher2014-11-271-0/+189
| | | | | | | | | | | | | This demonstrates a race case where the client reuses a lease, while the server already sent a break. The open succeeds with SMB2_LEASE_FLAG_BREAK_IN_PROGRESS being set. This is more complex that smb2.lease.breaking[1-2] as it generates breaks from RWH => RH => R => NONE. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture/smb2: smb2.lease.breaking2 testStefan Metzmacher2014-11-271-0/+152
| | | | | | | | | | This demonstrates that a conflicting open with NTCREATEX_DISP_OVERWRITE breaks a lease to NONE. It also shows which error codes are generated for unexpected lease break acks. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture/smb2: smb2.lease.breaking1 testStefan Metzmacher2014-11-271-0/+108
| | | | | | | | | | This demonstrates a race case where the client reuses a lease, while the server already sent a break. The open succeeds with SMB2_LEASE_FLAG_BREAK_IN_PROGRESS being set. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture/smb2: make it possible to skip the automatic ack of lease breaks.Stefan Metzmacher2014-11-271-3/+10
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture/smb2: add smb2.lease.v2_epoch[2|3] testsStefan Metzmacher2014-11-271-0/+210
| | | | | | | | | | | | They demonstrate that the lease version (v1 or v2) is selected by the first open. All following opens using the other version still get the lease version of the first open. This implies that the server has to remember the lease version more globaly. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture/smb2: add smb2.lease.[v2_]complex1 testsStefan Metzmacher2014-11-271-0/+273
| | | | | | | | These tests verify the lease state is consistent between two connections with the same client_guid. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture/smb2: pass the expected flags to CHECK_LEASE()Stefan Metzmacher2014-11-271-26/+26
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture/smb2: don't check the lease break connection against samba3Stefan Metzmacher2014-11-271-2/+5
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture/smb2: always verify the v2 lease epoch.Stefan Metzmacher2014-11-271-44/+71
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture/smb2: verify lease_flags in CHECK_LEASE_BREAK()Stefan Metzmacher2014-11-271-2/+10
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture/smb2: lease per test fnamesStefan Metzmacher2014-11-271-18/+18
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>