summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2003-03-20 14:49:37 +0000
committerJelmer Vernooij <jelmer@samba.org>2003-03-20 14:49:37 +0000
commitbe40463c310ccc32d6a767a1521a87da937d6971 (patch)
tree285b4485246f2884080fb4dc06e44ff517f5015a
parent29d734a93cf3baa902502852bd246b387d6e8f93 (diff)
downloadsamba-be40463c310ccc32d6a767a1521a87da937d6971.tar.gz
samba-be40463c310ccc32d6a767a1521a87da937d6971.tar.bz2
samba-be40463c310ccc32d6a767a1521a87da937d6971.zip
Fix compile errors - don't use pstrcpy() on a fstring
(This used to be commit 3bad73ca870bb43324bdb5dfc6bb02e0fa1fb1e0)
-rw-r--r--source3/utils/smbcacls.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index 4588389f75..b523ac9423 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/utils/smbcacls.c
@@ -5,6 +5,7 @@
Copyright (C) Andrew Tridgell 2000
Copyright (C) Tim Potter 2000
Copyright (C) Jeremy Allison 2000
+ Copyright (C) Jelmer Vernooij 2003
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -744,11 +745,11 @@ static struct cli_state *connect_one(const char *share)
int opt;
char *p;
enum acl_mode mode = SMB_ACL_SET;
- static const char *the_acl = NULL;
+ static char *the_acl = NULL;
enum chown_mode change_mode = REQUEST_NONE;
int result;
fstring path;
- fstring filename;
+ pstring filename;
poptContext pc;
struct poptOption long_options[] = {
POPT_AUTOHELP
@@ -808,22 +809,22 @@ static struct cli_state *connect_one(const char *share)
break;
case 'S':
- the_acl = poptGetOptArg(pc);
+ the_acl = smb_xstrdup(poptGetOptArg(pc));
mode = SMB_ACL_SET;
break;
case 'D':
- the_acl = poptGetOptArg(pc);
+ the_acl = smb_xstrdup(poptGetOptArg(pc));
mode = SMB_ACL_DELETE;
break;
case 'M':
- the_acl = poptGetOptArg(pc);
+ the_acl = smb_xstrdup(poptGetOptArg(pc));
mode = SMB_ACL_MODIFY;
break;
case 'A':
- the_acl = poptGetOptArg(pc);
+ the_acl = smb_xstrdup(poptGetOptArg(pc));
mode = SMB_ACL_ADD;
break;
@@ -852,7 +853,7 @@ static struct cli_state *connect_one(const char *share)
return -1;
}
- fstrcpy(filename, poptGetArg(pc));
+ pstrcpy(filename, poptGetArg(pc));
all_string_sub(path,"/","\\",0);