1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
Commit Graph

173 Commits

Author SHA1 Message Date
Stefan Metzmacher
776f5c65bf s4:libnet: use helper functions to access dcerpc_binding->target_hostname
If possible also specify the already known address as dcerpc_binding->host.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:16 +01:00
Stefan Metzmacher
cd0981b2d8 s4:libnet: make use of dcerpc_binding_set_flags()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:16 +01:00
Stefan Metzmacher
84528b9ee0 s4:libnet_become_dc: make use of dcerpc_binding_[g|s]et_assoc_group_id()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:15 +01:00
Andrew Bartlett
0668f98d11 s4-libnet: Prepare libnet_BecomeDC for samdb_reference_dn() returning an extended DN
Remote LDAP servers will not accept an extended DN with other components.

Andrew Bartlett
2012-08-14 15:37:22 +02:00
Andrew Bartlett
fd0394d85d s4-libnet: Improve debugging of libnet_BecomeDC LDAP errors 2012-08-14 15:37:22 +02:00
Stefan Metzmacher
dcf82e5869 s4:libnet_become_dc: add missing 'return' after composite_error()
metze
2012-04-23 09:30:10 +02:00
Matthieu Patou
e34fe4dcb6 s4-becomedc: replicate first with DRS_CRITICAL_ONLY and DRS_GET_ANC objects for the base dn partition
Windows dcpromo do the same: getncchanges with DRS_GET_ANC and
DRS_CRITICAL_ONLY, then it does a getncchanges without those flags for
the rest.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-12-19 11:49:19 +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
Stefan Metzmacher
2cd76b0931 libcli/cldap: pass tevent_context to cldap_netlogon_send()
metze
2011-10-10 21:50:26 +02:00
Andrew Tridgell
085936926a s4-libnet: fixed forest DNS name
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-25 07:39:39 +10:00
Stefan Metzmacher
47fcbd71ae s4:libnet: passdown the DsGetNCChangesReq* to the libnet_BecomeDC_StoreChunk handler
metze

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-08-12 12:39:05 +02:00
Andrew Bartlett
35b309fa0c gensec: clarify memory ownership for gensec_session_info() and gensec_session_key()
This is slightly less efficient, because we no longer keep a cache on
the gensec structures, but much clearer in terms of memory ownership.
Both gensec_session_info() and gensec_session_key() now take a mem_ctx
and put the result only on that context.

Some duplication of memory in the callers (who were rightly uncertain
about who was the rightful owner of the returned memory) has been
removed to compensate for the internal copy.

Andrew Bartlett
2011-08-03 18:48:02 +10:00
Andrew Bartlett
a1f04e8abc libcli/util Rename common map_nt_error_from_unix to avoid duplicate symbol
The two error tables need to be combined, but for now seperate the names.

(As the common parts of the tree now use the _common function,
errmap_unix.c must be included in the s3 autoconf build).

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Jun 20 08:12:03 CEST 2011 on sn-devel-104
2011-06-20 08:12:03 +02:00
Andrew Tridgell
45e00ee686 s4-libnet: honour convention of DEBUGLEVEL>=10 for NDR print 2011-04-04 10:30:30 +10:00
Andrew Tridgell
8dc92c8f71 ldb: use #include <ldb.h> for ldb
thi ensures we are using the header corresponding to the version of
ldb we're linking against. Otherwise we could use the system ldb for
link and the in-tree one for include

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-10 06:51:07 +01:00
Kamen Mazdrashki
717b1158a6 idl: Use DRSUAPI_ATTID_ prefix instead of DRSUAPI_ATTRIBUTE_ for ATTID values
Those values are actually ATTID values and such, they are used
for ATTIDs for Attributes, Classes and Syntaxes.
2010-10-31 23:54:04 +00:00
Matthias Dieter Wallnöfer
c291858199 s4:dsdb - fix unsigned integer save problems using the "%u" specifier
The issue here is that we have not yet first cast to int32_t explicitly,
before we cast to an signed int to printf() into the %d or cast to a
int64_t before we then cast to a long long to printf into a %lld.

There are *no* unsigned integers in Active Directory LDAP, even the RID
allocations and ms-DS-Secondary-KrbTgt-Number are *signed* quantities.
(See the schema, and the syntax definitions in schema_syntax.c).

The failure has been detected by Matthieu Patou on the buildfarm host "tridge"
due to a malformed "groupType" attribute.

The solution is to use the "%d" specifier. Either to use it directly - or better
(when possible) use the call "samdb_msg_add_uint" (which encapsulates it).

This patch changes such problematic situations.
2010-10-16 10:54:46 +02:00
Matthias Dieter Wallnöfer
a0e9814c0d s4:dsdb - remove "samdb_result_uint", "samdb_result_int64", "samdb_result_uint64" and "samdb_result_string"
We have ldb_msg_find_attr_as_* calls which do exactly the same. Therefore this
reduces only code redundancies.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-10-15 08:36:01 +11:00
Andrew Tridgell
2d2a0cb582 s4-libnet: show the DN when DsAddEntry() fails
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-23 15:55:39 +10: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
d0f52ddac2 s4:provision Raise default max functional level to 2008R2
We don't support many of the extra features, but that applies across many
other parts of AD.  Allow the admin to join a 2008R2 domain if he or she wants.

This also makes it possible to test 2008R2 domain code in 'make test'

