A mirror of Man pages
Go to file
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
man1 localedef.1: wfix 2016-11-11 09:41:35 +01:00
man2 request_key.2: Add information regarding default keyring 2016-12-27 09:36:23 +01:00
man3 newlocale.3: tfix 2016-12-17 10:33:55 +01:00
man4 fuse.4: wfix 2016-12-16 15:20:57 +01:00
man5 proc.5: Add entries for "keys" files that refer reader to keyrings(7) 2016-12-27 09:36:20 +01:00
man6 getent.1, _syscall.2, acct.2, adjtimex.2, bdflush.2, brk.2, cacheflush.2, getsid.2, getxattr.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, ioperm.2, ipc.2, listxattr.2, mlock.2, modify_ldt.2, mremap.2, nanosleep.2, outb.2, perf_event_open.2, ptrace.2, removexattr.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, setsid.2, setxattr.2, socketcall.2, unimplemented.2, aio_cancel.3, aio_error.3, aio_fsync.3, aio_read.3, aio_return.3, aio_suspend.3, aio_write.3, cfree.3, crypt.3, dlopen.3, encrypt.3, errno.3, fenv.3, ftime.3, ftw.3, getgrent_r.3, getpass.3, getpwent_r.3, getutent.3, hsearch.3, lio_listio.3, lockf.3, login.3, longjmp.3, perror.3, printf.3, scandirat.3, setjmp.3, strfmon.3, strtoimax.3, termios.3, ttyname.3, ualarm.3, updwtmp.3, wcstoimax.3, wordexp.3, console_ioctl.4, dsp56k.4, fd.4, hd.4, intro.4, lp.4, mem.4, null.4, ram.4, rtc.4, sk98lin.4, tty.4, ttyS.4, vcs.4, filesystems.5, group.5, host.conf.5, hosts.5, intro.5, issue.5, motd.5, networks.5, nologin.5, nsswitch.conf.5, passwd.5, proc.5, protocols.5, securetty.5, shells.5, termcap.5, ttytype.5, utmp.5, intro.6, armscii-8.7, ascii.7, bootparam.7, cp1251.7, environ.7, glob.7, intro.7, iso_8859-1.7, iso_8859-10.7, iso_8859-11.7, iso_8859-13.7, iso_8859-14.7, iso_8859-15.7, iso_8859-16.7, iso_8859-2.7, iso_8859-3.7, iso_8859-4.7, iso_8859-5.7, iso_8859-6.7, iso_8859-7.7, iso_8859-8.7, iso_8859-9.7, koi8-r.7, koi8-u.7, posixoptions.7, standards.7, unicode.7, utf-8.7, intro.8: s/GPLv2+_doc_full/GPLv2+_DOC_FULL/ 2013-03-10 10:57:11 +01:00
man7 keyrings.7: Number the fields in /proc/keys for easy reference in discussion 2016-12-27 09:36:23 +01:00
man8 ldconfig.8: wfix 2016-11-11 09:36:15 +01:00
scripts man_show_fixme.sh: strip extraneous blank line at start of rendered FIXME output 2016-10-31 16:44:57 +01:00
Changes Start of man-pages-4.10: updating Changes and Changes.old 2016-12-12 11:50:11 +01:00
Changes.old Changes.old: tfix in 4.09 changes 2016-12-12 12:26:05 +01:00
Makefile Makefile: Drop compression support and 'screen' target 2016-04-20 14:06:00 +02:00
README README: Explain usage of prefix when installing 2014-05-26 10:16:11 +02:00
man-pages-4.10.Announce Start of man-pages-4.10: updating .Announce and .lsm files 2016-12-12 11:50:11 +01:00
man-pages-4.10.lsm Start of man-pages-4.10: updating .Announce and .lsm files 2016-12-12 11:50:11 +01:00

README

This package contains Linux man pages for sections
2, 3, 4, 5, and 7. Some more information is given in the
`Announce' file.

Install by copying to your favourite location.
"make install" will just copy them to /usr/share/man/man[1-8].
To install to a path different from /usr use
"make install prefix=/install/path".
"make" will move the pages from this package that are older than
the already installed ones to a subdirectory `not_installed',
then remove old versions (compressed or not),
compress the pages, and copy them to /usr/share/man/man[1-8].


Note that you may have to remove preformatted pages.

Note that sometimes these pages are duplicates of pages
also distributed in other packages. This has been reported
about dlclose.3, dlerror.3, dlopen.3, dlsym.3 (found in ld.so),
about resolver.3, resolv.conf.5 (found in bind-utils),
and about passwd.5, and mailaddr.7. Be careful not to
overwrite more up-to-date versions.
Reports on further duplicates are welcome.
Formerly present and now removed duplicates:
 exports.5 (found in nfs-server-2.2*),
 fstab.5, nfs.5 (found in util-linux-2.12*),
 lilo.8, lilo.conf.5 (found in lilo-21.6*).

Copyrights: These man pages come under various copyrights.
All pages are freely distributable when the nroff source is included.

If you have corrections and additions to suggest, see
http://www.kernel.org/doc/man-pages/contributing.html