r4428: use minimum open permissions in the 'acl' command in smbclient, so the user is
authorAndrew Tridgell <tridge@samba.org>
Fri, 31 Dec 2004 03:54:49 +0000 (03:54 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:07:48 +0000 (13:07 -0500)
not prevented from viewing the acl by other access bits
(This used to be commit 61e71782f573d0fa5b88237299df516c67405e30)

source4/client/client.c

index 802c4a7a91a67507ee8b6045edc1180974dd868a..62b2042a029f10e63c9fc9663bce7606a37902d8 100644 (file)
@@ -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;