]> git.ipfire.org Git - thirdparty/man-pages.git/log
thirdparty/man-pages.git
7 years agold.so.8: LD_BIND_NOT has effect only for function symbols
Michael Kerrisk [Sun, 15 Jan 2017 20:32:14 +0000 (09:32 +1300)] 
ld.so.8: LD_BIND_NOT has effect only for function symbols

As far as I can tell from testing and a short read of the glibc
source code, LD_BIND_NOT has an effect only for function symbols.
This is consistent also with the Solaris documentation, which
says:

    When the runtime linker performs a function relocation, it
    rewrites data associated with the functions .plt so that any
    subsequent calls will go directly to the function. The
    environment variable LD_BIND_NOT can be set to any value to
    prevent this data update. By using this variable together
    with the debugging request for detailed bindings, you can
    get a complete runtime account of all function binding.

Test case:

$ cat prog.c

int
main(int argc, char *argv[])
{
    for (;;) {
sleep(1);
optind = 0;
    }

    exit(EXIT_SUCCESS);
}
$ cc prog.c

And then in the run below, in each loop, we see repeated resolutions
only for the function symbol, sleep() (and not for optind).

$ LD_BIND_NOT=1 LD_DEBUG=symbols,bindings ./a.out
...
     30481: transferring control: ./t
     30481:
     30481: symbol=sleep;  lookup in file=./t [0]
     30481: symbol=sleep;  lookup in file=/lib64/libc.so.6 [0]
     30481: binding file ./t [0] to /lib64/libc.so.6 [0]: normal symbol `sleep' [GLIBC_2.2.5]
     30481: symbol=sleep;  lookup in file=./t [0]
     30481: symbol=sleep;  lookup in file=/lib64/libc.so.6 [0]
     30481: binding file ./t [0] to /lib64/libc.so.6 [0]: normal symbol `sleep' [GLIBC_2.2.5]
     30481: symbol=sleep;  lookup in file=./t [0]
     30481: symbol=sleep;  lookup in file=/lib64/libc.so.6 [0]
     30481: binding file ./t [0] to /lib64/libc.so.6 [0]: normal symbol `sleep' [GLIBC_2.2.5]
     30481: symbol=sleep;  lookup in file=./t [0]
     30481: symbol=sleep;  lookup in file=/lib64/libc.so.6 [0]
     30481: binding file ./t [0] to /lib64/libc.so.6 [0]: normal symbol `sleep' [GLIBC_2.2.5]
     30481: symbol=sleep;  lookup in file=./t [0]
     30481: symbol=sleep;  lookup in file=/lib64/libc.so.6 [0]
     30481: binding file ./t [0] to /lib64/libc.so.6 [0]: normal symbol `sleep' [GLIBC_2.2.5]
     30481: symbol=sleep;  lookup in file=./t [0]
     30481: symbol=sleep;  lookup in file=/lib64/libc.so.6 [0]
     30481: binding file ./t [0] to /lib64/libc.so.6 [0]: normal symbol `sleep' [GLIBC_2.2.5]

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agoresolv.conf.5: The 'inet6' option is deprecated since glibc 2.25
Michael Kerrisk [Fri, 13 Jan 2017 18:57:51 +0000 (07:57 +1300)] 
resolv.conf.5: The 'inet6' option is deprecated since glibc 2.25

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agoresolver.3: RES_USE_INET6 is deprecated since glibc 2.25
Michael Kerrisk [Fri, 13 Jan 2017 18:57:34 +0000 (07:57 +1300)] 
resolver.3: RES_USE_INET6 is deprecated since glibc 2.25

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agoresolver.3: Note that RES_BLAST was unimplemented and is now deprecated
Michael Kerrisk [Fri, 13 Jan 2017 18:32:14 +0000 (07:32 +1300)] 
resolver.3: Note that RES_BLAST was unimplemented and is now deprecated

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agoresolver.3: RES_AAONLY, RES_PRIMARY, RES_NOCHECKNAME, RES_KEEPTSIG are deprecated
Michael Kerrisk [Fri, 13 Jan 2017 18:23:23 +0000 (07:23 +1300)] 
resolver.3: RES_AAONLY, RES_PRIMARY, RES_NOCHECKNAME, RES_KEEPTSIG are deprecated

