Commit Graph

7812 Commits

Author SHA1 Message Date
Michael Kerrisk d293c1b8fd Ready for 3.40 2012-04-27 10:58:31 +12:00
Michael Kerrisk 3960d7a208 Removed trailing white space at end of lines 2012-04-27 10:58:21 +12:00
Michael Kerrisk af75eecea0 process_vm_writev.2: Correct target of link
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-27 10:57:58 +12:00
Michael Kerrisk 9be6751b46 Changes: Update for 3.40
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-27 10:56:42 +12:00
Michael Kerrisk 04b2e45352 process_vm_readv.2: Further improvements after Mike Frysinger's comments
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-26 09:13:00 +12:00
Michael Kerrisk 0b01869b0a process_vm_readv.2: Cleanups after comments from Mike Frysinger and Christopher Yeoh
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-26 09:13:00 +12:00
Michael Kerrisk 7985dbf3f7 process_vm_readv.2: Many additions, rewrites, and clarifications
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-26 09:13:00 +12:00
Michael Kerrisk 9762bc8a64 process_vm_readv.2: Minor tweaks to example code
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-26 09:12:59 +12:00
Michael Kerrisk 529b74009b process_vm_readv.2: Formatting fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-26 09:12:59 +12:00
Mike Frysinger 5e5ab35394 process_vm_writev.2: Link to new process_vm_readv(2) page
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-26 09:12:59 +12:00
Mike Frysinger 0b0ec7588c process_vm_readv.2: New page for process_vm_readv(2) and process_vm_writev(2)
Cowritten-by: Christopher Yeoh <cyeoh@au1.ibm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-26 09:12:59 +12:00
Michael Kerrisk 82232e78e9 gettimeofday.2, ptrace.2, sigaction.2, aio_init.3, mpool.3, scandir.3, inotify.7, netdevice.7: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-26 09:12:59 +12:00
Michael Kerrisk 3a6548ffb0 tcp.7: Amend 84b183e
A change in 2.6.28 restored the 2.2 behavior:
https://lkml.org/lkml/2009/6/30/499

