summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net.h2
-rw-r--r--source3/utils/net_ads.c18
-rw-r--r--source3/utils/net_dns.c3
-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
6 files changed, 21 insertions, 19 deletions
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 80f6ba9001..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)
{
@@ -1294,14 +1295,13 @@ static bool net_derive_salting_principal( TALLOC_CTX *ctx, ADS_STRUCT *ads )
#if defined(WITH_DNS_UPDATES)
#include "dns.h"
DNS_ERROR DoDNSUpdate(char *pszServerName,
- const char *pszDomainName,
- const char *pszHostName,
- const struct in_addr *iplist, int num_addrs );
-
+ const char *pszDomainName, const char *pszHostName,
+ const struct sockaddr_storage *sslist,
+ size_t num_addrs );
static NTSTATUS net_update_dns_internal(TALLOC_CTX *ctx, ADS_STRUCT *ads,
const char *machine_name,
- const struct in_addr *addrs,
+ const struct sockaddr_storage *addrs,
int num_addrs)
{
struct dns_rr_ns *nameservers = NULL;
@@ -1390,7 +1390,7 @@ done:
static NTSTATUS net_update_dns(TALLOC_CTX *mem_ctx, ADS_STRUCT *ads)
{
int num_addrs;
- struct in_addr *iplist = NULL;
+ struct sockaddr_storage *iplist = NULL;
fstring machine_name;
NTSTATUS status;
@@ -1446,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_dns.c b/source3/utils/net_dns.c
index 44a0b46e4e..fb6644d6b2 100644
--- a/source3/utils/net_dns.c
+++ b/source3/utils/net_dns.c
@@ -32,7 +32,8 @@
DNS_ERROR DoDNSUpdate(char *pszServerName,
const char *pszDomainName, const char *pszHostName,
- const struct sockaddr_storage *sslist, size_t num_addrs );
+ const struct sockaddr_storage *sslist,
+ size_t num_addrs );
/*********************************************************************
*********************************************************************/
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));