These options were never implemented; since glibc 2.25, they
are deprecated.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agoresolv.conf.5: ip6-bytestring was removed in glibc 2.25
Michael Kerrisk [Fri, 13 Jan 2017 18:02:29 +0000 (07:02 +1300)] 
resolv.conf.5: ip6-bytestring was removed in glibc 2.25

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agoresolver.3: RES_USEBSTRING was removed in glibc 2.25
Michael Kerrisk [Fri, 13 Jan 2017 18:01:00 +0000 (07:01 +1300)] 
resolver.3: RES_USEBSTRING was removed in glibc 2.25

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agoresolver.3, resolv.conf.5: Note that RES_USEBSTRING defaults to off
Michael Kerrisk [Fri, 13 Jan 2017 17:55:33 +0000 (06:55 +1300)] 
resolver.3, resolv.conf.5: Note that RES_USEBSTRING defaults to off

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agoresolv.conf.5: tfix
Michael Kerrisk [Fri, 13 Jan 2017 17:50:16 +0000 (06:50 +1300)] 
resolv.conf.5: tfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agoresolv.conf.5: The ipc-dotint and no-ip6-dotint options were removed in glibc 2.25
Michael Kerrisk [Fri, 13 Jan 2017 17:35:16 +0000 (06:35 +1300)] 
resolv.conf.5: The ipc-dotint and no-ip6-dotint options were removed in glibc 2.25

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agoresolv.conf.5: ffix
Michael Kerrisk [Fri, 13 Jan 2017 17:32:45 +0000 (06:32 +1300)] 
resolv.conf.5: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agoresolver.3: The RES_NOIP6DOTINT is removed in glibc 2.25
Michael Kerrisk [Fri, 13 Jan 2017 17:27:27 +0000 (06:27 +1300)] 
resolver.3: The RES_NOIP6DOTINT is removed in glibc 2.25

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agogetrlimit.2: wfix
Michael Kerrisk [Mon, 9 Jan 2017 02:52:09 +0000 (15:52 +1300)] 
getrlimit.2: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agogetrlimit.2: tfix
Michael Kerrisk [Mon, 9 Jan 2017 02:48:18 +0000 (15:48 +1300)] 
getrlimit.2: tfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agopid_namespaces.7, user_namespaces.7: Adjust references to namespaces(7) to ioctl_ns(2)
Michael Kerrisk [Sun, 8 Jan 2017 18:24:49 +0000 (07:24 +1300)] 
pid_namespaces.7, user_namespaces.7: Adjust references to namespaces(7) to ioctl_ns(2)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agoioctl.2: SEE ALSO: add ioctl_ns(2)
Michael Kerrisk [Sun, 8 Jan 2017 18:23:15 +0000 (07:23 +1300)] 
ioctl.2: SEE ALSO: add ioctl_ns(2)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agonamespaces.7: Remove content split out into ioctl_ns(2)
Michael Kerrisk [Sun, 8 Jan 2017 18:22:28 +0000 (07:22 +1300)] 
namespaces.7: Remove content split out into ioctl_ns(2)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agoioctl_ns.2: New page created by splitting ioctl(2) operations out of namespaces(7)
Michael Kerrisk [Sun, 8 Jan 2017 18:21:48 +0000 (07:21 +1300)] 
ioctl_ns.2: New page created by splitting ioctl(2) operations out of namespaces(7)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agoremap_file_pages.2: remap_file_pages() has been replaced by a slower in-kernel emulation
Michael Kerrisk [Thu, 5 Jan 2017 20:48:33 +0000 (09:48 +1300)] 
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>
7 years agoioctl_fideduperange.2: ffix
Jakub Wilk [Thu, 5 Jan 2017 12:47:47 +0000 (13:47 +0100)] 
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>
7 years agogetmntent.3: Prefer '\\' as the escape to get a backslash
Michael Kerrisk [Thu, 5 Jan 2017 04:17:41 +0000 (17:17 +1300)] 
getmntent.3: Prefer '\\' as the escape to get a backslash

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

Reported-by: Anders Thulin <anders@thulin.name>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agofopen.3: Change argument name: 'path' to 'pathname'
Michael Kerrisk [Thu, 5 Jan 2017 02:49:40 +0000 (15:49 +1300)] 
fopen.3: Change argument name: 'path' to 'pathname'

For consistency with open(2).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agofopen.3: Describe freopen() behavior for NULL pathname argument
Michael Kerrisk [Thu, 5 Jan 2017 02:45:01 +0000 (15:45 +1300)] 
fopen.3: Describe freopen() behavior for NULL pathname argument

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