Reported-by: lepton <ytht.net@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-26 09:12:59 +12:00
Michael Kerrisk 3326bd1971 scandir.3: Improve EXAMPLE source code: s/0/NULL/ in scandir() call
Reported-by: Daniel J Blueman <daniel@quora.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-26 09:12:59 +12:00
Michael Kerrisk 63f0f3d9b8 clock_getres.2: Clarify difference between CLOCK_MONOTONIC and CLOCK_MONOTONIC_RAW
Note interactions of these two clocks with discontinuous
adjustments to the system time and NTP/adjtime(2).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-26 09:12:59 +12:00
Michael Kerrisk 5f04b9486b gettimeofday.2: gettimeofday() is affected by discontinuous jumps in the system time
Advise reader to use clock_gettime(2), if they need a
monotonically increasing time source.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-26 09:12:10 +12:00
Michael Kerrisk fb6fc61227 gettimeofday.2: SEE ALSO: Add clock_gettime(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-26 09:12:06 +12:00
Michael Kerrisk bc02b3ea72 prctl.2: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-26 09:12:06 +12:00
Michael Kerrisk 06afe6739c prctl.2: Add PR_TASK_PERF_EVENTS_DISABLE and PR_TASK_PERF_EVENTS_ENABLE
Add some basic documentation of these operations, with a pointer to
tools/perf/design.txt for more information.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-26 09:12:06 +12:00
Michael Kerrisk 50fe8d5366 ptrace.2: Note SPARC deviation with respect to get/set regs
SPARC reverses the use of 'addr' and 'data' for
PTRACE_GETREGS, PTRACE_GETFPREGS, PTRACE_SETREGS,
and PTRACE_SETFPREGS.

Reported-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-26 09:11:45 +12:00
Michael Kerrisk 4ba272b3e0 inotify.7: Note buffer size that guarantees being able to read at least one event
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-24 09:35:45 +12:00
James Hunt 655684a9d9 inotify.7: Correct description of size of inotify_event structure
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-24 09:33:57 +12:00
Michael Kerrisk dc6a909bc0 strchr.3: srcfix: use . mark-up rather than \fI.\fP
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-24 09:09:26 +12:00
Michael Kerrisk 9640b1b311 memchr.3: Clarify description, omitting mention of "strings" and "characters"
The existing text slipped into talking about characters and
strings, which could mislead readers into thing that, for
example, searches for the byte '\0' are treated specially.
Therefore, rewrite in terms of "bytes" and "memory areas".

At the same time, make a few source file clean-ups.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-24 09:05:08 +12:00
James Hunt 2c4d293c33 strchr.3: Explain behavior when seraching for '\0'
The strchr(3) page does `not explain the behavior if the
character to search for is specified as a null character ('\0').
According to my copy of Harbison and Steele, since the terminator
is considered part of the string, a call such as:

  strchr("hello", '\0')

will return the address of the terminating null in the specified
string.

strchr(3) is inconsistent with index(3) which states:

    "The terminating null byte is considered to be
    a part of the strings."

Adding such a note to strchr(3) is also important since it is not
unreasonable to assume that strchr() will return NULL in this
scenario. This leads to code like the following which is
guaranteed to fail should get_a_char() return '\0':

    char string[] = "hello, world";
    int c = get_a_char();

    if (! strchr(string, c))
        fprintf(stderr, "failed to find character in string\n");

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-24 09:04:40 +12:00
Petr Baudis 6addb6a71d resolv.conf.5: Document "single-request" option
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-24 00:11:11 +12:00
Petr Baudis adc9675dac resolver.3: Note that many options are documented in resolv.conf(5)
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-24 00:09:25 +12:00
James Hunt 96da8065c2 termios.3: tfix: 'IECHO' should be 'ECHO'.
Signed-off-by: James Hunt <james.hunt@ubuntu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-23 23:40:07 +12:00
Michael Kerrisk c7c7235c38 prctl.2: Amend details of PR_SET_PDEATHSIG
The corresponding kernel change from Marchel Holtmann was

    The attached patch fixes a flaw in the "parent process
    death signal" when executing SUID binaries. An
    unprivileged user may send arbitrary signal to a child
    process even if it is running with higher privileges.

    The idea to fix this issue is to reset pdeath_signal not
    only on fork, but also on the execution of a SUID binary.

Reported-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-23 21:30:59 +12:00
lepton 84b183e9f7 tcp.7: Correct description for TCP_MAXSEG on modern kernel
In tcp.7, about TCP_MAXSEG, it reads

    If this option is set before connection establishment,
    it also changes the MSS value announced to the other
    end in the initial packet.

It is correct for kernel version 2.2, but it is not
correct for modern kernel such as 2.4 and 2.6.
On a linux box with a modern kernel, the setting for
TCP_MAXSEG won't change the MSS value announced to the
other end.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-23 21:17:09 +12:00
Michael Kerrisk 42bd5b3db0 socket.7: Correct description of SO_BROADCAST
As reported by Alexey:

socket(7) says:

SO_BROADCAST
  Set  or  get  the broadcast flag. When enabled, datagram sockets
  receive packets sent to a broadcast address and they are allowed
  to  send  packets  to  a  broadcast address.  This option has no
  effect on stream-oriented sockets.

I believe the second sentence is half wrong: when I try it, it
only affects the ability to send broadcast datagrams. You can only
receive broadcast datagrams if you bind to INADDR_ANY and don't
connect. The POSIX standard agrees with my tests and disagrees
with the manpage:

http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_10.html

Reported-by: Alexey Toptygin <alexeyt@freeshell.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-23 21:02:31 +12:00
Michael Kerrisk f6dc36110c getpwnam.3: Fix discussion of _SC_GETPW_R_SIZE_MAX
The value is not meant to be a maximum (as was specified in
SUSv3) but an initial guess at the required size
(as specified in SUSv4).

Reported-by: Ulrich Drepper <drepper@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-23 20:21:23 +12:00
Michael Kerrisk f7bae7f86b getgrnam.3: Fix discussion of _SC_GETGR_R_SIZE_MAX
The value is not meant to be a maximum (as was specified in
SUSv3) but an initial guess at the required size
(as specified in SUSv4).

Reported-by: Ulrich Drepper <drepper@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-23 20:13:16 +12:00
Michael Kerrisk 61474e1b58 gsignal.3: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-23 18:59:15 +12:00
Michael Kerrisk ed987e2ee4 rexec.3: grfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-23 12:18:53 +12:00
Michael Kerrisk 6760cb0176 rexec_af.3: New link to rexec.3
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-23 12:18:22 +12:00
Michael Kerrisk 4cd4a6f890 rexec.3: Document rexec_af()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-23 12:17:44 +12:00
Michael Kerrisk 5b80f0073c iruserok_af.3, rcmd_af.3, rresvport_af.3, ruserok_af.3: New links to rcmd.3
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-23 12:03:33 +12:00
Michael Kerrisk 023a57dc59 rcmd.3: Document "_af" variants of these functions
Document rcmd_af(), rresvport_af(), iruserok_af(), ruserok_af().
Also some restructuring and other clarifications.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-23 12:01:47 +12:00
Michael Kerrisk aa104c88b7 rcmd.3: Add some details of the rresvport() 'port' argument
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-23 11:15:45 +12:00
Michael Kerrisk 7cb4d005c6 fallocate.2: Fix description of ENOSYS and EOPNOTSUP errors
As reported in https://bugzilla.redhat.com/show_bug.cgi?id=680214
the descriptions of ENOSYS and EOPNOTSUP are not corrected

Reported-by: John Sullivan <jsrhbz@kanargh.force9.co.uk>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-23 10:07:47 +12:00
Michael Kerrisk 61d71e01e2 strerror.3: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-23 09:25:56 +12:00
Michael Kerrisk 6fb29ca02e strerror.3: Add an example of the kind of string returned by setrerror()
Reported-by: Jon Grant <jg@jguk.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-23 09:24:28 +12:00
Brian F. G. Bidulock c643e947f7 netdevice.7: Document some SIOC configuration ioctls
This patch adds common but missing SIOC configuration ioctls to
the netdevice.7 manual pages that are not documented anywhere
else. SIOCSIFPFLAGS and SIOCGIFPFLAGS are linux-specific. Flag
values come from Linux 2.6.25 kernel headers for sockios. The
others are standard BSD ioctls that have alwasy been implemented
by Linux and were verified from inspecting netdevice.c kernel
code.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-23 08:29:44 +12:00
Stefan Puiu 4c49bf908c send.2: Document EACCES error case for UDP
It seems sendto() can return EACCES for UDP as well; the current
man page in git only says it can return EACCES for Unix sockets.

I was able to make sendto() return EACCES if I try to send from
192.168.1.1/24 to 192.168.1.0. I think the relevant code (in
kernel 2.6.38, but also present in 2.6.7 and 2.6.32, the 2 kernels
we use) is this (net/ipv4/udp.c, udp_sendmsg()):

 910                err = -EACCES;
 911                if ((rt->rt_flags & RTCF_BROADCAST) &&
 912                    !sock_flag(sk, SOCK_BROADCAST))
 913                        goto out;

So I guess if the kernel finds a route to the destination and
it's a broadcast route (and the socket doesn't have the broadcast
flag), then it returns EACCES.

I can verify the behavior with a very simple program (attached).
I've run it on my Ubuntu 10.10 (2.6.35 kernel) and got this:

stefan@spuiu-vml2:~/src/test/broadcast$ ./broadcast_test 10.205.20.94
10.205.20.1
sendto() returned 4
stefan@spuiu-vml2:~/src/test/broadcast$ ./broadcast_test 10.205.20.94
10.205.20.0
sendto() returned negative, errno: 13/Permission denied

(10.205.20.94 is my local IP, of course).

=====
    #include <stdio.h>

    #include <sys/types.h>
    #include <sys/socket.h>
    #include <netinet/in.h>
    #include <arpa/inet.h>
    #include <errno.h>
    #include <stdlib.h>

    int main(int argc, char **argv)
    {
        int sock;

        if (argc < 2) {
            printf("Usage: %s local_address destination_address\n", argv[0]);
            exit(1);
        }

        sock = socket(AF_INET, SOCK_DGRAM, 0);
        if (sock < 0) {
            perror("socket");
            return -1;
        }

        struct sockaddr_in local_addr;
        local_addr.sin_family = AF_INET;
        local_addr.sin_port = htons(1234);
        local_addr.sin_addr.s_addr = inet_addr(argv[1]);
        int ret = bind(sock, (struct sockaddr *) &local_addr, sizeof(local_addr));
        if (ret < 0) {
            perror("bind");
            return -1;
        }

        struct sockaddr_in remote_addr;
        remote_addr.sin_family = AF_INET;
        remote_addr.sin_port = htons(1234);
        remote_addr.sin_addr.s_addr = inet_addr(argv[2]);
        ret = sendto(sock, "blah", 4, 0, (struct sockaddr *)&remote_addr, sizeof(remote_addr));
        if (ret < 0) {
            printf("sendto() returned negative, errno: %d/%m\n", errno);
        }
        else {
            printf("sendto() returned %d\n", ret);
        }

        return 0;
    }
=====

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-23 08:15:01 +12:00
Michael Kerrisk df21098dee btree.3, dbopen.3, hash.3, mpool.3, recno.3: Note that glibc no longer provides these interfaces
glibc stopped providing these interfaces with v2.2.
Nowadays, the user that finds these pages probably wants
the libdb API, so note this in the page.

See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=337581

Reported-by: Brian M. Carlson <sandals@crustytoothpaste.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-23 07:47:35 +12:00
Eugen Dedu 1463d77202 iso_8859-1.7: Add "-" for SOFT HYPHEN
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=156154

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-22 19:12:38 +12:00
Michael Kerrisk afd6f6c5ea fopen.3: spfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-22 14:48:29 +12:00
Michael Kerrisk 4d9edb6e7e fopen.3: BUGS: Note limitation on number of flag characters parsed in 'mode' 2012-04-22 14:48:29 +12:00
Michael Kerrisk d33e84666f fopen.3: Document ",ccs=string" feature of 'mode' for fopen()/freopen()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-04-22 14:48:28 +12:00