From: "Ángel González" <ingenit@zoho.com>
To: Andy Lutomirski <luto@amacapital.net>
Cc: util-linux@vger.kernel.org
Subject: Re: [PATCH] Add no_new_privs
Date: Fri, 23 Nov 2012 23:52:54 +0100 [thread overview]
Message-ID: <50AFFE46.4090309@zoho.com> (raw)
In-Reply-To: <b9e1a13168f41cde97e1fdaa21cdc5354ef535ea.1353702119.git.luto@amacapital.net>
On 23/11/12 21:23, Andy Lutomirski wrote:
> ---
>
> I'm not 100% sure this is appropriate for util-linux, but it seems useful.
>
> I've never written new programs for util-linux before, and I barely understand
> autotools. Feedback is welcome :)
(...)
> --- /dev/null
> +++ b/sys-utils/no_new_privs.1
> @@ -0,0 +1,37 @@
> +.\" Process this file with
> +.\" groff -man -Tascii no_new_privs.1
> +.\"
> +.TH NO_NEW_PRIVS 1 "December 2012" "util-linux" "User Commands"
> +.SH NAME
> +no_new_privs \- run program with new_new_privs set
s/new_new_privs/no_new_privs/
> +.SH SYNOPSIS
> +.B no_new_privs
> +.RI [ options ]
> +program
> +.RI [ arguments ]
> +.SH DESCRIPTION
> +Sets the \fIno_new_privs\fP bit and then executes specified program. With
> +this bit set,
> +.BR execve (2)
> +will not grant new privileges. For example, the setuid
> +and setgid bits as well as file capabilities will not function. This bit
"will not be granted" instead of "will not function"?
It's not clear from the description if a privileged program would run
without setuid or if it wouldn't run at all (although to be fair,
no_new_privs.txt doesn't clarify that, either).
> +is inherited by child processes and cannot be unset. See
> +.BR prctl (2)
> +and
> +.IR Documentation/prctl/no_new_privs.txt
> +in the Linux kernel source.
> +.SH OPTIONS
> +.TP
> +.BR \-h , " \-\-help"
> +Print a help message,
> +.SH NOTES
> +If setting the no_new_privs bit fails, \fIprogram\fP will not be run.
Also document that it will return 1 ?
It is possible that something like 127 would be more appropiate, though.
> +.SH SEE ALSO
> +.BR prctl (2)
> +.SH BUGS
> +None known so far.
> +.SH AUTHOR
> +Andy Lutomirski <luto@amacapital.net>
> +.SH AVAILABILITY
> +The no_new_privs command is part of the util-linux package and is available from
> +ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
IMHO it should mention that PR_SET_NO_NEW_PRIVS is available since Linux
3.5
(...)
next prev parent reply other threads:[~2012-11-23 23:11 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-23 20:23 [PATCH] Add no_new_privs Andy Lutomirski
2012-11-23 21:14 ` Pádraig Brady
2012-11-26 10:08 ` Karel Zak
2012-11-26 12:45 ` Ángel González
2012-11-26 19:03 ` Andy Lutomirski
2012-11-27 1:39 ` Andy Lutomirski
2012-11-23 22:52 ` Ángel González [this message]
2012-12-08 8:19 ` [PATCH] Add setpriv, a tool to set privileges and such Andy Lutomirski
2012-12-08 16:23 ` Ángel González
2012-12-08 19:04 ` Andy Lutomirski
2012-12-09 22:24 ` Pádraig Brady
2012-12-09 23:12 ` Andy Lutomirski
2013-01-08 8:31 ` Karel Zak
2013-01-14 15:33 ` Andy Lutomirski
2013-01-14 15:58 ` [PATCH v2] " Andy Lutomirski
2013-01-26 14:29 ` [PATCH] setpriv: run a program with different Linux privilege settings Sami Kerola
2013-02-04 20:20 ` Andy Lutomirski
2013-02-05 9:05 ` Karel Zak
2013-02-05 10:51 ` Karel Zak
2013-02-06 1:07 ` [PATCH] setpriv: Fix an error message typo Andy Lutomirski
2013-02-06 11:32 ` Karel Zak
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=50AFFE46.4090309@zoho.com \
--to=ingenit@zoho.com \
--cc=luto@amacapital.net \
--cc=util-linux@vger.kernel.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.