diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/librpc/gen_ndr/libnetapi.h | 27 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/ndr_libnetapi.c | 120 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/ndr_libnetapi.h | 3 |
3 files changed, 150 insertions, 0 deletions
diff --git a/source3/librpc/gen_ndr/libnetapi.h b/source3/librpc/gen_ndr/libnetapi.h index 20a3662cf4..75fd947d77 100644 --- a/source3/librpc/gen_ndr/libnetapi.h +++ b/source3/librpc/gen_ndr/libnetapi.h @@ -204,6 +204,33 @@ struct USER_INFO_1007 { const char * usri1007_comment; }; +struct USER_INFO_X { + const char * usriX_name; + const char * usriX_password; + uint32_t usriX_password_age; + uint32_t usriX_priv; + const char * usriX_home_dir; + const char * usriX_comment; + uint32_t usriX_flags; + const char * usriX_script_path; + uint32_t usriX_auth_flags; + const char * usriX_full_name; + const char * usriX_usr_comment; + const char * usriX_parms; + const char * usriX_workstations; + uint32_t usriX_last_logon; + uint32_t usriX_last_logoff; + uint32_t usriX_acct_expires; + uint32_t usriX_max_storage; + uint32_t usriX_units_per_week; + uint8_t *usriX_logon_hours;/* [unique] */ + uint32_t usriX_bad_pw_count; + uint32_t usriX_num_logons; + const char * usriX_logon_server; + uint32_t usriX_country_code; + uint32_t usriX_code_page; +}; + struct NET_DISPLAY_USER { const char * usri1_name; const char * usri1_comment; diff --git a/source3/librpc/gen_ndr/ndr_libnetapi.c b/source3/librpc/gen_ndr/ndr_libnetapi.c index f84fbe4858..2fe5b2e5d7 100644 --- a/source3/librpc/gen_ndr/ndr_libnetapi.c +++ b/source3/librpc/gen_ndr/ndr_libnetapi.c @@ -942,6 +942,126 @@ _PUBLIC_ void ndr_print_USER_INFO_1007(struct ndr_print *ndr, const char *name, ndr->depth--; } +_PUBLIC_ enum ndr_err_code ndr_push_USER_INFO_X(struct ndr_push *ndr, int ndr_flags, const struct USER_INFO_X *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->usriX_name)); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->usriX_password)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->usriX_password_age)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->usriX_priv)); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->usriX_home_dir)); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->usriX_comment)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->usriX_flags)); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->usriX_script_path)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->usriX_auth_flags)); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->usriX_full_name)); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->usriX_usr_comment)); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->usriX_parms)); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->usriX_workstations)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->usriX_last_logon)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->usriX_last_logoff)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->usriX_acct_expires)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->usriX_max_storage)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->usriX_units_per_week)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->usriX_logon_hours)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->usriX_bad_pw_count)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->usriX_num_logons)); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->usriX_logon_server)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->usriX_country_code)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->usriX_code_page)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->usriX_logon_hours) { + NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->usriX_logon_hours)); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_USER_INFO_X(struct ndr_pull *ndr, int ndr_flags, struct USER_INFO_X *r) +{ + uint32_t _ptr_usriX_logon_hours; + TALLOC_CTX *_mem_save_usriX_logon_hours_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->usriX_name)); + NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->usriX_password)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->usriX_password_age)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->usriX_priv)); + NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->usriX_home_dir)); + NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->usriX_comment)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->usriX_flags)); + NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->usriX_script_path)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->usriX_auth_flags)); + NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->usriX_full_name)); + NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->usriX_usr_comment)); + NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->usriX_parms)); + NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->usriX_workstations)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->usriX_last_logon)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->usriX_last_logoff)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->usriX_acct_expires)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->usriX_max_storage)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->usriX_units_per_week)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_usriX_logon_hours)); + if (_ptr_usriX_logon_hours) { + NDR_PULL_ALLOC(ndr, r->usriX_logon_hours); + } else { + r->usriX_logon_hours = NULL; + } + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->usriX_bad_pw_count)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->usriX_num_logons)); + NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->usriX_logon_server)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->usriX_country_code)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->usriX_code_page)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->usriX_logon_hours) { + _mem_save_usriX_logon_hours_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->usriX_logon_hours, 0); + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->usriX_logon_hours)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_usriX_logon_hours_0, 0); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_USER_INFO_X(struct ndr_print *ndr, const char *name, const struct USER_INFO_X *r) +{ + ndr_print_struct(ndr, name, "USER_INFO_X"); + ndr->depth++; + ndr_print_string(ndr, "usriX_name", r->usriX_name); + ndr_print_string(ndr, "usriX_password", r->usriX_password); + ndr_print_uint32(ndr, "usriX_password_age", r->usriX_password_age); + ndr_print_uint32(ndr, "usriX_priv", r->usriX_priv); + ndr_print_string(ndr, "usriX_home_dir", r->usriX_home_dir); + ndr_print_string(ndr, "usriX_comment", r->usriX_comment); + ndr_print_uint32(ndr, "usriX_flags", r->usriX_flags); + ndr_print_string(ndr, "usriX_script_path", r->usriX_script_path); + ndr_print_uint32(ndr, "usriX_auth_flags", r->usriX_auth_flags); + ndr_print_string(ndr, "usriX_full_name", r->usriX_full_name); + ndr_print_string(ndr, "usriX_usr_comment", r->usriX_usr_comment); + ndr_print_string(ndr, "usriX_parms", r->usriX_parms); + ndr_print_string(ndr, "usriX_workstations", r->usriX_workstations); + ndr_print_uint32(ndr, "usriX_last_logon", r->usriX_last_logon); + ndr_print_uint32(ndr, "usriX_last_logoff", r->usriX_last_logoff); + ndr_print_uint32(ndr, "usriX_acct_expires", r->usriX_acct_expires); + ndr_print_uint32(ndr, "usriX_max_storage", r->usriX_max_storage); + ndr_print_uint32(ndr, "usriX_units_per_week", r->usriX_units_per_week); + ndr_print_ptr(ndr, "usriX_logon_hours", r->usriX_logon_hours); + ndr->depth++; + if (r->usriX_logon_hours) { + ndr_print_uint8(ndr, "usriX_logon_hours", *r->usriX_logon_hours); + } + ndr->depth--; + ndr_print_uint32(ndr, "usriX_bad_pw_count", r->usriX_bad_pw_count); + ndr_print_uint32(ndr, "usriX_num_logons", r->usriX_num_logons); + ndr_print_string(ndr, "usriX_logon_server", r->usriX_logon_server); + ndr_print_uint32(ndr, "usriX_country_code", r->usriX_country_code); + ndr_print_uint32(ndr, "usriX_code_page", r->usriX_code_page); + ndr->depth--; +} + _PUBLIC_ enum ndr_err_code ndr_push_NET_DISPLAY_USER(struct ndr_push *ndr, int ndr_flags, const struct NET_DISPLAY_USER *r) { if (ndr_flags & NDR_SCALARS) { diff --git a/source3/librpc/gen_ndr/ndr_libnetapi.h b/source3/librpc/gen_ndr/ndr_libnetapi.h index 4bf5b5f137..8ed66fe308 100644 --- a/source3/librpc/gen_ndr/ndr_libnetapi.h +++ b/source3/librpc/gen_ndr/ndr_libnetapi.h @@ -107,6 +107,9 @@ void ndr_print_USER_INFO_23(struct ndr_print *ndr, const char *name, const struc enum ndr_err_code ndr_push_USER_INFO_1007(struct ndr_push *ndr, int ndr_flags, const struct USER_INFO_1007 *r); enum ndr_err_code ndr_pull_USER_INFO_1007(struct ndr_pull *ndr, int ndr_flags, struct USER_INFO_1007 *r); void ndr_print_USER_INFO_1007(struct ndr_print *ndr, const char *name, const struct USER_INFO_1007 *r); +enum ndr_err_code ndr_push_USER_INFO_X(struct ndr_push *ndr, int ndr_flags, const struct USER_INFO_X *r); +enum ndr_err_code ndr_pull_USER_INFO_X(struct ndr_pull *ndr, int ndr_flags, struct USER_INFO_X *r); +void ndr_print_USER_INFO_X(struct ndr_print *ndr, const char *name, const struct USER_INFO_X *r); enum ndr_err_code ndr_push_NET_DISPLAY_USER(struct ndr_push *ndr, int ndr_flags, const struct NET_DISPLAY_USER *r); enum ndr_err_code ndr_pull_NET_DISPLAY_USER(struct ndr_pull *ndr, int ndr_flags, struct NET_DISPLAY_USER *r); void ndr_print_NET_DISPLAY_USER(struct ndr_print *ndr, const char *name, const struct NET_DISPLAY_USER *r); |