diff options
author | Tim Potter <tpot@samba.org> | 2003-02-25 23:51:56 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2003-02-25 23:51:56 +0000 |
commit | a20aba09996e470425a151271237f2d48a8302af (patch) | |
tree | 5524c76d6ebb4ed1199e688d3306186622b76a10 | |
parent | 55ee43cfb8b3ffb99c50d987f07a96fe79a0fe92 (diff) | |
download | samba-a20aba09996e470425a151271237f2d48a8302af.tar.gz samba-a20aba09996e470425a151271237f2d48a8302af.tar.xz samba-a20aba09996e470425a151271237f2d48a8302af.zip |
Merge: const fixes.
-rw-r--r-- | source/rpc_client/cli_dfs.c | 12 | ||||
-rw-r--r-- | source/rpc_client/cli_lsarpc.c | 5 | ||||
-rw-r--r-- | source/rpc_client/cli_netlogon.c | 2 | ||||
-rw-r--r-- | source/rpc_client/cli_spoolss.c | 17 | ||||
-rw-r--r-- | source/rpc_client/cli_srvsvc.c | 7 | ||||
-rw-r--r-- | source/rpc_parse/parse_dfs.c | 13 | ||||
-rw-r--r-- | source/rpc_parse/parse_spoolss.c | 14 | ||||
-rw-r--r-- | source/rpcclient/cmd_dfs.c | 16 | ||||
-rw-r--r-- | source/rpcclient/cmd_ds.c | 2 | ||||
-rw-r--r-- | source/rpcclient/cmd_lsarpc.c | 28 | ||||
-rw-r--r-- | source/rpcclient/cmd_netlogon.c | 12 | ||||
-rw-r--r-- | source/rpcclient/cmd_reg.c | 4 | ||||
-rw-r--r-- | source/rpcclient/cmd_samr.c | 36 | ||||
-rw-r--r-- | source/rpcclient/cmd_spoolss.c | 75 | ||||
-rw-r--r-- | source/rpcclient/cmd_srvsvc.c | 8 | ||||
-rw-r--r-- | source/rpcclient/rpcclient.h | 4 |
16 files changed, 136 insertions, 119 deletions
diff --git a/source/rpc_client/cli_dfs.c b/source/rpc_client/cli_dfs.c index 7fc27b9c3b2..2136b69df07 100644 --- a/source/rpc_client/cli_dfs.c +++ b/source/rpc_client/cli_dfs.c @@ -67,8 +67,8 @@ NTSTATUS cli_dfs_exist(struct cli_state *cli, TALLOC_CTX *mem_ctx, } NTSTATUS cli_dfs_add(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename, - char *comment, uint32 flags) + const char *entrypath, const char *servername, + const char *sharename, const char *comment, uint32 flags) { prs_struct qbuf, rbuf; DFS_Q_DFS_ADD q; @@ -111,7 +111,8 @@ NTSTATUS cli_dfs_add(struct cli_state *cli, TALLOC_CTX *mem_ctx, } NTSTATUS cli_dfs_remove(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *entrypath, char *servername, char *sharename) + const char *entrypath, const char *servername, + const char *sharename) { prs_struct qbuf, rbuf; DFS_Q_DFS_REMOVE q; @@ -153,8 +154,9 @@ NTSTATUS cli_dfs_remove(struct cli_state *cli, TALLOC_CTX *mem_ctx, } 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) + const char *entrypath, const char *servername, + const char *sharename, uint32 info_level, + DFS_INFO_CTR *ctr) { prs_struct qbuf, rbuf; diff --git a/source/rpc_client/cli_lsarpc.c b/source/rpc_client/cli_lsarpc.c index 84b5aa725af..db873236e46 100644 --- a/source/rpc_client/cli_lsarpc.c +++ b/source/rpc_client/cli_lsarpc.c @@ -805,7 +805,8 @@ NTSTATUS cli_lsa_enum_privilege(struct cli_state *cli, TALLOC_CTX *mem_ctx, /** Get privilege name */ NTSTATUS cli_lsa_get_dispname(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, char *name, uint16 lang_id, uint16 lang_id_sys, + POLICY_HND *pol, const char *name, + uint16 lang_id, uint16 lang_id_sys, fstring description, uint16 *lang_id_desc) { prs_struct qbuf, rbuf; @@ -1050,7 +1051,7 @@ NTSTATUS cli_lsa_enum_privsaccount(struct cli_state *cli, TALLOC_CTX *mem_ctx, /** Get a privilege value given its name */ NTSTATUS cli_lsa_lookupprivvalue(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, char *name, LUID *luid) + POLICY_HND *pol, const char *name, LUID *luid) { prs_struct qbuf, rbuf; LSA_Q_LOOKUPPRIVVALUE q; diff --git a/source/rpc_client/cli_netlogon.c b/source/rpc_client/cli_netlogon.c index b5ad7987554..cbb09803af6 100644 --- a/source/rpc_client/cli_netlogon.c +++ b/source/rpc_client/cli_netlogon.c @@ -489,7 +489,7 @@ NTSTATUS cli_netlogon_sam_deltas(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Logon domain user */ NTSTATUS cli_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *username, char *password, + const char *username, const char *password, int logon_type) { prs_struct qbuf, rbuf; diff --git a/source/rpc_client/cli_spoolss.c b/source/rpc_client/cli_spoolss.c index a1aa6664c19..bb6ce1b9985 100644 --- a/source/rpc_client/cli_spoolss.c +++ b/source/rpc_client/cli_spoolss.c @@ -1243,8 +1243,8 @@ WERROR cli_spoolss_addform(struct cli_state *cli, TALLOC_CTX *mem_ctx, */ WERROR cli_spoolss_setform(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *handle, uint32 level, char *form_name, - FORM *form) + POLICY_HND *handle, uint32 level, + const char *form_name, FORM *form) { prs_struct qbuf, rbuf; SPOOL_Q_SETFORM q; @@ -1305,8 +1305,8 @@ WERROR cli_spoolss_setform(struct cli_state *cli, TALLOC_CTX *mem_ctx, WERROR cli_spoolss_getform(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 offered, uint32 *needed, - POLICY_HND *handle, char *formname, uint32 level, - FORM_1 *form) + POLICY_HND *handle, const char *formname, + uint32 level, FORM_1 *form) { prs_struct qbuf, rbuf; SPOOL_Q_GETFORM q; @@ -1377,7 +1377,7 @@ WERROR cli_spoolss_getform(struct cli_state *cli, TALLOC_CTX *mem_ctx, */ WERROR cli_spoolss_deleteform(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *handle, char *form_name) + POLICY_HND *handle, const char *form_name) { prs_struct qbuf, rbuf; SPOOL_Q_DELETEFORM q; @@ -1899,7 +1899,7 @@ WERROR cli_spoolss_enddocprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, WERROR cli_spoolss_getprinterdata(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 offered, uint32 *needed, - POLICY_HND *hnd, char *valuename, + POLICY_HND *hnd, const char *valuename, REGISTRY_VALUE *value) { prs_struct qbuf, rbuf; @@ -1953,8 +1953,9 @@ WERROR cli_spoolss_getprinterdata(struct cli_state *cli, TALLOC_CTX *mem_ctx, WERROR cli_spoolss_getprinterdataex(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 offered, uint32 *needed, - POLICY_HND *hnd, char *keyname, - char *valuename, REGISTRY_VALUE *value) + POLICY_HND *hnd, const char *keyname, + const char *valuename, + REGISTRY_VALUE *value) { prs_struct qbuf, rbuf; SPOOL_Q_GETPRINTERDATAEX q; diff --git a/source/rpc_client/cli_srvsvc.c b/source/rpc_client/cli_srvsvc.c index b6c6b377ff3..6cd18f2e43d 100644 --- a/source/rpc_client/cli_srvsvc.c +++ b/source/rpc_client/cli_srvsvc.c @@ -230,9 +230,10 @@ WERROR cli_srvsvc_net_share_del(struct cli_state *cli, TALLOC_CTX *mem_ctx, } WERROR cli_srvsvc_net_share_add(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *netname, uint32 type, char *remark, - uint32 perms, uint32 max_uses, uint32 num_uses, - char *path, char *passwd) + const char *netname, uint32 type, + const char *remark, uint32 perms, + uint32 max_uses, uint32 num_uses, + const char *path, const char *passwd) { prs_struct qbuf, rbuf; SRV_Q_NET_SHARE_ADD q; diff --git a/source/rpc_parse/parse_dfs.c b/source/rpc_parse/parse_dfs.c index ccd6d429fa8..6f13500359f 100644 --- a/source/rpc_parse/parse_dfs.c +++ b/source/rpc_parse/parse_dfs.c @@ -76,8 +76,8 @@ BOOL dfs_io_r_dfs_exist(const char *desc, DFS_R_DFS_EXIST *q_d, prs_struct *ps, Make a DFS_Q_DFS_REMOVE structure *******************************************************************/ -BOOL init_dfs_q_dfs_remove(DFS_Q_DFS_REMOVE *q_d, char *entrypath, - char *servername, char *sharename) +BOOL init_dfs_q_dfs_remove(DFS_Q_DFS_REMOVE *q_d, const char *entrypath, + const char *servername, const char *sharename) { DEBUG(5,("init_dfs_q_dfs_remove\n")); init_unistr2(&q_d->DfsEntryPath, entrypath, strlen(entrypath)+1); @@ -149,8 +149,9 @@ BOOL dfs_io_r_dfs_remove(const char *desc, DFS_R_DFS_REMOVE *r_d, prs_struct *ps Make a DFS_Q_DFS_ADD structure *******************************************************************/ -BOOL init_dfs_q_dfs_add(DFS_Q_DFS_ADD *q_d, char *entrypath, char *servername, - char *sharename, char *comment, uint32 flags) +BOOL init_dfs_q_dfs_add(DFS_Q_DFS_ADD *q_d, const char *entrypath, + const char *servername, const char *sharename, + const char *comment, uint32 flags) { DEBUG(5,("init_dfs_q_dfs_add\n")); q_d->ptr_DfsEntryPath = q_d->ptr_ServerName = q_d->ptr_ShareName = 1; @@ -231,8 +232,8 @@ BOOL dfs_io_r_dfs_add(const char *desc, DFS_R_DFS_ADD *r_d, prs_struct *ps, int return True; } -BOOL init_dfs_q_dfs_get_info(DFS_Q_DFS_GET_INFO *q_d, char *entrypath, - char *servername, char *sharename, +BOOL init_dfs_q_dfs_get_info(DFS_Q_DFS_GET_INFO *q_d, const char *entrypath, + const char *servername, const char *sharename, uint32 info_level) { DEBUG(5,("init_dfs_q2_get_info\n")); diff --git a/source/rpc_parse/parse_spoolss.c b/source/rpc_parse/parse_spoolss.c index a34740f9ff3..47737908f02 100644 --- a/source/rpc_parse/parse_spoolss.c +++ b/source/rpc_parse/parse_spoolss.c @@ -1202,7 +1202,7 @@ BOOL make_spoolss_q_deleteprinterdriver( BOOL make_spoolss_q_getprinterdata(SPOOL_Q_GETPRINTERDATA *q_u, const POLICY_HND *handle, - char *valuename, uint32 size) + const char *valuename, uint32 size) { if (q_u == NULL) return False; @@ -1221,7 +1221,8 @@ BOOL make_spoolss_q_getprinterdata(SPOOL_Q_GETPRINTERDATA *q_u, BOOL make_spoolss_q_getprinterdataex(SPOOL_Q_GETPRINTERDATAEX *q_u, const POLICY_HND *handle, - char *keyname, char *valuename, uint32 size) + const char *keyname, + const char *valuename, uint32 size) { if (q_u == NULL) return False; @@ -7503,7 +7504,7 @@ BOOL make_spoolss_q_addform(SPOOL_Q_ADDFORM *q_u, POLICY_HND *handle, ********************************************************************/ BOOL make_spoolss_q_setform(SPOOL_Q_SETFORM *q_u, POLICY_HND *handle, - int level, char *form_name, FORM *form) + int level, const char *form_name, FORM *form) { memcpy(&q_u->handle, handle, sizeof(POLICY_HND)); q_u->level = level; @@ -7518,7 +7519,8 @@ BOOL make_spoolss_q_setform(SPOOL_Q_SETFORM *q_u, POLICY_HND *handle, * init a structure. ********************************************************************/ -BOOL make_spoolss_q_deleteform(SPOOL_Q_DELETEFORM *q_u, POLICY_HND *handle, char *form) +BOOL make_spoolss_q_deleteform(SPOOL_Q_DELETEFORM *q_u, POLICY_HND *handle, + const char *form) { memcpy(&q_u->handle, handle, sizeof(POLICY_HND)); init_unistr2(&q_u->name, form, strlen(form) + 1); @@ -7530,8 +7532,8 @@ BOOL make_spoolss_q_deleteform(SPOOL_Q_DELETEFORM *q_u, POLICY_HND *handle, char ********************************************************************/ BOOL make_spoolss_q_getform(SPOOL_Q_GETFORM *q_u, POLICY_HND *handle, - char *formname, uint32 level, NEW_BUFFER *buffer, - uint32 offered) + const char *formname, uint32 level, + NEW_BUFFER *buffer, uint32 offered) { memcpy(&q_u->handle, handle, sizeof(POLICY_HND)); q_u->level = level; diff --git a/source/rpcclient/cmd_dfs.c b/source/rpcclient/cmd_dfs.c index e3c4b77645d..715174c8245 100644 --- a/source/rpcclient/cmd_dfs.c +++ b/source/rpcclient/cmd_dfs.c @@ -25,7 +25,7 @@ /* Check DFS is supported by the remote server */ static NTSTATUS cmd_dfs_exist(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { BOOL dfs_exists; NTSTATUS result; @@ -44,10 +44,10 @@ static NTSTATUS cmd_dfs_exist(struct cli_state *cli, TALLOC_CTX *mem_ctx, } static NTSTATUS cmd_dfs_add(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { NTSTATUS result; - char *entrypath, *servername, *sharename, *comment; + const char *entrypath, *servername, *sharename, *comment; uint32 flags = 0; if (argc != 5) { @@ -68,10 +68,10 @@ static NTSTATUS cmd_dfs_add(struct cli_state *cli, TALLOC_CTX *mem_ctx, } static NTSTATUS cmd_dfs_remove(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { NTSTATUS result; - char *entrypath, *servername, *sharename; + const char *entrypath, *servername, *sharename; if (argc != 4) { printf("Usage: %s entrypath servername sharename\n", argv[0]); @@ -169,7 +169,7 @@ static void display_dfs_info_ctr(DFS_INFO_CTR *ctr) /* Enumerate dfs shares */ static NTSTATUS cmd_dfs_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { DFS_INFO_CTR ctr; NTSTATUS result; @@ -192,10 +192,10 @@ static NTSTATUS cmd_dfs_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, } static NTSTATUS cmd_dfs_getinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { NTSTATUS result; - char *entrypath, *servername, *sharename; + const char *entrypath, *servername, *sharename; uint32 info_level = 1; DFS_INFO_CTR ctr; diff --git a/source/rpcclient/cmd_ds.c b/source/rpcclient/cmd_ds.c index 946015c1e31..9de6d6a9ec9 100644 --- a/source/rpcclient/cmd_ds.c +++ b/source/rpcclient/cmd_ds.c @@ -26,7 +26,7 @@ static NTSTATUS cmd_ds_dsrole_getprimarydominfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { NTSTATUS result; DS_DOMINFO_CTR ctr; diff --git a/source/rpcclient/cmd_lsarpc.c b/source/rpcclient/cmd_lsarpc.c index 57ec09ef63f..6053dec7920 100644 --- a/source/rpcclient/cmd_lsarpc.c +++ b/source/rpcclient/cmd_lsarpc.c @@ -64,7 +64,7 @@ done: static NTSTATUS cmd_lsa_query_info_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { POLICY_HND pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -134,7 +134,7 @@ static NTSTATUS cmd_lsa_query_info_policy(struct cli_state *cli, static NTSTATUS cmd_lsa_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { POLICY_HND pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -179,7 +179,7 @@ static NTSTATUS cmd_lsa_lookup_names(struct cli_state *cli, /* Resolve a list of SIDs to a list of names */ static NTSTATUS cmd_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -246,7 +246,7 @@ static NTSTATUS cmd_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, static NTSTATUS cmd_lsa_enum_trust_dom(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { POLICY_HND pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -300,8 +300,8 @@ static NTSTATUS cmd_lsa_enum_trust_dom(struct cli_state *cli, /* Enumerates privileges */ static NTSTATUS cmd_lsa_enum_privilege(struct cli_state *cli, - TALLOC_CTX *mem_ctx, int argc, - char **argv) + TALLOC_CTX *mem_ctx, int argc, + const char **argv) { POLICY_HND pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -354,7 +354,7 @@ static NTSTATUS cmd_lsa_enum_privilege(struct cli_state *cli, static NTSTATUS cmd_lsa_get_dispname(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { POLICY_HND pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -391,8 +391,8 @@ static NTSTATUS cmd_lsa_get_dispname(struct cli_state *cli, /* Enumerate the LSA SIDS */ static NTSTATUS cmd_lsa_enum_sids(struct cli_state *cli, - TALLOC_CTX *mem_ctx, int argc, - char **argv) + TALLOC_CTX *mem_ctx, int argc, + const char **argv) { POLICY_HND pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -445,7 +445,7 @@ static NTSTATUS cmd_lsa_enum_sids(struct cli_state *cli, static NTSTATUS cmd_lsa_enum_privsaccounts(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { POLICY_HND dom_pol; POLICY_HND user_pol; @@ -500,7 +500,7 @@ static NTSTATUS cmd_lsa_enum_privsaccounts(struct cli_state *cli, static NTSTATUS cmd_lsa_enum_acct_rights(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { POLICY_HND dom_pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -622,8 +622,8 @@ static NTSTATUS cmd_lsa_remove_acct_rights(struct cli_state *cli, /* Get a privilege value given its name */ static NTSTATUS cmd_lsa_lookupprivvalue(struct cli_state *cli, - TALLOC_CTX *mem_ctx, int argc, - char **argv) + TALLOC_CTX *mem_ctx, int argc, + const char **argv) { POLICY_HND pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -658,7 +658,7 @@ static NTSTATUS cmd_lsa_lookupprivvalue(struct cli_state *cli, static NTSTATUS cmd_lsa_query_secobj(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { POLICY_HND pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; diff --git a/source/rpcclient/cmd_netlogon.c b/source/rpcclient/cmd_netlogon.c index 53a926d52bd..407bff3735f 100644 --- a/source/rpcclient/cmd_netlogon.c +++ b/source/rpcclient/cmd_netlogon.c @@ -24,7 +24,7 @@ static NTSTATUS cmd_netlogon_logon_ctrl2(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { uint32 query_level = 1; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -47,7 +47,7 @@ static NTSTATUS cmd_netlogon_logon_ctrl2(struct cli_state *cli, static NTSTATUS cmd_netlogon_logon_ctrl(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { #if 0 uint32 query_level = 1; @@ -143,7 +143,7 @@ static void display_sam_sync(uint32 num_deltas, SAM_DELTA_HDR *hdr_deltas, static NTSTATUS cmd_netlogon_sam_sync(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { NTSTATUS result = NT_STATUS_UNSUCCESSFUL; unsigned char trust_passwd[16]; @@ -204,7 +204,7 @@ static NTSTATUS cmd_netlogon_sam_sync(struct cli_state *cli, static NTSTATUS cmd_netlogon_sam_deltas(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { NTSTATUS result = NT_STATUS_UNSUCCESSFUL; unsigned char trust_passwd[16]; @@ -266,12 +266,12 @@ static NTSTATUS cmd_netlogon_sam_deltas(struct cli_state *cli, static NTSTATUS cmd_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { unsigned char trust_passwd[16]; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; int logon_type = NET_LOGON_TYPE; - char *username, *password; + const char *username, *password; uint32 neg_flags = 0x000001ff; int auth_level = 2; diff --git a/source/rpcclient/cmd_reg.c b/source/rpcclient/cmd_reg.c index 5d29b4c51ab..19c0e7f71f0 100644 --- a/source/rpcclient/cmd_reg.c +++ b/source/rpcclient/cmd_reg.c @@ -895,7 +895,7 @@ static void cmd_reg_get_key_sec(struct client_info *info) nt registry shutdown ****************************************************************************/ static NTSTATUS cmd_reg_shutdown(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { NTSTATUS result = NT_STATUS_UNSUCCESSFUL; fstring msg; @@ -950,7 +950,7 @@ abort a shutdown ****************************************************************************/ static NTSTATUS cmd_reg_abort_shutdown(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { NTSTATUS result = NT_STATUS_UNSUCCESSFUL; diff --git a/source/rpcclient/cmd_samr.c b/source/rpcclient/cmd_samr.c index 9e8d105c46e..6ca33e19e70 100644 --- a/source/rpcclient/cmd_samr.c +++ b/source/rpcclient/cmd_samr.c @@ -264,7 +264,7 @@ static NTSTATUS try_samr_connects(struct cli_state *cli, TALLOC_CTX *mem_ctx, */ static NTSTATUS cmd_samr_query_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND connect_pol, domain_pol, user_pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -373,7 +373,7 @@ static void display_group_info_ctr(GROUP_INFO_CTR *ctr) */ static NTSTATUS cmd_samr_query_group(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND connect_pol, domain_pol, group_pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -435,7 +435,7 @@ done: static NTSTATUS cmd_samr_query_usergroups(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND connect_pol, domain_pol, @@ -499,8 +499,8 @@ static NTSTATUS cmd_samr_query_usergroups(struct cli_state *cli, /* Query aliases a user is a member of */ static NTSTATUS cmd_samr_query_useraliases(struct cli_state *cli, - TALLOC_CTX *mem_ctx, - int argc, char **argv) + TALLOC_CTX *mem_ctx, + int argc, const char **argv) { POLICY_HND connect_pol, domain_pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -568,7 +568,7 @@ static NTSTATUS cmd_samr_query_useraliases(struct cli_state *cli, static NTSTATUS cmd_samr_query_groupmem(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND connect_pol, domain_pol, group_pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -630,7 +630,7 @@ static NTSTATUS cmd_samr_query_groupmem(struct cli_state *cli, static NTSTATUS cmd_samr_enum_dom_groups(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND connect_pol, domain_pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -703,7 +703,7 @@ static NTSTATUS cmd_samr_enum_dom_groups(struct cli_state *cli, static NTSTATUS cmd_samr_enum_als_groups(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND connect_pol, domain_pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -785,7 +785,7 @@ static NTSTATUS cmd_samr_enum_als_groups(struct cli_state *cli, static NTSTATUS cmd_samr_query_aliasmem(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND connect_pol, domain_pol, alias_pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -859,7 +859,7 @@ static NTSTATUS cmd_samr_query_aliasmem(struct cli_state *cli, static NTSTATUS cmd_samr_query_dispinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND connect_pol, domain_pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -993,7 +993,7 @@ static NTSTATUS cmd_samr_query_dispinfo(struct cli_state *cli, static NTSTATUS cmd_samr_query_dominfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND connect_pol, domain_pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -1063,11 +1063,11 @@ static NTSTATUS cmd_samr_query_dominfo(struct cli_state *cli, static NTSTATUS cmd_samr_create_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND connect_pol, domain_pol, user_pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - char *acct_name; + const char *acct_name; uint16 acb_info; uint32 unknown, user_rid; uint32 access_mask = MAXIMUM_ALLOWED_ACCESS; @@ -1119,7 +1119,7 @@ static NTSTATUS cmd_samr_create_dom_user(struct cli_state *cli, static NTSTATUS cmd_samr_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { NTSTATUS result = NT_STATUS_UNSUCCESSFUL; POLICY_HND connect_pol, domain_pol; @@ -1189,7 +1189,7 @@ static NTSTATUS cmd_samr_lookup_names(struct cli_state *cli, static NTSTATUS cmd_samr_lookup_rids(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { NTSTATUS result = NT_STATUS_UNSUCCESSFUL; POLICY_HND connect_pol, domain_pol; @@ -1246,7 +1246,7 @@ static NTSTATUS cmd_samr_lookup_rids(struct cli_state *cli, static NTSTATUS cmd_samr_delete_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { NTSTATUS result = NT_STATUS_UNSUCCESSFUL; POLICY_HND connect_pol, domain_pol, user_pol; @@ -1315,7 +1315,7 @@ static NTSTATUS cmd_samr_delete_dom_user(struct cli_state *cli, */ static NTSTATUS cmd_samr_query_sec_obj(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND connect_pol, domain_pol, user_pol, *pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -1392,7 +1392,7 @@ done: static NTSTATUS cmd_samr_get_dom_pwinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { NTSTATUS result = NT_STATUS_UNSUCCESSFUL; uint16 unk_0, unk_1, unk_2; diff --git a/source/rpcclient/cmd_spoolss.c b/source/rpcclient/cmd_spoolss.c index 0ec94c99795..9f6f539e190 100644 --- a/source/rpcclient/cmd_spoolss.c +++ b/source/rpcclient/cmd_spoolss.c @@ -41,6 +41,15 @@ static const struct table_node archi_table[]= { {NULL, "", -1 } }; +/** + * @file + * + * rpcclient module for SPOOLSS rpc pipe. + * + * This generally just parses and checks command lines, and then calls + * a cli_spoolss function. + **/ + /**************************************************************************** function to do the mapping between the long architecture name and the short one. @@ -77,7 +86,7 @@ BOOL get_short_archi(char *short_archi, const char *long_archi) */ static NTSTATUS cmd_spoolss_not_implemented(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { printf ("(*) This command is not currently implemented.\n"); return NT_STATUS_OK; @@ -89,7 +98,7 @@ static NTSTATUS cmd_spoolss_not_implemented(struct cli_state *cli, */ static NTSTATUS cmd_spoolss_open_printer_ex(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { WERROR werror; fstring printername; @@ -291,7 +300,7 @@ static void display_print_info_3(PRINTER_INFO_3 *i3) static NTSTATUS cmd_spoolss_enum_printers(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { WERROR result; uint32 info_level = 1; @@ -396,7 +405,7 @@ static void display_port_info_2(PORT_INFO_2 *i2) static NTSTATUS cmd_spoolss_enum_ports(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { WERROR result; uint32 needed, info_level = 1; @@ -448,7 +457,7 @@ static NTSTATUS cmd_spoolss_enum_ports(struct cli_state *cli, */ static NTSTATUS cmd_spoolss_setprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND pol; WERROR result; @@ -518,7 +527,7 @@ static NTSTATUS cmd_spoolss_setprinter(struct cli_state *cli, */ static NTSTATUS cmd_spoolss_getprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND pol; WERROR result; @@ -637,7 +646,7 @@ static void display_reg_value(REGISTRY_VALUE value) */ static NTSTATUS cmd_spoolss_getprinterdata(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND pol; WERROR result; @@ -646,7 +655,7 @@ static NTSTATUS cmd_spoolss_getprinterdata(struct cli_state *cli, servername, user; uint32 needed; - char *valuename; + const char *valuename; REGISTRY_VALUE value; if (argc != 3) { @@ -681,7 +690,7 @@ static NTSTATUS cmd_spoolss_getprinterdata(struct cli_state *cli, /* Get printer info */ result = cli_spoolss_getprinterdata(cli, mem_ctx, 0, &needed, - &pol, valuename, &value); + &pol, valuename, &value); if (W_ERROR_V(result) == ERRmoredata) result = cli_spoolss_getprinterdata( @@ -708,7 +717,7 @@ static NTSTATUS cmd_spoolss_getprinterdata(struct cli_state *cli, */ static NTSTATUS cmd_spoolss_getprinterdataex(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND pol; WERROR result; @@ -717,7 +726,7 @@ static NTSTATUS cmd_spoolss_getprinterdataex(struct cli_state *cli, servername, user; uint32 needed; - char *valuename, *keyname; + const char *valuename, *keyname; REGISTRY_VALUE value; if (argc != 4) { @@ -893,7 +902,7 @@ static void display_print_driver_3(DRIVER_INFO_3 *i1) */ static NTSTATUS cmd_spoolss_getdriver(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND pol; WERROR werror; @@ -983,7 +992,7 @@ static NTSTATUS cmd_spoolss_getdriver(struct cli_state *cli, */ static NTSTATUS cmd_spoolss_enum_drivers(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { WERROR werror; uint32 info_level = 1; @@ -1071,7 +1080,7 @@ static void display_printdriverdir_1(DRIVER_DIRECTORY_1 *i1) */ static NTSTATUS cmd_spoolss_getdriverdir(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { WERROR result; fstring env; @@ -1136,7 +1145,7 @@ void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch) wrapper for strtok to get the next parameter from a delimited list. Needed to handle the empty parameter string denoted by "NULL" *************************************************************************/ -static char* get_driver_3_param (char* str, const char* delim, UNISTR* dest) +static char* get_driver_3_param (const char* str, const char* delim, UNISTR* dest) { char *ptr; @@ -1166,7 +1175,7 @@ static char* get_driver_3_param (char* str, const char* delim, UNISTR* dest) static BOOL init_drv_info_3_members ( TALLOC_CTX *mem_ctx, DRIVER_INFO_3 *info, - char *args + const char *args ) { char *str, *str2; @@ -1215,7 +1224,7 @@ static BOOL init_drv_info_3_members ( static NTSTATUS cmd_spoolss_addprinterdriver(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { WERROR result; uint32 level = 3; @@ -1268,7 +1277,7 @@ static NTSTATUS cmd_spoolss_addprinterdriver(struct cli_state *cli, static NTSTATUS cmd_spoolss_addprinterex(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { WERROR result; uint32 level = 2; @@ -1325,7 +1334,7 @@ static NTSTATUS cmd_spoolss_addprinterex(struct cli_state *cli, static NTSTATUS cmd_spoolss_setdriver(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND pol; WERROR result; @@ -1403,7 +1412,7 @@ done: static NTSTATUS cmd_spoolss_deletedriver(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { WERROR result; fstring servername; @@ -1445,7 +1454,7 @@ static NTSTATUS cmd_spoolss_deletedriver(struct cli_state *cli, static NTSTATUS cmd_spoolss_getprintprocdir(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { WERROR result; char *servername = NULL, *environment = NULL; @@ -1488,7 +1497,7 @@ static NTSTATUS cmd_spoolss_getprintprocdir(struct cli_state *cli, /* Add a form */ static NTSTATUS cmd_spoolss_addform(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND handle; WERROR werror; @@ -1547,7 +1556,7 @@ static NTSTATUS cmd_spoolss_addform(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Set a form */ static NTSTATUS cmd_spoolss_setform(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND handle; WERROR werror; @@ -1605,7 +1614,7 @@ static NTSTATUS cmd_spoolss_setform(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Get a form */ static NTSTATUS cmd_spoolss_getform(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND handle; WERROR werror; @@ -1669,7 +1678,7 @@ static NTSTATUS cmd_spoolss_getform(struct cli_state *cli, TALLOC_CTX *mem_ctx, static NTSTATUS cmd_spoolss_deleteform(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { POLICY_HND handle; WERROR werror; @@ -1716,7 +1725,7 @@ static NTSTATUS cmd_spoolss_deleteform(struct cli_state *cli, static NTSTATUS cmd_spoolss_enum_forms(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { POLICY_HND handle; WERROR werror; @@ -1784,7 +1793,7 @@ static NTSTATUS cmd_spoolss_enum_forms(struct cli_state *cli, static NTSTATUS cmd_spoolss_setprinterdata(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { WERROR result; uint32 needed; @@ -1903,7 +1912,7 @@ static void display_job_info_2(JOB_INFO_2 *job) static NTSTATUS cmd_spoolss_enum_jobs(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { WERROR result; uint32 needed, level = 1, num_jobs, i; @@ -1978,7 +1987,7 @@ done: static NTSTATUS cmd_spoolss_enum_data( struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { WERROR result; uint32 i=0, val_needed, data_needed; @@ -2037,14 +2046,14 @@ done: static NTSTATUS cmd_spoolss_enum_data_ex( struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { WERROR result; uint32 needed, i; BOOL got_hnd = False; pstring printername; fstring servername, user; - char *keyname = NULL; + const char *keyname = NULL; POLICY_HND hnd; REGVAL_CTR ctr; @@ -2102,7 +2111,7 @@ done: static NTSTATUS cmd_spoolss_enum_printerkey( struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { WERROR result; uint32 needed, returned; @@ -2174,7 +2183,7 @@ done: static NTSTATUS cmd_spoolss_rffpcnex(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { fstring servername, printername; POLICY_HND hnd; diff --git a/source/rpcclient/cmd_srvsvc.c b/source/rpcclient/cmd_srvsvc.c index 10fdfd74374..8597c7bc2ec 100644 --- a/source/rpcclient/cmd_srvsvc.c +++ b/source/rpcclient/cmd_srvsvc.c @@ -181,7 +181,7 @@ static void display_srv_info_102(SRV_INFO_102 *sv102) /* Server query info */ static NTSTATUS cmd_srvsvc_srv_query_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { uint32 info_level = 101; SRV_INFO_CTR ctr; @@ -248,7 +248,7 @@ static void display_share_info_2(SRV_SHARE_INFO_2 *info2) static NTSTATUS cmd_srvsvc_net_share_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { uint32 info_level = 2; SRV_SHARE_INFO_CTR ctr; @@ -294,7 +294,7 @@ static NTSTATUS cmd_srvsvc_net_share_enum(struct cli_state *cli, static NTSTATUS cmd_srvsvc_net_remote_tod(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { TIME_OF_DAY_INFO tod; WERROR result; @@ -316,7 +316,7 @@ static NTSTATUS cmd_srvsvc_net_remote_tod(struct cli_state *cli, static NTSTATUS cmd_srvsvc_net_file_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { uint32 info_level = 3; SRV_FILE_INFO_CTR ctr; diff --git a/source/rpcclient/rpcclient.h b/source/rpcclient/rpcclient.h index 3276a62437a..1bd3c1a6417 100644 --- a/source/rpcclient/rpcclient.h +++ b/source/rpcclient/rpcclient.h @@ -24,8 +24,8 @@ struct cmd_set { const char *name; - NTSTATUS (*fn)(struct cli_state*, TALLOC_CTX *mem_ctx, int argc, - char **argv); + NTSTATUS (*fn)(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, + const char **argv); int pipe_idx; const char *description; const char *usage; |