1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-14 19:24:43 +03:00

56 Commits

Author SHA1 Message Date
Michael Adam
9b443d2f4b torture: fix the ldap.cldap test
This makes sure a host*NAME* handed in will get properly resolved.
Bug uncovered by the new nss_wrapper code (1.1.2) which fixed
the handling of the AI_NUMERICHOST flag in getaddrinfo.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-01-11 12:25:26 +01:00
Benjamin Franzke
767bd6a4d4 s4:torture/ldap: Add test for netlogon over tcp
This patch moves the udp netlogon tests from cldap.c
to netlogon.c and passes a generic netlogon-send
function as parameter.

Therefore a tcp replacement for cldap_netlogon is also added.
The two variants tcp and udp are added as 2 new torture tests:

ldap.netlogon-udp & ldap.netlogon-tcp
Both tests succeed.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
2013-11-11 23:00:55 +01:00
Benjamin Franzke
32ee231da5 s4:torture/cldap: Fix a typo
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
2013-11-11 23:00:54 +01:00
Stefan Metzmacher
6ee628341f LDAP-CLDAP: demonstrate that pdc name is not an unc path
For LOGON_SAM_LOGON_RESPONSE_EX and LOGON_SAM_LOGON_USER_UNKNOWN_EX,
pdc name is not in unc path form.

[MS-ADTS] 7.3.1.* uses UnicodeLogonServer, which seems to be in unc form,
while NetbiosComputerName is not in unc form.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Jan  4 20:06:14 CET 2012 on sn-devel-104
2012-01-04 20:06:14 +01:00
Stefan Metzmacher
bf0da0b4f7 LDAP-CLDAP: demonstrate that pdc name is an unc path
For LOGON_SAM_LOGON_RESPONSE and LOGON_SAM_LOGON_USER_UNKNOWN,
I assume all levels without _EX in the name, pdc name is
in unc path form.

[MS-ADTS] 7.3.1.* uses UnicodeLogonServer, which seems to be in unc form,
while NetbiosComputerName is not in unc form.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Jan  4 13:37:42 CET 2012 on sn-devel-104
2012-01-04 13:37:42 +01:00
Matthias Dieter Wallnöfer
0e526062a4 s4:torture/ldap/cldap.c - remove the "test_cldap_netlogon_flag_ds_dns_forest" test
The test is wrong since the DNS_* (DS_DNS_CONTROLLER, DS_DNS_DOMAIN,
DS_DNS_FOREST_ROOT) flags are never set on the plain CLDAP pipe. They
get added only over the DsRGetDCName* calls over NETLOGON RPC.

Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sun Nov 27 16:23:27 CET 2011 on sn-devel-104
2011-11-27 16:23:27 +01:00
Stefan Metzmacher
b787b6e1bd libcli/cldap: don't pass tevent_context to cldap_socket_init()
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Oct 10 23:23:07 CEST 2011 on sn-devel-104
2011-10-10 23:23:07 +02:00
Andrew Tridgell
6b266b85cf s4-loadparm: 2nd half of lp_ to lpcfg_ conversion
this converts all callers that use the Samba4 loadparm lp_ calling
convention to use the lpcfg_ prefix.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-16 18:24:27 +10:00
Andrew Bartlett
c8a23147fe s4:libcli/ldap Rename ldap.h to libcli_ldap.h
It is a problem if a samba header is called ldap.h if we also want
to use OpenLDAP's ldap.h

Andrew Bartlett
2010-05-21 17:39:15 +10:00
Jelmer Vernooij
f9ca9e46ad Finish removal of iconv_convenience in public API's. 2010-05-18 11:45:30 +02:00
Matthias Dieter Wallnöfer
eceffe6909 nbt: samlogon/netlogon structures - unify denominations 2010-04-27 18:45:41 +02:00
Stefan Metzmacher
3751485c84 s4:torture: use a connected CLDAP socket.
This is needed because we don't (want) to specify an explicit
local address. And the socket family (ipv4 vs. ipv6) needs to
be autodetected based on the remote address before the
socket() syscall.

Otherwise we would try to connect to a ipv4 address through an
ipv6only socket.

