librpc: remove nbt dependency to samr.
authorGünther Deschner <gd@samba.org>
Wed, 2 Nov 2011 19:07:42 +0000 (20:07 +0100)
committerGünther Deschner <gd@samba.org>
Thu, 3 Nov 2011 17:35:08 +0000 (18:35 +0100)
Guenther

libcli/netlogon/ndr_netlogon.c
libcli/netlogon/netlogon.h
librpc/idl/misc.idl
librpc/idl/nbt.idl
librpc/idl/samr.idl
source3/libsmb/clidgram.c

index 7d6aa974b0c71a96dfcae1bccb33b2167fd4a1da..cab159f3a3cf2fa53558393a900c28435d54c021 100644 (file)
@@ -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;
index 9bf346af26dce35ae06e0532f429a40f67f156e9..30f716cceb704cc70586f2d26b539184337e5efa 100644 (file)
@@ -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
 {
index d37e515a3146389d8afda5fba57038743e1119c2..4d6fe3019a6210022d7ec1a8f2909a5c6ab005f8 100644 (file)
@@ -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;
 }
index 5d8dfd70888b691d7f8afd621744d088469d1c80..eb2e8117edb5809eb89072b25c37ac47c91cac1b 100644 (file)
@@ -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;
index cafffc2ca1291a611ecec124b5071312a6ae372b..4113a5432d76e53dc272ae66cd63fd908cf877c7 100644 (file)
@@ -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 */
index 90f06fd53593b84677de0cbf9eee195666246c1a..04964bd3f0e4a6f2b40c713f4a99f5f1d66a6e30 100644 (file)
@@ -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 ...