Andrew Bartlett
2010-06-23 20:10:06 +10:00
Andrew Bartlett
c4482bf53e libds:common Remove DS_DC_* domain functionality flags
These are just a subset of the DS_DOMAIN_ functionality flags, are compared and often confused with each other.  Just make them one set.

Andrew Bartlett
2010-06-23 20:10:03 +10:00
Stefan Metzmacher
6dbcffb51d s4:lib: merge LDB_WRAP and LDBSAMBA and make LDBSAMBA a library.
This is needed to remove samba specifc symbols from the bundled
ldb, in order to get the ABI right.

metze

Signed-off-by: Andreas Schneider <asn@samba.org>
2010-06-16 14:07:28 +02:00
Andrew Bartlett
35237d5356 s4:libnet Remove 'ads min function level' checks.
We support Windows 2000 native now.

Andrew Bartlett
2010-06-16 09:57:52 +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
Andrew Tridgell
280d06f8b5 s4-libnet: cope with an empty client site name from CLDAP
We fall back to the server site name in a vampire

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-04-27 15:24:44 +10:00
Andrew Tridgell
4679bb731b s4-vampire: show main CLDAP response attributes during vampire 2010-04-27 15:24:40 +10:00
Andrew Tridgell
47712ab3dd s4-libnet: fixed two compiler warnings 2010-04-22 19:36:16 +10:00
Matthias Dieter Wallnöfer
ad9e407357 Revert "s4:prefer "samdb_*_dn" basedn calls over the "ldb_get_*_dn" functions"
We should use the "ldb_get_*_basedn" calls since they are available in the LDB
library.
2010-04-13 08:55:15 +02:00
Kamen Mazdrashki
a62d0419de s4/libnet: handle errors returned for DsAddEntry_v3 properly
It turns out ms-docs are little bit misleading - in case of
no error, r->out.ctr->ctr3.err_data is not NULL, but
error information (r->out.ctr->ctr3.err_data->v1.info) is NULL!
2010-04-12 01:50:39 +03:00
Kamen Mazdrashki
cb0ad42a3d s4/libnet: Add few new lines in the debug log so it is readable again 2010-04-12 01:50:39 +03:00
Kamen Mazdrashki
9f92d586ca s4/libnet: Dump DRSUAPI_DIRERR_OK as unexpected
Actually DRSUAPI_DIRERR_OK is not valid error to be returned.
I introduce it in the IDL so that I can use it in enum.
So it should be dumped as Unexpected error code
2010-04-12 01:50:39 +03:00
Kamen Mazdrashki
db02ca65a0 s4/drs: Implement DsAddEntry V3 error handling 2010-03-24 17:34:42 +02:00
Kamen Mazdrashki
04f4ea6ae2 s4/drs: Refactor error handling for DsAddEntry V3 replies
Dumping for specific error classes are to be implemented properly
in the near future.
2010-03-24 17:34:39 +02:00
Kamen Mazdrashki
00fce797e8 s4/drs: drsuapi_DsAddEntry_ErrData propagate structure def in source code 2010-03-24 17:34:37 +02:00
Kamen Mazdrashki
427a1f3c62 s4/drs: DsAddEntry - extending error handling for V2 replies
After having more complete definition for DsAddEntryReply V2
structure, we can now handle error state in more robust way,
not just counting on number of objects returned.
2010-03-24 17:34:35 +02:00
Kamen Mazdrashki
58ddf31ad1 s4/drs: drsuapi_DsAddEntryErrorInfoX changes propagated to source code 2010-03-24 17:34:34 +02:00
Kamen Mazdrashki
05db9365b6 s4/drs: DsAddEntry - Propagating unsigned switches to source code 2010-03-24 17:34:31 +02:00
Stefan Metzmacher
2c5bbea8cb s4:libnet_become_dc: make use of use tevent_req based dcerpc_binding_handle stubs
metze
2010-03-12 15:25:42 +01:00
Matthias Dieter Wallnöfer
af72a63cff s4:libnet_become_dc - change counter variables to "unsigned" where they count LDB objects 2010-03-10 20:22:06 +01:00
Kamen Mazdrashki
9f21787131 s4/drs: DsGetNCChanges - Propagating IDL changes to source code
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-03-10 17:11:57 +01:00
Stefan Metzmacher
56b97000bd s4:libnet_become_dc: don't look at the internals of 'struct rpc_request'
metze
2010-03-01 16:11:57 +01:00
Stefan Metzmacher
5d33c6d4f9 s4:libnet_become_dc: make use of explicit dcerpc_*_recv functions
metze
2010-03-01 16:11:53 +01:00
Anatoliy Atanasov
c65abcf9d3 s4/libnet: Fix misleading comment 2010-03-01 14:17:32 +02:00
Stefan Metzmacher
b6737c1a7c s4:libnet: 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
Anatoliy Atanasov
968bd16b49 s4/rodc: change the libnet_become_dc code to do RODC join 2010-02-17 18:03:32 +02:00
Kamen Mazdrashki
8823a549ca s4/drs: propagate DRS_ extension flags in code base 2010-02-05 10:51:57 +01:00
Andrew Tridgell
f461a72ec3 idl: switched to using the WSPP names for the 'neighbour' DRS options
The documentation shows that all these functions in fact use the same
flags variable type. To be consistent between functions, and to allow
easy reference to the WSPP docs, it is better for us to also use this
generic DrsOptions bitfield rather than one per operations.
2010-01-18 07:25:18 +11:00
Andrew Tridgell
a5d6117065 s4-torture: switch to generic DRS options flags 2010-01-14 15:37:59 +11:00