From: Joshua Brindle <jbrindle@tresys.com>
To: Ivan Gyurdiev <ivg2@cornell.edu>
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 16:43:20 -0500 [thread overview]
Message-ID: <4384E278.3020200@tresys.com> (raw)
In-Reply-To: <4384CCC7.5090605@cornell.edu>
Ivan Gyurdiev wrote:
> 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).
>
doesn't matter, either function works, i just used add for the test
script, all of the functions are exported however, and Dan can use
modify in the semanage tool for convenience if he'd like.
> 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().
None of this must be done outside a transaction, I did the test that way
to hold the lock the shortest amount of time possible but it's certainly
possible and appropriate to start a transaction before modifying
anything in memory.
>
> 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 21:43 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
2005-11-23 21:43 ` Joshua Brindle [this message]
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=4384E278.3020200@tresys.com \
--to=jbrindle@tresys.com \
--cc=SELinux@tycho.nsa.gov \
--cc=dwalsh@redhat.com \
--cc=ivg2@cornell.edu \
--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.