From e222a342de85dbd648409a16527e55aa285933fe Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 31 Dec 2004 03:54:49 +0000 Subject: r4428: use minimum open permissions in the 'acl' command in smbclient, so the user is not prevented from viewing the acl by other access bits (This used to be commit 61e71782f573d0fa5b88237299df516c67405e30) --- source4/client/client.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source4/client/client.c') diff --git a/source4/client/client.c b/source4/client/client.c index 802c4a7a91..62b2042a02 100644 --- a/source4/client/client.c +++ b/source4/client/client.c @@ -1859,7 +1859,14 @@ static int cmd_acl(const char **cmd_ptr) } pstrcat(fname,buf); - fnum = smbcli_open(cli->tree, fname, O_RDONLY, DENY_NONE); + fnum = smbcli_nt_create_full(cli->tree, fname, 0, + SEC_STD_READ_CONTROL, + 0, + NTCREATEX_SHARE_ACCESS_DELETE| + NTCREATEX_SHARE_ACCESS_READ| + NTCREATEX_SHARE_ACCESS_WRITE, + NTCREATEX_DISP_OPEN, + 0, 0); if (fnum == -1) { d_printf("%s - %s\n", fname, smbcli_errstr(cli->tree)); return -1; -- cgit