metze
2010-02-26 13:22:12 +11:00
Andrew Tridgell
84d0047377 s4-torture: ran minimal_includes.pl over source4/torture
This reduces compile time somewhat.
2009-10-20 16:04:46 +11:00
Matthias Dieter Wallnöfer
abeb794b66 s4:torture "cldap" test - restore the removed constraints and add more
Consider for description the post on the technical mailing list. I hope that this
satisfies abartlet again.
2009-10-19 18:34:29 +02:00
Matthias Dieter Wallnöfer
77b9d2827b s4:torture "cldap" test - rework and test more results 2009-10-18 14:33:43 +02:00
Matthias Dieter Wallnöfer
e9f7ef0439 s4:torture cldap test - Add checks for the right forest DNS name 2009-10-14 12:27:06 +02:00
Andrew Tridgell
4cb055cacd ds-flags: use the new name DS_DNS_FOREST_ROOT
Update to use the new DS_DNS_FOREST_ROOT name, which makes it clearer
what this bit means (according to MS-ADTS doc)
2009-10-02 12:02:00 +10:00
Matthias Dieter Wallnöfer
b250c8de39 Fixes for the "cldap" tests
- Insert a check after the "tsocket" library call to make sure that the call
  terminated correctly
- Add a comment to explain why on further calls of "cldap_socket_init" the
  destination address hasn't to be specified
2009-06-18 13:49:26 +10:00
Stefan Metzmacher
8a6f91c910 LDAP-CLDAP: remove temporary debug statements...
metze
2009-03-22 12:20:45 +01:00
Stefan Metzmacher
c600e8ef42 s4:cldap: rewrite the cldap library based on tsocket
metze
2009-03-19 16:25:59 +01:00
Günther Deschner
d242491488 idl: finally fully share nbt.idl in s3 and s4.
Guenther
2008-10-15 21:44:39 +02:00
Jelmer Vernooij
a9d8ed748e Sync with Samba 3. 2008-10-14 15:43:04 +02:00
Volker Lendecke
af1c802791 The IRIX compiler does not like embedded unnamed unions 2008-10-02 08:09:25 +02:00
Matthias Dieter Wallnöfer
5e89476730 Add a torture test for the new 'netlogon' flags.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
(This used to be commit a484334fb4dafd1df514d1bf88f7e0c4f07dff86)
2008-08-20 12:46:37 +10:00
Simo Sorce
929adc9efa Make up the right dependencies now that ldb depends on libevents
(This used to be commit 3b8eec7ca334528cad3cdcd5e3fc5ee555d8d0e0)
2008-06-14 11:59:19 -04:00
Andrew Bartlett
f67156fc92 Extend the 'netlogon' CLDAP and NBT implementation.
This now handles checking if the user exists, including validating the
ACB mask on the user.

This would be a nasty security hole, if Kerberos did not already
expose this information anonymously...

Andrew Bartlett
(This used to be commit 441b286c00f9a7743cdefeb243545bdbd2c94c5e)
2008-05-21 12:37:36 +10:00
Andrew Bartlett
24264e9acb Modify the LDAP-CLDAP test for better coverage.
This fixes up some compiled in constants and checks a couple more NT
versions.

Andrew Bartlett
(This used to be commit ca1b3fe3add06dc22361d5a5fe7e63a6abb1697c)
2008-05-17 20:52:23 +10:00
Andrew Bartlett
58e7f253ea Rework the CLDAP and NBT netlogon requests and responses.
This now matches section 7.3.3 of the MS-ATDS specification, and all
our current tests pass against windows.  There is still more testing
to do, and the server implementation to complete.

Andrew Bartlett
(This used to be commit 431d0c03965cbee85691cd0dc1e2a509c1a2b717)
2008-05-16 13:03:01 +10:00
Simo Sorce
4e83011f72 Remove more event_context_init() uses from function calls within deep down the code.
Make sure we pass around the event_context where we need it instead.
All test but a few python ones fail. Jelmer promised to fix them.
(This used to be commit 3045d391626fba169aa26be52174883e18d323e9)
2008-04-21 18:12:33 -04:00
Jelmer Vernooij
c38c2765d1 Remove yet more uses of global_loadparm.
(This used to be commit e01c1e87c0fe9709df7eb5b863f7ce85564174cd)
2008-02-21 17:17:37 +01:00
Andrew Bartlett
8174ed1ebe r26683: Add another testcase. I still don't know what's wrong here.
Andrew Bartlett
(This used to be commit 341929c615e5573887889cf22950a25b536c6fc1)
2008-01-06 22:51:02 -06:00
Andrew Bartlett
4e064c5ce6 r26682: Move CLDAP to the modern torture system, and add value checking.
Andrew Bartlett
(This used to be commit df17c4a9e84f4a4087c4a4a8ad44a82d4acb522e)
2008-01-06 21:21:02 -06:00
Jelmer Vernooij
da0f222f43 r26271: Remove some more uses of global_loadparm.
(This used to be commit e9875fcd56de0748ed78d7e3c9cdb4919cd96d3c)
2007-12-21 05:47:53 +01:00
Jelmer Vernooij
bbdfbf8d9d r26238: Add a loadparm context parameter to torture_context, remove more uses of global_loadparm.
(This used to be commit a33a5530545086b81a3b205aa109dff11c546926)
2007-12-21 05:47:20 +01:00
Jelmer Vernooij
25f286fdfe r26223: Move loadparm context up in the stack.
(This used to be commit 152e2b1a283675b53affb8f7225644925f171dbd)
2007-12-21 05:46:59 +01:00
Jelmer Vernooij
2151cde580 r25554: Convert last instances of BOOL, True and False to the standard types.
(This used to be commit 566aa14139510788548a874e9213d91317f83ca9)
2007-10-10 15:07:55 -05:00
Jelmer Vernooij
98b57d5eb6 r25035: Fix some more warnings, use service pointer rather than service number in more places.
(This used to be commit df9cebcb97e20564359097148665bd519f31bc6f)
2007-10-10 15:05:43 -05:00
Andrew Tridgell
0479a2f1cb r23792: convert Samba4 to GPLv3
There are still a few tidyups of old FSF addresses to come (in both s3
and s4). More commits soon.
(This used to be commit fcf38a38ac691abd0fa51b89dc951a08e89fdafa)
2007-10-10 14:59:12 -05:00
Stefan Metzmacher
2506a1efce r20318: do what the printf statement says:-)
metze
(This used to be commit dd9ef6e5ab471665d019fbda87c90f5c95bd57ea)
2007-10-10 14:29:39 -05:00
Simo Sorce
4889eb9f7a r19831: Big ldb_dn optimization and interfaces enhancement patch
This patch changes a lot of the code in ldb_dn.c, and also
removes and add a number of manipulation functions around.

