diff options
Diffstat (limited to 'librpc')
-rw-r--r-- | librpc/gen_ndr/cli_lsa.c | 17 | ||||
-rw-r--r-- | librpc/gen_ndr/cli_lsa.h | 10 | ||||
-rw-r--r-- | librpc/gen_ndr/cli_spoolss.c | 9 | ||||
-rw-r--r-- | librpc/gen_ndr/cli_spoolss.h | 4 | ||||
-rw-r--r-- | librpc/gen_ndr/lsa.h | 19 | ||||
-rw-r--r-- | librpc/gen_ndr/ndr_lsa.c | 175 | ||||
-rw-r--r-- | librpc/gen_ndr/ndr_samr.c | 2 | ||||
-rw-r--r-- | librpc/gen_ndr/ndr_spoolss.c | 116 | ||||
-rw-r--r-- | librpc/gen_ndr/samr.h | 6 | ||||
-rw-r--r-- | librpc/gen_ndr/spoolss.h | 22 | ||||
-rw-r--r-- | librpc/gen_ndr/srv_lsa.c | 4 | ||||
-rw-r--r-- | librpc/gen_ndr/srv_spoolss.c | 17 | ||||
-rw-r--r-- | librpc/idl/frsapi.idl | 23 | ||||
-rw-r--r-- | librpc/idl/frsrpc.idl | 425 | ||||
-rw-r--r-- | librpc/idl/frstrans.idl | 83 | ||||
-rw-r--r-- | librpc/idl/lsa.idl | 18 | ||||
-rw-r--r-- | librpc/idl/samr.idl | 4 | ||||
-rw-r--r-- | librpc/idl/spoolss.idl | 19 | ||||
-rw-r--r-- | librpc/ndr/ndr_frsrpc.c | 94 | ||||
-rw-r--r-- | librpc/ndr/ndr_frsrpc.h | 35 | ||||
-rw-r--r-- | librpc/ndr_standard.pc.in | 11 |
21 files changed, 976 insertions, 137 deletions
diff --git a/librpc/gen_ndr/cli_lsa.c b/librpc/gen_ndr/cli_lsa.c index 93362537b4..04cf38aaf3 100644 --- a/librpc/gen_ndr/cli_lsa.c +++ b/librpc/gen_ndr/cli_lsa.c @@ -1796,12 +1796,18 @@ NTSTATUS rpccli_lsa_DeleteTrustedDomain(struct rpc_pipe_client *cli, } NTSTATUS rpccli_lsa_StorePrivateData(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + struct policy_handle *handle /* [in] [ref] */, + struct lsa_String *name /* [in] [ref] */, + struct lsa_DATA_BUF *val /* [in] [unique] */) { struct lsa_StorePrivateData r; NTSTATUS status; /* In parameters */ + r.in.handle = handle; + r.in.name = name; + r.in.val = val; if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(lsa_StorePrivateData, &r); @@ -1832,12 +1838,18 @@ NTSTATUS rpccli_lsa_StorePrivateData(struct rpc_pipe_client *cli, } NTSTATUS rpccli_lsa_RetrievePrivateData(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + struct policy_handle *handle /* [in] [ref] */, + struct lsa_String *name /* [in] [ref] */, + struct lsa_DATA_BUF **val /* [in,out] [ref] */) { struct lsa_RetrievePrivateData r; NTSTATUS status; /* In parameters */ + r.in.handle = handle; + r.in.name = name; + r.in.val = val; if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(lsa_RetrievePrivateData, &r); @@ -1862,6 +1874,7 @@ NTSTATUS rpccli_lsa_RetrievePrivateData(struct rpc_pipe_client *cli, } /* Return variables */ + *val = *r.out.val; /* Return result */ return r.out.result; diff --git a/librpc/gen_ndr/cli_lsa.h b/librpc/gen_ndr/cli_lsa.h index 8dbd7330b4..10c408528f 100644 --- a/librpc/gen_ndr/cli_lsa.h +++ b/librpc/gen_ndr/cli_lsa.h @@ -214,9 +214,15 @@ NTSTATUS rpccli_lsa_DeleteTrustedDomain(struct rpc_pipe_client *cli, struct policy_handle *handle /* [in] [ref] */, struct dom_sid2 *dom_sid /* [in] [ref] */); NTSTATUS rpccli_lsa_StorePrivateData(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + struct policy_handle *handle /* [in] [ref] */, + struct lsa_String *name /* [in] [ref] */, + struct lsa_DATA_BUF *val /* [in] [unique] */); NTSTATUS rpccli_lsa_RetrievePrivateData(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + struct policy_handle *handle /* [in] [ref] */, + struct lsa_String *name /* [in] [ref] */, + struct lsa_DATA_BUF **val /* [in,out] [ref] */); NTSTATUS rpccli_lsa_OpenPolicy2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *system_name /* [in] [unique,charset(UTF16)] */, diff --git a/librpc/gen_ndr/cli_spoolss.c b/librpc/gen_ndr/cli_spoolss.c index 66083e6856..38031b615d 100644 --- a/librpc/gen_ndr/cli_spoolss.c +++ b/librpc/gen_ndr/cli_spoolss.c @@ -2006,12 +2006,17 @@ NTSTATUS rpccli_spoolss_DeletePort(struct rpc_pipe_client *cli, NTSTATUS rpccli_spoolss_CreatePrinterIC(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + struct policy_handle *handle /* [in] [ref] */, + struct policy_handle *gdi_handle /* [out] [ref] */, + struct spoolss_DevmodeContainer *devmode_ctr /* [in] [ref] */, WERROR *werror) { struct spoolss_CreatePrinterIC r; NTSTATUS status; /* In parameters */ + r.in.handle = handle; + r.in.devmode_ctr = devmode_ctr; if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(spoolss_CreatePrinterIC, &r); @@ -2036,6 +2041,7 @@ NTSTATUS rpccli_spoolss_CreatePrinterIC(struct rpc_pipe_client *cli, } /* Return variables */ + *gdi_handle = *r.out.gdi_handle; /* Return result */ if (werror) { @@ -2088,12 +2094,14 @@ NTSTATUS rpccli_spoolss_PlayGDIScriptOnPrinterIC(struct rpc_pipe_client *cli, NTSTATUS rpccli_spoolss_DeletePrinterIC(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + struct policy_handle *gdi_handle /* [in,out] [ref] */, WERROR *werror) { struct spoolss_DeletePrinterIC r; NTSTATUS status; /* In parameters */ + r.in.gdi_handle = gdi_handle; if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterIC, &r); @@ -2118,6 +2126,7 @@ NTSTATUS rpccli_spoolss_DeletePrinterIC(struct rpc_pipe_client *cli, } /* Return variables */ + *gdi_handle = *r.out.gdi_handle; /* Return result */ if (werror) { diff --git a/librpc/gen_ndr/cli_spoolss.h b/librpc/gen_ndr/cli_spoolss.h index baf5d61e2a..b171c69fbd 100644 --- a/librpc/gen_ndr/cli_spoolss.h +++ b/librpc/gen_ndr/cli_spoolss.h @@ -294,12 +294,16 @@ NTSTATUS rpccli_spoolss_DeletePort(struct rpc_pipe_client *cli, WERROR *werror); NTSTATUS rpccli_spoolss_CreatePrinterIC(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + struct policy_handle *handle /* [in] [ref] */, + struct policy_handle *gdi_handle /* [out] [ref] */, + struct spoolss_DevmodeContainer *devmode_ctr /* [in] [ref] */, WERROR *werror); NTSTATUS rpccli_spoolss_PlayGDIScriptOnPrinterIC(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); NTSTATUS rpccli_spoolss_DeletePrinterIC(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + struct policy_handle *gdi_handle /* [in,out] [ref] */, WERROR *werror); NTSTATUS rpccli_spoolss_AddPrinterConnection(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, diff --git a/librpc/gen_ndr/lsa.h b/librpc/gen_ndr/lsa.h index 3c9a5d80a6..9ee5fab4c8 100644 --- a/librpc/gen_ndr/lsa.h +++ b/librpc/gen_ndr/lsa.h @@ -445,7 +445,7 @@ enum lsa_TrustDomInfoEnum LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL=10, LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL=11, LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL=12, - LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES=13 + LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES=13 } #else { __donnot_use_enum_lsa_TrustDomInfoEnum=0x7FFFFFFF} @@ -461,7 +461,7 @@ enum lsa_TrustDomInfoEnum #define LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL ( 10 ) #define LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL ( 11 ) #define LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL ( 12 ) -#define LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES ( 13 ) +#define LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES ( 13 ) #endif ; @@ -603,7 +603,7 @@ union lsa_TrustedDomainInfo { struct lsa_TrustDomainInfoFullInfoInternal full_info_internal;/* [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL)] */ struct lsa_TrustDomainInfoInfoEx2Internal info_ex2_internal;/* [case(LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL)] */ struct lsa_TrustDomainInfoFullInfo2Internal full_info2_internal;/* [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL)] */ - struct lsa_TrustDomainInfoSupportedEncTypes enc_types;/* [case(LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES)] */ + struct lsa_TrustDomainInfoSupportedEncTypes enc_types;/* [case(LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES)] */ }/* [switch_type(lsa_TrustDomInfoEnum)] */; struct lsa_DATA_BUF_PTR { @@ -1333,6 +1333,12 @@ struct lsa_DeleteTrustedDomain { struct lsa_StorePrivateData { struct { + struct policy_handle *handle;/* [ref] */ + struct lsa_String *name;/* [ref] */ + struct lsa_DATA_BUF *val;/* [unique] */ + } in; + + struct { NTSTATUS result; } out; @@ -1341,6 +1347,13 @@ struct lsa_StorePrivateData { struct lsa_RetrievePrivateData { struct { + struct policy_handle *handle;/* [ref] */ + struct lsa_String *name;/* [ref] */ + struct lsa_DATA_BUF **val;/* [ref] */ + } in; + + struct { + struct lsa_DATA_BUF **val;/* [ref] */ NTSTATUS result; } out; diff --git a/librpc/gen_ndr/ndr_lsa.c b/librpc/gen_ndr/ndr_lsa.c index 3ad9c41fd7..b8ba679378 100644 --- a/librpc/gen_ndr/ndr_lsa.c +++ b/librpc/gen_ndr/ndr_lsa.c @@ -2735,7 +2735,7 @@ _PUBLIC_ void ndr_print_lsa_TrustDomInfoEnum(struct ndr_print *ndr, const char * case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL: val = "LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL"; break; case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL: val = "LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL"; break; case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL: val = "LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL"; break; - case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES: val = "LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES"; break; + case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES: val = "LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES"; break; } ndr_print_enum(ndr, name, "ENUM", val, r); } @@ -3662,7 +3662,7 @@ static enum ndr_err_code ndr_push_lsa_TrustedDomainInfo(struct ndr_push *ndr, in NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo2Internal(ndr, NDR_SCALARS, &r->full_info2_internal)); break; } - case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES: { + case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES: { NDR_CHECK(ndr_push_lsa_TrustDomainInfoSupportedEncTypes(ndr, NDR_SCALARS, &r->enc_types)); break; } @@ -3720,7 +3720,7 @@ static enum ndr_err_code ndr_push_lsa_TrustedDomainInfo(struct ndr_push *ndr, in NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo2Internal(ndr, NDR_BUFFERS, &r->full_info2_internal)); break; - case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES: + case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES: break; default: @@ -3789,7 +3789,7 @@ static enum ndr_err_code ndr_pull_lsa_TrustedDomainInfo(struct ndr_pull *ndr, in NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo2Internal(ndr, NDR_SCALARS, &r->full_info2_internal)); break; } - case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES: { + case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES: { NDR_CHECK(ndr_pull_lsa_TrustDomainInfoSupportedEncTypes(ndr, NDR_SCALARS, &r->enc_types)); break; } @@ -3846,7 +3846,7 @@ static enum ndr_err_code ndr_pull_lsa_TrustedDomainInfo(struct ndr_pull *ndr, in NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo2Internal(ndr, NDR_BUFFERS, &r->full_info2_internal)); break; - case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES: + case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES: break; default: @@ -3910,7 +3910,7 @@ _PUBLIC_ void ndr_print_lsa_TrustedDomainInfo(struct ndr_print *ndr, const char ndr_print_lsa_TrustDomainInfoFullInfo2Internal(ndr, "full_info2_internal", &r->full_info2_internal); break; - case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES: + case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES: ndr_print_lsa_TrustDomainInfoSupportedEncTypes(ndr, "enc_types", &r->enc_types); break; @@ -9225,6 +9225,18 @@ _PUBLIC_ void ndr_print_lsa_DeleteTrustedDomain(struct ndr_print *ndr, const cha static enum ndr_err_code ndr_push_lsa_StorePrivateData(struct ndr_push *ndr, int flags, const struct lsa_StorePrivateData *r) { if (flags & NDR_IN) { + if (r->in.handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle)); + if (r->in.name == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.val)); + if (r->in.val) { + NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.val)); + } } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); @@ -9234,7 +9246,37 @@ static enum ndr_err_code ndr_push_lsa_StorePrivateData(struct ndr_push *ndr, int static enum ndr_err_code ndr_pull_lsa_StorePrivateData(struct ndr_pull *ndr, int flags, struct lsa_StorePrivateData *r) { + uint32_t _ptr_val; + TALLOC_CTX *_mem_save_handle_0; + TALLOC_CTX *_mem_save_name_0; + TALLOC_CTX *_mem_save_val_0; if (flags & NDR_IN) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.handle); + } + _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.name); + } + _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.name, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_val)); + if (_ptr_val) { + NDR_PULL_ALLOC(ndr, r->in.val); + } else { + r->in.val = NULL; + } + if (r->in.val) { + _mem_save_val_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.val, 0); + NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.val)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_val_0, 0); + } } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); @@ -9252,6 +9294,20 @@ _PUBLIC_ void ndr_print_lsa_StorePrivateData(struct ndr_print *ndr, const char * if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "lsa_StorePrivateData"); ndr->depth++; + ndr_print_ptr(ndr, "handle", r->in.handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "handle", r->in.handle); + ndr->depth--; + ndr_print_ptr(ndr, "name", r->in.name); + ndr->depth++; + ndr_print_lsa_String(ndr, "name", r->in.name); + ndr->depth--; + ndr_print_ptr(ndr, "val", r->in.val); + ndr->depth++; + if (r->in.val) { + ndr_print_lsa_DATA_BUF(ndr, "val", r->in.val); + } + ndr->depth--; ndr->depth--; } if (flags & NDR_OUT) { @@ -9266,8 +9322,30 @@ _PUBLIC_ void ndr_print_lsa_StorePrivateData(struct ndr_print *ndr, const char * static enum ndr_err_code ndr_push_lsa_RetrievePrivateData(struct ndr_push *ndr, int flags, const struct lsa_RetrievePrivateData *r) { if (flags & NDR_IN) { + if (r->in.handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle)); + if (r->in.name == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name)); + if (r->in.val == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.val)); + if (*r->in.val) { + NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.val)); + } } if (flags & NDR_OUT) { + if (r->out.val == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.val)); + if (*r->out.val) { + NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.val)); + } NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -9275,9 +9353,68 @@ static enum ndr_err_code ndr_push_lsa_RetrievePrivateData(struct ndr_push *ndr, static enum ndr_err_code ndr_pull_lsa_RetrievePrivateData(struct ndr_pull *ndr, int flags, struct lsa_RetrievePrivateData *r) { + uint32_t _ptr_val; + TALLOC_CTX *_mem_save_handle_0; + TALLOC_CTX *_mem_save_name_0; + TALLOC_CTX *_mem_save_val_0; + TALLOC_CTX *_mem_save_val_1; if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.handle); + } + _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.name); + } + _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.name, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.val); + } + _mem_save_val_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.val, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_val)); + if (_ptr_val) { + NDR_PULL_ALLOC(ndr, *r->in.val); + } else { + *r->in.val = NULL; + } + if (*r->in.val) { + _mem_save_val_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->in.val, 0); + NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.val)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_val_1, 0); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_val_0, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_ALLOC(ndr, r->out.val); + *r->out.val = *r->in.val; } if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.val); + } + _mem_save_val_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.val, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_val)); + if (_ptr_val) { + NDR_PULL_ALLOC(ndr, *r->out.val); + } else { + *r->out.val = NULL; + } + if (*r->out.val) { + _mem_save_val_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.val, 0); + NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.val)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_val_1, 0); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_val_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; @@ -9293,11 +9430,37 @@ _PUBLIC_ void ndr_print_lsa_RetrievePrivateData(struct ndr_print *ndr, const cha if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "lsa_RetrievePrivateData"); ndr->depth++; + ndr_print_ptr(ndr, "handle", r->in.handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "handle", r->in.handle); + ndr->depth--; + ndr_print_ptr(ndr, "name", r->in.name); + ndr->depth++; + ndr_print_lsa_String(ndr, "name", r->in.name); + ndr->depth--; + ndr_print_ptr(ndr, "val", r->in.val); + ndr->depth++; + ndr_print_ptr(ndr, "val", *r->in.val); + ndr->depth++; + if (*r->in.val) { + ndr_print_lsa_DATA_BUF(ndr, "val", *r->in.val); + } + ndr->depth--; + ndr->depth--; ndr->depth--; } if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "lsa_RetrievePrivateData"); ndr->depth++; + ndr_print_ptr(ndr, "val", r->out.val); + ndr->depth++; + ndr_print_ptr(ndr, "val", *r->out.val); + ndr->depth++; + if (*r->out.val) { + ndr_print_lsa_DATA_BUF(ndr, "val", *r->out.val); + } + ndr->depth--; + ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; } diff --git a/librpc/gen_ndr/ndr_samr.c b/librpc/gen_ndr/ndr_samr.c index 58b7ae2413..258aba9bb6 100644 --- a/librpc/gen_ndr/ndr_samr.c +++ b/librpc/gen_ndr/ndr_samr.c @@ -4831,12 +4831,14 @@ _PUBLIC_ void ndr_print_samr_ValidationStatus(struct ndr_print *ndr, const char case SAMR_VALIDATION_STATUS_SUCCESS: val = "SAMR_VALIDATION_STATUS_SUCCESS"; break; case SAMR_VALIDATION_STATUS_PASSWORD_MUST_CHANGE: val = "SAMR_VALIDATION_STATUS_PASSWORD_MUST_CHANGE"; break; case SAMR_VALIDATION_STATUS_ACCOUNT_LOCKED_OUT: val = "SAMR_VALIDATION_STATUS_ACCOUNT_LOCKED_OUT"; break; + case SAMR_VALIDATION_STATUS_PASSWORD_EXPIRED: val = "SAMR_VALIDATION_STATUS_PASSWORD_EXPIRED"; break; case SAMR_VALIDATION_STATUS_BAD_PASSWORD: val = "SAMR_VALIDATION_STATUS_BAD_PASSWORD"; break; case SAMR_VALIDATION_STATUS_PWD_HISTORY_CONFLICT: val = "SAMR_VALIDATION_STATUS_PWD_HISTORY_CONFLICT"; break; case SAMR_VALIDATION_STATUS_PWD_TOO_SHORT: val = "SAMR_VALIDATION_STATUS_PWD_TOO_SHORT"; break; case SAMR_VALIDATION_STATUS_PWD_TOO_LONG: val = "SAMR_VALIDATION_STATUS_PWD_TOO_LONG"; break; case SAMR_VALIDATION_STATUS_NOT_COMPLEX_ENOUGH: val = "SAMR_VALIDATION_STATUS_NOT_COMPLEX_ENOUGH"; break; case SAMR_VALIDATION_STATUS_PASSWORD_TOO_RECENT: val = "SAMR_VALIDATION_STATUS_PASSWORD_TOO_RECENT"; break; + case SAMR_VALIDATION_STATUS_PASSWORD_FILTER_ERROR: val = "SAMR_VALIDATION_STATUS_PASSWORD_FILTER_ERROR"; break; } ndr_print_enum(ndr, name, "ENUM", val, r); } diff --git a/librpc/gen_ndr/ndr_spoolss.c b/librpc/gen_ndr/ndr_spoolss.c index a1be2fd92c..fedebb2d56 100644 --- a/librpc/gen_ndr/ndr_spoolss.c +++ b/librpc/gen_ndr/ndr_spoolss.c @@ -14464,7 +14464,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_OSVersion(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->major)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minor)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->build)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->platform_id)); { uint32_t _flags_save_string = ndr->flags; ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); @@ -14490,7 +14490,7 @@ _PUBLIC_ void ndr_print_spoolss_OSVersion(struct ndr_print *ndr, const char *nam ndr_print_uint32(ndr, "major", r->major); ndr_print_uint32(ndr, "minor", r->minor); ndr_print_uint32(ndr, "build", r->build); - ndr_print_uint32(ndr, "unknown", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2:r->unknown); + ndr_print_uint32(ndr, "platform_id", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2:r->platform_id); ndr_print_string(ndr, "extra_string", r->extra_string); ndr->depth--; } @@ -14520,8 +14520,11 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_OSVersionEx(struct ndr_push *ndr, in } ndr->flags = _flags_save_string; } - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->service_pack_major)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->service_pack_minor)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->suite_mask)); + NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->product_type)); + NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->reserved)); } if (ndr_flags & NDR_BUFFERS) { } @@ -14536,7 +14539,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_OSVersionEx(struct ndr_pull *ndr, in NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->major)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minor)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->build)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->platform_id)); { uint32_t _flags_save_string = ndr->flags; ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); @@ -14548,8 +14551,11 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_OSVersionEx(struct ndr_pull *ndr, in } ndr->flags = _flags_save_string; } - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->service_pack_major)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->service_pack_minor)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->suite_mask)); + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->product_type)); + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->reserved)); } if (ndr_flags & NDR_BUFFERS) { } @@ -14564,10 +14570,13 @@ _PUBLIC_ void ndr_print_spoolss_OSVersionEx(struct ndr_print *ndr, const char *n ndr_print_uint32(ndr, "major", r->major); ndr_print_uint32(ndr, "minor", r->minor); ndr_print_uint32(ndr, "build", r->build); - ndr_print_uint32(ndr, "unknown1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2:r->unknown1); + ndr_print_uint32(ndr, "platform_id", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2:r->platform_id); ndr_print_string(ndr, "extra_string", r->extra_string); - ndr_print_uint32(ndr, "unknown2", r->unknown2); - ndr_print_uint32(ndr, "unknown3", r->unknown3); + ndr_print_uint16(ndr, "service_pack_major", r->service_pack_major); + ndr_print_uint16(ndr, "service_pack_minor", r->service_pack_minor); + ndr_print_uint16(ndr, "suite_mask", r->suite_mask); + ndr_print_uint8(ndr, "product_type", r->product_type); + ndr_print_uint8(ndr, "reserved", r->reserved); ndr->depth--; } @@ -23702,8 +23711,20 @@ _PUBLIC_ void ndr_print_spoolss_DeletePort(struct ndr_print *ndr, const char *na static enum ndr_err_code ndr_push_spoolss_CreatePrinterIC(struct ndr_push *ndr, int flags, const struct spoolss_CreatePrinterIC *r) { if (flags & NDR_IN) { + if (r->in.handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle)); + if (r->in.devmode_ctr == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.devmode_ctr)); } if (flags & NDR_OUT) { + if (r->out.gdi_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.gdi_handle)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -23711,9 +23732,37 @@ static enum ndr_err_code ndr_push_spoolss_CreatePrinterIC(struct ndr_push *ndr, static enum ndr_err_code ndr_pull_spoolss_CreatePrinterIC(struct ndr_pull *ndr, int flags, struct spoolss_CreatePrinterIC *r) { + TALLOC_CTX *_mem_save_handle_0; + TALLOC_CTX *_mem_save_gdi_handle_0; + TALLOC_CTX *_mem_save_devmode_ctr_0; if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.handle); + } + _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.devmode_ctr); + } + _mem_save_devmode_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.devmode_ctr, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.devmode_ctr)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devmode_ctr_0, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_ALLOC(ndr, r->out.gdi_handle); + ZERO_STRUCTP(r->out.gdi_handle); } if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.gdi_handle); + } + _mem_save_gdi_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.gdi_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.gdi_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_gdi_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; @@ -23729,11 +23778,23 @@ _PUBLIC_ void ndr_print_spoolss_CreatePrinterIC(struct ndr_print *ndr, const cha if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "spoolss_CreatePrinterIC"); ndr->depth++; + ndr_print_ptr(ndr, "handle", r->in.handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "handle", r->in.handle); + ndr->depth--; + ndr_print_ptr(ndr, "devmode_ctr", r->in.devmode_ctr); + ndr->depth++; + ndr_print_spoolss_DevmodeContainer(ndr, "devmode_ctr", r->in.devmode_ctr); + ndr->depth--; ndr->depth--; } if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "spoolss_CreatePrinterIC"); ndr->depth++; + ndr_print_ptr(ndr, "gdi_handle", r->out.gdi_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "gdi_handle", r->out.gdi_handle); + ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } @@ -23784,8 +23845,16 @@ _PUBLIC_ void ndr_print_spoolss_PlayGDIScriptOnPrinterIC(struct ndr_print *ndr, static enum ndr_err_code ndr_push_spoolss_DeletePrinterIC(struct ndr_push *ndr, int flags, const struct spoolss_DeletePrinterIC *r) { if (flags & NDR_IN) { + if (r->in.gdi_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.gdi_handle)); } if (flags & NDR_OUT) { + if (r->out.gdi_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.gdi_handle)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -23793,9 +23862,28 @@ static enum ndr_err_code ndr_push_spoolss_DeletePrinterIC(struct ndr_push *ndr, static enum ndr_err_code ndr_pull_spoolss_DeletePrinterIC(struct ndr_pull *ndr, int flags, struct spoolss_DeletePrinterIC *r) { + TALLOC_CTX *_mem_save_gdi_handle_0; if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.gdi_handle); + } + _mem_save_gdi_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.gdi_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.gdi_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_gdi_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_ALLOC(ndr, r->out.gdi_handle); + *r->out.gdi_handle = *r->in.gdi_handle; } if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.gdi_handle); + } + _mem_save_gdi_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.gdi_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.gdi_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_gdi_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; @@ -23811,11 +23899,19 @@ _PUBLIC_ void ndr_print_spoolss_DeletePrinterIC(struct ndr_print *ndr, const cha if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "spoolss_DeletePrinterIC"); ndr->depth++; + ndr_print_ptr(ndr, "gdi_handle", r->in.gdi_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "gdi_handle", r->in.gdi_handle); + ndr->depth--; ndr->depth--; } if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "spoolss_DeletePrinterIC"); ndr->depth++; + ndr_print_ptr(ndr, "gdi_handle", r->out.gdi_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "gdi_handle", r->out.gdi_handle); + ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } diff --git a/librpc/gen_ndr/samr.h b/librpc/gen_ndr/samr.h index e44de1b037..ce84b45a9e 100644 --- a/librpc/gen_ndr/samr.h +++ b/librpc/gen_ndr/samr.h @@ -834,24 +834,28 @@ enum samr_ValidationStatus SAMR_VALIDATION_STATUS_SUCCESS=0, SAMR_VALIDATION_STATUS_PASSWORD_MUST_CHANGE=1, SAMR_VALIDATION_STATUS_ACCOUNT_LOCKED_OUT=2, + SAMR_VALIDATION_STATUS_PASSWORD_EXPIRED=3, SAMR_VALIDATION_STATUS_BAD_PASSWORD=4, SAMR_VALIDATION_STATUS_PWD_HISTORY_CONFLICT=5, SAMR_VALIDATION_STATUS_PWD_TOO_SHORT=6, SAMR_VALIDATION_STATUS_PWD_TOO_LONG=7, SAMR_VALIDATION_STATUS_NOT_COMPLEX_ENOUGH=8, - SAMR_VALIDATION_STATUS_PASSWORD_TOO_RECENT=9 + SAMR_VALIDATION_STATUS_PASSWORD_TOO_RECENT=9, + SAMR_VALIDATION_STATUS_PASSWORD_FILTER_ERROR=10 } #else { __donnot_use_enum_samr_ValidationStatus=0x7FFFFFFF} #define SAMR_VALIDATION_STATUS_SUCCESS ( 0 ) #define SAMR_VALIDATION_STATUS_PASSWORD_MUST_CHANGE ( 1 ) #define SAMR_VALIDATION_STATUS_ACCOUNT_LOCKED_OUT ( 2 ) +#define SAMR_VALIDATION_STATUS_PASSWORD_EXPIRED ( 3 ) #define SAMR_VALIDATION_STATUS_BAD_PASSWORD ( 4 ) #define SAMR_VALIDATION_STATUS_PWD_HISTORY_CONFLICT ( 5 ) #define SAMR_VALIDATION_STATUS_PWD_TOO_SHORT ( 6 ) #define SAMR_VALIDATION_STATUS_PWD_TOO_LONG ( 7 ) #define SAMR_VALIDATION_STATUS_NOT_COMPLEX_ENOUGH ( 8 ) #define SAMR_VALIDATION_STATUS_PASSWORD_TOO_RECENT ( 9 ) +#define SAMR_VALIDATION_STATUS_PASSWORD_FILTER_ERROR ( 10 ) #endif ; diff --git a/librpc/gen_ndr/spoolss.h b/librpc/gen_ndr/spoolss.h index 9446193863..1a9d393e09 100644 --- a/librpc/gen_ndr/spoolss.h +++ b/librpc/gen_ndr/spoolss.h @@ -1058,7 +1058,7 @@ struct spoolss_OSVersion { uint32_t major; uint32_t minor; uint32_t build; - uint32_t unknown;/* [value(2)] */ + uint32_t platform_id;/* [value(2)] */ const char * extra_string;/* [subcontext_size(256),subcontext(0),flag(LIBNDR_FLAG_STR_NULLTERM)] */ }/* [gensize,public] */; @@ -1067,10 +1067,13 @@ struct spoolss_OSVersionEx { uint32_t major; uint32_t minor; uint32_t build; - uint32_t unknown1;/* [value(2)] */ + uint32_t platform_id;/* [value(2)] */ const char * extra_string;/* [subcontext_size(256),subcontext(0),flag(LIBNDR_FLAG_STR_NULLTERM)] */ - uint32_t unknown2; - uint32_t unknown3; + uint16_t service_pack_major; + uint16_t service_pack_minor; + uint16_t suite_mask; + uint8_t product_type; + uint8_t reserved; }/* [gensize,public] */; union spoolss_PrinterData { @@ -2516,6 +2519,12 @@ struct spoolss_DeletePort { struct spoolss_CreatePrinterIC { struct { + struct policy_handle *handle;/* [ref] */ + struct spoolss_DevmodeContainer *devmode_ctr;/* [ref] */ + } in; + + struct { + struct policy_handle *gdi_handle;/* [ref] */ WERROR result; } out; @@ -2532,6 +2541,11 @@ struct spoolss_PlayGDIScriptOnPrinterIC { struct spoolss_DeletePrinterIC { struct { + struct policy_handle *gdi_handle;/* [ref] */ + } in; + + struct { + struct policy_handle *gdi_handle;/* [ref] */ WERROR result; } out; diff --git a/librpc/gen_ndr/srv_lsa.c b/librpc/gen_ndr/srv_lsa.c index c86d0857f8..f1b4a06d0d 100644 --- a/librpc/gen_ndr/srv_lsa.c +++ b/librpc/gen_ndr/srv_lsa.c @@ -3366,6 +3366,8 @@ static bool api_lsa_RetrievePrivateData(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_RetrievePrivateData, r); } + ZERO_STRUCT(r->out); + r->out.val = r->in.val; r->out.result = _lsa_RetrievePrivateData(p, r); if (p->rng_fault_state) { @@ -6810,6 +6812,8 @@ NTSTATUS rpc_lsarpc_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, c case NDR_LSA_RETRIEVEPRIVATEDATA: { struct lsa_RetrievePrivateData *r = (struct lsa_RetrievePrivateData *)_r; + ZERO_STRUCT(r->out); + r->out.val = r->in.val; r->out.result = _lsa_RetrievePrivateData(cli->pipes_struct, r); return NT_STATUS_OK; } diff --git a/librpc/gen_ndr/srv_spoolss.c b/librpc/gen_ndr/srv_spoolss.c index 41a79b4a79..ae99f098a6 100644 --- a/librpc/gen_ndr/srv_spoolss.c +++ b/librpc/gen_ndr/srv_spoolss.c @@ -3245,6 +3245,13 @@ static bool api_spoolss_CreatePrinterIC(pipes_struct *p) NDR_PRINT_IN_DEBUG(spoolss_CreatePrinterIC, r); } + ZERO_STRUCT(r->out); + r->out.gdi_handle = talloc_zero(r, struct policy_handle); + if (r->out.gdi_handle == NULL) { + talloc_free(r); + return false; + } + r->out.result = _spoolss_CreatePrinterIC(p, r); if (p->rng_fault_state) { @@ -3391,6 +3398,8 @@ static bool api_spoolss_DeletePrinterIC(pipes_struct *p) NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterIC, r); } + ZERO_STRUCT(r->out); + r->out.gdi_handle = r->in.gdi_handle; r->out.result = _spoolss_DeletePrinterIC(p, r); if (p->rng_fault_state) { @@ -8068,6 +8077,12 @@ NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, case NDR_SPOOLSS_CREATEPRINTERIC: { struct spoolss_CreatePrinterIC *r = (struct spoolss_CreatePrinterIC *)_r; + ZERO_STRUCT(r->out); + r->out.gdi_handle = talloc_zero(mem_ctx, struct policy_handle); + if (r->out.gdi_handle == NULL) { + return NT_STATUS_NO_MEMORY; + } + r->out.result = _spoolss_CreatePrinterIC(cli->pipes_struct, r); return NT_STATUS_OK; } @@ -8080,6 +8095,8 @@ NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, case NDR_SPOOLSS_DELETEPRINTERIC: { struct spoolss_DeletePrinterIC *r = (struct spoolss_DeletePrinterIC *)_r; + ZERO_STRUCT(r->out); + r->out.gdi_handle = r->in.gdi_handle; r->out.result = _spoolss_DeletePrinterIC(cli->pipes_struct, r); return NT_STATUS_OK; } diff --git a/librpc/idl/frsapi.idl b/librpc/idl/frsapi.idl index 11593f479a..ea7880c9f8 100644 --- a/librpc/idl/frsapi.idl +++ b/librpc/idl/frsapi.idl @@ -98,24 +98,31 @@ interface frsapi WERROR frsapi_IsPathReplicated( [in,unique] [string,charset(UTF16)] uint16 *path, [in] frsapi_ReplicaSetType replica_set_type, - [out] uint32 *unknown1, - [out] uint32 *unknown2, - [out] uint32 *unknown3, + [out] uint32 *replicated, + [out] uint32 *primary, + [out] uint32 *root, [out] GUID *replica_set_guid ); /****************/ /* Function 0x09 */ - [todo] void FRSAPI_WRITER_COMMAND(); + typedef [v1_enum] enum { + FRSAPI_WRITER_COMMAND_FREEZE = 0x00000001, + FRSAPI_WRITER_COMMAND_THAW = 0x00000002 + } frsapi_WriterCommandsValues; + + WERROR frsapi_WriterCommand( + [in] frsapi_WriterCommandsValues command + ); /****************/ /* Function 0x0a */ /* not supported before w2k3 sp2 */ WERROR frsapi_ForceReplication( - [in,unique] GUID *guid1, - [in,unique] GUID *guid2, - [in,unique] [charset(UTF16),string] uint16 *replica_set, - [in,unique] [charset(UTF16),string] uint16 *partner_name + [in,unique] GUID *replica_set_guid, + [in,unique] GUID *connection_guid, + [in,unique] [charset(UTF16),string] uint16 *replica_set_name, + [in,unique] [charset(UTF16),string] uint16 *partner_dns_name ); } diff --git a/librpc/idl/frsrpc.idl b/librpc/idl/frsrpc.idl index 1019a25b28..cab155295d 100644 --- a/librpc/idl/frsrpc.idl +++ b/librpc/idl/frsrpc.idl @@ -7,6 +7,7 @@ import "misc.idl"; version(1.1), endpoint("ncacn_ip_tcp:", "ncalrpc:"), helpstring("File Replication Service"), + helper("../librpc/ndr/ndr_frsrpc.h"), pointer_default(unique) ] interface frsrpc @@ -14,112 +15,337 @@ interface frsrpc /*****************/ /* Function 0x00 */ - /* TAG:3 this TLV contains a GUID and the name of the server sending - * the call - */ typedef struct { - [subcontext(4)] GUID unknown1; - [subcontext(4)] nstring source_server; - } frsrpc_FrsSendCommPktChunkDataSSRV; + [subcontext(4)] GUID guid; + [subcontext(4)] nstring name; + } frsrpc_CommPktChunkGuidName; - /* TAG:4 this TLV contains a GUID and the name of the destination - * server the PDU is sent to - */ typedef struct { - [subcontext(4)] GUID unknown1; - [subcontext(4)] nstring dest_server; - } frsrpc_FrsSendCommPktChunkDataDSRV; + hyper vsn; + GUID guid; + } frsrpc_CommPktGSVN; + + typedef [bitmap32bit,flag(NDR_PAHEX)] bitmap { + FRSRPC_CO_FLAG_ABORT_CO = 0x00000001, + FRSRPC_CO_FLAG_VV_ACTIVATED = 0x00000002, + FRSRPC_CO_FLAG_CONTENT_CMD = 0x00000004, + FRSRPC_CO_FLAG_LOCATION_CMD = 0x00000008, + FRSRPC_CO_FLAG_ONLIST = 0x00000010, + FRSRPC_CO_FLAG_LOCALCO = 0x00000020, + FRSRPC_CO_FLAG_RETRY = 0x00000040, + FRSRPC_CO_FLAG_OUT_OF_ORDER = 0x00000200, + FRSRPC_CO_FLAG_NEW_FILE = 0x00000400, + FRSRPC_CO_FLAG_CONTROL = 0x00001000, + FRSRPC_CO_FLAG_DIRECTED_CO = 0x00002000, + FRSRPC_CO_FLAG_VVJOIN_TO_ORIG = 0x00040000, + FRSRPC_CO_FLAG_SKIP_ORIG_REC_C = 0x00100000, + FRSRPC_CO_FLAG_MOVEIN_GEN = 0x00200000, + FRSRPC_CO_FLAG_MORPH_GEN_HEAD = 0x00400000, + FRSRPC_CO_FLAG_JUST_OID_RESET = 0x00800000, + FRSRPC_CO_FLAG_COMPRESSED_STAGE = 0x01000000, + FRSRPC_CO_FLAG_COMPRESSED_STAGE = 0x01000000, + FRSRPC_CO_FLAG_SKIP_VV_UPDATE = 0x02000000 + } frsrpc_CommPktCoCmdFlags; + + const uint32 FRSRPC_CO_IFLAG_NONE = 0x0000000; + + typedef [bitmap32bit,flag(NDR_PAHEX)] bitmap { + FRSRPC_CO_IFLAG_VVRETIRE_EXEC = 0x00000001, + FRSRPC_CO_IFLAG_CO_ABORT = 0x00000002, + FRSRPC_CO_IFLAG_DIR_ENUM_PENDING= 0x00000004 + } frsrpc_CommPktCoCmdIFlags; + + typedef [v1_enum,flag(NDR_PAHEX)] enum { + FRSRPC_CO_STATUS_CO_ENTERED_LOG = 0x00000000, + FRSRPC_CO_STATUS_ALLOC_STAGING_LOCAL_CO = 0x00000001, + FRSRPC_CO_STATUS_LOCAL_CO_STAGING_STARTED = 0x00000002, + FRSRPC_CO_STATUS_LOCAL_CO_STAGING_COMPLETED = 0x00000003, + FRSRPC_CO_STATUS_WAIT_RETRY_LOCAL_CO_STAGING = 0x00000004, + FRSRPC_CO_STATUS_ALLOC_STAGING_REMOTE_CO = 0x00000005, + FRSRPC_CO_STATUS_REMOTE_CO_STAGING_STARTED = 0x00000006, + FRSRPC_CO_STATUS_REMOTE_CO_STAGING_COMPLETED = 0x00000007, + FRSRPC_CO_STATUS_WAIT_RETRY_REMOTE_CO_STAGING = 0x00000008, + FRSRPC_CO_STATUS_FILE_INSTALL_REQUESTED = 0x00000009, + FRSRPC_CO_STATUS_FILE_INSTALL_STARTED = 0x0000000A, + FRSRPC_CO_STATUS_FILE_INSTALL_COMPLETED = 0x0000000B, + FRSRPC_CO_STATUS_FILE_INSTALL_WAIT_RETRY = 0x0000000C, + FRSRPC_CO_STATUS_FILE_INSTALL_RETRYING = 0x0000000D, + FRSRPC_CO_STATUS_FILE_INSTALL_RENAME_RETRYING = 0x0000000E, + FRSRPC_CO_STATUS_FILE_INSTALL_DELETE_RETRYING = 0x0000000F, + FRSRPC_CO_STATUS_CO_RECYCLED_FOR_ENUM = 0x00000013, + FRSRPC_CO_STATUS_REQUEST_OUTBOUND_PROPAGATION = 0x00000014, + FRSRPC_CO_STATUS_REQUEST_ACCEPTED_OUTBOUND_LOG = 0x00000015, + FRSRPC_CO_STATUS_DB_STATE_UPDATE_STARTED = 0x00000016, + FRSRPC_CO_STATUS_DB_STATE_UPDATE_COMPLETED = 0x00000017, + FRSRPC_CO_STATUS_CO_ABORTED = 0x00000018 + } frsrpc_CommPktCoCmdStatus; + + typedef [bitmap32bit,flag(NDR_PAHEX)] bitmap { + FRSRPC_CONTENT_REASON_DATA_OVERWRITE = 0x00000001, + FRSRPC_CONTENT_REASON_DATA_EXTEND = 0x00000002, + FRSRPC_CONTENT_REASON_DATA_TRUNCATION = 0x00000004, + FRSRPC_CONTENT_REASON_NAMED_DATA_OVERWRITE = 0x00000010, + FRSRPC_CONTENT_REASON_NAMED_DATA_EXTEND = 0x00000020, + FRSRPC_CONTENT_REASON_NAMED_DATA_TRUNCATION = 0x00000040, + FRSRPC_CONTENT_REASON_FILE_CREATE = 0x00000100, + FRSRPC_CONTENT_REASON_FILE_DELETE = 0x00000200, + FRSRPC_CONTENT_REASON_EA_CHANGE = 0x00000400, + FRSRPC_CONTENT_REASON_SECURITY_CHANGE = 0x00000800, + FRSRPC_CONTENT_REASON_OLD_NAME = 0x00001000, + FRSRPC_CONTENT_REASON_NEW_NAME = 0x00002000, + FRSRPC_CONTENT_REASON_BASIC_INFO_CHANGE = 0x00004000, + FRSRPC_CONTENT_REASON_COMPRESSION_CHANGE = 0x00020000 + } frsrpc_CommPktCoCmdContentCmd; + + typedef [v1_enum,flag(NDR_PAHEX)] enum { + FRSRPC_CO_LOCATION_FILE_CREATE = 0x00000000, + FRSRPC_CO_LOCATION_DIR_CREATE = 0x00000000 | 0x00000001, + FRSRPC_CO_LOCATION_FILE_DELETE = 0x00000002, + FRSRPC_CO_LOCATION_DIR_DELETE = 0x00000002 | 0x00000001, + FRSRPC_CO_LOCATION_FILE_MOVEIN = 0x00000004, + FRSRPC_CO_LOCATION_DIR_MOVEIN = 0x00000004 | 0x00000001, + FRSRPC_CO_LOCATION_FILE_MOVEIN2 = 0x00000006, + FRSRPC_CO_LOCATION_DIR_MOVEIN2 = 0x00000006 | 0x00000001, + FRSRPC_CO_LOCATION_FILE_MOVEOUT = 0x00000008, + FRSRPC_CO_LOCATION_DIR_MOVEOUT = 0x00000008 | 0x00000001, + FRSRPC_CO_LOCATION_FILE_MOVERS = 0x0000000a, + FRSRPC_CO_LOCATION_DIR_MOVERS = 0x0000000a | 0x00000001, + FRSRPC_CO_LOCATION_FILE_MOVEDIR = 0x0000000c, + FRSRPC_CO_LOCATION_DIR_MOVEDIR = 0x0000000c | 0x00000001, + FRSRPC_CO_LOCATION_FILE_NO_CMD = 0x0000000e, + FRSRPC_CO_LOCATION_DIR_NO_CMD = 0x0000000e | 0x00000001 + } frsrpc_CommPktCoCmdLocationCmd; - /* TAG:18 this TLV contains a timestamp - */ typedef struct { - [subcontext(4)] NTTIME time; - } frsrpc_FrsSendCommPktChunkDataTS; + uint32 sequence_number; + frsrpc_CommPktCoCmdFlags flags; + frsrpc_CommPktCoCmdIFlags iflags; + frsrpc_CommPktCoCmdStatus status; + frsrpc_CommPktCoCmdContentCmd content_cmd; + frsrpc_CommPktCoCmdLocationCmd location_cmd; + uint32 file_attributes; + uint32 file_version_number; + uint32 partern_ack_sequence_number; + [value(0)] uint32 not_used; + hyper file_size; + hyper file_offset; + hyper frs_vsn; + hyper file_usn; + hyper jrnl_usn; + hyper jrnl_first_usn; + uint32 original_replica_num; + uint32 new_replica_num; + GUID change_order_guid; + GUID originator_guid; + GUID file_guid; + GUID old_parent_guid; + GUID new_parent_guid; + GUID connection_guid; + hyper ack_version; + [value(0)] hyper spare2ul1; + [value(0)] hyper spare1guid_p1; + [value(0)] hyper spare1guid_p2; + [value(0)] hyper spare2guid_p1; + [value(0)] hyper spare3guid_p2; + [value(0)] uint32 spare1wcs; + [value(0)] uint32 spare2wcs; + [value(0)] uint32 extension; + [value(0)] uint32 spare2bin; + NTTIME event_time; + [value(2*strlen_m(file_name))] uint16 file_name_length; +#define FRSRPC_MAX_PATH 260 + [charset(UTF16)] uint16 file_name[FRSRPC_MAX_PATH+1]; + [value(0)] uint8 padding1; + [value(0)] uint8 padding2; + [value(0)] uint8 padding3; + [value(0)] uint8 padding4; + } frsrpc_CommPktChangeOrderCommand; + + typedef [v1_enum,flag(NDR_PAHEX)] enum { + FRSRPC_DATA_EXTENSION_TERMINATOR = 0x00000000, + FRSRPC_DATA_EXTENSION_MD5_CHECKSUM = 0x00000001, + FRSRPC_DATA_EXTENSION_RETRY_TIMEOUT = 0x00000002 + } frsrpc_CommPktDataExtensionType; + typedef [flag(NDR_PAHEX)] struct { + [value(0x00000018)] uint32 prefix_size; + [value(FRSRPC_DATA_EXTENSION_MD5_CHECKSUM)] + frsrpc_CommPktDataExtensionType prefix_type; + uint8 data[16]; + } frsrpc_CommPktDataExtensionChecksum; typedef struct { - uint32 unknown1; - } frsrpc_FrsSendCommPktChunkDataA; + [value(0x00000018)] uint32 prefix_size; + [value(FRSRPC_DATA_EXTENSION_RETRY_TIMEOUT)] + frsrpc_CommPktDataExtensionType prefix_type; + uint32 count; + [value(0)] uint32 not_used; + NTTIME first_try_time; + } frsrpc_CommPktDataExtensionRetryTimeout; + + typedef [flag(NDR_PAHEX)] enum { + FRSRPC_CO_RECORD_EXTENSION_VERSION_WIN2K = 0x0000, + FRSRPC_CO_RECORD_EXTENSION_VERSION_1 = 0x0001 + } frsrpc_CommPktCoRecordExtensionMajor; typedef struct { - uint32 unknown1; - GUID unknown2; - [subcontext(4)] nstring unknown3; - } frsrpc_FrsSendCommPktChunkDataB; + [value(0x00000028)] uint32 field_size; + [value(FRSRPC_CO_RECORD_EXTENSION_VERSION_WIN2K)] + frsrpc_CommPktCoRecordExtensionMajor major; + [value(0x0001)] uint16 offset_count; + [value(0x00000010)] uint32 offset; + [value(0)] uint32 offset_last; + frsrpc_CommPktDataExtensionChecksum data_checksum; + } frsrpc_CommPktCoRecordExtensionWin2k; typedef struct { - uint32 unknown1; - GUID unknown2; - } frsrpc_FrsSendCommPktChunkDataC; + [value(0x00000048)] uint32 field_size; + frsrpc_CommPktCoRecordExtensionMajor major; + [value(0x0002)] uint16 offset_count; + [value(0x00000018)] uint32 offset0; + [value(0x00000030)] uint32 offset1;/*TODO: is this correct??? */ + [value(0)] uint32 offset_last; + [value(0)] uint32 not_used; + frsrpc_CommPktDataExtensionChecksum data_checksum; + frsrpc_CommPktDataExtensionRetryTimeout data_retry_timeout; + } frsrpc_CommPktChangeOrderRecordExtension; + + typedef [v1_enum,flag(NDR_PAHEX)] enum { + FRSRPC_COMMAND_REMOTE_CO = 0x00000218, + FRSRPC_COMMAND_RECEIVING_STATE = 0x00000238, + FRSRPC_COMMAND_REMOTE_CO_DONE = 0x00000250, + FRSRPC_COMMAND_ABORT_FETCH = 0x00000246, + FRSRPC_COMMAND_RETRY_FETCH = 0x00000244, + FRSRPC_COMMAND_NEED_JOIN = 0x00000121, + FRSRPC_COMMAND_START_JOIN = 0x00000122, + FRSRPC_COMMAND_JOINING = 0x00000130, + FRSRPC_COMMAND_JOINED = 0x00000128, + FRSRPC_COMMAND_UNJOIN_REMOTE = 0x00000148, + FRSRPC_COMMAND_WJOIN_DONE = 0x00000136, + FRSRPC_COMMAND_SEND_STAGE = 0x00000228 + } frsrpc_CommPktCommand; + + typedef [flag(NDR_PAHEX)] enum { + FRSRPC_COMM_PKT_CHUNK_BOP = 0x0001, + FRSRPC_COMM_PKT_CHUNK_COMMAND = 0x0002, + FRSRPC_COMM_PKT_CHUNK_TO = 0x0003, + FRSRPC_COMM_PKT_CHUNK_FROM = 0x0004, + FRSRPC_COMM_PKT_CHUNK_REPLICA = 0x0005, + FRSRPC_COMM_PKT_CHUNK_CONNECTION = 0x0008, + FRSRPC_COMM_PKT_CHUNK_JOIN_GUID = 0x0006, + FRSRPC_COMM_PKT_CHUNK_LAST_JOIN_TIME = 0x0012, + + FRSRPC_COMM_PKT_CHUNK_VVECTOR = 0x0007, + FRSRPC_COMM_PKT_CHUNK_JOIN_TIME = 0x0011, + FRSRPC_COMM_PKT_CHUNK_REPLICA_VERSION_GUID = 0x0014, + FRSRPC_COMM_PKT_CHUNK_COMPRESSION_GUID = 0x0018, + + FRSRPC_COMM_PKT_CHUNK_BLOCK = 0x0009, + FRSRPC_COMM_PKT_CHUNK_BLOCK_SIZE = 0x000A, + FRSRPC_COMM_PKT_CHUNK_FILE_SIZE = 0x000B, + FRSRPC_COMM_PKT_CHUNK_FILE_OFFSET = 0x000C, + FRSRPC_COMM_PKT_CHUNK_GVSN = 0x000E, + FRSRPC_COMM_PKT_CHUNK_CO_GUID = 0x000F, + FRSRPC_COMM_PKT_CHUNK_CO_SEQUENCE_NUMBER = 0x0010, + + FRSRPC_COMM_PKT_CHUNK_REMOTE_CO = 0x000D, + FRSRPC_COMM_PKT_CHUNK_CO_EXT_WIN2K = 0x0016, + FRSRPC_COMM_PKT_CHUNK_CO_EXTENTION_2 = 0x0017, + + FRSRPC_COMM_PKT_CHUNK_EOP = 0x0013 + } frsrpc_CommPktChunkType; typedef [nodiscriminant] union { [default,flag(NDR_REMAINING)] DATA_BLOB blob; - [case(1)] frsrpc_FrsSendCommPktChunkDataA A; - [case(2)] frsrpc_FrsSendCommPktChunkDataA A; - [case(3)] frsrpc_FrsSendCommPktChunkDataSSRV SSRV; - [case(4)] frsrpc_FrsSendCommPktChunkDataDSRV DSRV; - [case(5)] frsrpc_FrsSendCommPktChunkDataB B; - [case(8)] frsrpc_FrsSendCommPktChunkDataB B; - [case(6)] frsrpc_FrsSendCommPktChunkDataC C; - [case(18)] frsrpc_FrsSendCommPktChunkDataTS TS; - [case(19)] frsrpc_FrsSendCommPktChunkDataA A; - } frsrpc_FrsSendCommPktChunkData; + [case(FRSRPC_COMM_PKT_CHUNK_BOP)] + [value(0)] uint32 bop; + [case(FRSRPC_COMM_PKT_CHUNK_COMMAND)] + frsrpc_CommPktCommand command; + [case(FRSRPC_COMM_PKT_CHUNK_TO)] + frsrpc_CommPktChunkGuidName to; + [case(FRSRPC_COMM_PKT_CHUNK_FROM)] + frsrpc_CommPktChunkGuidName from; + [case(FRSRPC_COMM_PKT_CHUNK_REPLICA)] + frsrpc_CommPktChunkGuidName replica; + [case(FRSRPC_COMM_PKT_CHUNK_CONNECTION)] + frsrpc_CommPktChunkGuidName connection; + [case(FRSRPC_COMM_PKT_CHUNK_JOIN_GUID)][subcontext(4)] + GUID join_guid; + [case(FRSRPC_COMM_PKT_CHUNK_LAST_JOIN_TIME)] + NTTIME last_join_time; + [case(FRSRPC_COMM_PKT_CHUNK_VVECTOR)][subcontext(4)] + frsrpc_CommPktGSVN vvector; + [case(FRSRPC_COMM_PKT_CHUNK_JOIN_TIME)][subcontext(4)] + NTTIME join_time; + [case(FRSRPC_COMM_PKT_CHUNK_REPLICA_VERSION_GUID)][subcontext(4)] + GUID replica_version_guid; + [case(FRSRPC_COMM_PKT_CHUNK_COMPRESSION_GUID)] + GUID compression_guid; + [case(FRSRPC_COMM_PKT_CHUNK_BLOCK)] + [flag(NDR_REMAINING)] DATA_BLOB block; + [case(FRSRPC_COMM_PKT_CHUNK_BLOCK_SIZE)] + hyper block_size; + [case(FRSRPC_COMM_PKT_CHUNK_FILE_SIZE)] + hyper file_size; + [case(FRSRPC_COMM_PKT_CHUNK_FILE_OFFSET)] + hyper file_offset; + [case(FRSRPC_COMM_PKT_CHUNK_GVSN)][subcontext(4)] + frsrpc_CommPktGSVN gvsn; + [case(FRSRPC_COMM_PKT_CHUNK_CO_GUID)][subcontext(4)] + GUID co_guid; + [case(FRSRPC_COMM_PKT_CHUNK_CO_SEQUENCE_NUMBER)] + uint32 co_sequnence_number; + [case(FRSRPC_COMM_PKT_CHUNK_REMOTE_CO)][subcontext(4)] + frsrpc_CommPktChangeOrderCommand remote_co; + [case(FRSRPC_COMM_PKT_CHUNK_CO_EXT_WIN2K)][subcontext(4)] + frsrpc_CommPktCoRecordExtensionWin2k co_ext_win2k; + [case(FRSRPC_COMM_PKT_CHUNK_CO_EXTENTION_2)][subcontext(4)] + frsrpc_CommPktChangeOrderRecordExtension co_extension2; + [case(FRSRPC_COMM_PKT_CHUNK_EOP)] + [value(0xFFFFFFFF)] uint32 bop; + } frsrpc_CommPktChunkData; - typedef struct { - uint16 type; - [subcontext(4),switch_is(type)] frsrpc_FrsSendCommPktChunkData data; - } frsrpc_FrsSendCommPktChunk; - - typedef [flag(NDR_NOALIGN)] struct { - frsrpc_FrsSendCommPktChunk chunk1; - frsrpc_FrsSendCommPktChunk chunk2; - frsrpc_FrsSendCommPktChunk chunk3; - frsrpc_FrsSendCommPktChunk chunk4; - frsrpc_FrsSendCommPktChunk chunk5; - frsrpc_FrsSendCommPktChunk chunk6; - frsrpc_FrsSendCommPktChunk chunk7; - frsrpc_FrsSendCommPktChunk chunk8; - frsrpc_FrsSendCommPktChunk chunk9; - } frsrpc_FrsSendCommPktChunkCtr; + typedef [public,flag(NDR_NOALIGN)] struct { + frsrpc_CommPktChunkType type; + [subcontext(4),switch_is(type)] frsrpc_CommPktChunkData data; + } frsrpc_CommPktChunk; + + typedef [nopull,nopush,flag(NDR_NOALIGN)] struct { + uint32 num_chunks; /* this doesn't appear on the wire */ + frsrpc_CommPktChunk chunks[num_chunks]; + } frsrpc_CommPktChunkCtr; + + typedef [v1_enum] enum { + FRSRPC_COMM_PKT_MAJOR_0 = 0x00000000 + } frsrpc_CommPktMajor; + + typedef [v1_enum] enum { + FRSRPC_COMM_PKT_MINOR_0 = 0x00000000, + FRSRPC_COMM_PKT_MINOR_1 = 0x00000001, + FRSRPC_COMM_PKT_MINOR_2 = 0x00000002, + FRSRPC_COMM_PKT_MINOR_3 = 0x00000003, + FRSRPC_COMM_PKT_MINOR_4 = 0x00000004, + FRSRPC_COMM_PKT_MINOR_5 = 0x00000005, + FRSRPC_COMM_PKT_MINOR_6 = 0x00000006, + FRSRPC_COMM_PKT_MINOR_7 = 0x00000007, + FRSRPC_COMM_PKT_MINOR_8 = 0x00000008, + FRSRPC_COMM_PKT_MINOR_9 = 0x00000009 + } frsrpc_CommPktMinor; typedef struct { - uint32 unknown1; - uint32 unknown2; - uint32 unknown3; - uint32 unknown4; - uint32 tlv_size; - uint32 unknown6; - uint32 unknown7; /* This may be a UNIQUE pointer? */ - uint32 unknown8; - uint32 unknown9; - /* - * The format of this blob is this a concatenation - * of TLVs which are not really NDR encoded. - * - * The individual TLVs are encoded as : - * struct { - * uint16 type; - * [subcontext(4),switch_is(type)] chunk_data data; - * } chunk; - * - * some of the chunk are like this: - * - * struct { - * uint32 unknown; // 0x00000010 - * struct GUID guid; - * lstring string; - * } ...; - * - * - * The tags are (might be) : - * 3: Source server sending the PDU - * 4: Destination server the PDU is sent to - * 18: Timestamp - * - */ - [subcontext(4)/*,size_is(tlv_size)*/] frsrpc_FrsSendCommPktChunkCtr *chunks; - uint32 unknown10; - uint32 unknown11; + frsrpc_CommPktMajor major; + frsrpc_CommPktMinor minor; + [value(1)] uint32 cs_id; + [value(pkt_len+12)] uint32 memory_len; + [value(ndr_size_frsrpc_CommPktChunkCtr(r->ctr, + ndr->iconv_convenience, ndr->flags))] + [range(0, 262144)] + uint32 pkt_len; + [value(0)] uint32 upk_len; + [subcontext(4),subcontext_size(pkt_len)] + frsrpc_CommPktChunkCtr *ctr; + [value(0)] uint32 data_name; + [value(0)] uint32 data_handle; } frsrpc_FrsSendCommPktReq; WERROR frsrpc_FrsSendCommPkt( @@ -132,7 +358,28 @@ interface frsrpc /*****************/ /* Function 0x02 */ - [todo] void FRSRPC_START_PROMOTION_PARENT(); + typedef [v1_enum,flag(NDR_PAHEX)] enum { + FRSRPC_PARENT_AUTH_LEVEL_ENCRYPTED_KERBEROS = 0x00000000, + FRSRPC_PARENT_AUTH_LEVEL_NO_AUTHENTICATION = 0x00000001 + } frsrpc_PartnerAuthLevel; + + WERROR frsrpc_FrsStartPromotionParent( + [in,unique,string,charset(UTF16)] uint16 *parent_account, + [in,unique,string,charset(UTF16)] uint16 *parent_password, + [in,unique,string,charset(UTF16)] uint16 *replica_set_name, + [in,unique,string,charset(UTF16)] uint16 *replica_set_type, + [in,unique,string,charset(UTF16)] uint16 *connection_name, + [in,unique,string,charset(UTF16)] uint16 *partner_name, + [in,unique,string,charset(UTF16)] uint16 *partner_princ_name, + [in] frsrpc_PartnerAuthLevel partner_auth_level, + [in,value(16),range(16,16)] uint32 __ndr_guid_size, + [in,unique,subcontext(4),subcontext_size(16)] + GUID *connection_guid, + [in,unique,subcontext(4),subcontext_size(16)] + GUID *partner_guid, + [in,out,unique,subcontext(4),subcontext_size(16)] + GUID *parent_guid + ); /*****************/ /* Function 0x03 */ diff --git a/librpc/idl/frstrans.idl b/librpc/idl/frstrans.idl new file mode 100644 index 0000000000..c79aabf773 --- /dev/null +++ b/librpc/idl/frstrans.idl @@ -0,0 +1,83 @@ +#include "idl_types.h" + +import "misc.idl"; + +[ + uuid("897e2e5f-93f3-4376-9c9c-fd2277495c27"), + version(1.0), + endpoint("ncacn_ip_tcp:", "ncalrpc:"), + helpstring("File Replication Service DFS-R"), + pointer_default(unique) +] +interface frstrans +{ + /*****************/ + /* Function 0x00 */ + [todo] void FRSTRANS_CHECK_CONNECTIVITY(); + + /*****************/ + /* Function 0x01 */ + [todo] void FRSTRANS_ESTABLISH_CONNECTION(); + + /*****************/ + /* Function 0x02 */ + [todo] void FRSTRANS_ESTABLISH_SESSION(); + + /*****************/ + /* Function 0x03 */ + [todo] void FRSTRANS_REQUEST_UPDATES(); + + /*****************/ + /* Function 0x04 */ + [todo] void FRSTRANS_REQUEST_VERSION_VECTOR(); + + /*****************/ + /* Function 0x05 */ + [todo] void FRSTRANS_ASYNC_POLL(); + + /*****************/ + /* Function 0x06 */ + [todo] void FRSTRANS_REQUEST_RECORDS(); + + /*****************/ + /* Function 0x07 */ + [todo] void FRSTRANS_UPDATE_CANCEL(); + + /*****************/ + /* Function 0x08 */ + [todo] void FRSTRANS_RAW_GET_FILE_DATA(); + + /*****************/ + /* Function 0x09 */ + [todo] void FRSTRANS_RDC_GET_SIGNATURES(); + + /*****************/ + /* Function 0x0a */ + [todo] void FRSTRANS_RDC_PUSH_SOURCE_NEEDS(); + + /*****************/ + /* Function 0x0b */ + [todo] void FRSTRANS_RDC_GET_FILE_DATA(); + + /*****************/ + /* Function 0x0c */ + [todo] void FRSTRANS_RDC_CLOSE(); + + /*****************/ + /* Function 0x0d */ + [todo] void FRSTRANS_INITIALIZE_FILE_TRANSFER_ASYNC(); + + /*****************/ + /* Function 0x0e */ + [todo] void FRSTRANS_OPNUM_0E_NOT_USED_ON_THE_WIRE(); + + /* The following functions are new in Windows 2008 */ + + /*****************/ + /* Function 0x0f */ + [todo] void FRSTRANS_RAW_GET_FILE_DATA_ASYNC(); + + /*****************/ + /* Function 0x10 */ + [todo] void FRSTRANS_RDC_GET_FILE_DATA_ASYNC(); +} diff --git a/librpc/idl/lsa.idl b/librpc/idl/lsa.idl index 9e3b7d6048..7f8ed4afe3 100644 --- a/librpc/idl/lsa.idl +++ b/librpc/idl/lsa.idl @@ -651,7 +651,7 @@ import "misc.idl", "security.idl"; LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL = 10, LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL = 11, LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL = 12, - LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES = 13 + LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES = 13 } lsa_TrustDomInfoEnum; typedef [public,bitmap32bit] bitmap { @@ -788,7 +788,7 @@ import "misc.idl", "security.idl"; lsa_TrustDomainInfoInfoEx2Internal info_ex2_internal; [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL)] lsa_TrustDomainInfoFullInfo2Internal full_info2_internal; - [case(LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES)] + [case(LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES)] lsa_TrustDomainInfoSupportedEncTypes enc_types; } lsa_TrustedDomainInfo; @@ -935,10 +935,18 @@ import "misc.idl", "security.idl"; ); /* Function: 0x2a */ - [todo] NTSTATUS lsa_StorePrivateData(); - /* Function: 0x2b */ - [todo] NTSTATUS lsa_RetrievePrivateData(); + NTSTATUS lsa_StorePrivateData( + [in] policy_handle *handle, + [in,ref] lsa_String *name, + [in,unique] lsa_DATA_BUF *val + ); + /* Function: 0x2b */ + NTSTATUS lsa_RetrievePrivateData( + [in] policy_handle *handle, + [in,ref] lsa_String *name, + [in,out,ref] lsa_DATA_BUF **val + ); /**********************/ /* Function: 0x2c */ diff --git a/librpc/idl/samr.idl b/librpc/idl/samr.idl index b7c151d413..8a5692fe17 100644 --- a/librpc/idl/samr.idl +++ b/librpc/idl/samr.idl @@ -1544,12 +1544,14 @@ import "misc.idl", "lsa.idl", "security.idl"; SAMR_VALIDATION_STATUS_SUCCESS = 0, SAMR_VALIDATION_STATUS_PASSWORD_MUST_CHANGE = 1, SAMR_VALIDATION_STATUS_ACCOUNT_LOCKED_OUT = 2, + SAMR_VALIDATION_STATUS_PASSWORD_EXPIRED = 3, SAMR_VALIDATION_STATUS_BAD_PASSWORD = 4, SAMR_VALIDATION_STATUS_PWD_HISTORY_CONFLICT = 5, SAMR_VALIDATION_STATUS_PWD_TOO_SHORT = 6, SAMR_VALIDATION_STATUS_PWD_TOO_LONG = 7, SAMR_VALIDATION_STATUS_NOT_COMPLEX_ENOUGH = 8, - SAMR_VALIDATION_STATUS_PASSWORD_TOO_RECENT = 9 + SAMR_VALIDATION_STATUS_PASSWORD_TOO_RECENT = 9, + SAMR_VALIDATION_STATUS_PASSWORD_FILTER_ERROR = 10 } samr_ValidationStatus; typedef struct { diff --git a/librpc/idl/spoolss.idl b/librpc/idl/spoolss.idl index f37424634d..0c68dffcd1 100644 --- a/librpc/idl/spoolss.idl +++ b/librpc/idl/spoolss.idl @@ -1311,7 +1311,7 @@ import "misc.idl", "security.idl", "winreg.idl"; uint32 major; uint32 minor; uint32 build; - [value(2)] uint32 unknown; + [value(2)] uint32 platform_id; [subcontext(0),subcontext_size(256)] nstring extra_string; } spoolss_OSVersion; @@ -1320,10 +1320,13 @@ import "misc.idl", "security.idl", "winreg.idl"; uint32 major; uint32 minor; uint32 build; - [value(2)] uint32 unknown1; + [value(2)] uint32 platform_id; [subcontext(0),subcontext_size(256)] nstring extra_string; - uint32 unknown2;/* service pack number? I saw 0 from w2k3 and 1 from winxp sp1*/ - uint32 unknown3;/* hmm? w2k3: 131346(0x20112) winxp sp1: 503382272 0x1E010100 */ + uint16 service_pack_major; + uint16 service_pack_minor; + uint16 suite_mask; + uint8 product_type; + uint8 reserved; } spoolss_OSVersionEx; typedef [nodiscriminant,public,gensize] union { @@ -1683,7 +1686,10 @@ import "misc.idl", "security.idl", "winreg.idl"; /******************/ /* Function: 0x28 */ - [todo] WERROR spoolss_CreatePrinterIC( + WERROR spoolss_CreatePrinterIC( + [in,ref] policy_handle *handle, + [out,ref] policy_handle *gdi_handle, + [in,ref] spoolss_DevmodeContainer *devmode_ctr ); /******************/ @@ -1693,7 +1699,8 @@ import "misc.idl", "security.idl", "winreg.idl"; /******************/ /* Function: 0x2a */ - [todo] WERROR spoolss_DeletePrinterIC( + WERROR spoolss_DeletePrinterIC( + [in,out,ref] policy_handle *gdi_handle ); /******************/ diff --git a/librpc/ndr/ndr_frsrpc.c b/librpc/ndr/ndr_frsrpc.c new file mode 100644 index 0000000000..e0c7f1cd75 --- /dev/null +++ b/librpc/ndr/ndr_frsrpc.c @@ -0,0 +1,94 @@ +/* + Unix SMB/CIFS implementation. + + helper routines for FRSRPC marshalling + + Copyright (C) Stefan (metze) Metzmacher 2009 + + 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 + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include "includes.h" +#include "librpc/gen_ndr/ndr_frsrpc.h" + +enum ndr_err_code ndr_push_frsrpc_CommPktChunkCtr(struct ndr_push *ndr, + int ndr_flags, + const struct frsrpc_CommPktChunkCtr *r) +{ + uint32_t cntr_chunks_0; + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 2)); + for (cntr_chunks_0 = 0; cntr_chunks_0 < r->num_chunks; cntr_chunks_0++) { + NDR_CHECK(ndr_push_frsrpc_CommPktChunk(ndr, NDR_SCALARS, &r->chunks[cntr_chunks_0])); + } + } + if (ndr_flags & NDR_BUFFERS) { + } + ndr->flags = _flags_save_STRUCT; + } + return NDR_ERR_SUCCESS; +} + +#define _TMP_PULL_REALLOC_N(ndr, s, t, n) do { \ + _NDR_PULL_FIX_CURRENT_MEM_CTX(ndr);\ + (s) = talloc_realloc(ndr->current_mem_ctx, (s), t, n); \ + if (!(s)) { \ + return ndr_pull_error(ndr, NDR_ERR_ALLOC, \ + "Alloc %u * %s failed: %s\n", \ + (unsigned)n, # s, __location__); \ + } \ +} while (0) + +enum ndr_err_code ndr_pull_frsrpc_CommPktChunkCtr(struct ndr_pull *ndr, + int ndr_flags, + struct frsrpc_CommPktChunkCtr *r) +{ + uint32_t cntr_chunks_0; + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN); + if (ndr_flags & NDR_SCALARS) { + uint32_t remaining = ndr->data_size - ndr->offset; + r->num_chunks = 0; + r->chunks = NULL; + for (cntr_chunks_0 = 0; remaining > 0; cntr_chunks_0++) { + r->num_chunks += 1; + _TMP_PULL_REALLOC_N(ndr, r->chunks, + struct frsrpc_CommPktChunk, + r->num_chunks); + NDR_CHECK(ndr_pull_frsrpc_CommPktChunk(ndr, + NDR_SCALARS, + &r->chunks[cntr_chunks_0])); + remaining = ndr->data_size - ndr->offset; + } + } + if (ndr_flags & NDR_BUFFERS) { + } + ndr->flags = _flags_save_STRUCT; + } + return NDR_ERR_SUCCESS; +} + +size_t ndr_size_frsrpc_CommPktChunkCtr(const struct frsrpc_CommPktChunkCtr *r, + struct smb_iconv_convenience *ic, + int flags) +{ + flags |= LIBNDR_FLAG_NOALIGN; + return ndr_size_struct(r, flags, + (ndr_push_flags_fn_t)ndr_push_frsrpc_CommPktChunkCtr, + ic); +} diff --git a/librpc/ndr/ndr_frsrpc.h b/librpc/ndr/ndr_frsrpc.h new file mode 100644 index 0000000000..e8dc76959b --- /dev/null +++ b/librpc/ndr/ndr_frsrpc.h @@ -0,0 +1,35 @@ +/* + Unix SMB/CIFS implementation. + + helper routines for FRSRPC marshalling + + Copyright (C) Stefan (metze) Metzmacher 2009 + + 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 + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef _LIBRPC_NDR_NDR_FRSRPC_H +#define _LIBRPC_NDR_NDR_FRSRPC_H + +enum ndr_err_code ndr_push_frsrpc_CommPktChunkCtr(struct ndr_push *ndr, + int ndr_flags, + const struct frsrpc_CommPktChunkCtr *r); +enum ndr_err_code ndr_pull_frsrpc_CommPktChunkCtr(struct ndr_pull *ndr, + int ndr_flags, + struct frsrpc_CommPktChunkCtr *r); +size_t ndr_size_frsrpc_CommPktChunkCtr(const struct frsrpc_CommPktChunkCtr *r, + struct smb_iconv_convenience *ic, + int flags); + +#endif /* _LIBRPC_NDR_NDR_FRSRPC_H */ diff --git a/librpc/ndr_standard.pc.in b/librpc/ndr_standard.pc.in new file mode 100644 index 0000000000..80eace1bef --- /dev/null +++ b/librpc/ndr_standard.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: ndr-standard +Description: NDR marshallers for the standard set of DCE/RPC interfaces +Requires: ndr +Version: 0.0.1 +Libs: -L${libdir} -lndr-standard +Cflags: -I${includedir} -DHAVE_IMMEDIATE_STRUCTURES=1 -D_GNU_SOURCE=1 |