public inbox for linux-cifs@vger.kernel.org
 help / color / mirror / Atom feed
From: Bruno Wolff III <bruno@wolff.to>
To: linux-cifs@vger.kernel.org
Subject: setcifsacl: Shouldn't 0x0 be a valid mask?
Date: Thu, 23 Sep 2021 10:55:10 -0500	[thread overview]
Message-ID: <20210923155510.GA2171@wolff.to> (raw)

I was looking at using S-1-2-3-4 to take away rights via ownership and 
granting no access (but not denying it either) makes sense as access 
is granted via group membership. Microsofts documentation seems to 
suggest the a 0x0 mask is valid.
Quote from 
https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/dd125370(v=ws.10)?redirectedfrom=MSDN
"When you add the Owner Rights security principal to objects, you can 
specify what permissions are given to the owner of an object. For example 
you can specify in the access control entry (ACE) of an object that the 
owner of a particular object is given Read permissions or you can specify 
NULL permissions to an object, which grants the owner of the object no 
permissions."

Here is example output:
# setcifsacl -a "ACL:S-1-2-3-4:0x0/0x0/0x0" bruno-test
verify_ace_mask: Invalid mask 0x0 (value 0x0)

Besides the owner rights case, I think this might also make sense in an ACL 
to break inheritence, though in that case there might be other ways to 
do that.

Unless having a 0x0 mask actually breaks things, it doesn't seem that 
it is a good idea to prohibit it.

             reply	other threads:[~2021-09-23 16:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-23 15:55 Bruno Wolff III [this message]
2021-09-23 16:15 ` setcifsacl: Shouldn't 0x0 be a valid mask? Steve French
2021-09-23 16:10   ` Bruno Wolff III
2021-09-23 16:35   ` Bruno Wolff III
2021-09-23 19:38   ` Bruno Wolff III
     [not found]     ` <CAH2r5msf525KHBUTgiTMFwzm=Wk_0vGeHuWFia1ijBETSvG4Ew@mail.gmail.com>
2021-09-23 20:48       ` Bruno Wolff III

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210923155510.GA2171@wolff.to \
    --to=bruno@wolff.to \
    --cc=linux-cifs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox