Commit Graph

13205 Commits

Author SHA1 Message Date
Michael Kerrisk a1d4cbf4f8 getgroups.2: Refer reader to user_namespaces(7) for discussion of /proc/PID/setgroups
The discussion of /proc/PID/setgroups has moved from
proc(5) to user_namespaces(7).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-04 15:11:02 +01:00
Michael Kerrisk ab28dba9a0 proc.5, user_namespaces.7: Migrate description of /proc/PID/setgroups to user_namespaces(7)
It makes sense to have the description of this file
in the general discussion of user namespaces.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-04 15:11:02 +01:00
Michael Kerrisk 4e2683f9a3 getgroups.2: Note kernel version for EPERM /proc/PID/setgroups error case
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-04 15:11:02 +01:00
Ma Shimiao b640fcfad1 wcstombs.3: ATTRIBUTES: Note function that is thread-safe
The marking matches glibc marking.

Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-04 15:11:02 +01:00
Ma Shimiao 988517af15 wctob.3: ATTRIBUTES: Note function that is thread-safe
The marking matches glibc marking.

Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-04 15:11:02 +01:00
Ma Shimiao 8ae2d62531 popen.3: ATTRIBUTES: Note functions that are thread-safe
The marking matches glibc marking.

Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-04 15:11:02 +01:00
Michael Kerrisk a0726dbfdd proc.5: Tweaks to /proc/PID/setgroups text
After comments from Eric Biederman

Cowritten-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-04 15:11:02 +01:00
Michael Kerrisk f72de267d9 user_namespaces.7: srcfix: FIXME
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-04 15:11:02 +01:00
Michael Kerrisk 364ce93556 user_namespaces.7: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-04 15:11:02 +01:00
Michael Kerrisk f2d61dbbaa user_namespaces.7: Some tweaks to Eric Biederman's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-04 15:11:02 +01:00
Eric W. Biederman 0c9abe8b8c user_namespaces.7: Update the documentation to reflect the fixes for negative groups
Files with access permissions such as rwx---rwx give fewer
permissions to their group then they do to everyone else.  Which
means dropping groups with setgroups(0, NULL) actually grants a
process privileges.

The unprivileged setting of gid_map turned out not to be safe
after this change.  Privileged setting of gid_map can be
interpreted as meaning yes it is ok to drop groups. [ Eric
additionally noted: Setting of gid_map with privilege has been
clarified to mean that dropping groups is ok.  This allows
existing programs that set gid_map with privilege to work
without changes.  That is, newgidmap(1) continues to work
unchanged.]

To prevent this problem and future problems, user namespaces were
changed in such a way as to guarantee a user can not obtain
credentials without privilege that they could not obtain without
the help of user namespaces.

This meant testing the effective user ID and not the filesystem
user ID, as setresuid(2) and setregid(2) allow setting any process
UID or GID (except the supplementary groups) to the effective ID.

