All of lore.kernel.org
 help / color / mirror / Atom feed
* policyrep questions
@ 2007-05-08 22:29 Karl MacMillan
  2007-05-09 14:13 ` Karl MacMillan
  2007-05-09 15:29 ` Stephen Smalley
  0 siblings, 2 replies; 6+ messages in thread
From: Karl MacMillan @ 2007-05-08 22:29 UTC (permalink / raw)
  To: SE Linux

I have a few questions as I continue to do the policyrep patches.

1) The free functions for the objects may need to return an error (which
I hate, but there is no good way to avoid this). This will break
compatibility with the existing string based sepol objects (like
sepol_bool). Any problems breaking this compatibility?

2) The general form of the free functions will be:

int sepol_object_free(struct sepol_handle *h, struct sepol_object *o);

Is the handle necessary? The general form is to pass a handle wherever
an error is possible, but it seems like overkill in this case.

3) The existing objects copy the passed in strings where I was hoping to
avoid the copy. Any opinions either way? I'm currently leaning towards
copying because that kind of change will create hard to track down bugs
for no good reason.

4) We assume NULL-terminated strings all over the place - should we be
providing apis with length? Alternatively, should we provide a better
string object (since we are currently re-inventing the wheel, why not?).
We could pull in something like James Antills Vstr library -
http://www.and.org/vstr/ (read and be amazed at the diligence of James).
It just seems crazy that our apis are not the safest.

Karl




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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-05-09 16:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-08 22:29 policyrep questions Karl MacMillan
2007-05-09 14:13 ` Karl MacMillan
2007-05-09 15:30   ` Stephen Smalley
2007-05-09 15:29 ` Stephen Smalley
2007-05-09 15:51   ` Karl MacMillan
2007-05-09 16:34   ` James Antill

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.