mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
Fixed up some const related compiler warnings.
(This used to be commit 923425e497112c5d1e2e569da6c13dcd02b6a8af)
This commit is contained in:
parent
589371e1d5
commit
3a2f56cb63
@ -51,7 +51,8 @@ static int max_protocol = PROTOCOL_NT1;
|
||||
extern pstring user_socket_options;
|
||||
|
||||
static int process_tok(fstring tok);
|
||||
static int cmd_help(void);
|
||||
static NTSTATUS cmd_help(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc,
|
||||
const char **argv);
|
||||
|
||||
/* 30 second timeout on most commands */
|
||||
#define CLIENT_TIMEOUT (30*1000)
|
||||
@ -979,7 +980,8 @@ static BOOL do_altname(char *name)
|
||||
/****************************************************************************
|
||||
Exit client.
|
||||
****************************************************************************/
|
||||
static int cmd_quit(void)
|
||||
static NTSTATUS cmd_quit(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc,
|
||||
const char **argv)
|
||||
{
|
||||
cli_shutdown(cli);
|
||||
exit(0);
|
||||
@ -2149,7 +2151,8 @@ static int process_tok(fstring tok)
|
||||
/****************************************************************************
|
||||
help
|
||||
****************************************************************************/
|
||||
static int cmd_help(void)
|
||||
static NTSTATUS cmd_help(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc,
|
||||
const char **argv)
|
||||
{
|
||||
int i=0,j;
|
||||
fstring buf;
|
||||
|
@ -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;
|
||||
@ -301,7 +301,7 @@ static NTSTATUS cmd_lsa_enum_trust_dom(struct cli_state *cli,
|
||||
|
||||
static NTSTATUS cmd_lsa_enum_privilege(struct cli_state *cli,
|
||||
TALLOC_CTX *mem_ctx, int argc,
|
||||
char **argv)
|
||||
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;
|
||||
@ -392,7 +392,7 @@ static NTSTATUS cmd_lsa_get_dispname(struct cli_state *cli,
|
||||
|
||||
static NTSTATUS cmd_lsa_enum_sids(struct cli_state *cli,
|
||||
TALLOC_CTX *mem_ctx, int argc,
|
||||
char **argv)
|
||||
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;
|
||||
@ -666,8 +666,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;
|
||||
@ -702,7 +702,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;
|
||||
|
@ -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_users(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;
|
||||
@ -704,7 +704,7 @@ static NTSTATUS cmd_samr_enum_dom_users(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;
|
||||
@ -777,7 +777,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;
|
||||
@ -859,7 +859,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;
|
||||
@ -933,7 +933,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;
|
||||
@ -1067,7 +1067,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;
|
||||
@ -1137,11 +1137,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;
|
||||
@ -1193,7 +1193,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;
|
||||
@ -1263,7 +1263,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;
|
||||
@ -1320,7 +1320,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;
|
||||
@ -1389,7 +1389,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;
|
||||
@ -1466,7 +1466,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;
|
||||
|
@ -259,7 +259,7 @@ static void fetch_machine_sid(struct cli_state *cli)
|
||||
/* List the available commands on a given pipe */
|
||||
|
||||
static NTSTATUS cmd_listcommands(struct cli_state *cli, TALLOC_CTX *mem_ctx,
|
||||
int argc, char **argv)
|
||||
int argc, const char **argv)
|
||||
{
|
||||
struct cmd_list *tmp;
|
||||
struct cmd_set *tmp_set;
|
||||
@ -364,7 +364,7 @@ static NTSTATUS cmd_help(struct cli_state *cli, TALLOC_CTX *mem_ctx,
|
||||
/* Change the debug level */
|
||||
|
||||
static NTSTATUS cmd_debuglevel(struct cli_state *cli, TALLOC_CTX *mem_ctx,
|
||||
int argc, char **argv)
|
||||
int argc, const char **argv)
|
||||
{
|
||||
if (argc > 2) {
|
||||
printf("Usage: %s [debuglevel]\n", argv[0]);
|
||||
@ -479,7 +479,7 @@ static NTSTATUS do_cmd(struct cli_state *cli,
|
||||
|
||||
/* Run command */
|
||||
|
||||
result = cmd_entry->fn(cli, mem_ctx, argc, (char **) argv);
|
||||
result = cmd_entry->fn(cli, mem_ctx, argc, (const char **) argv);
|
||||
|
||||
/* Cleanup */
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user