Commit Graph

18955 Commits

Author SHA1 Message Date
Michael Kerrisk f7dbc40ee7 capabilities.7: Minor wording fix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-02 16:21:37 +01:00
Michael Kerrisk 0336144833 prctl.2: Defer to capabilities(7) for discussion of the "keep capabilities" flag
It makes no sense to describe this flag in two different
manual pages, so consolidate the description to one page.
Furthermore, the following statement that was in the prctl(2)
page is not correct:

    A thread's effective capability set is always cleared
    when such a credential change is made, regardless of
    the setting of the "keep capabilities" flag.

The effective set is not cleared if, for example, the
credential sets were [ruid != 0, euid != 0, suid == 0]
and suid is switched to zero while the "keep capabilities"
flag is set.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-02 16:21:13 +01:00
Michael Kerrisk 705a8f33f1 capabilities.7: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-02 15:43:02 +01:00
Michael Kerrisk bbb186d403 capabilities.7: Clarify which capability sets are effected by SECBIT_KEEP_CAPS
This flag has relevance only for the process permitted and
effective sets.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-02 15:40:39 +01:00
Michael Kerrisk e67ac266c8 capabilities.7: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-02 15:08:52 +01:00
Michael Kerrisk f6b60423bd capabilities.7: Ambient set is also cleared when UIDs are set to nonzero value
See cap_emulate_setxuid():

        kuid_t root_uid = make_kuid(old->user_ns, 0);

        if ((uid_eq(old->uid, root_uid) ||
             uid_eq(old->euid, root_uid) ||
             uid_eq(old->suid, root_uid)) &&
            (!uid_eq(new->uid, root_uid) &&
             !uid_eq(new->euid, root_uid) &&
             !uid_eq(new->suid, root_uid))) {
                if (!issecure(SECURE_KEEP_CAPS)) {
                        cap_clear(new->cap_permitted);
                        cap_clear(new->cap_effective);
                }

                /*
                 * Pre-ambient programs expect setresuid to nonroot followed
                 * by exec to drop capabilities.  We should make sure that
                 * this remains the case.
                 */
                cap_clear(new->cap_ambient);
        }

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-02 11:08:40 +01:00
Michael Kerrisk 8e821c3aa8 user_namespaces.7: Mention NS_GET_OWNER_UID ioctl() operation
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-02 09:22:40 +01:00
Michael Kerrisk a563b19b70 capabilities.7: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-02 09:12:07 +01:00
Michael Kerrisk 6dfb150c9f seccomp.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-01 22:03:20 +01:00
Michael Kerrisk b94c5c5a5b seccomp.2: Clarify that SECCOMP_RET_TRAP SIGSYS signal is thread-directed
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-01 22:02:43 +01:00
Michael Kerrisk 3411d30b10 memfd_create.2: glibc support for memfd_create() was added in version 2.27
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-30 18:59:48 +01:00
Michael Kerrisk 39874d761d mlock.2: glibc support for mlock2() is added in version 2.27
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-30 18:58:53 +01:00
Michael Kerrisk 072337de25 ldd.1: Minor wording fix + tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-30 10:59:58 +01:00
Michael Kerrisk b320d728f9 unshare.2: Clarify the EUSERS occurred only until kernel 4.8
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-29 17:18:35 +01:00
Michael Kerrisk 910d43452d Changes.old: tfix
Reported-by: Andries E. Brouwer <Andries.Brouwer@cwi.nl>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-27 17:51:52 +01:00
Michael Kerrisk 8c71c67c21 Changes.old: Fixes for 4.14 changelog
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-27 17:49:50 +01:00
Michael Kerrisk 157fe4e334 Start of man-pages-4.15: updating Changes and Changes.old 2017-11-26 12:49:38 +01:00
Michael Kerrisk 70181c938f Start of man-pages-4.15: updating .Announce and .lsm files 2017-11-26 12:49:37 +01:00
Michael Kerrisk b8c73f3718 Start of man-pages-4.15: renaming .Announce and .lsm files 2017-11-26 12:49:37 +01:00
Michael Kerrisk c69ba7e390 Ready for 4.14 2017-11-26 12:42:33 +01:00
Michael Kerrisk c6688cd124 Removed trailing white space at end of lines 2017-11-26 12:42:22 +01:00
Michael Kerrisk 1c6f59c276 getpid.2, pipe.2, abort.3, daemon.3, pthread_yield.3, stdio.3, sysconf.3, tty.4, shells.5, sysfs.5, fifo.7, hier.7, icmp.7, path_resolution.7, pid_namespaces.7, standards.7: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-26 12:38:46 +01:00
Michael Kerrisk cd79b0c4ff veth.4: Add missing license tags
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-26 12:36:20 +01:00
Michael Kerrisk ed6235cff1 Changes: Ready for 4.14
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-26 12:21:32 +01:00
Michael Kerrisk b0a36622df Changes.old: wsfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-26 12:05:30 +01:00
Michael Kerrisk d2414cb5a1 makedev.3: Minor fixes to Adrian Bunk's patch
Note glibc version where deprecation occurred.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-25 14:23:05 +01:00
Adrian Bunk 1e50980d0f makedev.3: glibc has deprecated exposing the definitions via <sys/types.h>
Compile warning with glibc 2.25:

    warning: In the GNU C Library, "makedev" is defined by
    <sys/sysmacros.h>. For historical compatibility, it is
    currently defined by <sys/types.h> as well, but we plan to
    remove this soon.  To use "makedev", include <sys/sysmacros.h>
    directly. If you did not intend to use a system-defined macro
    "makedev", you should undefine it after including
    <sys/types.h>.

