Commit Graph

13501 Commits

Author SHA1 Message Date
Jann Horn a2ac97c78b getcwd.3: Note behavior for unreachable current working directory
For the code that does this, see fs/dcache.c, search for
"prepend_unreachable".

Test case to demonstrate:

$ cat getcwd.c

int main(void) {
  unshare(CLONE_NEWUSER | CLONE_NEWNS);
  chdir("/usr");
  chroot("bin");

  printf("current directory: \"%s\"\n", get_current_dir_name());

  char *real = realpath(".", NULL);
  printf("realpath of .: \"%s\"\n", real ? real : "{none}");
  real = realpath("../home/jann/.ssh", NULL);
  printf("realpath of path: \"%s\"\n", real ? real : "{none}");

  return 0;
}
$ cat getcwd_test.c

int main(void) {
  unshare(CLONE_NEWUSER | CLONE_NEWNS);
  chdir("/usr");
  chroot("bin");
  printf("current directory: \"%s\"\n", get_current_dir_name());
  return 0;
}
$ gcc -o getcwd_test getcwd_test.c -Wall
$ ./getcwd_test
current directory: "(unreachable)/usr"

realpath.3 doesn't currently seem to handle this
case in a sane way, so I'm not going to document
its behavior yet. I'll report that as a bug instead.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-06 16:13:55 +02:00
Michael Kerrisk a405066e3d proc.5: Update description /proc/sys/unix 'Type' field
The existing text was very crufty. UNIX domain sockets
support more than SOCK_STREAM for a _very_ long time now.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-06 16:13:54 +02:00
Michael Kerrisk 8f8a46fbcb proc.5: Note that abstract sockets are included in /proc/net/unix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-06 16:13:54 +02:00
Michael Kerrisk 756f55f601 proc.5: Reformat /proc/net/unix information as a list
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-06 16:13:54 +02:00
Michael Kerrisk dbe6f88bf8 proc.5: Add some detail to /proc/PID/timers
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-06 16:13:54 +02:00
Michael Kerrisk c5aee02706 mq_notify.3: Add "C library/kernel ABI differences" subsection
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-06 16:13:54 +02:00
Michael Kerrisk 4c33c15ad3 timer_create.2: Add some details to C library/kernel ABI differences
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-06 16:13:54 +02:00
Michael Kerrisk 318f2dce07 timer_create.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-06 16:13:54 +02:00
Michael Kerrisk c99652b724 nptl.7: Add reference to timer_create(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-06 16:13:54 +02:00
Michael Kerrisk 7f1ea8fbde proc.5: /proc/PID/timers fix
Minor fix to description.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-06 16:13:54 +02:00
Michael Kerrisk 93691c1ef8 proc.5: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-06 16:13:54 +02:00
Gleb Fotengauer-Malinovskiy b4bd5a5c94 umount.2: tfix
Signed-off-by: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-06 16:13:54 +02:00
Masanari Iida 9284f6e7a2 boot.7: tfix: Fix spelling typo in boot.7
Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-06 16:13:54 +02:00
David Rientjes 31ddc55d25 madvise.2: Specify MADV_REMOVE returns EINVAL for hugetlbfs
madvise(2) actually returns with error EINVAL for MADV_REMOVE
when used for hugetlb VMAs, not EOPNOTSUPP, and this has been
the case since MADV_REMOVE was introduced in commit f6b3ec238d12
("madvise(MADV_REMOVE): remove pages from tmpfs shm backing
store").

Specify the exact behavior.

Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-06 16:13:54 +02:00
Michael Kerrisk 968b403434 Changes.old: Fix to 3.82 changelog
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-06 16:13:54 +02:00
Michael Kerrisk 14cb1eefe2 raw.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-06 16:13:54 +02:00
Michael Kerrisk 5734da6d61 proc.5: Note that /proc/PID/timers requires CONFIG_CHECKPOINT_RESTORE
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-06 16:13:54 +02:00
Michael Kerrisk 5eeca37ce1 mq_open.3: NOTES: explain differences from the underlying system call
The check for the slash at the start of a pathname is done in glibc

Reported-by: Fabien Pichot <fpichot@bouledef.eu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-06 16:13:31 +02:00
Michael Kerrisk 1024e8ffb9 unshare.2: Remove mention of "System V" from discussion of CLONE_NEWIPC
These days, CLONE_NEWIPC also affects POSIX message queues.

Reported-by: Fabien Pichot <fpichot@bouledef.eu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-06 16:12:22 +02:00
Michael Kerrisk 2588906be2 Changes.old: Fix up 3.82 changelog
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-31 08:30:41 +02:00
Michael Kerrisk b4ea80b476 Start of man-pages-3.83: updating Changes and Changes.old 2015-03-29 22:33:06 +02:00
Michael Kerrisk c7461bd0ec Start of man-pages-3.83: updating .Announce and .lsm files 2015-03-29 22:33:06 +02:00
Michael Kerrisk 34b98faacf Start of man-pages-3.83: renaming .Announce and .lsm files 2015-03-29 22:33:06 +02:00
Michael Kerrisk 37c070f66e Ready for 3.82 2015-03-29 22:31:44 +02:00
Michael Kerrisk 458abbe629 Removed trailing white space at end of lines 2015-03-29 22:31:35 +02:00
Michael Kerrisk 329c1277b8 Changes: Expanded tabs 2015-03-29 22:31:35 +02:00
Michael Kerrisk 1e64c86bbf intro.1, ldd.1, clone.2, getgroups.2, getpid.2, getsockopt.2, ioctl_list.2, msgop.2, open.2, seccomp.2, setgid.2, setresuid.2, setreuid.2, setuid.2, sigaction.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, syscall.2, syscalls.2, umount.2, clock.3, dlopen.3, fmemopen.3, fpathconf.3, fputwc.3, fputws.3, fseek.3, fseeko.3, gcvt.3, getline.3, getwchar.3, hypot.3, if_nameindex.3, initgroups.3, popen.3, resolver.3, strcoll.3, strdup.3, tzset.3, ulimit.3, wcstombs.3, wctob.3, xdr.3, console_codes.4, random.4, filesystems.5, host.conf.5, hosts.5, proc.5, resolv.conf.5, securetty.5, credentials.7, feature_test_macros.7, hier.7, ipv6.7, packet.7, pthreads.7, raw.7, signal.7, tcp.7, user_namespaces.7, ld.so.8, ldconfig.8: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-29 22:30:09 +02:00
Michael Kerrisk b10a1929c3 Changes: Ready for 3.82
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-29 22:30:09 +02:00
Michael Kerrisk 661824b409 syscall.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-29 22:30:09 +02:00
Michael Kerrisk 1e941e8ce8 syscall.2: Minor edtis to Jann Horn's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-29 18:09:56 +02:00
Jann Horn 9ccd62fc42 syscall.2: Add x32 ABI
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-29 18:09:56 +02:00
Michael Kerrisk 37daa840af seccomp.2: Minor edits to Jann Horn's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-29 18:09:56 +02:00
Jann Horn b44088b44f seccomp.2: Explain blacklisting problems, expand example
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-29 17:52:09 +02:00
Michael Kerrisk 519f81c60c raw.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-29 17:16:36 +02:00
Michael Kerrisk 44d8807495 nptl.7: wfix
Reported-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-28 23:58:04 +01:00
Michael Kerrisk 3f1982b218 sigsetops.3: Note treatment of signals used internally by NPTL
The glibc sigfillset() function excludes the two real-time
signals used by NPTL.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-28 23:58:04 +01:00
Michael Kerrisk 59526510f2 pthread_sigqueue.3: Note treatment of signals used internally by NPTL
The glibc pthread_sigqueue() function gives an error on attempts
to send either of the real-time signals used by NPTL.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-28 23:58:04 +01:00
Michael Kerrisk 4ea239b05e pthread_kill.3: Note treatment of signals used internally by NPTL
The glibc pthread_kill() function gives an error on attempts
to send either of the real-time signals used by NPTL.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-28 23:58:04 +01:00
Michael Kerrisk ee053db874 sigaction.2: Note treatment of signals used internally by NPTL
The glibc wrapper gives an EINVAL error on attempts to change the
disposition of either of the two real-time signals used by NPTL.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-28 23:58:04 +01:00
Michael Kerrisk bce38798d0 pthread_sigmask.3: Note treatment of signals used internally by NPTL
The glibc implementation silently ignores attempts to block the two
real-time signals used by NPTL.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-28 23:58:04 +01:00
Michael Kerrisk 3699b15436 sigprocmask.2: Note treatment of signals used internally by NPTL
The glibc wrapper silently ignores attempts to block the two
real-time signals used by NPTL.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-28 23:58:04 +01:00
Michael Kerrisk 4ff3769fff sigwait.3: Note treatment of signals used internally by NPTL
The glibc sigwait() silently ignore attempts to wait for
signals used by NPTL.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-28 23:58:04 +01:00
Michael Kerrisk 363308860d sigwaitinfo.2: Note treatment of signals used internally by NPTL
The glibc wrappers silently ignore attempts to wait for
signals used by NPTL.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-28 23:58:04 +01:00
Michael Kerrisk 84cb494f8d setuid.2: Add discussion of NPTL credential-changing mechanism
At the kernel level, credentials (UIDs and GIDs) are a per-thread
attribute. NPTL uses a signal-based mechanism to ensure that
when one thread changes its credentials, all other threads change
credentials to the same values. By this means, the NPTL
implementation conforms to the POSIX requirement that the threads
in a process share credentials.

Reported-by: Shawn Landden <shawn@churchofgit.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-28 23:58:04 +01:00
Michael Kerrisk 38883d9578 setreuid.2: Add discussion of NPTL credential-changing mechanism
At the kernel level, credentials (UIDs and GIDs) are a per-thread
attribute. NPTL uses a signal-based mechanism to ensure that
when one thread changes its credentials, all other threads change
credentials to the same values. By this means, the NPTL
implementation conforms to the POSIX requirement that the threads
in a process share credentials.

Reported-by: Shawn Landden <shawn@churchofgit.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-28 23:58:04 +01:00
Michael Kerrisk ab09119b65 setresuid.2: Add discussion of NPTL credential-changing mechanism
At the kernel level, credentials (UIDs and GIDs) are a per-thread
attribute. NPTL uses a signal-based mechanism to ensure that
when one thread changes its credentials, all other threads change
credentials to the same values. By this means, the NPTL
implementation conforms to the POSIX requirement that the threads
in a process share credentials.

Reported-by: Shawn Landden <shawn@churchofgit.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-28 23:58:04 +01:00
Michael Kerrisk 716db1bafe setgid.2: Add discussion of NPTL credential-changing mechanism
At the kernel level, credentials (UIDs and GIDs) are a per-thread
attribute. NPTL uses a signal-based mechanism to ensure that
when one thread changes its credentials, all other threads change
credentials to the same values. By this means, the NPTL
implementation conforms to the POSIX requirement that the threads
in a process share credentials.

Reported-by: Shawn Landden <shawn@churchofgit.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-28 23:58:04 +01:00
Michael Kerrisk 405930725b getgroups.2: Add discussion of NPTL credential-changing mechanism
At the kernel level, credentials (UIDs and GIDs) are a per-thread
attribute. NPTL uses a signal-based mechanism to ensure that
when one thread changes its credentials, all other threads change
credentials to the same values. By this means, the NPTL
implementation conforms to the POSIX requirement that the threads
in a process share credentials.

Reported-by: Shawn Landden <shawn@churchofgit.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-28 23:58:04 +01:00
Michael Kerrisk cb066271c9 signal.7: SEE ALSO: add nptl(7)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-28 23:58:04 +01:00
Michael Kerrisk d378f78434 pthreads.7: Add references to nptl(7)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-28 23:58:04 +01:00