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
Subject: Re: Record keys
Date: Wed, 19 Oct 2005 12:50:48 -0400	[thread overview]
Message-ID: <43567968.6020803@cornell.edu> (raw)
In-Reply-To: <4356520D.7050603@tresys.com>


> I can't think of any time a key wouldn't be within the record. I don't 
> know what the problem is though, the record will always be serialized 
> some way into a flat text file
You keep keep referring to the problem I'm trying to solve as 
parsing/writing a flat text file. Please realize that records are 
supposed to be backend-independent data structures. In particular, I 
currently use them for transfer with a flat file, or a policydb object. 
I am hoping you can use them over the wire for the policy server... 
so..no, the record will not always go in a text file.

I understand the serialization argument...
There's the same problem with policy - the key is a bunch of primitives 
that need to be assembled together (and disassembled).
> so you have to key_extract either way, if you keep a key around you do 
> it once on read, if you don't you do it anytime there is a query, set, 
> etc, it seems better to do it once.
Sepol doesn't have much use for the key structure - it's mostly to 
benefit semanage polymorphism. Sepol would just disassembles the key 
back into its components to do a query. I need to add a function to do 
that, since currently the key is opaque.

Also, if the key is separate from the record, the user can do something 
stupid, like add a record with a mismatch key.
=======

Anyway, there's no significant problem here - either way is fine. I'm 
just trying to finalize the API.

--
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-19 16:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <434F5E3A.5030003@cornell.edu>
2005-10-14  7:30 ` Record keys Ivan Gyurdiev
2005-10-15  9:33   ` Ivan Gyurdiev
2005-10-19 14:02   ` Joshua Brindle
2005-10-19 16:50     ` Ivan Gyurdiev [this message]

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=43567968.6020803@cornell.edu \
    --to=ivg2@cornell.edu \
    --cc=jbrindle@tresys.com \
    --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.