Reported-by: Helmut Eller <eller.helmut@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agofopen.3: Note the open(2) flags that correspond to the 'mode' argument
Michael Kerrisk [Thu, 5 Jan 2017 02:33:13 +0000 (15:33 +1300)] 
fopen.3: Note the open(2) flags that correspond to the 'mode' argument

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agofopen.3: Add subsection headings for each function
Michael Kerrisk [Thu, 5 Jan 2017 02:25:12 +0000 (15:25 +1300)] 
fopen.3: Add subsection headings for each function

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agofopen.3: wfix
Michael Kerrisk [Thu, 5 Jan 2017 02:24:31 +0000 (15:24 +1300)] 
fopen.3: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agounix.7: tfix
Jakub Wilk [Tue, 3 Jan 2017 23:36:57 +0000 (00:36 +0100)] 
unix.7: tfix

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agomdoc.7: tfix
Jakub Wilk [Tue, 3 Jan 2017 23:36:56 +0000 (00:36 +0100)] 
mdoc.7: tfix

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agokeyrings.7: tfix
Jakub Wilk [Tue, 3 Jan 2017 23:36:55 +0000 (00:36 +0100)] 
keyrings.7: tfix

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agoaio_suspend.3: tfix
Jakub Wilk [Tue, 3 Jan 2017 23:36:54 +0000 (00:36 +0100)] 
aio_suspend.3: tfix

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agorequest_key.2: tfix
Jakub Wilk [Tue, 3 Jan 2017 23:36:53 +0000 (00:36 +0100)] 
request_key.2: tfix

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agokeyctl.2: tfix
Jakub Wilk [Tue, 3 Jan 2017 23:36:52 +0000 (00:36 +0100)] 
keyctl.2: tfix

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agogetrlimit.2: tfix
Jakub Wilk [Tue, 3 Jan 2017 23:36:51 +0000 (00:36 +0100)] 
getrlimit.2: tfix

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agoChanges.old: tfix
Jakub Wilk [Tue, 3 Jan 2017 23:36:50 +0000 (00:36 +0100)] 
Changes.old: tfix

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agosignal.7: SIGXFSZ: add reference to setrlimit(2)
Michael Kerrisk [Mon, 2 Jan 2017 19:02:35 +0000 (20:02 +0100)] 
signal.7: SIGXFSZ: add reference to setrlimit(2)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agosignal.7: SIGXCPU: add reference to setrlimit(2)
Michael Kerrisk [Mon, 2 Jan 2017 19:02:01 +0000 (20:02 +0100)] 
signal.7: SIGXCPU: add reference to setrlimit(2)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agosignal.7: SIGSYS: add reference to seccomp(2)
Michael Kerrisk [Mon, 2 Jan 2017 19:01:14 +0000 (20:01 +0100)] 
signal.7: SIGSYS: add reference to seccomp(2)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agosignal.7: SIGPIPE: add reference to pipe(7)
Michael Kerrisk [Mon, 2 Jan 2017 18:58:41 +0000 (19:58 +0100)] 
signal.7: SIGPIPE: add reference to pipe(7)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agosignal.7: Add a name for SIGEMT
Michael Kerrisk [Mon, 2 Jan 2017 18:56:14 +0000 (19:56 +0100)] 
signal.7: Add a name for SIGEMT

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agopkeys.7, signal.7: tfix
Michael Kerrisk [Mon, 2 Jan 2017 18:41:49 +0000 (19:41 +0100)] 
pkeys.7, signal.7: tfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agosignal.7: Change description of SIGSYS to "Bad system call"
Michael Kerrisk [Mon, 2 Jan 2017 18:36:17 +0000 (19:36 +0100)] 
signal.7: Change description of SIGSYS to "Bad system call"

This is the more typical definition.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agoinotify_add_watch.2: Note "inode" as a synonym for "filesystem object"
Michael Kerrisk [Mon, 2 Jan 2017 19:07:17 +0000 (20:07 +0100)] 
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>
7 years agoinotify.7: Point out that inotify monitoring is inode based
Michael Kerrisk [Sun, 1 Jan 2017 22:18:51 +0000 (23:18 +0100)] 
inotify.7: Point out that inotify monitoring is inode based

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agorecv.2: wfix
Michael Kerrisk [Sat, 31 Dec 2016 20:24:12 +0000 (21:24 +0100)] 
recv.2: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agoptrace.2: clarify PTRACE_O_EXITKILL
Omar Sandoval [Fri, 30 Dec 2016 18:26:54 +0000 (10:26 -0800)] 
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>
7 years agocgroups.7: tfix
Omar Sandoval [Fri, 30 Dec 2016 18:26:53 +0000 (10:26 -0800)] 
cgroups.7: tfix

