All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Grubb <sgrubb@redhat.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Drop Posix Capabilities
Date: Mon, 28 Sep 2009 17:31:00 -0400	[thread overview]
Message-ID: <200909281731.00670.sgrubb@redhat.com> (raw)
In-Reply-To: <1254083485.2659.14.camel@localhost.localdomain>

On Sunday 27 September 2009 04:31:25 pm Marcel Holtmann wrote:
> > > > +AC_DEFUN([LIBCAP_NG_PATH],
> > > > +[
> > > > +     AC_ARG_WITH(libcap-ng,
> > > > +     [ --with-libcap-ng=[auto/yes/no]  Add Libcap-ng support
> > > > +             [default=auto]],, with_libcap_ng=auto)
> > > > +
> > >
> > > I mention this to Bastien already. I want pkgconfig support here and
> > > not some old style aclocal magic.
> >
> > libcap-ng itself does not provide any pkgconfig support. I'll check on
> > this.
> 
> According to the bug you guys have open for this, you try to fix this
> upstream in libcap-ng. So please push a pkgconfig file to libcap-ng and
> then I am more than happy to accept a patch for this.

The bug report only said pkg-config support might be nice, but it was not 
specified as a requirement. Anyways, I made a new release of libcap-ng today 
with a pkg-config file added. There are no other user of that file, so please let 
me know if something is wrong with it.

http://people.redhat.com/sgrubb/libcap-ng/libcap-ng-0.6.2.tar.gz
 
> I like to have capability dropping in bluetoothd, but I do wanna do it
> with a proper upstream project.

one other thing I thought I would point out. The patch I sent can make it easy 
to run the bluetooth daemon as non-root user. If we switch this line:

capng_apply(CAPNG_SELECT_BOTH);

to

capng_change_id(uid, gid, CAPNG_DROP_SUPP_GRP | CAPNG_CLEAR_BOUNDING);

then the job is easier. Of course you would likely need to fixup file 
permissions in places, but in theory a non-root bluetooth daemon is possible 
with a 1 line change in the patch. You would probably want to add error 
handling and a way to specify the uid/gid, too.

-Steve

  reply	other threads:[~2009-09-28 21:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-25 20:47 [PATCH] Drop Posix Capabilities Steve Grubb
2009-09-25 21:35 ` Marcel Holtmann
2009-09-26 14:29   ` Steve Grubb
2009-09-27 20:31     ` Marcel Holtmann
2009-09-28 21:31       ` Steve Grubb [this message]
2009-09-28 23:40         ` Marcel Holtmann
2009-09-29 13:00           ` Steve Grubb
2009-09-29 18:03             ` Marcel Holtmann
2009-10-02  9:46 ` Marcel Holtmann

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=200909281731.00670.sgrubb@redhat.com \
    --to=sgrubb@redhat.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=marcel@holtmann.org \
    /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.