From be40463c310ccc32d6a767a1521a87da937d6971 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 20 Mar 2003 14:49:37 +0000 Subject: Fix compile errors - don't use pstrcpy() on a fstring (This used to be commit 3bad73ca870bb43324bdb5dfc6bb02e0fa1fb1e0) --- source3/utils/smbcacls.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'source3/utils/smbcacls.c') 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); -- cgit