Signed-off-by: Omar Sandoval <osandov@osandov.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agorecv.2: Remove duplicate paragraph
Michael Kerrisk [Sat, 31 Dec 2016 19:32:31 +0000 (20:32 +0100)] 
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>
7 years agoioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, perfmonctl.2, sched_rr_get_...
Michael Kerrisk [Fri, 30 Dec 2016 12:41:37 +0000 (13:41 +0100)] 
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>
7 years agopid_namespaces.7: Minor fixes to Keno Fischer's patch
Michael Kerrisk [Wed, 28 Dec 2016 14:56:05 +0000 (15:56 +0100)] 
pid_namespaces.7: Minor fixes to Keno Fischer's patch

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agopid_namespaces.7: CLONE_SIGHAND|CLONE_VM|CLONE_NEWPID is no longer disallowed
Keno Fischer [Tue, 27 Dec 2016 19:34:08 +0000 (14:34 -0500)] 
pid_namespaces.7: CLONE_SIGHAND|CLONE_VM|CLONE_NEWPID is no longer disallowed

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years ago__ppc_set_ppr_med.3: wfix
Michael Kerrisk [Wed, 28 Dec 2016 10:44:41 +0000 (11:44 +0100)] 
__ppc_set_ppr_med.3: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years ago__ppc_set_ppr_med.3: Note need for _ARCH_PWR8 macro
Wainer dos Santos Moschetta [Tue, 27 Dec 2016 20:06:53 +0000 (18:06 -0200)] 
__ppc_set_ppr_med.3: Note need for _ARCH_PWR8 macro

The _ARCH_PWR8 macro must be defined to get the
 __ppc_set_ppr_very_low() and __ppc_set_ppr_med_high()
definitions.

Signed-off-by: Wainer dos Santos Moschetta <wainersm@linux.vnet.ibm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agoprctl.2: Minor fixes to Keno's patch
Michael Kerrisk [Wed, 28 Dec 2016 10:13:38 +0000 (11:13 +0100)] 
prctl.2: Minor fixes to Keno's patch

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agoprctl.2: Be more precise in what causes dumpable to reset
Keno Fischer [Tue, 27 Dec 2016 21:52:16 +0000 (16:52 -0500)] 
prctl.2: Be more precise in what causes dumpable to reset

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agopoll.2i, select.2: ffix + srcfix
Michael Kerrisk [Tue, 27 Dec 2016 20:07:49 +0000 (21:07 +0100)] 
poll.2i, select.2: ffix + srcfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agopoll.2, select.2: Add a reference to the sigset discussion in sigprocmask(2)
Nicolas B [Tue, 27 Dec 2016 19:32:29 +0000 (14:32 -0500)] 
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>
7 years agocgroups.7: ffix
Keno Fischer [Tue, 27 Dec 2016 19:30:50 +0000 (14:30 -0500)] 
cgroups.7: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agosched.7: wfix
Nicolas B [Tue, 27 Dec 2016 16:42:13 +0000 (17:42 +0100)] 
sched.7: wfix

Reported-by: Nicolas Biscos <nicolas.biscos+man7@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agogetline.3: Document ENOMEM error case
Jann Horn [Tue, 27 Dec 2016 15:01:36 +0000 (16:01 +0100)] 
getline.3: Document ENOMEM error case

see the error handling in libio/iogetdelim.c

Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agoman_show_fixme.sh: Fix rendering issue
Michael Kerrisk [Mon, 19 Dec 2016 14:48:25 +0000 (15:48 +0100)] 
man_show_fixme.sh: Fix rendering issue