Furthermore, to preserve in some form the useful applications
that have been setting gid_map without privilege, the file
/proc/[pid]/setgroups was added to allow disabling setgroups(2).
With setgroups(2) permanently disabled in a user namespace, it
again becomes safe to allow writes to gid_map without privilege.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-04 15:10:02 +01:00
Michael Kerrisk 6bb49a3266 proc.5: Tweak's to Eric Biederman's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-03 15:49:39 +01:00
Michael Kerrisk de04dd4df3 proc.5: Add some details on /proc/PID/setgroups
And generally rework the text.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-03 15:49:39 +01:00
Michael Kerrisk c06e4b9664 getgroups.2: ERRORS: add EPERM for the case where /proc/PID/setgroups is "deny"
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-03 15:49:39 +01:00
Michael Kerrisk 925b92395b getgroups.2: Note capability associated with EPERM error for setgroups(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-03 15:49:39 +01:00
Michael Kerrisk 5c92b1b761 proc.5: Tweaks to Eric Biederman's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-03 15:49:39 +01:00
Eric W. Biederman d520465b99 proc.5: Document /proc/[pid]/setgroups
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-03 15:49:39 +01:00
Michael Kerrisk 1622fc979b proc.5: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-03 15:49:39 +01:00
Michael Kerrisk 430a1677d2 umount.2: Move "shared mount + umount" text to a subsection in MOTTES
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-03 15:49:39 +01:00
Michael Kerrisk 50a4b0aafc umount.2: Tweak's to Eric Biederman's "shared subtrees on umount" patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-03 15:49:39 +01:00
Eric W. Biederman 6d47504df1 umount.2: Document the effect of shared subtrees on umount(2)
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-03 15:49:39 +01:00
Eric W. Biederman f131122173 umount.2: Correct the description of MNT_DETACH
I recently realized that I had been reasoning improperly about
what umount(MNT_DETACH) did based on an insufficient description
in the umount.2 man page, that matched my intuition but not the
implementation.

When there are no submounts, MNT_DETACH is essentially harmless to
applications.  Where there are submounts, MNT_DETACH changes what
is visible to applications using the detach directories.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-03 15:49:38 +01:00
Michael Kerrisk 3ef9fdd1a9 user_namespaces.7: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-03 15:49:16 +01:00
Michael Kerrisk 74412268b4 user_namespaces.7: Update kernel version associated with 5-line limit for map files
As at Linux 3.18, the limit is still five lines, so mention the
more recent kernel version in the text.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-03 13:20:28 +01:00
Michael Kerrisk 095f40d547 man-pages.7: Minor rewording of description of Section 5
Reported-by: Stéphane Aulery <saulery@free.fr>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-03 12:46:00 +01:00
Michael Kerrisk ae86ac0e86 man-pages-3.82.Announce: Minor change to man5 description
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-03 12:44:40 +01:00
Ma Shimiao 7ab7eb48f7 strdup.3: ATTRIBUTES: Note functions that are thread-safe
The marking matches glibc marking.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-03 12:41:48 +01:00
Ma Shimiao 7aa848d5bb strcoll.3: ATTRIBUTES: Note function that is thread-safe
The markings match glibc markings.

Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-03 12:41:22 +01:00
Ma Shimiao 011bc01157 fseek.3: ATTRIBUTES: Note functions that are thread-safe
The markings match glibc markings.

Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-03 12:40:37 +01:00
Michael Kerrisk c9b0afde95 setns.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-03 09:50:24 +01:00
Michael Kerrisk c32297a0ee man-pages-3.82.Announce: Fix description of section 5
Reported-by: Stéphane Aulery <saulery@free.fr>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-03 09:38:53 +01:00
Ma Shimiao ac4fa12883 fseeko.3: ATTRIBUTES: Note functions that are thread-safe
The markings match glibc markings.

Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-03 09:32:41 +01:00
Ma Shimiao 6d02776465 hypot.3:ATTRIBUTES: Note functions that are thread-safe
The markings match glibc markings.

Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-03 09:21:13 +01:00
Michael Kerrisk 0f0daf7d99 ioctl_list.2: srcfix: remove unneeded "changelog" text
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-03 08:33:01 +01:00
Heinrich Schuchardt a44ffc6491 ioctl_list.2: include/linux/ext2_fs.h
Include linux/ext2_fs.h does not contain any ioctl definitions
anymore.

Request codes EXT2_IOC* have been replaced by FS_IOC* in
linux/fs.h.

Some definitions of FS_IOC_* use long* but the actual code expects
int* (see fs/ext2/ioctl.c).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-03 08:30:03 +01:00
Yuri Kozlov 299cfca4a2 ecvt_r.3: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-03 08:29:07 +01:00
Michael Kerrisk 98df674009 mq_open.3: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-03 08:27:30 +01:00
Torvald Riegel c8aba8ed88 mq_open.3: Add EINVAL error case for invalid name
This behavior is implementation-defined by POSIX.  If the name
doesn't start with a '/', glibc returns EINVAL without attempting
the syscall.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-03 08:25:49 +01:00
Michael Kerrisk 1533d24295 clone.2: Small rewording of explanation of clone() wrt threads
Clone has so many effects that it's an oversimplification to say
that the *main* use of clone is to create a thread.  (In fact,
the use of clone() to create new processes may well be more
common, since glibc's fork() is a wrapper that calls clone().)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-02 17:25:57 +01:00
Michael Kerrisk bc9e70fad6 mount.2: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-02 17:25:57 +01:00
Michael Kerrisk 9316cc647e syscalls.2: Update for Linux 4.0
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-02 17:25:57 +01:00
Stéphane Aulery db6642bdb2 man-pages.7: Improve description of sections in accordance with intro pages
Signed-off-by: Stéphane Aulery <saulery@free.fr>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-02 17:25:57 +01:00
Michael Kerrisk f8db29e89c console_codes.4: Add kernel version number for CSI sequence 15
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-02 17:25:57 +01:00
Taisuke Yamada e8db1b97eb console_codes.4: Add Console Private CSI sequence 15
An undocumented escape sequence in drivers/tty/vt/vt.c brings the
previously accessed virtual terminal to the foreground.

Signed-off-by: Scot Doyle <lkml14@scotdoyle.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-02 17:25:57 +01:00
Bill Pemberton 33ec0e5425 rpc.3: tfix
Signed-off-by: Bill Pemberton <wfp5p@worldbroken.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-02 17:25:56 +01:00
Bill Pemberton 18e93ab874 ilogb.3: spfix
Signed-off-by: Bill Pemberton <wfp5p@worldbroken.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-02 17:25:56 +01:00
Namhyung Kim ff3e550075 memusage.1: tfix
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-02 17:25:56 +01:00
Michael Kerrisk 28b44abc49 clone.2: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-02 17:25:56 +01:00
Josh Triplett 3dd889d9c1 clone.2: Document that clone silently ignores CLONE_PID and CLONE_STOPPED
Normally, system calls return EINVAL for flags they don't support.
Explicitly document that clone does *not* produce an error for these two
obsolete flags.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-02 17:25:56 +01:00
Stéphane Aulery 4e3abe8b23 intro.8: tfix
Signed-off-by: Stéphane Aulery <saulery@free.fr>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-02 17:25:56 +01:00