All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luke Kenneth Casson Leighton <lkcl@lkcl.net>
To: Daniel J Walsh <dwalsh@redhat.com>
Cc: Darrel Goeddel <dgoeddel@TrustedCS.com>,
	Stephen Smalley <sds@epoch.ncsc.mil>,
	SELinux <SELinux@tycho.nsa.gov>
Subject: Re: New ideas on implementation on libsetrans.
Date: Tue, 13 Sep 2005 22:22:36 +0100	[thread overview]
Message-ID: <20050913212236.GA540@lkcl.net> (raw)
In-Reply-To: <43272E92.4060400@redhat.com>

On Tue, Sep 13, 2005 at 03:54:58PM -0400, Daniel J Walsh wrote:
> >Have you put any thought into the language that libselinux and the 
> >daemons
> >would speak over the socket?
> >
> I like ASCII... Of course if someone wants to take the ball and run with 
> it, it would be great.
 
 before making a decision: what level of complexity are we looking at?

 if you're looking at a horrendous set of interlinked structs, combining
 variable-length arrays of unions containing further variable-length
 arrays of structs, such as this:

 http://cvs.sourceforge.net/viewcvs.py/oser/exchange5.5/exploration/test/emsabp/emsabp.idl?rev=1.1&view=markup

 then you would be completely and utterly insane to do this by hand.

 if, however, on the other hand, you are looking at a simple "gimme one
 bit of data" "here you go" then yeh, ascii would be fine (and, to be
 honest, infinitely preferable).


 winbindd needs to handle binary data structures, and _fortunately_ it
 has access to a whole boat-load of MSRPC infrastructure / pickling
 code.

 so even though it's handling data structures such as NET_USER_INFO_3
 variable-length optional-extras nightmares, the code already exists
 (which was created by hand, and NET_USER_INFO_3 on its own took several
 hours to do) so we use it.

 
 one technique deployed by winbindd is to have a "fixed size" data blob
 and an optional "variable length" data blob.

 the "fixed size" one is the union of a whole stack of structs,
 with an integer "info level" which is the "command", and that
 info level specifies which of the structs in the union is actually
 contained in the fixed-size data blob.

 it's a technique known as "encapsulated unions".


 so.

 what do the data structures look like?

 tell me they're nice and simple...


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

  parent reply	other threads:[~2005-09-13 21:25 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-13 18:35 New ideas on implementation on libsetrans Daniel J Walsh
2005-09-13 18:59 ` Stephen Smalley
2005-09-13 19:10 ` Luke Kenneth Casson Leighton
2005-09-13 19:44 ` Darrel Goeddel
2005-09-13 19:54   ` Daniel J Walsh
2005-09-13 19:53     ` Stephen Smalley
2005-09-13 20:04       ` Daniel J Walsh
2005-09-13 20:06         ` Stephen Smalley
2005-09-13 20:33           ` Daniel J Walsh
2005-09-13 20:32             ` Stephen Smalley
2005-09-13 21:19               ` Daniel J Walsh
2005-09-14 13:39                 ` Stephen Smalley
2005-09-14 14:15                   ` Daniel J Walsh
     [not found]                   ` <20050914192343.GA30138@redhat.com>
2005-09-14 19:51                     ` Stephen Smalley
2005-09-14 13:03           ` Steve G
2005-09-14 13:33             ` Stephen Smalley
2005-09-14 17:25               ` Steve G
2005-09-14 17:52                 ` Stephen Smalley
2005-09-14 18:01                 ` Stephen Smalley
2005-09-16 13:47                   ` Luke Kenneth Casson Leighton
2005-09-13 21:22     ` Luke Kenneth Casson Leighton [this message]
2005-09-14 11:58       ` Stephen Smalley
2005-09-16 13:59         ` Luke Kenneth Casson Leighton
2005-09-16 17:18           ` Steve G
2005-09-16 17:28             ` 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=20050913212236.GA540@lkcl.net \
    --to=lkcl@lkcl.net \
    --cc=SELinux@tycho.nsa.gov \
    --cc=dgoeddel@TrustedCS.com \
    --cc=dwalsh@redhat.com \
    --cc=sds@epoch.ncsc.mil \
    /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.