The aim is to avoid validating a dn if not necessary as the
validation code is necessarily slow. This is mainly to speed up
internal operations where input is not user generated and so we
can assume the DNs need no validation. The code is designed to
keep the data as a string if possible.

The code is not yet 100% perfect, but pass all the tests so far.
A memleak is certainly present, I'll work on that next.

Simo.
(This used to be commit a580c871d3784602a9cce32d33419e63c8236e63)
2007-10-10 14:28:22 -05:00
Stefan Metzmacher
5d7b85184d r19737: - add some more CLDAP rootdse tests
- don't ignore CLDAP rootdse errors anymore

metze
(This used to be commit 712577d9e284445e9257b691aefb719511d6a57c)
2007-10-10 14:28:17 -05:00
Jelmer Vernooij
a39f239cb2 r19392: Use torture_setting_* rather than lp_parm_* where possible.
(This used to be commit b28860978fe29c5b10abfb8c59d7182864e21dd6)
2007-10-10 14:21:24 -05:00
Simo Sorce
efa3803335 r15788: Do not crash when no result is returned
(This used to be commit efb7e39e512eb71deaeef1315bc88a902e5cd848)
2007-10-10 14:08:20 -05:00
Andrew Tridgell
cf83b29b58 r15530: added testing of generic CLDAP requests, looking at the rootDSE. Jerry
has found that w2k3 does respond to rootDSE cldap requests. This test
shows that it does indeed work, but the expression handling is not
what you would expect
(This used to be commit 388e98e77cfd1603156ea431877e40ac886d9c08)
2007-10-10 14:05:54 -05:00
Jelmer Vernooij
909b111f58 r14720: Add torture_context argument to all torture tests
(This used to be commit 3c7a5ce29108dd82210dc3e1f00414f545949e1d)
2007-10-10 13:59:13 -05:00
Jelmer Vernooij
8528016978 r14464: Don't include ndr_BASENAME.h files unless strictly required, instead
try to include just the BASENAME.h files (containing only structs)
(This used to be commit 3dd477ca5147f28a962b8437e2611a8222d706bd)
2007-10-10 13:57:27 -05:00
Andrew Tridgell
7dae041b1a r12637: test CLDAP with both NULL and non-NULL user
(This used to be commit 2b603d3ecf2f3108942422bda864e41c8addbf60)
2007-10-10 13:49:11 -05:00
Jelmer Vernooij
d4de4c2d21 r12608: Remove some unused #include lines.
(This used to be commit 70e7449318aa0e9d2639c76730a7d1683b2f4981)
2007-10-10 13:49:03 -05:00
Stefan Metzmacher
e87f589f00 r8368: the type filed depends on the user being present or not
call ndr_print for each call

metze
(This used to be commit 0a07e4ef8d869d35ceb0761495e367077f2361ba)
2007-10-10 13:20:12 -05:00
Stefan Metzmacher
06a4e5688e r8223: fix the values of nt_version and type we reply in the server code,
also name the struct like the nt_version number

metze
(This used to be commit 1e3af5cc1f68b7fa54b8ba77ed9836a619a69436)
2007-10-10 13:19:21 -05:00