All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ivan Gyurdiev <ivg2@cornell.edu>
To: Joshua Brindle <jbrindle@tresys.com>
Cc: selinux@tycho.nsa.gov, Stephen Smalley <sds@tycho.nsa.gov>
Subject: Re: [ SEMANAGE ] Add a few direct dbases to handle
Date: Fri, 14 Oct 2005 17:40:59 -0400	[thread overview]
Message-ID: <435025EB.2060203@cornell.edu> (raw)
In-Reply-To: <43501DD9.4010803@tresys.com>


>>
>> You don't seem to realize that those databases need to exist, whether 
>> or not you're using the policy server, or the direct api.
>> This is just another way to switch between the two.
>>
> The policy server can't fill in these databases since there are 
> permission checks it would need to do for the queries.
That sounds like an implementation detail, and I don't understand why 
it's a problem. Maybe you can be more specific?

I've defined a database-like interface for users and other objects for 
files. You can look at users.h or ports.h, to see an example. I would 
like to support the same interface for the same objects in policy. I 
plan on exposing at least the query part of it to libsemanage clients. 
I'm not sure whether the modification part of it should be exposed 
(since you want modules only...no primitive changes), but I think it 
should be implemented internally in any case.

I can support the direct-case implementation. I am hoping you can 
support the policy server case, because otherwise this interface will 
not work for the server. If you dislike the interface, please give 
concrete reasons why, and I'll try to correct it.

>>>>
>>>> In fact, I want to convert your modules functions into a database 
>>>> too, but
>>>> I haven't gotten to it yet, and this isn't high priority.
>>>>
>>> Why? This doesn't solve any problem.
>>
>> For consistency, if nothing else... I think there are benefits to 
>> hiding data collections under a uniform interface, but I don't want 
>> to get into that right now - I sent Karl a long email some time ago. 
>> I know he's not convinced, but it's just my pet project.
>>
> this is a library being used by many people, I don't know that adding 
> things for the sake of adding them is appropriate.
I don't waste my time adding things "for the sake of adding them". I try 
to design things so that they are extensible. For example, one concrete 
reason why I want to see the modules look like a database, is that the 
dbase interface has more functions than you currently provide, and 
provides better encapsulation. I think that having a similar modules 
interface could be beneficial.

That said, Dan Walsh has not specified this as part of my current 
project, so it's just something that I would like to do.
The handle does not contain anything backend specific currently. Please 
give an example of something backend specific.
> The subject of this email is "Add a few direct dbases to handle". Does 
> direct mean something different from a direct connection?
You're right...the subject is misleading. It should say:
"Add a few policy databases to the handle, and stub their direct 
implementations".

> Also:
>
> +
> +#define DBASE_BASE_USERS      5
> +#define DBASE_BASE_PORTS      6
> +#if 0
> +#define DBASE_BASE_INTERFACES 7
> +#define DBASE_BASE_BOOLEANS   8
> +#endif
>
> What are these? How are they different from the other user, ports, 
> interfaces, booleans. Why isn't this described in the code or even email?
These are the users/ports/interfaces, and booleans that are currently 
part of the binary policy.
This was described in an email, to which you replied IIRC. It has also 
been described multiple times when I submitted patches that talk about a 
"direct database" to the list.

I agree that the code is not commented, but I've tried to at least name 
things proplerly.
I can add more comments later on, since a lot of this functionality 
isn't quite working yet - this is work in-progress.

--
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.

  reply	other threads:[~2005-10-14 21:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-14 18:16 [ SEMANAGE ] Add a few direct dbases to handle Ivan Gyurdiev
2005-10-14 18:39 ` [ SEMANAGE ] Bugfix previous patches Ivan Gyurdiev
2005-10-14 20:08   ` Stephen Smalley
2005-10-14 20:20 ` [ SEMANAGE ] Add a few direct dbases to handle Joshua Brindle
2005-10-14 20:40   ` Ivan Gyurdiev
2005-10-14 20:45     ` Ivan Gyurdiev
2005-10-14 20:39       ` Joshua Brindle
2005-10-14 20:59         ` Ivan Gyurdiev
2005-10-14 21:06           ` Joshua Brindle
2005-10-14 21:40             ` Ivan Gyurdiev [this message]
2005-10-15 11:34               ` Ivan Gyurdiev
2005-10-15 11:38                 ` Ivan Gyurdiev

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=435025EB.2060203@cornell.edu \
    --to=ivg2@cornell.edu \
    --cc=jbrindle@tresys.com \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@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.