summaryrefslogtreecommitdiff
path: root/source4/client/client.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-12-31 03:54:49 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:07:48 -0500
commite222a342de85dbd648409a16527e55aa285933fe (patch)
tree4b32410f1a83e4b3579fe5f3529b1f180e936378 /source4/client/client.c
parent09c1b9cbe5175636bcf4b606edfd0022bd9cfd6b (diff)
downloadsamba-e222a342de85dbd648409a16527e55aa285933fe.tar.gz
samba-e222a342de85dbd648409a16527e55aa285933fe.tar.bz2
samba-e222a342de85dbd648409a16527e55aa285933fe.zip
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)
Diffstat (limited to 'source4/client/client.c')
-rw-r--r--source4/client/client.c9
1 files changed, 8 insertions, 1 deletions
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;