diff options
author | Tim Potter <tpot@samba.org> | 2001-08-27 21:32:54 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2001-08-27 21:32:54 +0000 |
commit | 316c3fb510f9b0dbff18077f3249219ba3028b3d (patch) | |
tree | 1ff7be3dbae9e88f5c4ebd6d1b5cc83646af7e1a /source3 | |
parent | 8b6b1b2e82a23d4e6472a65dd1e1dd5fdd6cd277 (diff) | |
download | samba-316c3fb510f9b0dbff18077f3249219ba3028b3d.tar.gz samba-316c3fb510f9b0dbff18077f3249219ba3028b3d.tar.bz2 samba-316c3fb510f9b0dbff18077f3249219ba3028b3d.zip |
Convert to NTSTATUS.
(This used to be commit 9e69f59d6c4ec4e0474c594ada3a05ecc2bc806b)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/cli_dfs.c | 34 | ||||
-rw-r--r-- | source3/libsmb/cli_lsarpc.c | 52 | ||||
-rw-r--r-- | source3/libsmb/cli_reg.c | 22 | ||||
-rw-r--r-- | source3/libsmb/cli_samr.c | 168 | ||||
-rw-r--r-- | source3/libsmb/cli_spoolss.c | 48 | ||||
-rw-r--r-- | source3/libsmb/cli_srvsvc.c | 7 |
6 files changed, 165 insertions, 166 deletions
diff --git a/source3/libsmb/cli_dfs.c b/source3/libsmb/cli_dfs.c index ad36438ed8..b1ad01e748 100644 --- a/source3/libsmb/cli_dfs.c +++ b/source3/libsmb/cli_dfs.c @@ -31,13 +31,13 @@ struct cli_state *cli_dfs_initialise(struct cli_state *cli, char *system_name, /* Query DFS support */ -uint32 cli_dfs_exist(struct cli_state *cli, TALLOC_CTX *mem_ctx, - BOOL *dfs_exists) +NTSTATUS cli_dfs_exist(struct cli_state *cli, TALLOC_CTX *mem_ctx, + BOOL *dfs_exists) { prs_struct qbuf, rbuf; DFS_Q_DFS_EXIST q; DFS_R_DFS_EXIST r; - uint32 result = NT_STATUS_UNSUCCESSFUL; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; ZERO_STRUCT(q); ZERO_STRUCT(r); @@ -75,14 +75,14 @@ uint32 cli_dfs_exist(struct cli_state *cli, TALLOC_CTX *mem_ctx, return result; } -uint32 cli_dfs_add(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename, - char *comment, uint32 flags) +NTSTATUS cli_dfs_add(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename, + char *comment, uint32 flags) { prs_struct qbuf, rbuf; DFS_Q_DFS_ADD q; DFS_R_DFS_ADD r; - uint32 result = NT_STATUS_UNSUCCESSFUL; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; ZERO_STRUCT(q); ZERO_STRUCT(r); @@ -117,13 +117,13 @@ uint32 cli_dfs_add(struct cli_state *cli, TALLOC_CTX *mem_ctx, return result; } -uint32 cli_dfs_remove(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename) +NTSTATUS cli_dfs_remove(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename) { prs_struct qbuf, rbuf; DFS_Q_DFS_REMOVE q; DFS_R_DFS_REMOVE r; - uint32 result = NT_STATUS_UNSUCCESSFUL; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; ZERO_STRUCT(q); ZERO_STRUCT(r); @@ -159,15 +159,15 @@ uint32 cli_dfs_remove(struct cli_state *cli, TALLOC_CTX *mem_ctx, return result; } -uint32 cli_dfs_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename, - uint32 info_level, DFS_INFO_CTR *ctr) +NTSTATUS cli_dfs_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename, + uint32 info_level, DFS_INFO_CTR *ctr) { prs_struct qbuf, rbuf; DFS_Q_DFS_GET_INFO q; DFS_R_DFS_GET_INFO r; - uint32 result = NT_STATUS_UNSUCCESSFUL; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; ZERO_STRUCT(q); ZERO_STRUCT(r); @@ -207,13 +207,13 @@ uint32 cli_dfs_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Enumerate dfs shares */ -uint32 cli_dfs_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 info_level, DFS_INFO_CTR *ctr) +NTSTATUS cli_dfs_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 info_level, DFS_INFO_CTR *ctr) { prs_struct qbuf, rbuf; DFS_Q_DFS_ENUM q; DFS_R_DFS_ENUM r; - uint32 result = NT_STATUS_UNSUCCESSFUL; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; ZERO_STRUCT(q); ZERO_STRUCT(r); diff --git a/source3/libsmb/cli_lsarpc.c b/source3/libsmb/cli_lsarpc.c index 023f7f8dae..791b6eace3 100644 --- a/source3/libsmb/cli_lsarpc.c +++ b/source3/libsmb/cli_lsarpc.c @@ -35,14 +35,14 @@ struct cli_state *cli_lsa_initialise(struct cli_state *cli, char *system_name, /* Open a LSA policy handle */ -uint32 cli_lsa_open_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx, - BOOL sec_qos, uint32 des_access, POLICY_HND *pol) +NTSTATUS cli_lsa_open_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx, + BOOL sec_qos, uint32 des_access, POLICY_HND *pol) { prs_struct qbuf, rbuf; LSA_Q_OPEN_POL q; LSA_R_OPEN_POL r; LSA_SEC_QOS qos; - uint32 result; + NTSTATUS result; ZERO_STRUCT(q); ZERO_STRUCT(r); @@ -91,14 +91,14 @@ uint32 cli_lsa_open_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Open a LSA policy handle */ -uint32 cli_lsa_open_policy2(struct cli_state *cli, TALLOC_CTX *mem_ctx, - BOOL sec_qos, uint32 des_access, POLICY_HND *pol) +NTSTATUS cli_lsa_open_policy2(struct cli_state *cli, TALLOC_CTX *mem_ctx, + BOOL sec_qos, uint32 des_access, POLICY_HND *pol) { prs_struct qbuf, rbuf; LSA_Q_OPEN_POL2 q; LSA_R_OPEN_POL2 r; LSA_SEC_QOS qos; - uint32 result; + NTSTATUS result; ZERO_STRUCT(q); ZERO_STRUCT(r); @@ -149,13 +149,13 @@ uint32 cli_lsa_open_policy2(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Close a LSA policy handle */ -uint32 cli_lsa_close(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol) +NTSTATUS cli_lsa_close(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol) { prs_struct qbuf, rbuf; LSA_Q_CLOSE q; LSA_R_CLOSE r; - uint32 result; + NTSTATUS result; ZERO_STRUCT(q); ZERO_STRUCT(r); @@ -197,16 +197,16 @@ uint32 cli_lsa_close(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Lookup a list of sids */ -uint32 cli_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, int num_sids, DOM_SID *sids, - char ***names, uint32 **types, int *num_names) +NTSTATUS cli_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, int num_sids, DOM_SID *sids, + char ***names, uint32 **types, int *num_names) { prs_struct qbuf, rbuf; LSA_Q_LOOKUP_SIDS q; LSA_R_LOOKUP_SIDS r; DOM_R_REF ref; LSA_TRANS_NAME_ENUM t_names; - uint32 result; + NTSTATUS result; int i; ZERO_STRUCT(q); @@ -306,15 +306,15 @@ uint32 cli_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Lookup a list of names */ -uint32 cli_lsa_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, int num_names, char **names, - DOM_SID **sids, uint32 **types, int *num_sids) +NTSTATUS cli_lsa_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, int num_names, char **names, + DOM_SID **sids, uint32 **types, int *num_sids) { prs_struct qbuf, rbuf; LSA_Q_LOOKUP_NAMES q; LSA_R_LOOKUP_NAMES r; DOM_R_REF ref; - uint32 result; + NTSTATUS result; int i; ZERO_STRUCT(q); @@ -407,14 +407,14 @@ uint32 cli_lsa_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Query info policy */ -uint32 cli_lsa_query_info_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint16 info_class, - fstring domain_name, DOM_SID *domain_sid) +NTSTATUS cli_lsa_query_info_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint16 info_class, + fstring domain_name, DOM_SID *domain_sid) { prs_struct qbuf, rbuf; LSA_Q_QUERY_INFO q; LSA_R_QUERY_INFO r; - uint32 result; + NTSTATUS result; ZERO_STRUCT(q); ZERO_STRUCT(r); @@ -494,15 +494,15 @@ uint32 cli_lsa_query_info_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Enumerate list of trusted domains */ -uint32 cli_lsa_enum_trust_dom(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 *enum_ctx, - uint32 *num_domains, char ***domain_names, - DOM_SID **domain_sids) +NTSTATUS cli_lsa_enum_trust_dom(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 *enum_ctx, + uint32 *num_domains, char ***domain_names, + DOM_SID **domain_sids) { prs_struct qbuf, rbuf; LSA_Q_ENUM_TRUST_DOM q; LSA_R_ENUM_TRUST_DOM r; - uint32 result; + NTSTATUS result; int i; ZERO_STRUCT(q); diff --git a/source3/libsmb/cli_reg.c b/source3/libsmb/cli_reg.c index 42fea91874..88e6d3b36d 100644 --- a/source3/libsmb/cli_reg.c +++ b/source3/libsmb/cli_reg.c @@ -1,4 +1,3 @@ - /* Unix SMB/Netbios implementation. Version 2.2 @@ -28,24 +27,25 @@ #include "includes.h" /* Opens a SMB connection to the WINREG pipe */ + struct cli_state *cli_winreg_initialise(struct cli_state *cli, - char *system_name, - struct ntuser_creds *creds) + char *system_name, + struct ntuser_creds *creds) { return cli_pipe_initialise(cli, system_name, PIPE_WINREG, creds); } /* Shutdown a server */ -uint32 cli_reg_shutdown(struct cli_state * cli, TALLOC_CTX *mem_ctx, - const char *srv_name, const char *msg, - uint32 timeout, uint16 flags) +NTSTATUS cli_reg_shutdown(struct cli_state * cli, TALLOC_CTX *mem_ctx, + const char *srv_name, const char *msg, + uint32 timeout, uint16 flags) { prs_struct qbuf; prs_struct rbuf; REG_Q_SHUTDOWN q_s; REG_R_SHUTDOWN r_s; - uint32 result = NT_STATUS_UNSUCCESSFUL; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; if (msg == NULL) return False; @@ -78,15 +78,14 @@ done: /* Abort a server shutdown */ -uint32 cli_reg_abort_shutdown(struct cli_state * cli, - TALLOC_CTX *mem_ctx, - const char *srv_name) +NTSTATUS cli_reg_abort_shutdown(struct cli_state * cli, TALLOC_CTX *mem_ctx, + const char *srv_name) { prs_struct rbuf; prs_struct qbuf; REG_Q_ABORT_SHUTDOWN q_s; REG_R_ABORT_SHUTDOWN r_s; - uint32 result = NT_STATUS_UNSUCCESSFUL; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; ZERO_STRUCT (q_s); ZERO_STRUCT (r_s); @@ -113,4 +112,3 @@ done: return result; } - diff --git a/source3/libsmb/cli_samr.c b/source3/libsmb/cli_samr.c index 123f5c116b..9e40135801 100644 --- a/source3/libsmb/cli_samr.c +++ b/source3/libsmb/cli_samr.c @@ -35,13 +35,13 @@ struct cli_state *cli_samr_initialise(struct cli_state *cli, char *system_name, /* Connect to SAMR database */ -uint32 cli_samr_connect(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 access_mask, POLICY_HND *connect_pol) +NTSTATUS cli_samr_connect(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 access_mask, POLICY_HND *connect_pol) { prs_struct qbuf, rbuf; SAMR_Q_CONNECT q; SAMR_R_CONNECT r; - uint32 result = NT_STATUS_UNSUCCESSFUL; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; ZERO_STRUCT(q); ZERO_STRUCT(r); @@ -81,13 +81,13 @@ uint32 cli_samr_connect(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Close SAMR handle */ -uint32 cli_samr_close(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *connect_pol) +NTSTATUS cli_samr_close(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *connect_pol) { prs_struct qbuf, rbuf; SAMR_Q_CLOSE_HND q; SAMR_R_CLOSE_HND r; - uint32 result = NT_STATUS_UNSUCCESSFUL; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; ZERO_STRUCT(q); ZERO_STRUCT(r); @@ -127,14 +127,14 @@ uint32 cli_samr_close(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Open handle on a domain */ -uint32 cli_samr_open_domain(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *connect_pol, uint32 access_mask, - DOM_SID *domain_sid, POLICY_HND *domain_pol) +NTSTATUS cli_samr_open_domain(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *connect_pol, uint32 access_mask, + DOM_SID *domain_sid, POLICY_HND *domain_pol) { prs_struct qbuf, rbuf; SAMR_Q_OPEN_DOMAIN q; SAMR_R_OPEN_DOMAIN r; - uint32 result = NT_STATUS_UNSUCCESSFUL; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; ZERO_STRUCT(q); ZERO_STRUCT(r); @@ -174,14 +174,14 @@ uint32 cli_samr_open_domain(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Open handle on a user */ -uint32 cli_samr_open_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *domain_pol, uint32 access_mask, - uint32 user_rid, POLICY_HND *user_pol) +NTSTATUS cli_samr_open_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, uint32 access_mask, + uint32 user_rid, POLICY_HND *user_pol) { prs_struct qbuf, rbuf; SAMR_Q_OPEN_USER q; SAMR_R_OPEN_USER r; - uint32 result = NT_STATUS_UNSUCCESSFUL; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; ZERO_STRUCT(q); ZERO_STRUCT(r); @@ -221,14 +221,14 @@ uint32 cli_samr_open_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Open handle on a group */ -uint32 cli_samr_open_group(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *domain_pol, uint32 access_mask, - uint32 group_rid, POLICY_HND *group_pol) +NTSTATUS cli_samr_open_group(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, uint32 access_mask, + uint32 group_rid, POLICY_HND *group_pol) { prs_struct qbuf, rbuf; SAMR_Q_OPEN_GROUP q; SAMR_R_OPEN_GROUP r; - uint32 result = NT_STATUS_UNSUCCESSFUL; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; ZERO_STRUCT(q); ZERO_STRUCT(r); @@ -268,14 +268,14 @@ uint32 cli_samr_open_group(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Query user info */ -uint32 cli_samr_query_userinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *user_pol, uint16 switch_value, - SAM_USERINFO_CTR **ctr) +NTSTATUS cli_samr_query_userinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol, uint16 switch_value, + SAM_USERINFO_CTR **ctr) { prs_struct qbuf, rbuf; SAMR_Q_QUERY_USERINFO q; SAMR_R_QUERY_USERINFO r; - uint32 result = NT_STATUS_UNSUCCESSFUL; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; ZERO_STRUCT(q); ZERO_STRUCT(r); @@ -314,14 +314,14 @@ uint32 cli_samr_query_userinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Query group info */ -uint32 cli_samr_query_groupinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *group_pol, uint32 info_level, - GROUP_INFO_CTR *ctr) +NTSTATUS cli_samr_query_groupinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *group_pol, uint32 info_level, + GROUP_INFO_CTR *ctr) { prs_struct qbuf, rbuf; SAMR_Q_QUERY_GROUPINFO q; SAMR_R_QUERY_GROUPINFO r; - uint32 result = NT_STATUS_UNSUCCESSFUL; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; ZERO_STRUCT(q); ZERO_STRUCT(r); @@ -361,14 +361,14 @@ uint32 cli_samr_query_groupinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Query user groups */ -uint32 cli_samr_query_usergroups(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *user_pol, uint32 *num_groups, - DOM_GID **gid) +NTSTATUS cli_samr_query_usergroups(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol, uint32 *num_groups, + DOM_GID **gid) { prs_struct qbuf, rbuf; SAMR_Q_QUERY_USERGROUPS q; SAMR_R_QUERY_USERGROUPS r; - uint32 result = NT_STATUS_UNSUCCESSFUL; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; ZERO_STRUCT(q); ZERO_STRUCT(r); @@ -409,14 +409,14 @@ uint32 cli_samr_query_usergroups(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Query user groups */ -uint32 cli_samr_query_groupmem(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *group_pol, uint32 *num_mem, - uint32 **rid, uint32 **attr) +NTSTATUS cli_samr_query_groupmem(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *group_pol, uint32 *num_mem, + uint32 **rid, uint32 **attr) { prs_struct qbuf, rbuf; SAMR_Q_QUERY_GROUPMEM q; SAMR_R_QUERY_GROUPMEM r; - uint32 result = NT_STATUS_UNSUCCESSFUL; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; ZERO_STRUCT(q); ZERO_STRUCT(r); @@ -458,15 +458,15 @@ uint32 cli_samr_query_groupmem(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Enumerate domain groups */ -uint32 cli_samr_enum_dom_groups(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 *start_idx, - uint32 size, struct acct_info **dom_groups, - uint32 *num_dom_groups) +NTSTATUS cli_samr_enum_dom_groups(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 *start_idx, + uint32 size, struct acct_info **dom_groups, + uint32 *num_dom_groups) { prs_struct qbuf, rbuf; SAMR_Q_ENUM_DOM_GROUPS q; SAMR_R_ENUM_DOM_GROUPS r; - uint32 result = NT_STATUS_UNSUCCESSFUL, name_idx, i; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL, name_idx, i; ZERO_STRUCT(q); ZERO_STRUCT(r); @@ -535,14 +535,14 @@ uint32 cli_samr_enum_dom_groups(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Query alias members */ -uint32 cli_samr_query_aliasmem(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *alias_pol, uint32 *num_mem, - DOM_SID **sids) +NTSTATUS cli_samr_query_aliasmem(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *alias_pol, uint32 *num_mem, + DOM_SID **sids) { prs_struct qbuf, rbuf; SAMR_Q_QUERY_ALIASMEM q; SAMR_R_QUERY_ALIASMEM r; - uint32 result = NT_STATUS_UNSUCCESSFUL, i; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL, i; ZERO_STRUCT(q); ZERO_STRUCT(r); @@ -593,14 +593,14 @@ uint32 cli_samr_query_aliasmem(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Open handle on an alias */ -uint32 cli_samr_open_alias(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *domain_pol, uint32 access_mask, - uint32 alias_rid, POLICY_HND *alias_pol) +NTSTATUS cli_samr_open_alias(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, uint32 access_mask, + uint32 alias_rid, POLICY_HND *alias_pol) { prs_struct qbuf, rbuf; SAMR_Q_OPEN_ALIAS q; SAMR_R_OPEN_ALIAS r; - uint32 result; + NTSTATUS result; ZERO_STRUCT(q); ZERO_STRUCT(r); @@ -642,14 +642,14 @@ uint32 cli_samr_open_alias(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Query domain info */ -uint32 cli_samr_query_dom_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *domain_pol, uint16 switch_value, - SAM_UNK_CTR *ctr) +NTSTATUS cli_samr_query_dom_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, uint16 switch_value, + SAM_UNK_CTR *ctr) { prs_struct qbuf, rbuf; SAMR_Q_QUERY_DOMAIN_INFO q; SAMR_R_QUERY_DOMAIN_INFO r; - uint32 result = NT_STATUS_UNSUCCESSFUL; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; ZERO_STRUCT(q); ZERO_STRUCT(r); @@ -691,15 +691,15 @@ uint32 cli_samr_query_dom_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Query display info */ -uint32 cli_samr_query_dispinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *domain_pol, uint32 *start_idx, - uint16 switch_value, uint32 *num_entries, - uint32 max_entries, SAM_DISPINFO_CTR *ctr) +NTSTATUS cli_samr_query_dispinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, uint32 *start_idx, + uint16 switch_value, uint32 *num_entries, + uint32 max_entries, SAM_DISPINFO_CTR *ctr) { prs_struct qbuf, rbuf; SAMR_Q_QUERY_DISPINFO q; SAMR_R_QUERY_DISPINFO r; - uint32 result = NT_STATUS_UNSUCCESSFUL; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; ZERO_STRUCT(q); ZERO_STRUCT(r); @@ -749,16 +749,16 @@ uint32 cli_samr_query_dispinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Lookup rids. Note that NT4 seems to crash if more than ~1000 rids are looked up in one packet. */ -uint32 cli_samr_lookup_rids(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *domain_pol, uint32 flags, - uint32 num_rids, uint32 *rids, - uint32 *num_names, char ***names, - uint32 **name_types) +NTSTATUS cli_samr_lookup_rids(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, uint32 flags, + uint32 num_rids, uint32 *rids, + uint32 *num_names, char ***names, + uint32 **name_types) { prs_struct qbuf, rbuf; SAMR_Q_LOOKUP_RIDS q; SAMR_R_LOOKUP_RIDS r; - uint32 result = NT_STATUS_UNSUCCESSFUL, i; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL, i; if (num_rids > 1000) { DEBUG(2, ("cli_samr_lookup_rids: warning: NT4 can crash if " @@ -822,16 +822,16 @@ uint32 cli_samr_lookup_rids(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Lookup names */ -uint32 cli_samr_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *domain_pol, uint32 flags, - uint32 num_names, char **names, - uint32 *num_rids, uint32 **rids, - uint32 **rid_types) +NTSTATUS cli_samr_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, uint32 flags, + uint32 num_names, char **names, + uint32 *num_rids, uint32 **rids, + uint32 **rid_types) { prs_struct qbuf, rbuf; SAMR_Q_LOOKUP_NAMES q; SAMR_R_LOOKUP_NAMES r; - uint32 result = NT_STATUS_UNSUCCESSFUL, i; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL, i; ZERO_STRUCT(q); ZERO_STRUCT(r); @@ -886,15 +886,15 @@ uint32 cli_samr_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Create a domain user */ -uint32 cli_samr_create_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *domain_pol, char *acct_name, - uint32 acb_info, uint32 unknown, - POLICY_HND *user_pol, uint32 *rid) +NTSTATUS cli_samr_create_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, char *acct_name, + uint32 acb_info, uint32 unknown, + POLICY_HND *user_pol, uint32 *rid) { prs_struct qbuf, rbuf; SAMR_Q_CREATE_USER q; SAMR_R_CREATE_USER r; - uint32 result = NT_STATUS_UNSUCCESSFUL; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; ZERO_STRUCT(q); ZERO_STRUCT(r); @@ -940,14 +940,14 @@ uint32 cli_samr_create_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Set userinfo */ -uint32 cli_samr_set_userinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *user_pol, uint16 switch_value, - uchar sess_key[16], SAM_USERINFO_CTR *ctr) +NTSTATUS cli_samr_set_userinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol, uint16 switch_value, + uchar sess_key[16], SAM_USERINFO_CTR *ctr) { prs_struct qbuf, rbuf; SAMR_Q_SET_USERINFO q; SAMR_R_SET_USERINFO r; - uint32 result = NT_STATUS_UNSUCCESSFUL; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; ZERO_STRUCT(q); ZERO_STRUCT(r); @@ -990,14 +990,14 @@ uint32 cli_samr_set_userinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Set userinfo2 */ -uint32 cli_samr_set_userinfo2(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *user_pol, uint16 switch_value, - uchar sess_key[16], SAM_USERINFO_CTR *ctr) +NTSTATUS cli_samr_set_userinfo2(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol, uint16 switch_value, + uchar sess_key[16], SAM_USERINFO_CTR *ctr) { prs_struct qbuf, rbuf; SAMR_Q_SET_USERINFO2 q; SAMR_R_SET_USERINFO2 r; - uint32 result = NT_STATUS_UNSUCCESSFUL; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; ZERO_STRUCT(q); ZERO_STRUCT(r); @@ -1037,13 +1037,13 @@ uint32 cli_samr_set_userinfo2(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Delete domain user */ -uint32 cli_samr_delete_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *user_pol) +NTSTATUS cli_samr_delete_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol) { prs_struct qbuf, rbuf; SAMR_Q_DELETE_DOM_USER q; SAMR_R_DELETE_DOM_USER r; - uint32 result = NT_STATUS_UNSUCCESSFUL; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; ZERO_STRUCT(q); ZERO_STRUCT(r); diff --git a/source3/libsmb/cli_spoolss.c b/source3/libsmb/cli_spoolss.c index b301de6448..54769ce18d 100644 --- a/source3/libsmb/cli_spoolss.c +++ b/source3/libsmb/cli_spoolss.c @@ -38,7 +38,7 @@ struct cli_state *cli_spoolss_initialise(struct cli_state *cli, /* Open printer ex */ -uint32 cli_spoolss_open_printer_ex( +NTSTATUS cli_spoolss_open_printer_ex( struct cli_state *cli, TALLOC_CTX *mem_ctx, char *printername, @@ -52,7 +52,7 @@ uint32 cli_spoolss_open_printer_ex( prs_struct qbuf, rbuf; SPOOL_Q_OPEN_PRINTER_EX q; SPOOL_R_OPEN_PRINTER_EX r; - uint32 result; + NTSTATUS result; ZERO_STRUCT(q); ZERO_STRUCT(r); @@ -97,7 +97,7 @@ uint32 cli_spoolss_open_printer_ex( /* Close a printer handle */ -uint32 cli_spoolss_close_printer( +NTSTATUS cli_spoolss_close_printer( struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol @@ -106,7 +106,7 @@ uint32 cli_spoolss_close_printer( prs_struct qbuf, rbuf; SPOOL_Q_CLOSEPRINTER q; SPOOL_R_CLOSEPRINTER r; - uint32 result; + NTSTATUS result; ZERO_STRUCT(q); ZERO_STRUCT(r); @@ -380,7 +380,7 @@ static void decode_printerdriverdir_1 ( /* Enumerate printers */ -uint32 cli_spoolss_enum_printers( +NTSTATUS cli_spoolss_enum_printers( struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 flags, @@ -394,7 +394,7 @@ uint32 cli_spoolss_enum_printers( SPOOL_R_ENUMPRINTERS r; NEW_BUFFER buffer; uint32 needed = 100; - uint32 result; + NTSTATUS result; fstring server; ZERO_STRUCT(q); @@ -458,7 +458,7 @@ uint32 cli_spoolss_enum_printers( } /* Enumerate printer ports */ -uint32 cli_spoolss_enum_ports( +NTSTATUS cli_spoolss_enum_ports( struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 level, @@ -471,7 +471,7 @@ uint32 cli_spoolss_enum_ports( SPOOL_R_ENUMPORTS r; NEW_BUFFER buffer; uint32 needed = 100; - uint32 result; + NTSTATUS result; fstring server; ZERO_STRUCT(q); @@ -532,7 +532,7 @@ uint32 cli_spoolss_enum_ports( } /* Get printer info */ -uint32 cli_spoolss_getprinter( +NTSTATUS cli_spoolss_getprinter( struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, @@ -545,7 +545,7 @@ uint32 cli_spoolss_getprinter( SPOOL_R_GETPRINTER r; NEW_BUFFER buffer; uint32 needed = 100; - uint32 result; + NTSTATUS result; ZERO_STRUCT(q); ZERO_STRUCT(r); @@ -604,7 +604,7 @@ uint32 cli_spoolss_getprinter( /********************************************************************** * Set printer info */ -uint32 cli_spoolss_setprinter( +NTSTATUS cli_spoolss_setprinter( struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, @@ -616,7 +616,7 @@ uint32 cli_spoolss_setprinter( prs_struct qbuf, rbuf; SPOOL_Q_SETPRINTER q; SPOOL_R_SETPRINTER r; - uint32 result = NT_STATUS_UNSUCCESSFUL; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; ZERO_STRUCT(q); ZERO_STRUCT(r); @@ -654,7 +654,7 @@ done: /********************************************************************** * Get installed printer drivers for a given printer */ -uint32 cli_spoolss_getprinterdriver ( +NTSTATUS cli_spoolss_getprinterdriver ( struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, @@ -668,7 +668,7 @@ uint32 cli_spoolss_getprinterdriver ( SPOOL_R_GETPRINTERDRIVER2 r; NEW_BUFFER buffer; uint32 needed = 1024; - uint32 result; + NTSTATUS result; fstring server; ZERO_STRUCT(q); @@ -734,7 +734,7 @@ uint32 cli_spoolss_getprinterdriver ( /********************************************************************** * Get installed printer drivers for a given printer */ -uint32 cli_spoolss_enumprinterdrivers ( +NTSTATUS cli_spoolss_enumprinterdrivers ( struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 level, @@ -748,7 +748,7 @@ uint32 cli_spoolss_enumprinterdrivers ( SPOOL_R_ENUMPRINTERDRIVERS r; NEW_BUFFER buffer; uint32 needed = 0; - uint32 result; + NTSTATUS result; fstring server; ZERO_STRUCT(q); @@ -816,7 +816,7 @@ uint32 cli_spoolss_enumprinterdrivers ( /********************************************************************** * Get installed printer drivers for a given printer */ -uint32 cli_spoolss_getprinterdriverdir ( +NTSTATUS cli_spoolss_getprinterdriverdir ( struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 level, @@ -829,7 +829,7 @@ uint32 cli_spoolss_getprinterdriverdir ( SPOOL_R_GETPRINTERDRIVERDIR r; NEW_BUFFER buffer; uint32 needed = 100; - uint32 result; + NTSTATUS result; fstring server; ZERO_STRUCT(q); @@ -887,7 +887,7 @@ uint32 cli_spoolss_getprinterdriverdir ( /********************************************************************** * Install a printer driver */ -uint32 cli_spoolss_addprinterdriver ( +NTSTATUS cli_spoolss_addprinterdriver ( struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 level, @@ -897,7 +897,7 @@ uint32 cli_spoolss_addprinterdriver ( prs_struct qbuf, rbuf; SPOOL_Q_ADDPRINTERDRIVER q; SPOOL_R_ADDPRINTERDRIVER r; - uint32 result = NT_STATUS_UNSUCCESSFUL; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; fstring server; ZERO_STRUCT(q); @@ -943,7 +943,7 @@ done: /********************************************************************** * Install a printer */ -uint32 cli_spoolss_addprinterex ( +NTSTATUS cli_spoolss_addprinterex ( struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 level, @@ -953,7 +953,7 @@ uint32 cli_spoolss_addprinterex ( prs_struct qbuf, rbuf; SPOOL_Q_ADDPRINTEREX q; SPOOL_R_ADDPRINTEREX r; - uint32 result; + NTSTATUS result; fstring server, client, user; @@ -1006,7 +1006,7 @@ done: * Delete a Printer Driver from the server (does not remove * the driver files */ -uint32 cli_spoolss_deleteprinterdriver ( +NTSTATUS cli_spoolss_deleteprinterdriver ( struct cli_state *cli, TALLOC_CTX *mem_ctx, char *arch, @@ -1016,7 +1016,7 @@ uint32 cli_spoolss_deleteprinterdriver ( prs_struct qbuf, rbuf; SPOOL_Q_DELETEPRINTERDRIVER q; SPOOL_R_DELETEPRINTERDRIVER r; - uint32 result; + NTSTATUS result; fstring server; ZERO_STRUCT(q); diff --git a/source3/libsmb/cli_srvsvc.c b/source3/libsmb/cli_srvsvc.c index 042a9c44ff..c9bd464362 100644 --- a/source3/libsmb/cli_srvsvc.c +++ b/source3/libsmb/cli_srvsvc.c @@ -32,13 +32,14 @@ struct cli_state *cli_svrsvc_initialise(struct cli_state *cli, return cli_pipe_initialise(cli, system_name, PIPE_SRVSVC, creds); } -uint32 cli_srvsvc_net_srv_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 switch_value, SRV_INFO_CTR *ctr) +NTSTATUS cli_srvsvc_net_srv_get_info(struct cli_state *cli, + TALLOC_CTX *mem_ctx, + uint32 switch_value, SRV_INFO_CTR *ctr) { prs_struct qbuf, rbuf; SRV_Q_NET_SRV_GET_INFO q; SRV_R_NET_SRV_GET_INFO r; - uint32 result; + NTSTATUS result; ZERO_STRUCT(q); ZERO_STRUCT(r); |