Commit Graph

2697 Commits

Author SHA1 Message Date
Michael Kerrisk 110039c1da unix.7: Remove mention of recvmsg() from discussion of EPIPE error
See https://bugzilla.kernel.org/show_bug.cgi?id=137351

Reported-by: Laurent Georget <laurent.georget@supelec.fr>
Reported-by: Ivan Kharpalev <ivan.kharpalev@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-07-24 21:27:09 +02:00
Michael Kerrisk 3df541c0e6 ldd.1, localedef.1, add_key.2, chroot.2, clone.2, fork.2, futex.2, get_mempolicy.2, get_robust_list.2, getitimer.2, getpriority.2, ioctl.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, kcmp.2, kill.2, lookup_dcookie.2, mmap.2, mount.2, open.2, pciconfig_read.2, perf_event_open.2, prctl.2, process_vm_readv.2, ptrace.2, quotactl.2, recv.2, setfsgid.2, setfsuid.2, sysinfo.2, umask.2, umount.2, unshare.2, utimensat.2, wait.2, assert.3, fmax.3, fmin.3, getauxval.3, inet_pton.3, malloc_hook.3, memmem.3, mkdtemp.3, mktemp.3, printf.3, strcasecmp.3, strcat.3, strtoul.3, strxfrm.3, console_codes.4, console_ioctl.4, lirc.4, tty.4, vcs.4, charmap.5, elf.5, locale.5, proc.5, repertoiremap.5, utmp.5, capabilities.7, cgroup_namespaces.7, cgroups.7, charsets.7, cp1251.7, cp1252.7, credentials.7, feature_test_macros.7, iso_8859-1.7, iso_8859-15.7, iso_8859-5.7, koi8-r.7, koi8-u.7, man-pages.7, mount_namespaces.7, namespaces.7, netlink.7, pid_namespaces.7, unix.7, user_namespaces.7, utf-8.7: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-07-17 18:10:19 +02:00
Michael Kerrisk 8c74a1cea4 user_namespaces.7: Clarify details of CAP_SYS_ADMIN and cgroup v1 mounts
With respect to cgroups version 1, CAP_SYS_ADMIN in the user
namespace allows only *named* hierarchies to be mounted (and
not hierarchies that have a controller).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-07-07 14:30:01 +02:00
Michael Kerrisk c7e077eaa4 user_namespaces.7: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-07-07 13:59:24 +02:00
Michael Kerrisk c0ada844e0 man-pages.7: Add a few more details on formatting conventions
Add some more details for Section 1 and 8 formatting.
Separate out formatting discussion into commands, functions,
and "general".

In part triggered by https://bugzilla.kernel.org/show_bug.cgi?id=121211

Reported-by: Josh Triplett <josh@kernel.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-07-07 13:23:13 +02:00
Michael Kerrisk 0b9200154c man-pages.7: Clarify which sections man-pages provides man pages for
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-07-07 13:23:13 +02:00
Jakub Wilk 1481407a2e mount_namespaces.7: tfix
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
2016-07-07 12:16:28 +02:00
Jakub Wilk 26213e0e53 ip.7: tfix
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
2016-07-07 12:15:58 +02:00
Michael Kerrisk ba5fd8d940 capabilities.7: Note on SECURE_NO_CAP_AMBIENT_RAISE for capabilities-only environment
A few months after applying Andy Lutomirski's patch that documented
ambient capabilities, I found myself again asking a question
that I'd already once asked of Any. So, best to be more explicit
in the man page that setting/locking SECBIT_NO_CAP_AMBIENT_RAISE
is not required when using prctl(PR_SET_SECUREBITS) to create
a capabilities-only environment.

