summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/rpc_client/cli_lsarpc.c8
-rw-r--r--source3/rpcclient/rpcclient.c2
-rw-r--r--source3/utils/net.h2
-rw-r--r--source3/utils/net_ads.c7
-rw-r--r--source3/utils/net_domain.c2
-rw-r--r--source3/utils/net_rpc.c11
-rw-r--r--source3/utils/net_rpc_join.c4
-rw-r--r--source3/winbindd/winbindd_cm.c6
8 files changed, 23 insertions, 19 deletions
diff --git a/source3/rpc_client/cli_lsarpc.c b/source3/rpc_client/cli_lsarpc.c
index 77ade5cba1..286cc210e2 100644
--- a/source3/rpc_client/cli_lsarpc.c
+++ b/source3/rpc_client/cli_lsarpc.c
@@ -542,7 +542,8 @@ NTSTATUS rpccli_lsa_query_info_policy2_new(struct rpc_pipe_client *cli, TALLOC_C
NTSTATUS rpccli_lsa_query_info_policy(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
POLICY_HND *pol, uint16 info_class,
- char **domain_name, DOM_SID **domain_sid)
+ const char **domain_name,
+ DOM_SID **domain_sid)
{
prs_struct qbuf, rbuf;
LSA_Q_QUERY_INFO q;
@@ -632,8 +633,9 @@ NTSTATUS rpccli_lsa_query_info_policy(struct rpc_pipe_client *cli,
NTSTATUS rpccli_lsa_query_info_policy2(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
POLICY_HND *pol, uint16 info_class,
- char **domain_name, char **dns_name,
- char **forest_name,
+ const char **domain_name,
+ const char **dns_name,
+ const char **forest_name,
struct GUID **domain_guid,
DOM_SID **domain_sid)
{
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index dd8b911bb8..081e0fb15e 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -134,7 +134,7 @@ static void fetch_machine_sid(struct cli_state *cli)
POLICY_HND pol;
NTSTATUS result = NT_STATUS_OK;
uint32 info_class = 5;
- char *domain_name = NULL;
+ const char *domain_name = NULL;
static bool got_domain_sid;
TALLOC_CTX *mem_ctx;
DOM_SID *dom_sid = NULL;
diff --git a/source3/utils/net.h b/source3/utils/net.h
index 2ffa4d77b1..3a4b1da7b0 100644
--- a/source3/utils/net.h
+++ b/source3/utils/net.h
@@ -42,7 +42,7 @@ struct rpc_sh_ctx {
struct cli_state *cli;
DOM_SID *domain_sid;
- char *domain_name;
+ const char *domain_name;
const char *whoami;
const char *thiscmd;
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index 0a9020bcfd..732ba8d8b6 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -817,7 +817,7 @@ static int net_ads_leave(int argc, const char **argv)
struct cli_state *cli = NULL;
TALLOC_CTX *ctx;
DOM_SID *dom_sid = NULL;
- char *short_domain_name = NULL;
+ const char *short_domain_name = NULL;
if (!secrets_init()) {
DEBUG(1,("Failed to initialise secrets database\n"));
@@ -961,7 +961,8 @@ static NTSTATUS check_ads_config( void )
********************************************************************/
static NTSTATUS net_join_domain(TALLOC_CTX *ctx, const char *servername,
- struct sockaddr_storage *pss, char **domain,
+ struct sockaddr_storage *pss,
+ const char **domain,
DOM_SID **dom_sid,
const char *password)
{
@@ -1445,7 +1446,7 @@ int net_ads_join(int argc, const char **argv)
ADS_STRUCT *ads = NULL;
ADS_STATUS status;
NTSTATUS nt_status;
- char *short_domain_name = NULL;
+ const char *short_domain_name = NULL;
char *tmp_password, *password;
TALLOC_CTX *ctx = NULL;
DOM_SID *domain_sid = NULL;
diff --git a/source3/utils/net_domain.c b/source3/utils/net_domain.c
index 3f1908e242..da5e61caf0 100644
--- a/source3/utils/net_domain.c
+++ b/source3/utils/net_domain.c
@@ -157,7 +157,7 @@ int netdom_store_machine_account( const char *domain, DOM_SID *sid, const char *
********************************************************************/
NTSTATUS netdom_get_domain_sid( TALLOC_CTX *mem_ctx, struct cli_state *cli,
- char **domain, DOM_SID **sid )
+ const char **domain, DOM_SID **sid )
{
struct rpc_pipe_client *pipe_hnd = NULL;
POLICY_HND lsa_pol;
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 2bd867fff3..677924649c 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -51,7 +51,8 @@ static bool sync_files(struct copy_clistate *cp_clistate, const char *mask);
**/
NTSTATUS net_get_remote_domain_sid(struct cli_state *cli, TALLOC_CTX *mem_ctx,
- DOM_SID **domain_sid, char **domain_name)
+ DOM_SID **domain_sid,
+ const char **domain_name)
{
struct rpc_pipe_client *lsa_pipe;
POLICY_HND pol;
@@ -112,7 +113,7 @@ int run_rpc_command(struct cli_state *cli_arg,
TALLOC_CTX *mem_ctx;
NTSTATUS nt_status;
DOM_SID *domain_sid;
- char *domain_name;
+ const char *domain_name;
/* make use of cli_state handed over as an argument, if possible */
if (!cli_arg) {
@@ -5607,7 +5608,7 @@ static int rpc_trustdom_establish(int argc, const char **argv)
DOM_SID *domain_sid;
char* domain_name;
- char* domain_name_pol;
+ const char* domain_name_pol;
char* acct_name;
fstring pdc_name;
char *dc_name;
@@ -5917,7 +5918,7 @@ static int rpc_trustdom_vampire(int argc, const char **argv)
DOM_SID *domain_sids;
char **trusted_dom_names;
fstring pdc_name;
- char *dummy;
+ const char *dummy;
/*
* Listing trusted domains (stored in secrets.tdb, if local)
@@ -6057,7 +6058,7 @@ static int rpc_trustdom_list(int argc, const char **argv)
DOM_SID *domain_sids;
char **trusted_dom_names;
fstring pdc_name;
- char *dummy;
+ const char *dummy;
/* trusting domains listing variables */
POLICY_HND domain_hnd;
diff --git a/source3/utils/net_rpc_join.c b/source3/utils/net_rpc_join.c
index 0c25a53365..6e37f3c84c 100644
--- a/source3/utils/net_rpc_join.c
+++ b/source3/utils/net_rpc_join.c
@@ -155,7 +155,7 @@ int net_rpc_join_newstyle(int argc, const char **argv)
NTSTATUS result;
int retval = 1;
- char *domain = NULL;
+ const char *domain = NULL;
uint32 num_rids, *name_types, *user_rids;
uint32 flags = 0x3e8;
char *acct_name;
@@ -413,7 +413,7 @@ int net_rpc_join_newstyle(int argc, const char **argv)
/* Now store the secret in the secrets database */
- strupper_m(domain);
+ strupper_m(CONST_DISCARD(char *, domain));
if (!secrets_store_domain_sid(domain, domain_sid)) {
DEBUG(0, ("error storing domain sid for %s\n", domain));
diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c
index a9155a5763..908228717e 100644
--- a/source3/winbindd/winbindd_cm.c
+++ b/source3/winbindd/winbindd_cm.c
@@ -1799,9 +1799,9 @@ static void set_dc_type_and_flags_connect( struct winbindd_domain *domain )
struct rpc_pipe_client *cli;
POLICY_HND pol;
- char *domain_name = NULL;
- char *dns_name = NULL;
- char *forest_name = NULL;
+ const char *domain_name = NULL;
+ const char *dns_name = NULL;
+ const char *forest_name = NULL;
DOM_SID *dom_sid = NULL;
ZERO_STRUCT( ctr );