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

52 Commits

Author SHA1 Message Date
Andrew Bartlett
937bf4b836 librpc/ndr: Unimplement DRSUAPI_COMPRESSION_TYPE_XPRESS and rename
DRSUAPI_COMPRESSION_TYPE_XPRESS is not MS-XCA nor is it implemented by
lzexpress_compress(), so disconnect from that algorithm.

This avoids someone fixing lzxpress_compress() to work for DRSUAPI
and breaking claims support.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2023-03-31 01:48:30 +00:00
Stefan Metzmacher
c403fa1a7f krb5_wrap: move source3/libads/krb5_errs.c to lib/krb5_wrap/krb5_errs.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2020-02-10 16:32:37 +00:00
Volker Lendecke
f2e939b65b libads: Give krb5_errs.c its own header
The protos were declared in lib/krb5_wrap but the functions are not
available there.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2018-11-27 07:13:14 +01:00
Volker Lendecke
1c6e2704fb lib: Avoid a ZERO_STRUCT, save a few bytes .text
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2017-11-13 23:54:46 +01:00
Andrew Bartlett
4b25650577 repl: Give an error if we get a secret when not expecting one
We should never get a secret from a server when we specify DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING

This asserts that this is the case.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2015-10-26 05:11:21 +01:00
Samuel Cabrero
d747372d28 idl:drsuapi: Manage all possible lengths of drsuapi_DsBindInfo
Signed-off-by: Samuel Cabrero <scabrero@zentyal.com>
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
2014-07-07 05:22:33 +02:00
Matthieu Patou
679bbd014e s3: don't replace the error message if already defined
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Sun Mar  4 10:13:24 CET 2012 on sn-devel-104
2012-03-04 10:13:24 +01:00
Andrew Bartlett
ad0a07c531 s3-talloc Change TALLOC_ZERO_P() to talloc_zero()
Using the standard macro makes it easier to move code into common, as
TALLOC_ZERO_P isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andreas Schneider
bf18403c81 s3-rpc_client: Move client pipe functions to own header. 2011-02-28 18:15:04 +01:00
Stefan Metzmacher
bf7a27c397 s3:libnet: add 'process_links' to dssync_ops
This allows the backend to handle linked attributes.