This was the 4 Dec 2015 reply from Andy to my question:

    > In the capabilities(7) page tehre is the longstanding text:
    >
    >        An  application  can use the following call to lock itself, and
    >        all of its descendants, into an environment where the only  way
    >        of  gaining capabilities is by executing a program with associ‐
    >        ated file capabilities:
    >
    >            prctl(PR_SET_SECUREBITS,
    >                    SECBIT_KEEP_CAPS_LOCKED |
    >                    SECBIT_NO_SETUID_FIXUP |
    >                    SECBIT_NO_SETUID_FIXUP_LOCKED |
    >                    SECBIT_NOROOT |
    >                    SECBIT_NOROOT_LOCKED);
    >
    > As far as I can estimate, no changes are needed here to include
    > SECBIT_NO_CAP_AMBIENT_RAISE and SECBIT_NO_CAP_AMBIENT_RAISE_LOCKED
    > in the above prctl() call, but could you confirm please?

    Correct.  I'll probably write up a patch to suggest that doing this is
    a poor idea on a conventional distro, though, and I'll explain why.  I
    suppose than deleting this would be an option, too.

Reported-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-07-07 09:06:43 +02:00
Michael Kerrisk c54fbb8c3d capabilities.7: Add a detail on use of securebits
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-07-07 08:13:23 +02:00
Jakub Wilk 658a3012f8 bootparam.7: tfix
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
2016-07-01 20:57:31 +02:00
Michael Kerrisk f481726d64 mount_namespaces.7: Minor fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-30 06:08:32 +02:00
Michael Kerrisk e210919644 mount_namespaces.7: Describe "dominant peer group" and "propagate_from" mountinfo tag
Reported-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-30 06:08:32 +02:00
Michael Kerrisk da031af127 namespaces.7: Refer to new mount_namespaces(7) for information on mount namespaces
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-30 06:08:31 +02:00
Michael Kerrisk d9cdf357c9 mount_namespaces.7: Minor tweaks
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-30 06:08:31 +02:00
Michael Kerrisk 98c28960c3 mount_namespaces.7: New page describing mount namespaces
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-30 06:08:31 +02:00
Michael Kerrisk fa7ae0ea13 user_namespaces.7: Correct kernel version where XFS added support for user namespaces
Linux 3.12, not 3.11.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-30 06:08:18 +02:00
Michael Kerrisk 801245a110 user_namespaces.7: SEE ALSO: add ptrace(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-29 07:06:30 +02:00
Michael Kerrisk 33a1ab5da1 namespaces.7: /proc/PID/ns/* are governed by PTRACE_MODE_READ_FSCREDS
Permission to dereference/readlink /proc/PID/ns/* symlinks is
governed by a PTRACE_MODE_READ_FSCREDS ptrace access mode check.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-29 07:06:29 +02:00
Michael Kerrisk 2e23a9b257 cgroups.7: ERRORS: add mount(2) EBUSY error
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-28 06:32:23 +02:00
Michael Kerrisk 687d3f4aef user_namespaces.7: Correct user namespace rules for mounting /proc
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-26 16:31:44 +02:00
Michael Kerrisk 7e52299f66 user_namespaces.7: CAP_SYS_ADMIN allows mounting cgroup filesystems
See https://bugzilla.kernel.org/show_bug.cgi?id=120671

Reported-by: Michał Zegan <webczat_200@poczta.onet.pl>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-26 16:11:30 +02:00
Michael Kerrisk 8a9fb19dbd user_namespaces.7: Clarify CAP_SYS_ADMIN details for mounting FS_USERNS_MOUNT filesystems
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-26 16:09:06 +02:00
Michael Kerrisk c54e143901 termio.7: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-22 12:32:48 +02:00
Michael Kerrisk 712550ffb6 boot.7: Minor SEE ALSO fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-22 12:31:21 +02:00
Michael Kerrisk 32efecaab8 user_namespaces.7: List the mount operations permitted by CAP_SYS_ADMIN
List the mount operations permitted by CAP_SYS_ADMIN in a
noninitial userns.

See https://bugzilla.kernel.org/show_bug.cgi?id=120671

Reported-by: Michał Zegan <webczat_200@poczta.onet.pl>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-21 13:55:07 +02:00
Michael Kerrisk 2304b0d740 user_namespaces.7: Add a subsection heading for effects of capabilities in user NS
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-21 13:55:07 +02:00
Michael Kerrisk 89070c1a7c user_namespaces.7: Clarify meaning of privilege in a user namespace
Having privilege in a user NS only allows privileged
operations on resources governed by that user NS. Many
privileged operations relate to resources that have no
association with any namespace type, and only processes
with privilege in the initial user NS can perform those
operations.

See https://bugzilla.kernel.org/show_bug.cgi?id=120671

Reported-by: Michał Zegan <webczat_200@poczta.onet.pl>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-21 10:48:43 +02:00
Michael Kerrisk 61256f9f75 cgroup_namespaces.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-21 10:25:38 +02:00
Michael Kerrisk 3afb0c6a8e user_namespaces.7: SEE ALSO: add cgroup_namespaces(7)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-21 10:25:14 +02:00
Michael Kerrisk 7ea1c45ebd user_namespaces.7: Describe a concrete example of capability checking
Add a concrete example of how the kernel checks capabilities in
an associated user namespace when a process attempts a privileged
operation.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-21 10:25:14 +02:00
Michael Kerrisk 06999763ba user_namespaces.7: Minor wording fix
Avoid listing all namespace types in a couple of places,
since such a list is subject to bit rot as the number
of namespace types grows.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-21 10:25:14 +02:00
Michael Kerrisk a3969b76b9 user_namespaces.7: wfix: reword a long, difficult to understand sentence
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-21 10:25:14 +02:00
Michael Kerrisk 0a66259f35 netlink.7: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-20 15:21:30 +02:00
Michael Kerrisk 6cab1c1f5f netlink.7: Rework version information
(No changes in technical details.)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-20 15:21:30 +02:00
Michael Kerrisk 813d922024 cgroups.7: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-20 15:21:30 +02:00
Michael Kerrisk 7f98a23983 unix.7: Update text on socket permissions on other systems
At least some of the modern BSDs seem to check for write
permission on a socket. (I tested OpenBSD 5.9.) On Solaris 10,
some light testing suggested that write permission is still
not checked on that system.

See https://bugzilla.kernel.org/show_bug.cgi?id=120061  (and
https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-1999-1402)

Reported-by: Carsten Grohmann <carstengrohmann@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-20 15:21:30 +02:00
Michael Kerrisk 44cca454d2 unix.7: Note that umask / permissions have no effect for abstract sockets
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-20 14:08:31 +02:00
Michael Kerrisk d1875c13fc unix.7: Move some abstract socket details to a separate subsection
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-20 14:08:31 +02:00
Michael Kerrisk 9f213833a4 unix.7: Move discussion on pathname socket permissions to DESCRIPTION
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-20 14:08:31 +02:00
Michael Kerrisk b2bbcdb6ac unix.7: Minor wording fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-20 14:08:30 +02:00
Michael Kerrisk 9574e8b061 unix.7: Note that abstract sockets automatically disappear when FDs are closed
Added after I ran across this question:
http://unix.stackexchange.com/questions/216784/does-linux-automatically-clean-up-abstract-domain-sockets

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-20 14:08:30 +02:00
Michael Kerrisk 89657ef57d unix.7: Minor wording fix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-20 14:08:30 +02:00
Michael Kerrisk 00b78c5fda unix.7: Clarify ownership and permissions assigned during socket creation
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-20 14:08:22 +02:00
Michael Kerrisk 7578ea2f85 unix.7: Expand discussion of socket permissions
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-20 14:00:37 +02:00
Michael Kerrisk ce552c68fb unix.7: Enhance statement about changing sockets ownership and permissions
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-20 14:00:37 +02:00
Michael Kerrisk b1ef409dc7 unix.7: Fix statement about permissions needed to connect to a UNIX doain socket
Read permission is not required (verified by experiment).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-20 14:00:37 +02:00
Michael Kerrisk 820758df1a unix.7: grfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-20 14:00:37 +02:00
Michael Kerrisk dd4d803910 netlink.7: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-12 13:17:46 +02:00
Michael Kerrisk 376db9a14e netlink.7: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-06-12 13:13:46 +02:00