Commit Graph

6704 Commits

Author SHA1 Message Date
Michael Kerrisk 2ea8ee2cf0 ioctl.2: SEE ALSO: add ioctl_ns(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-01-09 15:48:57 +13:00
Michael Kerrisk 008f58d5e8 ioctl_ns.2: New page created by splitting ioctl(2) operations out of namespaces(7)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-01-09 15:48:51 +13:00
Michael Kerrisk 94d76e41e9 remap_file_pages.2: remap_file_pages() has been replaced by a slower in-kernel emulation
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-01-06 09:48:33 +13:00
Jakub Wilk 48dd0abcd0 ioctl_fideduperange.2: ffix
Add empty line between "struct file_dedupe_range" definition and the
following paragraph.

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-01-06 05:57:05 +13:00
Jakub Wilk e38f392506 request_key.2: tfix
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-01-04 15:24:49 +13:00
Jakub Wilk 40aba91d56 keyctl.2: tfix
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-01-04 15:24:30 +13:00
Jakub Wilk 4e66320e06 getrlimit.2: tfix
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-01-04 15:23:54 +13:00
Michael Kerrisk 30e2a22aa6 inotify_add_watch.2: Note "inode" as a synonym for "filesystem object"
Consistent with clarifications just made in inotify(7).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-01-02 20:08:40 +01:00
Michael Kerrisk 2b1d26d40e recv.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-31 21:24:12 +01:00
Omar Sandoval 14d6e62f12 ptrace.2: clarify PTRACE_O_EXITKILL
The description in the man page is confusing; it makes it sound like
setting the PTRACE_O_EXITKILL flag on any tracee makes it so that all
tracees are killed if the tracer exits. The description from kernel
commit 992fb6e170639b that introduced PTRACE_O_EXITKILL offers a
different explanation: "If the tracer exits it sends SIGKILL to every
tracee which has this bit set".

Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Omar Sandoval <osandov@osandov.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-31 20:39:16 +01:00
Michael Kerrisk 3e1ac86ee8 recv.2: Remove duplicate paragraph
man-pages-1.34 included changes that duplicated an existing
paragraph. Remove that duplicate.

Reported-by: Vincent Bernat <vincent@bernat.im>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-31 20:32:31 +01:00
Michael Kerrisk 70bdb9b539 ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, perfmonctl.2, sched_rr_get_interval.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-30 13:41:37 +01:00
Michael Kerrisk 41f90bb7eb prctl.2: Minor fixes to Keno's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-28 11:13:38 +01:00
Keno Fischer 27ce08bf1d prctl.2: Be more precise in what causes dumpable to reset
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-28 11:10:28 +01:00
Michael Kerrisk f8dcca844a poll.2i, select.2: ffix + srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-27 21:09:07 +01:00
Nicolas B f25ea51b98 poll.2, select.2: Add a reference to the sigset discussion in sigprocmask(2)
A little while back, I added a note to sigprocmask.2 that
discussed the difference between the libc's and the kernel's
sigset_t structures.  I added that note, because I saw this being
done wrong in a tool tracing system calls (causing subtle bugs).
As it turns out, the same bugs existed for ppoll and pselect, for
the same reason. I'm hoping by adding the reference here, future
writers of similar tools will find that discussion and not make
the same mistake.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-27 21:05:48 +01:00
Michael Kerrisk 64dd3b717a keyctl.2: srcfix: update FIXME
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-27 09:36:23 +01:00
Michael Kerrisk 60be6628fa keyctl.2: KEYCTL_SET_REQKEY_KEYRING also has an effect for request_key(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-27 09:36:23 +01:00
Michael Kerrisk 0978f70669 add_key.2: srcfix: Update FIXMEs
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-27 09:36:23 +01:00
Michael Kerrisk 5834768eaf request_key.2: srcfix: FIXME
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-27 09:36:23 +01:00
Michael Kerrisk c69490ae43 keyctl.2: Improve a KEYCTL_SET_REQKEY_KEYRING detail
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-27 09:36:23 +01:00
Michael Kerrisk 5e0d5def6c request_key.2: Improve description of default keyring when dest_keyring is zero
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-27 09:36:23 +01:00
Michael Kerrisk 6dfb4dda6e request_key.2: Minor wording fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-27 09:36:23 +01:00
Eugene Syromyatnikov 2bcf858070 request_key.2: Add information regarding default keyring
Notes from Eugene:

Based on linux v4.9-rc6 (9c763584):

 * security/keys/keyctl.c, SYSCALL_DEFINE4(request_key, ...), line 158:
  * Assume that call is performed with with destringid == 0:
  * We skip check on line 196, so dest_ref remains NULL
  * On line 213, request_key_and_link is called with key_ref_to_ptr(dest_ref)
   * key_ref_to_ptr() itself just zeroes lower bit which is used for
     indication that key reference in the possession of the current
     context.
 * security/keys/request_key.c, request_key_and_link, line 508:
  * On line 543, we try to search process keyrings for the key (we
    fill ctx at hte beginning of the function and then pass it to
    search_process_keyrings)
  * If key is found (key_ref is not erroneous), we convert key_ref to
    ptr on line 546 and skip the following block on line 547 since
    dest_keyring is 0.
  * If key is not found and error is not EAGAIN, then
    construct_key_and_link is called on line 566 with dest_keyring ==
    NULL.
 * security/keys/request_key.c, construct_key_and_link, line 430:
  * On line 450, construct_get_dest_keyring is called with dest_keyring
    == NULL.
 * security/keys/request_key.c, construct_get_dest_keyring, line 253:
  * The argument here (which is pointer to pointer to struct key) is
    named _dest_keyring, but on line 257 it is dereferenced to local
    variable dest_keyring (so it stores NULL now).
  * We re going to the "else" branch (starting from line 266) of check
    on line 262
  * Now we are switching against cred->jit_keyring with the behavour
    described in the patch.
 * git grep jit_keyring security/keys reveals that it is assigned inside
   keyctl_set_reqkey_keyring, security/keys/keyctl.c, line 1257.
 * keyctl_set_reqkey_keyring is called from SYSCALL_DEFINE5(keyctl,
   ...), when option passed to keyctl is KEYCTL_SET_REQKEY_KEYRING (line
   1652).
 * Default value for jit_keyring is sort of difficult to find out, since
   it is inherited, but overall it is explicitly set to
   KEY_REQKEY_DEFL_THREAD_KEYRING or copied from zeroed-out structures
   (so it is equal to KEY_REQKEY_DEFL_DEFAULT) which leads to the same
   behaviour in case the process has not been upcalled by request_key
   construction.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-27 09:36:23 +01:00
Michael Kerrisk 1d452eeca3 add_key.2: Various fixes after review by David Howells
Reported-by: David Howells <dhowells@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-27 09:36:22 +01:00
Michael Kerrisk eebdcb80a8 add_key.2: Reorder list of key tpes (pace keyrings first)
Reported-by: David Howells <dhowells@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-27 09:36:22 +01:00
Michael Kerrisk f5e0c167f4 add_key.2: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-27 09:36:22 +01:00
Eugene Syromyatnikov 87c6aeea76 keyctl.2: tfix 2016-12-27 09:36:22 +01:00
Michael Kerrisk 0b617a3a9c request_key.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-27 09:36:22 +01:00
Michael Kerrisk 24fcf1d3e7 request_key.2: Tweaks to Eugene Syromyatnikov's patches
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-27 09:36:22 +01:00
Eugene Syromyatnikov b58584686b request_key.2: VERSIONS: Note kernel version that added key instantiation on request
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-27 09:36:22 +01:00
Eugene Syromyatnikov f70b502db6 request_key.2: Document some additional errors
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-27 09:36:22 +01:00
Eugene Syromyatnikov 9b0ac3ef53 request_key.2: wfix 2016-12-27 09:36:22 +01:00
Eugene Syromyatnikov 1bf661a0d8 request_key.2: tfix 2016-12-27 09:36:21 +01:00
Michael Kerrisk b67331f9b3 add_key.2: ERRORS: Note key types and descriptions that are reserved
Some key type names and keyring description names are
reserved to the implementation.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-27 09:36:21 +01:00
Michael Kerrisk 924ebcde51 add_key.2: Tweaks to Eugene Syromyatnikov's patches
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-27 09:36:21 +01:00
Eugene Syromyatnikov 62975dc234 add_key.2: Add information regarding EPERM 2016-12-27 09:36:21 +01:00
Eugene Syromyatnikov c99809b93e add_key.2: Add information regarding EFAULT 2016-12-27 09:36:21 +01:00
Eugene Syromyatnikov 94dd02f476 add_key.2: Change wording regarding storing of big_key payload 2016-12-27 09:36:21 +01:00
Eugene Syromyatnikov 89bcd51753 add_key.2: Wording change regarding the reasons of call failure 2016-12-27 09:36:21 +01:00
Michael Kerrisk 1f39876b88 request_key.2: Minor tweaks
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-27 09:36:21 +01:00
Michael Kerrisk 4051799cd8 request_key.2: Remove errExit() from example program
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-27 09:36:21 +01:00
Michael Kerrisk 6052344b05 add_key.2: Remove errExit() from example program
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-27 09:36:21 +01:00
Michael Kerrisk d38d705386 add_key.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-27 09:36:21 +01:00
Michael Kerrisk 6e810113f1 keyctl.2: Clarify permission rules for KEYCTL_SETPERM
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-27 09:36:21 +01:00
Michael Kerrisk 0bbcf59de2 request_key.2: Refer to keyctl(2) for another demo of the example program
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-27 09:36:20 +01:00
Michael Kerrisk 388adc3c19 request_key.2: Give the example program a name
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-27 09:36:20 +01:00
Michael Kerrisk cbf1ad35a2 keyctl.2: Add an example program
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-27 09:36:20 +01:00
Michael Kerrisk 472f8204e5 keyctl.2: srcfix: FIXME
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-27 09:36:20 +01:00
Michael Kerrisk a76439c9d0 keyctl.2: Minor tweaks
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-27 09:36:20 +01:00