summaryrefslogtreecommitdiffstats
path: root/source3/utils
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-05-05 14:56:30 -0700
committerJeremy Allison <jra@samba.org>2011-05-06 00:57:00 +0200
commit9eee6e2fd2fcb1dcf19541d1bdc72eb048b3ba4a (patch)
tree90247f66882a6fd64604b7a45310364b6a9cfede /source3/utils
parentf85e095dd29638dcb4819f60a7239bc37e8a41ca (diff)
downloadsamba-9eee6e2fd2fcb1dcf19541d1bdc72eb048b3ba4a.tar.gz
samba-9eee6e2fd2fcb1dcf19541d1bdc72eb048b3ba4a.tar.xz
samba-9eee6e2fd2fcb1dcf19541d1bdc72eb048b3ba4a.zip
More const fixes... getting near the end now.
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri May 6 00:57:00 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_ads.c2
-rw-r--r--source3/utils/net_lookup.c2
-rw-r--r--source3/utils/net_rpc.c18
-rw-r--r--source3/utils/net_rpc_join.c2
4 files changed, 12 insertions, 12 deletions
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index a966e5dd633..f7530953228 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -2082,7 +2082,7 @@ static int net_ads_password(struct net_context *c, int argc, const char **argv)
}
if (argv[1]) {
- new_password = (char *)argv[1];
+ new_password = (const char *)argv[1];
} else {
if (asprintf(&prompt, _("Enter new password for %s:"), user) == -1) {
return -1;
diff --git a/source3/utils/net_lookup.c b/source3/utils/net_lookup.c
index 06aedbd4730..7179d01fe3c 100644
--- a/source3/utils/net_lookup.c
+++ b/source3/utils/net_lookup.c
@@ -290,7 +290,7 @@ static int net_lookup_kdc(struct net_context *c, int argc, const char **argv)
}
if (argc>0) {
- realm.data = CONST_DISCARD(char *, argv[0]);
+ realm.data = discard_const_p(char, argv[0]);
realm.length = strlen(argv[0]);
} else if (lp_realm() && *lp_realm()) {
realm.data = lp_realm();
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 43398524ec0..7072b4ef326 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -549,7 +549,7 @@ NTSTATUS rpc_info_internals(struct net_context *c,
status = dcerpc_samr_OpenDomain(b, mem_ctx,
&connect_pol,
MAXIMUM_ALLOWED_ACCESS,
- CONST_DISCARD(struct dom_sid2 *, domain_sid),
+ discard_const_p(struct dom_sid2, domain_sid),
&domain_pol,
&result);
if (!NT_STATUS_IS_OK(status)) {
@@ -1622,7 +1622,7 @@ static NTSTATUS rpc_group_delete_internals(struct net_context *c,
status = dcerpc_samr_OpenDomain(b, mem_ctx,
&connect_pol,
MAXIMUM_ALLOWED_ACCESS,
- CONST_DISCARD(struct dom_sid2 *, domain_sid),
+ discard_const_p(struct dom_sid2, domain_sid),
&domain_pol,
&result);
if (!NT_STATUS_IS_OK(status)) {
@@ -2584,7 +2584,7 @@ static NTSTATUS rpc_group_list_internals(struct net_context *c,
status = dcerpc_samr_OpenDomain(b, mem_ctx,
&connect_pol,
MAXIMUM_ALLOWED_ACCESS,
- CONST_DISCARD(struct dom_sid2 *, domain_sid),
+ discard_const_p(struct dom_sid2, domain_sid),
&domain_pol,
&result);
if (!NT_STATUS_IS_OK(status)) {
@@ -2710,7 +2710,7 @@ static NTSTATUS rpc_group_list_internals(struct net_context *c,
status = dcerpc_samr_OpenDomain(b, mem_ctx,
&connect_pol,
MAXIMUM_ALLOWED_ACCESS,
- CONST_DISCARD(struct dom_sid2 *, &global_sid_Builtin),
+ discard_const_p(struct dom_sid2, &global_sid_Builtin),
&domain_pol,
&result);
if (!NT_STATUS_IS_OK(status)) {
@@ -3032,7 +3032,7 @@ static NTSTATUS rpc_group_members_internals(struct net_context *c,
status = dcerpc_samr_OpenDomain(b, mem_ctx,
&connect_pol,
MAXIMUM_ALLOWED_ACCESS,
- CONST_DISCARD(struct dom_sid2 *, domain_sid),
+ discard_const_p(struct dom_sid2, domain_sid),
&domain_pol,
&result);
if (!NT_STATUS_IS_OK(status)) {
@@ -4318,7 +4318,7 @@ static NTSTATUS rpc_fetch_domain_aliases(struct rpc_pipe_client *pipe_hnd,
status = dcerpc_samr_OpenDomain(b, mem_ctx,
connect_pol,
MAXIMUM_ALLOWED_ACCESS,
- CONST_DISCARD(struct dom_sid2 *, domain_sid),
+ discard_const_p(struct dom_sid2, domain_sid),
&domain_pol,
&result);
if (!NT_STATUS_IS_OK(status)) {
@@ -5803,7 +5803,7 @@ static NTSTATUS rpc_trustdom_add_internals(struct net_context *c,
status = dcerpc_samr_OpenDomain(b, mem_ctx,
&connect_pol,
MAXIMUM_ALLOWED_ACCESS,
- CONST_DISCARD(struct dom_sid2 *, domain_sid),
+ discard_const_p(struct dom_sid2, domain_sid),
&domain_pol,
&result);
if (!NT_STATUS_IS_OK(status)) {
@@ -5977,7 +5977,7 @@ static NTSTATUS rpc_trustdom_del_internals(struct net_context *c,
status = dcerpc_samr_OpenDomain(b, mem_ctx,
&connect_pol,
MAXIMUM_ALLOWED_ACCESS,
- CONST_DISCARD(struct dom_sid2 *, domain_sid),
+ discard_const_p(struct dom_sid2, domain_sid),
&domain_pol,
&result);
if (!NT_STATUS_IS_OK(status)) {
@@ -6937,7 +6937,7 @@ static int rpc_trustdom_list(struct net_context *c, int argc, const char **argv)
for (i = 0; i < num_domains; i++) {
- char *str = CONST_DISCARD(char *, trusts->entries[i].name.string);
+ char *str = discard_const_p(char, trusts->entries[i].name.string);
found_domain = true;
diff --git a/source3/utils/net_rpc_join.c b/source3/utils/net_rpc_join.c
index 1ca213d155b..7cdcc9ea747 100644
--- a/source3/utils/net_rpc_join.c
+++ b/source3/utils/net_rpc_join.c
@@ -498,7 +498,7 @@ int net_rpc_join_newstyle(struct net_context *c, int argc, const char **argv)
/* Now store the secret in the secrets database */
- strupper_m(CONST_DISCARD(char *, domain));
+ strupper_m(discard_const_p(char, domain));
if (!secrets_store_domain_sid(domain, domain_sid)) {
DEBUG(0, ("error storing domain sid for %s\n", domain));