All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Paris <eparis@parisplace.org>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: selinux@tycho.nsa.gov
Subject: Re: [PATCH] libselinux: 1/2 Introduce {get,set}procattrcon
Date: Mon, 26 Jun 2006 15:38:13 -0400	[thread overview]
Message-ID: <1151350693.21012.170.camel@localhost.localdomain> (raw)
In-Reply-To: <1151346680.5264.50.camel@moss-spartans.epoch.ncsc.mil>

On Mon, 2006-06-26 at 14:31 -0400, Stephen Smalley wrote:
> > --- libselinux-1.30.15/include/selinux/selinux.h.p1	2006-06-26 12:00:54.000000000 -0400
> > +++ libselinux-1.30.15/include/selinux/selinux.h	2006-06-26 12:00:54.000000000 -0400
> > @@ -24,6 +24,14 @@ extern void freeconary(security_context_
> >  
> >  /* Wrappers for the /proc/pid/attr API. */
> >  
> > +/* Generic /proc pid attr handlers.  These will either get or set the context
> > +   from or into the proc location passed to them.  Should only be called from 
> > +   inside libselinux */
> > +extern int getprocattrcon(security_context_t *con, char *path);
> > +extern int getprocattrcon_raw(security_context_t *con, char *path);
> > +extern int setprocattrcon(security_context_t con, char *path);
> > +extern int setprocattrcon_raw(security_context_t con, char *path);
> > +
> >  /* Get current context, and set *con to refer to it.
> >     Caller must free via freecon. */
> >  extern int getcon(security_context_t *con);
> 
> If they should only be called from inside libselinux, why are they
> defined in selinux/selinux.h, and exported to users of the library?

When I originally typed that comment I was still under the misguided
impression they were being hidden (which should have stood out as
strange for the same reason it did to james).  I could see value if you
had done something custom to your kernel or your libselinux didn't have
interfaces for all of the /proc/pid/attr/* (as is now the case since
there are kernels with keycreate and sockcreate but no libselinux
interface, even if that will get fixed shortly.)  I don't think it's
unreasonable to remove that comment and just leave them as visable
functions.  Do you want another patch to remove the comment?  Anyone
have feelings that we shouldn't export such a general interface?

-Eric


--
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:[~2006-06-26 19:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-26 16:48 [PATCH] libselinux: 1/2 Introduce {get,set}procattrcon Eric Paris
2006-06-26 18:31 ` Stephen Smalley
2006-06-26 19:38   ` Eric Paris [this message]
2006-06-26 20:15     ` Stephen Smalley
2006-06-27 20:30       ` Stephen Smalley
  -- strict thread matches above, loose matches on Subject: below --
2006-06-23 20:32 Eric Paris
2006-06-24  1:00 ` James Antill

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=1151350693.21012.170.camel@localhost.localdomain \
    --to=eparis@parisplace.org \
    --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.