From 2ecd50116c22536f9a77131bc14a64915a2fc12e Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Wed, 2 Nov 2011 20:07:42 +0100 Subject: [PATCH] librpc: remove nbt dependency to samr. Guenther --- libcli/netlogon/ndr_netlogon.c | 4 ++-- libcli/netlogon/netlogon.h | 1 - librpc/idl/misc.idl | 7 +++++++ librpc/idl/nbt.idl | 9 +++------ librpc/idl/samr.idl | 7 ------- source3/libsmb/clidgram.c | 1 + 6 files changed, 13 insertions(+), 16 deletions(-) diff --git a/libcli/netlogon/ndr_netlogon.c b/libcli/netlogon/ndr_netlogon.c index 7d6aa974b0c..cab159f3a3c 100644 --- a/libcli/netlogon/ndr_netlogon.c +++ b/libcli/netlogon/ndr_netlogon.c @@ -48,7 +48,7 @@ enum ndr_err_code ndr_push_NETLOGON_SAM_LOGON_REQUEST(struct ndr_push *ndr, int NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->mailslot_name)); ndr->flags = _flags_save_string; } - NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_control)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->acct_control)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_dom_sid0(&r->sid, ndr->flags))); if (ndr_size_dom_sid0(&r->sid, ndr->flags)) { struct ndr_push *_ndr_sid; @@ -93,7 +93,7 @@ enum ndr_err_code ndr_pull_NETLOGON_SAM_LOGON_REQUEST(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->mailslot_name)); ndr->flags = _flags_save_string; } - NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_control)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->acct_control)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_size)); if (r->sid_size) { uint32_t _flags_save_DATA_BLOB = ndr->flags; diff --git a/libcli/netlogon/netlogon.h b/libcli/netlogon/netlogon.h index 9bf346af26d..30f716cceb7 100644 --- a/libcli/netlogon/netlogon.h +++ b/libcli/netlogon/netlogon.h @@ -27,7 +27,6 @@ #include "librpc/gen_ndr/ndr_misc.h" #include "librpc/gen_ndr/ndr_security.h" #include "librpc/gen_ndr/ndr_svcctl.h" -#include "librpc/gen_ndr/ndr_samr.h" struct netlogon_samlogon_response { diff --git a/librpc/idl/misc.idl b/librpc/idl/misc.idl index d37e515a314..4d6fe3019a6 100644 --- a/librpc/idl/misc.idl +++ b/librpc/idl/misc.idl @@ -77,4 +77,11 @@ interface misc [case(REG_MULTI_SZ)] nstring_array string_array; [default,flag(NDR_REMAINING)] DATA_BLOB data; } winreg_Data; + + /* SAM database types */ + typedef [public,v1_enum] enum { + SAM_DATABASE_DOMAIN = 0, /* Domain users and groups */ + SAM_DATABASE_BUILTIN = 1, /* BUILTIN users and groups */ + SAM_DATABASE_PRIVS = 2 /* Privileges */ + } netr_SamDatabaseID; } diff --git a/librpc/idl/nbt.idl b/librpc/idl/nbt.idl index 5d8dfd70888..eb2e8117edb 100644 --- a/librpc/idl/nbt.idl +++ b/librpc/idl/nbt.idl @@ -8,7 +8,7 @@ encoding if it doesn't work out */ -import "misc.idl", "security.idl", "svcctl.idl", "samr.idl"; +import "misc.idl", "security.idl", "svcctl.idl"; [ helper("../libcli/netlogon/netlogon.h", "../libcli/nbt/libnbt.h"), helpstring("NBT messages"), @@ -393,8 +393,6 @@ interface nbt LOGON_SAM_LOGON_USER_UNKNOWN_EX = 25 /* was NETLOGON_RESPONSE_FROM_PDC_USER */ } netlogon_command; - typedef bitmap samr_AcctFlags samr_AcctFlags; - /* query to dc hand marshaled, as it has 'optional' * parts */ typedef [nopull,nopush] struct { @@ -402,7 +400,8 @@ interface nbt nstring computer_name; nstring user_name; astring mailslot_name; - samr_AcctFlags acct_control; + uint32 acct_control; + /* samr_AcctFlags acct_control; */ [value(ndr_size_dom_sid0(&sid, ndr->flags))] uint32 sid_size; /* The manual alignment is required because this * structure is marked flag(NDR_NOALIGN) via the @@ -511,8 +510,6 @@ interface nbt uint16 lm20_token; } nbt_netlogon_response2; - typedef enum netr_SamDatabaseID netr_SamDatabaseID; - /* used to announce SAM changes - MS-NRPC 2.2.1.5.1 */ typedef struct { netr_SamDatabaseID db_index; diff --git a/librpc/idl/samr.idl b/librpc/idl/samr.idl index cafffc2ca12..4113a5432d7 100644 --- a/librpc/idl/samr.idl +++ b/librpc/idl/samr.idl @@ -17,13 +17,6 @@ import "misc.idl", "lsa.idl", "security.idl"; { typedef bitmap security_secinfo security_secinfo; - /* SAM database types */ - typedef [public,v1_enum] enum { - SAM_DATABASE_DOMAIN = 0, /* Domain users and groups */ - SAM_DATABASE_BUILTIN = 1, /* BUILTIN users and groups */ - SAM_DATABASE_PRIVS = 2 /* Privileges */ - } netr_SamDatabaseID; - /* account control (acct_flags) bits */ typedef [public,bitmap32bit] bitmap { ACB_DISABLED = 0x00000001, /* 1 = User account disabled */ diff --git a/source3/libsmb/clidgram.c b/source3/libsmb/clidgram.c index 90f06fd5359..04964bd3f0e 100644 --- a/source3/libsmb/clidgram.c +++ b/source3/libsmb/clidgram.c @@ -25,6 +25,7 @@ #include "libsmb/clidgram.h" #include "libsmb/nmblib.h" #include "messages.h" +#include "librpc/gen_ndr/samr.h" /* * cli_send_mailslot, send a mailslot for client code ... -- 2.11.4.GIT