If a single quote falls at the start of a line, then the rest of
the line is treated as a comment. Therefore, escape single quotes.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agokeyctl.2: srcfix: update FIXME
Michael Kerrisk [Sat, 17 Dec 2016 13:32:08 +0000 (14:32 +0100)] 
keyctl.2: srcfix: update FIXME

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agokeyctl.2: KEYCTL_SET_REQKEY_KEYRING also has an effect for request_key(2)
Michael Kerrisk [Sat, 17 Dec 2016 13:31:06 +0000 (14:31 +0100)] 
keyctl.2: KEYCTL_SET_REQKEY_KEYRING also has an effect for request_key(2)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agoadd_key.2: srcfix: Update FIXMEs
Michael Kerrisk [Sat, 17 Dec 2016 13:26:53 +0000 (14:26 +0100)] 
add_key.2: srcfix: Update FIXMEs

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agorequest_key.2: srcfix: FIXME
Michael Kerrisk [Sat, 17 Dec 2016 11:56:04 +0000 (12:56 +0100)] 
request_key.2: srcfix: FIXME

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agokeyctl.2: Improve a KEYCTL_SET_REQKEY_KEYRING detail
Michael Kerrisk [Sat, 17 Dec 2016 11:54:09 +0000 (12:54 +0100)] 
keyctl.2: Improve a KEYCTL_SET_REQKEY_KEYRING detail

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agorequest_key.2: Improve description of default keyring when dest_keyring is zero
Michael Kerrisk [Sat, 17 Dec 2016 10:30:05 +0000 (11:30 +0100)] 
request_key.2: Improve description of default keyring when dest_keyring is zero

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agorequest_key.2: Minor wording fixes
Michael Kerrisk [Sat, 17 Dec 2016 10:01:40 +0000 (11:01 +0100)] 
request_key.2: Minor wording fixes

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agorequest_key.2: Add information regarding default keyring
Eugene Syromyatnikov [Mon, 21 Nov 2016 20:59:40 +0000 (23:59 +0300)] 
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>
7 years agokeyrings.7: Number the fields in /proc/keys for easy reference in discussion
Michael Kerrisk [Fri, 16 Dec 2016 15:35:10 +0000 (16:35 +0100)] 
keyrings.7: Number the fields in /proc/keys for easy reference in discussion

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agokeyrings.7: srcfix
Michael Kerrisk [Thu, 15 Dec 2016 07:28:36 +0000 (08:28 +0100)] 
keyrings.7: srcfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agokeyrings.7: wfix
Michael Kerrisk [Wed, 14 Dec 2016 07:26:52 +0000 (08:26 +0100)] 
keyrings.7: wfix

Reported-by: David Howells <dhowells@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agokeyrings.7: Fixes after feedback from David Howells
Michael Kerrisk [Tue, 13 Dec 2016 13:51:10 +0000 (14:51 +0100)] 
keyrings.7: Fixes after feedback from David Howells

Reported-by: David Howells <dhowells@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agokeyrings.7: wfix
Michael Kerrisk [Tue, 13 Dec 2016 13:36:09 +0000 (14:36 +0100)] 
keyrings.7: wfix

Reported-by: David Howells <dhowells@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agokeyrings.7: Add a little more detail on the encryption of the big_key payload
Michael Kerrisk [Tue, 13 Dec 2016 12:56:29 +0000 (13:56 +0100)] 
keyrings.7: Add a little more detail on the encryption of the big_key payload

Reported-by: Eugene Syromyatnikov <evgsyr@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agokeyrings.7: ff
Michael Kerrisk [Tue, 13 Dec 2016 12:51:21 +0000 (13:51 +0100)] 
keyrings.7: ff

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agokeyrings.7: Rework 'big_key' text a little
Michael Kerrisk [Tue, 13 Dec 2016 12:48:37 +0000 (13:48 +0100)] 
keyrings.7: Rework 'big_key' text a little

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agokeyrings.7: Fixes after review by David Howells
Michael Kerrisk [Tue, 13 Dec 2016 11:42:05 +0000 (12:42 +0100)] 
keyrings.7: Fixes after review by David Howells

Reported-by: David Howells <dhowells@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agokeyrings.7: Reorder list of key types
Michael Kerrisk [Tue, 13 Dec 2016 11:42:55 +0000 (12:42 +0100)] 
keyrings.7: Reorder list of key types

Place "keyring" first.