Background: glibc commit dbab6577c6684c62bd2521c1c29dc25c3cac966f

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-25 14:18:41 +01:00
Michael Kerrisk 54d12ec932 open_by_handle_at.2: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-24 09:32:27 +01:00
NeilBrown c61adb1789 open_by_handle_at.2: Clarify MAX_HANDLE_SZ
As hinted in the kernel source, MAX_HANDLE_SZ is a hint
rather than a promise:

    /* limit the handle size to NFSv4 handle size now */
    #define MAX_HANDLE_SZ 128

Note the "now" (probably should be "for now").
So change the description to make this clear.

Reported-by: Lennart Poettering <lennart@poettering.net>
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-24 09:31:28 +01:00
Michael Kerrisk 9bbf42428c getgroups.2: Minor restructuring of CONFORMING TO
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 21:46:50 +01:00
Michael Kerrisk 6fac0412de arch_prctl.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 21:45:02 +01:00
Michael Kerrisk defcd2c896 setuid.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 21:43:45 +01:00
Michael Kerrisk 674367694c llseek.2, lseek.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 21:42:11 +01:00
Michael Kerrisk 79c064f2e3 ioctl.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 21:39:45 +01:00
Michael Kerrisk d5bc35a7a9 connect.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 21:38:24 +01:00
Michael Kerrisk 7d4151a5c3 errno.3: Remove an unnecessary sentence
Reported-by: Walter Harms <wharms@bfs.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 21:24:53 +01:00
Michael Kerrisk b01ecc5e1d errno.3: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 21:24:21 +01:00
Michael Kerrisk 2a871e9941 pipe.2: Since Linux 4.5, fcntl() can be used to set O_DIRECT for a pipe
See https://bugzilla.kernel.org/show_bug.cgi?id=197917

Reported-by: Marin H. <mar-tSIEzQ@neutronstar.noip.me>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 13:36:06 +01:00
Michael Kerrisk 8466189293 fifo.7: Refer reader to pipe(7) for details of I/O semantics of FIFOs
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 13:36:00 +01:00
Michael Kerrisk 5a99c72245 errno.3: Note the use of perror(3) and strerror(3)
Reported-by: Walter Harms <wharms@bfs.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:49:32 +01:00
Michael Kerrisk afde18c00a errno.3: Minor wording change
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:39:59 +01:00
Michael Kerrisk f79214781c errno.3: Explicitly note that error numbers vary also across UNIX systems
Reported-by: Walter Harms <wharms@bfs.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:39:01 +01:00
Michael Kerrisk 6eb4b782a0 errno.3: Recast the advice against manually declaring 'errno'
Recast the advice against manually declaring 'errno' to
a more modern perspective. It's 13 years since the original
text was added, and even then it was describing old behavior.
Cast the description to be about behavior further away in
time, and note more clearly that manual declaration will
cause problems with modern C libraries.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:39:01 +01:00
Michael Kerrisk 5db92f96f4 errno.3: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:39:01 +01:00
Michael Kerrisk 44a35dc807 errno.3: Note use of errno(1) to look up error names and numbers
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:39:01 +01:00
Michael Kerrisk bf3683a153 errno.3: Note that error numbers vary somewhat across architectures
Added after a patch from Wesley Aptekar-Cassels that proposed
to add error numbers to the text.

Reported-by: Wesley Aptekar-Cassels <w.aptekar@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:39:01 +01:00
Michael Kerrisk 9d1a5fa63e errno.3: Error numbers are positive values (rather than nonzero values)
POSIX.1-2008 noted the explicitly the change (to align with
the C standards) that error numbers are positive, rather
than nonzero.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:39:01 +01:00
Michael Kerrisk b89ec85240 errno.3: Reorganize the text and and some subheadings
Restructure the text and add some subheadings for better
readability. No (intentional) content changes.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:39:01 +01:00
Michael Kerrisk c288d6b50d errno.3: Note the <errno.h> also provides the symbolic error names
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:10:12 +01:00
Michael Kerrisk a9641f84a1 errno.3: Minor text reorganization
No content changes.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:10:12 +01:00