[SCM] Samba Shared Repository - branch v4-1-test updated
Karolin Seeger
kseeger at samba.org
Sun Jan 11 08:16:03 MST 2015
The branch, v4-1-test has been updated
via 65f891a nsswitch: fix soname of linux nss_*.so.2 modules
via 5636a48 selftest: use shared/libnss_wrapper_winbind.so.2
via b3f140d wafsamba: add optional keep_underscore=True to SAMBA_LIBRARY()
via 16f881c winbind: Retry after SESSION_EXPIRED error in ping-dc
via c6ede38 winbind: Retry LogonControl RPC in ping-dc after session expiration
via 45238fe librpc/ndr_drsuapi: Allow ndrdump to dump dsinfo52 blobs
via db5d422 idl:drsuapi: Manage all possible lengths of drsuapi_DsBindInfo
via e3e0c5e librpc-idl: change the drsuapi_DsBindInfoCtr so that it match what is on the wire both in NDR32 and NDR64.
via e890269 librpc-idl: replace int32 by uint32 as the values are always > 0
via 9dd858c librpc-idl: replace int32 by the enumeration as it's the type that we use in union's switch drsuapi_DsGetDCInfoCtrLevels
via a6a301f drsuapi.idl: change the range for attribute values to 26214400 bytes.
from d6c626a libcli/smb: only force signing of smb2 session setups when binding a new session
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-1-test
- Log -----------------------------------------------------------------
commit 65f891a3021aedf832d61a7d0006c48320d5fd84
Author: Stefan Metzmacher <metze at samba.org>
Date: Thu Dec 18 10:33:34 2014 +0100
nsswitch: fix soname of linux nss_*.so.2 modules
Bug: https://bugzilla.samba.org/show_bug.cgi?id=9299
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
(similar to commit 575b093dac3c509b1bfaab0b4ad29b9b4214e487)
Autobuild-User(v4-1-test): Karolin Seeger <kseeger at samba.org>
Autobuild-Date(v4-1-test): Sun Jan 11 16:15:06 CET 2015 on sn-devel-104
commit 5636a4839a8f3be3c4bd3bb48010fa6349cdde5f
Author: Stefan Metzmacher <metze at samba.org>
Date: Thu Dec 18 20:13:44 2014 +0100
selftest: use shared/libnss_wrapper_winbind.so.2
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 at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
(similar to commit 4eb24fa545234be506eb1330ccbbfd5c2b9e0d82)
commit b3f140d6eb6610d1e8fc40dd862e1052f2ac5337
Author: Stefan Metzmacher <metze at samba.org>
Date: Thu Dec 18 10:21:30 2014 +0100
wafsamba: add optional keep_underscore=True to SAMBA_LIBRARY()
Bug: https://bugzilla.samba.org/show_bug.cgi?id=9299
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
(similar to commit 82e583b04b04e560c121163850d70c52d2fce78d)
commit 16f881c37260861957fe10f1a485f45bcb7e912e
Author: Christof Schmitt <cs at samba.org>
Date: Fri Dec 19 12:24:53 2014 -0700
winbind: Retry after SESSION_EXPIRED error in ping-dc
Trying to establish a netlogon connection when the service ticket
expires might fail with NT_STATUS_NETWORK_SESSION_EXPIRED. The
underlying client code already marks the session as invalid, so retry
the netlogon connect in this case.
Signed-off-by: Christof Schmit <cs at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Tue Jan 6 02:58:57 CET 2015 on sn-devel-104
(cherry picked from commit a2670f15dea27c10e3827216adf572f9c3894f85)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11034
commit c6ede38e1d1e2fdbe80bd0cbf14062574729172c
Author: Christof Schmitt <cs at samba.org>
Date: Mon Dec 22 15:19:47 2014 -0800
winbind: Retry LogonControl RPC in ping-dc after session expiration
When the underlying session expires, the LogonControl RPC call used in
ping-dc returns NT_STATUS_IO_DEVICE_ERROR. Retry once in this case,
instead of returning the error to the caller.
Signed-off-by: Christof Schmitt <cs at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Tue Dec 23 02:46:34 CET 2014 on sn-devel-104
(cherry picked from commit 2fdc55160309cec89aeb88243cb18d058c67e918)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11034
commit 45238fe24d85d877b9dff98667cb0dee95e8c444
Author: Matthieu Patou <mat at matws.net>
Date: Tue Sep 23 13:45:32 2014 -0700
librpc/ndr_drsuapi: Allow ndrdump to dump dsinfo52 blobs
Change-Id: I6968b25c67587296b928b2193a9d48093c69c01a
Signed-off-by: Matthieu Patou <mat at matws.net>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
(cherry picked from commit 1ac96a416d7d6db2476f56129166fd9e018e7306)
The last 6 patches address
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11006
'domain join' fails - 'drsuapi.DsBindInfoFallBack' has no attribute
'supported_extensions'.
commit db5d42280f28a9a6dade157683f674b8f157dc46
Author: Samuel Cabrero <scabrero at zentyal.com>
Date: Fri Jul 4 12:45:59 2014 +0200
idl:drsuapi: Manage all possible lengths of drsuapi_DsBindInfo
Signed-off-by: Samuel Cabrero <scabrero at zentyal.com>
Reviewed-by: Kamen Mazdrashki <kamenim at samba.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Kamen Mazdrashki <kamenim at samba.org>
(cherry picked from commit d747372d28273542298f86530e715e8faaf907f2)
commit e3e0c5e1b5f0307f74737b0a5f7584da387d1fa3
Author: Matthieu Patou <mat at matws.net>
Date: Sun Oct 20 13:37:17 2013 -0700
librpc-idl: change the drsuapi_DsBindInfoCtr so that it match what is on the wire both in NDR32 and NDR64.
Previous implementation had a problem with NDR64 with uint32 and
uint3264 being in the wrong order
Signed-off-by: Matthieu Patou <mat at matws.net>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
Autobuild-Date(master): Wed Oct 30 10:16:02 CET 2013 on sn-devel-104
(cherry picked from commit 8dc931bafca00c1c61a4366ffb6cfa72a98bb412)
commit e8902692b591edb48d5f6a47a491ac09d1de9e26
Author: Stefan Metzmacher <metze at samba.org>
Date: Mon Oct 21 08:40:28 2013 +0200
librpc-idl: replace int32 by uint32 as the values are always > 0
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
(cherry picked from commit 1e2e421632c275f8cf7529935f72ef3639ddea14)
commit 9dd858caebd66ca2a508c8b92224c6a45215a888
Author: Matthieu Patou <mat at matws.net>
Date: Sun Oct 20 20:16:27 2013 -0700
librpc-idl: replace int32 by the enumeration as it's the type that we use in union's switch drsuapi_DsGetDCInfoCtrLevels
Signed-off-by: Matthieu Patou <mat at matws.net>
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
(cherry picked from commit 568bf16dfadb4bd3003ed18b19098a3d1473f2fe)
commit a6a301f5b7ee4a6d69661512cedece685bd901db
Author: Stefan Metzmacher <metze at samba.org>
Date: Mon Sep 23 08:05:41 2013 +0200
drsuapi.idl: change the range for attribute values to 26214400 bytes.
This matches the IDL from [MS-DRSR].
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Matthieu Patou <mat at matws.net>
(cherry picked from commit 51d8eba8417c58c2ade30d58a838441008209542)
-----------------------------------------------------------------------
Summary of changes:
buildtools/wafsamba/wafsamba.py | 6 +-
librpc/idl/drsuapi.idl | 104 +++++++++++++++----
librpc/ndr/ndr_drsuapi.c | 190 ++++++++++++++++++++++++++++++++++
nsswitch/wscript_build | 24 +++--
selftest/target/Samba.pm | 2 +-
source3/libnet/libnet_dssync.c | 21 +++-
source3/rpcclient/cmd_drsuapi.c | 4 +
source3/winbindd/winbindd_dual_srv.c | 18 ++++
source3/wscript_build | 7 --
source4/dsdb/repl/drepl_out_helpers.c | 27 ++++-
source4/libnet/libnet_become_dc.c | 25 ++++-
source4/libnet/libnet_unbecome_dc.c | 25 ++++-
source4/selftest/tests.py | 2 +-
source4/torture/drs/rpc/dssync.c | 21 +++-
source4/torture/drs/rpc/msds_intid.c | 21 +++-
source4/torture/rpc/dsgetinfo.c | 21 +++-
16 files changed, 473 insertions(+), 45 deletions(-)
Changeset truncated at 500 lines:
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index c8220c2..6f0e11b 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -109,6 +109,7 @@ def SAMBA_LIBRARY(bld, libname, source,
ldflags='',
external_library=False,
realname=None,
+ keep_underscore=False,
autoproto=None,
autoproto_extra_source='',
group='main',
@@ -209,7 +210,10 @@ def SAMBA_LIBRARY(bld, libname, source,
libname)
if target_type == 'PYTHON' or realname or not private_library:
- bundled_name = libname.replace('_', '-')
+ if keep_underscore:
+ bundled_name = libname
+ else:
+ bundled_name = libname.replace('_', '-')
else:
bundled_name = PRIVATE_NAME(bld, libname, bundled_extension,
private_library)
diff --git a/librpc/idl/drsuapi.idl b/librpc/idl/drsuapi.idl
index ed85205..b78a865 100644
--- a/librpc/idl/drsuapi.idl
+++ b/librpc/idl/drsuapi.idl
@@ -115,22 +115,30 @@ interface drsuapi
} drsuapi_SupportedExtensionsExt;
/* this is used by w2k */
- typedef struct {
+ typedef [public] struct {
drsuapi_SupportedExtensions supported_extensions;
GUID site_guid;
uint32 pid;
} drsuapi_DsBindInfo24;
/* this is used by w2k3 */
- typedef struct {
+ typedef [public] struct {
drsuapi_SupportedExtensions supported_extensions;
GUID site_guid;
uint32 pid;
uint32 repl_epoch;
} drsuapi_DsBindInfo28;
+ typedef [public] struct {
+ drsuapi_SupportedExtensions supported_extensions;
+ GUID site_guid;
+ uint32 pid;
+ uint32 repl_epoch;
+ drsuapi_SupportedExtensionsExt supported_extensions_ext;
+ } drsuapi_DsBindInfo32;
+
/* this is used by w2k8 */
- typedef struct {
+ typedef [public] struct {
drsuapi_SupportedExtensions supported_extensions;
GUID site_guid;
uint32 pid;
@@ -139,15 +147,34 @@ interface drsuapi
GUID config_dn_guid;
} drsuapi_DsBindInfo48;
- typedef struct {
+ /* this is used by w2k12 R2 [MS-DRSR] Section 5.39 */
+ typedef [public] struct {
+ drsuapi_SupportedExtensions supported_extensions;
+ GUID site_guid;
+ uint32 pid;
+ uint32 repl_epoch;
+ drsuapi_SupportedExtensionsExt supported_extensions_ext;
+ GUID config_dn_guid;
+ drsuapi_SupportedExtensionsExt supported_capabilities_ext;
+ } drsuapi_DsBindInfo52;
+
+ typedef [public] struct {
[flag(NDR_REMAINING)] DATA_BLOB info;
} drsuapi_DsBindInfoFallBack;
- typedef [nodiscriminant] union {
- [case(24)][subcontext(4)] drsuapi_DsBindInfo24 info24;
- [case(28)][subcontext(4)] drsuapi_DsBindInfo28 info28;
- [case(48)][subcontext(4)] drsuapi_DsBindInfo48 info48;
- [default][subcontext(4)] drsuapi_DsBindInfoFallBack FallBack;
+ typedef [nopull, nopush, noprint] [nodiscriminant] union {
+ [case(24)][subcontext(0), subcontext_size(24)] drsuapi_DsBindInfo24 info24;
+ [case(28)][subcontext(0), subcontext_size(28)] drsuapi_DsBindInfo28 info28;
+ [case(32)][subcontext(0), subcontext_size(32)] drsuapi_DsBindInfo32 info32;
+ [case(48)][subcontext(0), subcontext_size(48)] drsuapi_DsBindInfo48 info48;
+ [case(52)][subcontext(0), subcontext_size(52)] drsuapi_DsBindInfo52 info52;
+ /*
+ * The size for the defaut case is a bit arbitrary it in fact the value
+ * of the switch but we can't reference it.
+ * As we hand(un-)marshall this structure it has 0 impact and makes
+ * pidl happy for wireshark too
+ */
+ [default][subcontext(0), subcontext_size(48)] drsuapi_DsBindInfoFallBack Fallback;
} drsuapi_DsBindInfo;
/* the drsuapi_DsBindInfoCtr was this before
@@ -160,11 +187,44 @@ interface drsuapi
* so we're doing it here
*/
+ /*
+ * MS-DRSR.pdf gives the following definition
+ typedef struct {
+ [range(1,10000)] DWORD cb;
+ [size_is(cb)] BYTE rgb[];
+ } DRS_EXTENSIONS;
+
+ But we use a subcontext which has a slighly different signification on how
+ data are laid out.
+ With the MS-DRSR definition we will have
+ size_is_cb cv rgb_array
+ with size_is_cb being a uint3264 and cv being a uint32
+
+ We used to have
typedef struct {
[range(1,10000)] uint32 length;
[switch_is(length)] drsuapi_DsBindInfo info;
} drsuapi_DsBindInfoCtr;
+ typedef [nodiscriminant] union {
+ [case(24)][subcontext(4)] drsuapi_DsBindInfo24 info24;
+ [case(28)][subcontext(4)] drsuapi_DsBindInfo28 info28;
+ [case(48)][subcontext(4)] drsuapi_DsBindInfo48 info48;
+ [default][subcontext(4)] drsuapi_DsBindInfoFallBack FallBack;
+ } drsuapi_DsBindInfo;
+
+ With this definition data is laid out this way:
+ length subcontext_size drsuapi_DsBindInfoxx
+ with length being a uint32 and subcontext_size being a uint3264
+
+ It has clearly an impact on the way things are aligned when using NDR64
+ */
+ typedef [flag(NDR_NOALIGN)] struct {
+ [range(1,10000)] uint3264 length;
+ [value(length)] uint32 __ndr_length;
+ [switch_is(length)] drsuapi_DsBindInfo info;
+ } drsuapi_DsBindInfoCtr;
+
/* this is a magic guid you need to pass to DsBind to make drsuapi_DsWriteAccountSpn() work
*
* maybe the bind_guid could also be the invocation_id see drsuapi_DsReplicaConnection04
@@ -546,7 +606,7 @@ interface drsuapi
/* Generic DATA_BLOB values */
typedef struct {
- [range(0,10485760),value(ndr_size_DATA_BLOB(0,blob,0))] uint32 __ndr_size;
+ [range(0,26214400),value(ndr_size_DATA_BLOB(0,blob,0))] uint32 __ndr_size;
DATA_BLOB *blob;
} drsuapi_DsAttributeValue;
@@ -1107,12 +1167,19 @@ interface drsuapi
/*****************/
/* Function 0x10 */
+ typedef [v1_enum] enum {
+ DRSUAPI_DC_INFO_CTR_1 = 1,
+ DRSUAPI_DC_INFO_CTR_2 = 2,
+ DRSUAPI_DC_INFO_CTR_3 = 3,
+ DRSUAPI_DC_CONNECTION_CTR_01 = 0xFFFFFFFF
+ } drsuapi_DsGetDCInfoCtrLevels;
+
typedef struct {
[charset(UTF16),string] uint16 *domain_name; /* netbios or dns */
- int32 level; /* specifies the switch level for the request */
+ drsuapi_DsGetDCInfoCtrLevels level; /* specifies the switch level for the request */
} drsuapi_DsGetDCInfoRequest1;
- typedef [switch_type(int32)] union {
+ typedef [switch_type(uint32)] union {
[case(1)] drsuapi_DsGetDCInfoRequest1 req1;
} drsuapi_DsGetDCInfoRequest;
@@ -1204,14 +1271,7 @@ interface drsuapi
[size_is(count)] drsuapi_DsGetDCConnection01 *array;
} drsuapi_DsGetDCConnectionCtr01;
- typedef [v1_enum] enum {
- DRSUAPI_DC_INFO_CTR_1 = 1,
- DRSUAPI_DC_INFO_CTR_2 = 2,
- DRSUAPI_DC_INFO_CTR_3 = 3,
- DRSUAPI_DC_CONNECTION_CTR_01 = -1
- } drsuapi_DsGetDCInfoCtrLevels;
-
- typedef [switch_type(int32)] union {
+ typedef [switch_type(drsuapi_DsGetDCInfoCtrLevels)] union {
[case(DRSUAPI_DC_INFO_CTR_1)] drsuapi_DsGetDCInfoCtr1 ctr1;
[case(DRSUAPI_DC_INFO_CTR_2)] drsuapi_DsGetDCInfoCtr2 ctr2;
[case(DRSUAPI_DC_INFO_CTR_3)] drsuapi_DsGetDCInfoCtr3 ctr3;
@@ -1220,9 +1280,9 @@ interface drsuapi
WERROR drsuapi_DsGetDomainControllerInfo(
[in] policy_handle *bind_handle,
- [in] int32 level,
+ [in] uint32 level,
[in,ref,switch_is(level)] drsuapi_DsGetDCInfoRequest *req,
- [out,ref] int32 *level_out,
+ [out,ref] drsuapi_DsGetDCInfoCtrLevels *level_out,
[out,ref,switch_is(*level_out)] drsuapi_DsGetDCInfoCtr *ctr
);
diff --git a/librpc/ndr/ndr_drsuapi.c b/librpc/ndr/ndr_drsuapi.c
index f7125e6..45d3ac09 100644
--- a/librpc/ndr/ndr_drsuapi.c
+++ b/librpc/ndr/ndr_drsuapi.c
@@ -4,6 +4,7 @@
routines for printing some linked list structs in DRSUAPI
Copyright (C) Stefan (metze) Metzmacher 2005
+ Copyright (C) Matthieu Patou 2013
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -406,3 +407,192 @@ _PUBLIC_ void ndr_print_drsuapi_DsAddEntry_AttrErrListItem_V1(struct ndr_print *
ndr_print_drsuapi_DsAddEntry_AttrErrListItem_V1(ndr, "next", r->next);
}
}
+
+enum ndr_err_code ndr_push_drsuapi_DsBindInfo(struct ndr_push *ndr, int ndr_flags, const union drsuapi_DsBindInfo *r)
+{
+ uint32_t _flags_save = ndr->flags;
+ ndr->flags = ndr->flags & ~LIBNDR_FLAG_NDR64;
+ NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
+ if (ndr_flags & NDR_SCALARS) {
+ uint32_t level = ndr_push_get_switch_value(ndr, r);
+ NDR_CHECK(ndr_push_union_align(ndr, 4));
+ switch (level) {
+ case 24: {
+ {
+ struct ndr_push *_ndr_info24;
+ NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_info24, 0, 24));
+ NDR_CHECK(ndr_push_drsuapi_DsBindInfo24(_ndr_info24, NDR_SCALARS, &r->info24));
+ NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info24, 0, 24));
+ }
+ break; }
+
+ case 28: {
+ {
+ struct ndr_push *_ndr_info28;
+ NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_info28, 0, 28));
+ NDR_CHECK(ndr_push_drsuapi_DsBindInfo28(_ndr_info28, NDR_SCALARS, &r->info28));
+ NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info28, 0, 28));
+ }
+ break; }
+
+ case 48: {
+ {
+ struct ndr_push *_ndr_info48;
+ NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_info48, 0, 48));
+ NDR_CHECK(ndr_push_drsuapi_DsBindInfo48(_ndr_info48, NDR_SCALARS, &r->info48));
+ NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info48, 0, 48));
+ }
+ break; }
+
+ case 52: {
+ {
+ struct ndr_push *_ndr_info52;
+ NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_info52, 0, 52));
+ NDR_CHECK(ndr_push_drsuapi_DsBindInfo52(_ndr_info52, NDR_SCALARS, &r->info52));
+ NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info52, 0, 52));
+ }
+ break; }
+
+ default: {
+ {
+ struct ndr_push *_ndr_Fallback;
+ NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_Fallback, 0, level));
+ NDR_CHECK(ndr_push_drsuapi_DsBindInfoFallBack(_ndr_Fallback, NDR_SCALARS, &r->Fallback));
+ NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_Fallback, 0, level));
+ }
+ break; }
+
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ uint32_t level = ndr_push_get_switch_value(ndr, r);
+ switch (level) {
+ case 24:
+ break;
+
+ case 28:
+ break;
+
+ case 48:
+ break;
+
+ case 52:
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ ndr->flags = _flags_save;
+ return NDR_ERR_SUCCESS;
+}
+
+enum ndr_err_code ndr_pull_drsuapi_DsBindInfo(struct ndr_pull *ndr, int ndr_flags, union drsuapi_DsBindInfo *r)
+{
+ uint32_t level;
+ uint32_t _flags_save = ndr->flags;
+ ndr->flags = ndr->flags & ~LIBNDR_FLAG_NDR64;
+ level = ndr_pull_get_switch_value(ndr, r);
+ NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_union_align(ndr, 4));
+ switch (level) {
+ case 24: {
+ {
+ struct ndr_pull *_ndr_info24;
+ NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_info24, 0, 24));
+ NDR_CHECK(ndr_pull_drsuapi_DsBindInfo24(_ndr_info24, NDR_SCALARS, &r->info24));
+ NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_info24, 0, 24));
+ }
+ break; }
+
+ case 28: {
+ {
+ struct ndr_pull *_ndr_info28;
+ NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_info28, 0, 28));
+ NDR_CHECK(ndr_pull_drsuapi_DsBindInfo28(_ndr_info28, NDR_SCALARS, &r->info28));
+ NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_info28, 0, 28));
+ }
+ break; }
+
+ case 48: {
+ {
+ struct ndr_pull *_ndr_info48;
+ NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_info48, 0, 48));
+ NDR_CHECK(ndr_pull_drsuapi_DsBindInfo48(_ndr_info48, NDR_SCALARS, &r->info48));
+ NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_info48, 0, 48));
+ }
+ break; }
+
+ case 52: {
+ {
+ struct ndr_pull *_ndr_info52;
+ NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_info52, 0, 52));
+ NDR_CHECK(ndr_pull_drsuapi_DsBindInfo52(_ndr_info52, NDR_SCALARS, &r->info52));
+ NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_info52, 0, 52));
+ }
+ break; }
+
+ default: {
+ {
+ struct ndr_pull *_ndr_Fallback;
+ NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_Fallback, 0, level));
+ NDR_CHECK(ndr_pull_drsuapi_DsBindInfoFallBack(_ndr_Fallback, NDR_SCALARS, &r->Fallback));
+ NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_Fallback, 0, level));
+ }
+ break; }
+
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 24:
+ break;
+
+ case 28:
+ break;
+
+ case 48:
+ break;
+
+ case 52:
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ ndr->flags = _flags_save;
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_drsuapi_DsBindInfo(struct ndr_print *ndr, const char *name, const union drsuapi_DsBindInfo *r)
+{
+ uint32_t level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "drsuapi_DsBindInfo");
+ switch (level) {
+ case 24:
+ ndr_print_drsuapi_DsBindInfo24(ndr, "info24", &r->info24);
+ break;
+
+ case 28:
+ ndr_print_drsuapi_DsBindInfo28(ndr, "info28", &r->info28);
+ break;
+
+ case 48:
+ ndr_print_drsuapi_DsBindInfo48(ndr, "info48", &r->info48);
+ break;
+
+ case 52:
+ ndr_print_drsuapi_DsBindInfo52(ndr, "info52", &r->info52);
+ break;
+
+ default:
+ ndr_print_drsuapi_DsBindInfoFallBack(ndr, "Fallback", &r->Fallback);
+ break;
+
+ }
+}
diff --git a/nsswitch/wscript_build b/nsswitch/wscript_build
index 55ba776..0e33730 100644
--- a/nsswitch/wscript_build
+++ b/nsswitch/wscript_build
@@ -30,12 +30,24 @@ bld.SAMBA_LIBRARY('nss_wrapper_winbind',
# the search for .rfind('gnu') covers gnu* and *-gnu is that too broad?
if (Utils.unversioned_sys_platform() == 'linux' or (host_os.rfind('gnu') > -1)):
- bld.SAMBA_LIBRARY('nss_winbind',
- source='winbind_nss_linux.c',
- deps='winbind-client',
- realname='libnss_winbind.so.2',
- soname='libnss_winbind.so',
- vnum='2')
+ bld.SAMBA_LIBRARY('nss_winbind',
+ keep_underscore=True,
+ source='winbind_nss_linux.c',
+ deps='winbind-client',
+ public_headers=[],
+ public_headers_install=False,
+ pc_files=[],
+ vnum='2')
+
+ # for nss_wins is linux only
+ bld.SAMBA3_LIBRARY('nss_wins',
+ keep_underscore=True,
+ source='wins.c',
+ deps='''param libsmb LIBTSOCKET''',
+ public_headers=[],
+ public_headers_install=False,
+ pc_files=[],
+ vnum='2')
elif (host_os.rfind('freebsd') > -1):
# FreeBSD winbind client is implemented as a wrapper around
# the Linux version.
diff --git a/selftest/target/Samba.pm b/selftest/target/Samba.pm
index b0817fd..217511a 100644
--- a/selftest/target/Samba.pm
+++ b/selftest/target/Samba.pm
@@ -68,7 +68,7 @@ sub nss_wrapper_winbind_so_path($) {
my ($object) = @_;
my $ret = $ENV{NSS_WRAPPER_WINBIND_SO_PATH};
if (not defined($ret)) {
- $ret = bindir_path($object, "default/nsswitch/libnss-winbind.so");
+ $ret = bindir_path($object, "shared/libnss_wrapper_winbind.so.2");
}
return $ret;
}
diff --git a/source3/libnet/libnet_dssync.c b/source3/libnet/libnet_dssync.c
index a843106..94f0628 100644
--- a/source3/libnet/libnet_dssync.c
+++ b/source3/libnet/libnet_dssync.c
@@ -195,9 +195,19 @@ static NTSTATUS libnet_dssync_bind(TALLOC_CTX *mem_ctx,
ctx->remote_info28.repl_epoch = 0;
break;
}
- case 28:
+ case 28: {
ctx->remote_info28 = bind_info.info.info28;
break;
+ }
+ case 32: {
+ struct drsuapi_DsBindInfo32 *info32;
+ info32 = &bind_info.info.info32;
+ ctx->remote_info28.site_guid = info32->site_guid;
+ ctx->remote_info28.supported_extensions = info32->supported_extensions;
+ ctx->remote_info28.pid = info32->pid;
+ ctx->remote_info28.repl_epoch = info32->repl_epoch;
+ break;
+ }
case 48: {
struct drsuapi_DsBindInfo48 *info48;
info48 = &bind_info.info.info48;
@@ -207,6 +217,15 @@ static NTSTATUS libnet_dssync_bind(TALLOC_CTX *mem_ctx,
ctx->remote_info28.repl_epoch = info48->repl_epoch;
break;
}
+ case 52: {
+ struct drsuapi_DsBindInfo52 *info52;
+ info52 = &bind_info.info.info52;
+ ctx->remote_info28.site_guid = info52->site_guid;
+ ctx->remote_info28.supported_extensions = info52->supported_extensions;
+ ctx->remote_info28.pid = info52->pid;
+ ctx->remote_info28.repl_epoch = info52->repl_epoch;
+ break;
+ }
default:
DEBUG(1, ("Warning: invalid info length in bind info: %d\n",
--
Samba Shared Repository
More information about the samba-cvs
mailing list