metze
2011-02-02 15:45:20 +01:00
Günther Deschner
1cd7f6c0e1 s3-drsuapi: fix error handling after converting to dcerpc_drsuapi_X functions.
Guenther
2011-01-12 13:41:16 +01:00
Günther Deschner
4f057230ca s3-drsuapi: prefer dcerpc_drsuapi_X functions.
Guenther
2011-01-11 22:18:02 +01:00
Günther Deschner
80b47fcb0a s3-libnet: better separate headers.
Guenther
2010-07-13 22:40:46 +02:00
Kamen Mazdrashki
88494b2b62 s3/drs: DsCrackNames - Propagating IDL changes to source code
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-03-10 17:12:03 +01:00
Kamen Mazdrashki
feb4c8a3e3 s3/drs: DsGetNCChanges - Propagating IDL changes to source code
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-03-10 17:11: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
Günther Deschner
3d679a3b5f s3-rpc: Avoid including every pipe's client and server stubs everywhere in samba.
Guenther
2009-11-26 20:03:17 +01:00
Volker Lendecke
b8cd1cff2d Fix an uninitialized variable 2009-04-23 14:35:50 +02:00
Andrew Bartlett
872cb0257c Move DRSUAPI per-attribute decryption into a common file
This file (contining metze's decryption routines) is now also be used by
Samba3's DRSUAPI implementation

Andrew Bartlett
2009-04-14 14:19:39 +10:00
Günther Deschner
264b28ec09 s3-libnet: only call libnet_dssync_process() startup and shutdown callbacks when filled in.
Guenther
2009-04-01 16:58:48 +02:00
Günther Deschner
6503ffaa04 s3: fix s3 drsuapi callers.
Guenther
2008-10-17 10:54:01 +02:00
Günther Deschner
f0dcc1fad4 s4-build: fix drsuapi callers.
Guenther
2008-10-16 14:03:10 +02:00
Jeremy Allison
3907392459 Fix "might be used uninitialized" warnings.
Jeremy.
(This used to be commit 5abd12eec1)
2008-08-07 17:49:19 -07:00
Michael Adam
87c7496761 libnet dssync: start memory allocation cleanup: use tmp ctx in libnet_dssync().
Don't leak temporary data to callers but use a temporary context
that is freed at the end.

Michael
(This used to be commit 2d98ad57f5)
2008-08-01 17:13:42 +02:00
Michael Adam
84ee630ee9 libnet dssync: fix memory allocation for error/result messages.
Use the libnet_dssync_context as a talloc context for the
result_message and error_message string members.
Using the passed in mem_ctx makes the implicit assumption
that mem_ctx is at least as long-lived as the libnet_dssync_context,
which is wrong.

Michael
(This used to be commit 635baf6b7d)
2008-08-01 17:10:59 +02:00
Michael Adam
a5d4b540e2 libnet dssync: add my C after dssync keytab changes.
Michael
(This used to be commit 9391aec8d4)
2008-08-01 16:08:00 +02:00
Michael Adam
10225fbef7 dssync: add clean_old_entries flag to dssync_ctx.
Initialize it to false.
And pass it down to the libnet_keytab context in
libnet_dssync_keytab.c:keytab_startup().

Unused yet.

Michael

Note: This might not be not 100% clean design to put this into the
toplevel dssync context while it is keytab specific. But then, on the
other hand, other imaginable backends might want to use this flag, too...
(This used to be commit 12e884f227)
2008-08-01 16:08:00 +02:00
Michael Adam
9d12511e45 libnet dssync: rename flag single to single_object_replication
So that it is more obvious what this controls.

Michael
(This used to be commit 2360f0a19f)
2008-08-01 16:07:58 +02:00
Michael Adam
072bd87194 libnet dssync: rename repl_nodiff flag to force_full_replication.
Michael
(This used to be commit ec959b4609)
2008-08-01 16:07:05 +02:00
Michael Adam
f060b744ef libnet dssync: support lists of dns (instead of one dn) for single object replication.
Just specify several DNs separated by spaces on the command line of
"net rpc vampire keytab" to get the passwords for each of these
accouns via single object replication.

Michael
(This used to be commit 6e53dc2db8)
2008-08-01 16:07:04 +02:00
Michael Adam
ab5a6712b6 libnet dssync: move determination of request level into build_request()
...where it belongs.

Michael
(This used to be commit 012b33f1c5)
2008-08-01 16:07:04 +02:00
Michael Adam
89d817386c libnet dssync: refactor dsgetncchanges loop out into libnet_dssync_getncchanges().
Michael
(This used to be commit 93cda1aa0a)
2008-08-01 16:07:04 +02:00
Michael Adam
0099c4b0c7 libnet dssync: fix single object replication by adding one check.
Before, this used the old uptodate vector in the request...

Michael
(This used to be commit 04fb9322d5)
2008-08-01 16:07:04 +02:00
Michael Adam
9e1eccc911 libnet dssync: simplify logic of libnet_dssync_process() main loop.
Untangle parsing of results and processing.
Make loop logic more obvious.
Call finishing operation after the loop, not inside.

Michael
(This used to be commit 47c8b3391c)
2008-08-01 16:07:04 +02:00
Michael Adam
58e0b8d568 libnet dssync: refactor creation of request out into new function
libnet_dssync_build_request().

Michael
(This used to be commit d745c1af40)
2008-08-01 16:07:04 +02:00
Michael Adam
c655e295ef vampire keytab: add switch --repl-nodiff to trigger full replication.
I.e. replication without keeping track of the up to date vector.

Michael
(This used to be commit d4b36e447b)
2008-08-01 16:07:04 +02:00
Michael Adam
d42160f9de dssync: allow replications of a single obj with net rpc vampire keytab.
This is triggered by setting the new "single" flag in the dssync_context
and filling the "object_dn" member with the dn of the object to be
fetched.

This call is accomplished by specifying the DRSUAPI_EXOP_REPL_OBJ
extended operation in the DsGetNCCHanges request. This variant does
honor an up-to-date-ness vectore passed in, but the answer does not
return a new up-to-dateness vector.

Call this operation as "net rpc vampire keytab /path/keytab object_dn" .

Michael
(This used to be commit f4a01178a3)
2008-08-01 16:04:41 +02:00
Michael Adam
4d946b5932 dssync: pass uptodateness vector into and out of DsGetNCChanges request.
Also store the new uptodateness vector in the backend after completion
and retrieve the old vector before sending the DsGetNCChanges request.

This effectively accomplishes differential replication.

Michael
(This used to be commit a2a88808df)
2008-08-01 16:04:41 +02:00
Michael Adam
26cceb8118 dssync: either use the req5 or the req8 request, depending on the supported_extenstion
that have been recorded in the remote_info28 in the dssync_context.

Michael
(This used to be commit 3a2a69137e)
2008-08-01 16:04:41 +02:00
Michael Adam
0f98b99483 dssync: record the bind info in the new remote_info28 in libnet_dssync_bind().
This extracts the info24 data in case this is what was returned (instead of info28).
E.g. windows 2000 returns info24.

Michael
(This used to be commit 61b41aa615)
2008-08-01 16:04:41 +02:00
Michael Adam
0db26805da dssync keytab: add support for keeping track of the up-to-date-ness vector.
The startup operation should get the old up-to-date-ness vector from the backend
and the finish operation should store the new vector to the backend after replication.

This adds the change of the signatures of the operations ot the dssync_ops struct
and the implementation for the keytab ops. The up-to-date-ness vector is stored
under the principal constructed as UTDV/$naming_context_dn@$dns_domain_name.

The vector is still uninterpreted in libnet_dssync_process().
This will be the next step...

This code is essentially by Metze.

Michael
(This used to be commit 01318fb27a)
2008-08-01 16:04:40 +02:00
Michael Adam
16c2190b14 dssync: replace the processing_fn by startup/process/finish ops.
This remove static a variable for the keytab context in the keytab
processing function and simplifies the signature. The keytab context
is instead in the new private data member of the dssync_context struct.

This is in preparation of adding support for keeping track of the
up-to-date-ness vector, in order to be able to sync diffs instead
of the whole database.

Michael
(This used to be commit c51c3339f3)
2008-08-01 16:04:39 +02:00
Michael Adam
2bd58bf383 Change occurrences of the u1 member of DsBindInfo* to pid after idl change.
Michael
(This used to be commit 42f3d681ca)
2008-07-22 16:28:13 +02:00
Michael Adam
0bb7c0a5d9 dssync: fix missing prototype warning by including the proper header.
Michael
(This used to be commit 7d7b63e89b)
2008-07-18 12:20:11 +02:00
Stefan Metzmacher
ddc0d9deb3 libnet_dssync: use ctr[1|6]->more_data
metze
(This used to be commit 6b7ddb6d66)
2008-07-16 15:31:23 +02:00
Günther Deschner
46dd2d77ec libnet_dssync: add last_query flag to processing routine.
Guenther
(This used to be commit 22bdee7fe0)
2008-06-27 02:01:15 +02:00
Günther Deschner
e58b2db024 libnet_dssync: add output filename and dns_domain_name to dssync struct.
Guenther
(This used to be commit c16e1820f8)
2008-06-27 02:01:03 +02:00
Günther Deschner
31f1ad4311 libnet_dssync: pass down drsuapi_DsReplicaOIDMapping_Ctr to callback.
Guenther
(This used to be commit cbff970fac)
2008-06-26 18:36:35 +02:00
Günther Deschner
a8b8994c2d libnet_dssync: always decrypt attributes before passing them to the processing routine.
Guenther
(This used to be commit 6eedd167e7)
2008-06-26 18:35:54 +02:00
Günther Deschner
eb6903344c net_vampire: add some error output to libnet_dssync.
Guenther
(This used to be commit 891d4cca0c)
2008-06-26 10:24:14 +02:00