Reported-by: David Howells <dhowells@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agoadd_key.2: Various fixes after review by David Howells
Michael Kerrisk [Tue, 13 Dec 2016 11:22:20 +0000 (12:22 +0100)] 
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>
7 years agoadd_key.2: Reorder list of key tpes (pace keyrings first)
Michael Kerrisk [Tue, 13 Dec 2016 11:14:11 +0000 (12:14 +0100)] 
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>
7 years agokeyrings.7: Add a note on the unimplemented group keyring
Michael Kerrisk [Fri, 25 Nov 2016 09:57:26 +0000 (10:57 +0100)] 
keyrings.7: Add a note on the unimplemented group keyring

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agokeyrings.7: Note the special keyring IDs used in add_key()/request_key()/keyctl()
Michael Kerrisk [Fri, 25 Nov 2016 09:44:27 +0000 (10:44 +0100)] 
keyrings.7: Note the special keyring IDs used in add_key()/request_key()/keyctl()

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agokeyrings.7: ffix
Michael Kerrisk [Fri, 25 Nov 2016 09:35:52 +0000 (10:35 +0100)] 
keyrings.7: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agokeyrings.7: Extend SEE ALSO list
Michael Kerrisk [Fri, 25 Nov 2016 09:07:12 +0000 (10:07 +0100)] 
keyrings.7: Extend SEE ALSO list

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agoadd_key.2: srcfix
Michael Kerrisk [Fri, 25 Nov 2016 09:02:36 +0000 (10:02 +0100)] 
add_key.2: srcfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agokeyrings.7: Minor tweaks
Michael Kerrisk [Fri, 25 Nov 2016 08:53:36 +0000 (09:53 +0100)] 
keyrings.7: Minor tweaks

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agokeyrings.7: Add info regarding pre-3.17 defaults in root_maxbytes/root_maxkeys
Eugene Syromyatnikov [Fri, 25 Nov 2016 01:01:33 +0000 (04:01 +0300)] 
keyrings.7: Add info regarding pre-3.17 defaults in root_maxbytes/root_maxkeys

7 years agokeyrings.7: tfix
Eugene Syromyatnikov [Fri, 25 Nov 2016 01:01:25 +0000 (04:01 +0300)] 
keyrings.7: tfix

7 years agokeyrings.7: Minor clarification on where big_key payload is stored
Eugene Syromyatnikov [Fri, 25 Nov 2016 01:01:11 +0000 (04:01 +0300)] 
keyrings.7: Minor clarification on where big_key payload is stored

7 years agokeyrings.7: tfix
Eugene Syromyatnikov [Fri, 25 Nov 2016 01:01:04 +0000 (04:01 +0300)] 
keyrings.7: tfix

7 years agokeyrings.7: Minor clarification regarding storage method used in keyrings
Eugene Syromyatnikov [Fri, 25 Nov 2016 01:00:57 +0000 (04:00 +0300)] 
keyrings.7: Minor clarification regarding storage method used in keyrings

7 years agokeyctl.2: tfix
Eugene Syromyatnikov [Fri, 25 Nov 2016 01:00:50 +0000 (04:00 +0300)] 
keyctl.2: tfix

7 years agorequest_key.2: wfix
Michael Kerrisk [Mon, 21 Nov 2016 22:15:37 +0000 (23:15 +0100)] 
request_key.2: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agorequest_key.2: Tweaks to Eugene Syromyatnikov's patches
Michael Kerrisk [Mon, 21 Nov 2016 22:06:21 +0000 (23:06 +0100)] 
request_key.2: Tweaks to Eugene Syromyatnikov's patches

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agorequest_key.2: VERSIONS: Note kernel version that added key instantiation on request
Eugene Syromyatnikov [Mon, 21 Nov 2016 21:58:21 +0000 (22:58 +0100)] 
request_key.2: VERSIONS: Note kernel version that added key instantiation on request

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agorequest_key.2: Document some additional errors
Eugene Syromyatnikov [Mon, 21 Nov 2016 21:52:30 +0000 (22:52 +0100)] 
request_key.2: Document some additional errors

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agorequest_key.2: wfix
Eugene Syromyatnikov [Mon, 21 Nov 2016 21:00:01 +0000 (00:00 +0300)] 
request_key.2: wfix

7 years agorequest_key.2: tfix
Eugene Syromyatnikov [Mon, 21 Nov 2016 20:59:54 +0000 (23:59 +0300)] 
request_key.2: tfix

7 years agokeyrings.7: Note key types and descriptions that are reserved to the implementation
Michael Kerrisk [Wed, 16 Nov 2016 10:20:03 +0000 (11:20 +0100)] 
keyrings.7: Note key types and descriptions that are reserved to the implementation

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 years agoadd_key.2: ERRORS: Note key types and descriptions that are reserved
Michael Kerrisk [Wed, 16 Nov 2016 10:17:05 +0000 (11:17 +0100)] 
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>