lkml.org 
[lkml]   [2009]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] define convenient securebits masks for prctl users
Quoting Michael Kerrisk (mtk.manpages@googlemail.com):
> Hi Serge,
>
> On Wed, Oct 14, 2009 at 11:15 PM, Serge E. Hallyn <serue@us.ibm.com> wrote:
> > The securebits are used by passing them to prctl with the
> > PR_{S,G}ET_SECUREBITS commands.  But the defines must be
> > shifted to be used in prctl, which begs to be confused and
> > misused by userspace.  So define some more convenient
> > values for userspace to specify.  This way userspace does
> >
> >        prctl(PR_SET_SECUREBITS, SECBIT_NOROOT);
> >
> > instead of
> >
> >        prctl(PR_SET_SECUREBITS, 1 << SECURE_NOROOT);
> >
> > Thanks to Michael for the idea.
> >
> > This patch also adds include/linux/securebits to the installed headers.
> > Then perhaps it can be included by glibc's sys/prctl.h.
> >
> > Changelog:
> >        Oct 14: (Suggestions by Michael Kerrisk):
> >                1. spell out SETUID in SECBIT_NO_SETUID*
> >                2. SECBIT_X_LOCKED does not imply SECBIT_X
> >                3. add definitions for keepcaps
>
> Thanks for these changes.

Thanks for taking a look and commenting!

> >        Oct 14: As suggested by Michael Kerrisk, don't
> >                use SB_* as that convention is already in
> >                use.  Use SECBIT_ prefix instead.
> >
> > Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
> > Acked-by: Andrew G. Morgan <morgan@kernel.org>
>
> Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>

thanks,
-serge
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-10-15 16:25    [W:0.042 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site