From: Nathan Scott <nathans@sgi.com>
To: Nicholas Hans Simmonds <nhstux@gmail.com>
Cc: linux-kernel@vger.kernel.org,
"Andrew G. Morgan" <morgan@transmeta.com>,
Alexander Kjeldaas <astor@guardian.no>
Subject: Re: [PATCH] Filesystem capabilities support
Date: Wed, 6 Jul 2005 14:56:52 +1000 [thread overview]
Message-ID: <20050706045652.GB1773@frodo> (raw)
In-Reply-To: <20050702214108.GA755@laptop>
Hi Nicholas,
On Sat, Jul 02, 2005 at 10:41:08PM +0100, Nicholas Hans Simmonds wrote:
> This is a simple attempt at providing capability support through extended
> attributes.
> ...
> +#define XATTR_CAP_SET XATTR_SECURITY_PREFIX "cap_set"
> ...
> + ret = bprm_getxattr(bprm_dentry,XATTR_CAP_SET,&caps,sizeof(caps));
> + if(ret == sizeof(caps)) {
> + if(caps.version == _LINUX_CAPABILITY_VERSION) {
> + cap_t(bprm->cap_effective) &= caps.mask_effective;
> ...
Since this is being stored on-disk, you may want to consider
endianness issues. I guess for binaries this isn't really a
problem (since they're unlikely to be run on other platforms),
though perhaps it is for shell scripts and the like. Storing
values in native endianness poses problems for backup/restore
programs, NFS, etc.
IIRC, the other LSM security attribute values are stored as
ASCII strings on-disk to avoid this sort of issue.
cheers.
--
Nathan
next prev parent reply other threads:[~2005-07-06 6:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-02 21:41 [PATCH] Filesystem capabilities support Nicholas Hans Simmonds
2005-07-02 23:01 ` Alexey Dobriyan
2005-07-03 0:14 ` Nicholas Hans Simmonds
2005-07-06 4:56 ` Nathan Scott [this message]
2005-07-04 14:27 ` Nicholas Hans Simmonds
2005-07-13 6:29 ` Nicholas Hans Simmonds
2005-07-13 17:51 ` Horst von Brand
2005-07-14 4:29 ` Nicholas Hans Simmonds
2005-07-14 20:05 ` Horst von Brand
2005-07-16 14:23 ` Nicholas Hans Simmonds
2005-07-15 3:45 ` Jesper Juhl
2005-07-16 15:42 ` Nicholas Hans Simmonds
-- strict thread matches above, loose matches on Subject: below --
2005-07-24 13:36 Arnout Engelen
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=20050706045652.GB1773@frodo \
--to=nathans@sgi.com \
--cc=astor@guardian.no \
--cc=linux-kernel@vger.kernel.org \
--cc=morgan@transmeta.com \
--cc=nhstux@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.