summaryrefslogtreecommitdiff
path: root/source3/utils/smbcacls.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-01-03 08:28:12 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-01-03 08:28:12 +0000
commit634c54310c92c48dd4eceec602e230a021bdcfc5 (patch)
tree9f5732a180b8daacf176e42511b0a72c972c7a4b /source3/utils/smbcacls.c
parent47a7f0cfb5006fb41239a6cd81cce5e35fde750a (diff)
downloadsamba-634c54310c92c48dd4eceec602e230a021bdcfc5.tar.gz
samba-634c54310c92c48dd4eceec602e230a021bdcfc5.tar.bz2
samba-634c54310c92c48dd4eceec602e230a021bdcfc5.zip
Merge from HEAD - make Samba compile with -Wwrite-strings without additional
warnings. (Adds a lot of const). Andrew Bartlett (This used to be commit 3a7458f9472432ef12c43008414925fd1ce8ea0c)
Diffstat (limited to 'source3/utils/smbcacls.c')
-rw-r--r--source3/utils/smbcacls.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index 07b2aa7fec..e41edcf6f8 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/utils/smbcacls.c
@@ -43,13 +43,13 @@ enum chown_mode {REQUEST_NONE, REQUEST_CHOWN, REQUEST_CHGRP};
enum exit_values {EXIT_OK, EXIT_FAILED, EXIT_PARSE_ERROR};
struct perm_value {
- char *perm;
+ const char *perm;
uint32 mask;
};
/* These values discovered by inspection */
-static struct perm_value special_values[] = {
+static const struct perm_value special_values[] = {
{ "R", 0x00120089 },
{ "W", 0x00120116 },
{ "X", 0x001200a0 },
@@ -59,7 +59,7 @@ static struct perm_value special_values[] = {
{ NULL, 0 },
};
-static struct perm_value standard_values[] = {
+static const struct perm_value standard_values[] = {
{ "READ", 0x001200a9 },
{ "CHANGE", 0x001301bf },
{ "FULL", 0x001f01ff },
@@ -70,7 +70,7 @@ static struct cli_state *global_hack_cli;
static POLICY_HND pol;
static BOOL got_policy_hnd;
-static struct cli_state *connect_one(char *share);
+static struct cli_state *connect_one(const char *share);
/* Open cli connection and policy handle */
@@ -161,7 +161,7 @@ static BOOL StringToSid(DOM_SID *sid, const char *str)
/* print an ACE on a FILE, using either numeric or ascii representation */
static void print_ace(FILE *f, SEC_ACE *ace)
{
- struct perm_value *v;
+ const struct perm_value *v;
fstring sidstr;
int do_print = 0;
uint32 got_mask;
@@ -234,7 +234,7 @@ static BOOL parse_ace(SEC_ACE *ace, char *str)
unsigned atype, aflags, amask;
DOM_SID sid;
SEC_ACCESS mask;
- struct perm_value *v;
+ const struct perm_value *v;
ZERO_STRUCTP(ace);
p = strchr_m(str,':');
@@ -708,7 +708,7 @@ static int cacl_set(struct cli_state *cli, char *filename,
/*****************************************************
return a connection to a server
*******************************************************/
-static struct cli_state *connect_one(char *share)
+static struct cli_state *connect_one(const char *share)
{
struct cli_state *c;
struct in_addr ip;