From: Ivan Gyurdiev <ivg2@cornell.edu>
To: Joshua Brindle <jbrindle@tresys.com>
Cc: SELinux List <SELinux@tycho.nsa.gov>,
Daniel J Walsh <dwalsh@redhat.com>,
Stephen Smalley <sds@tycho.nsa.gov>
Subject: Re: [PATCH] wrappers for writing users and seusers
Date: Wed, 23 Nov 2005 15:10:47 -0500 [thread overview]
Message-ID: <4384CCC7.5090605@cornell.edu> (raw)
In-Reply-To: <1132763281.3714.3.camel@twoface.columbia.tresys.com>
Joshua Brindle wrote:
> This patch adds wrappers necessary to write users and seusers using
> libsemanage. It also includes the wrappers for ports, but they are
> commented out since the port functions are not exported via
> libsemanage.map. Examples of how to write users and seusers (and tests)
> are in pywrap-test.py as usual. Let me know if there are any problems
> with this patch.
>
>
Writers should probably be using modify_local, instead of add_local?
Actually now's as good a time as any to re-examine whether we want to
keep all of those (both internally, and in the interface).
add -> add new object, fail if it exists (should not be used to test
existence)
set -> modify old object, fail if it does not exist (should not be used
to text existence)
modify -> add or modify new object, depending on whether it exists
Yes, modify() can be implemented in terms of exists(), add(), and set(),
but I don't want to see all of those called outside a transaction with
no lock held. Similarly, set() can be implemented in terms of exists()
and modify(). add can be implemented in terms of exists() and modify().
The existence test is with respect to local modifications only. The way
the objects are eventually loaded into policy is fixed, and right now
it's (set) for booleans, and (modify) for everything else. Actually,
those are the only ones implemented..
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
next prev parent reply other threads:[~2005-11-23 20:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-23 16:28 [PATCH] wrappers for writing users and seusers Joshua Brindle
2005-11-23 20:10 ` Ivan Gyurdiev [this message]
2005-11-23 21:43 ` Joshua Brindle
2005-11-28 19:30 ` Stephen Smalley
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=4384CCC7.5090605@cornell.edu \
--to=ivg2@cornell.edu \
--cc=SELinux@tycho.nsa.gov \
--cc=dwalsh@redhat.com \
--cc=jbrindle@tresys.com \
--cc=sds@tycho.nsa.gov \
/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.