]> git.ipfire.org Git - thirdparty/man-pages.git/log
thirdparty/man-pages.git
19 years ago2.05 release man-pages-2.05
Michael Kerrisk [Mon, 27 Jun 2005 15:47:28 +0000 (15:47 +0000)] 
2.05 release

19 years agoPrepare for 2.05 release
Michael Kerrisk [Mon, 27 Jun 2005 15:39:25 +0000 (15:39 +0000)] 
Prepare for 2.05 release

19 years agoVarious further wording changes related to open file description, etc.
Michael Kerrisk [Mon, 27 Jun 2005 15:35:32 +0000 (15:35 +0000)] 
Various further wording changes related to open file description, etc.

19 years agoMinor wording changes
Michael Kerrisk [Mon, 27 Jun 2005 14:42:40 +0000 (14:42 +0000)] 
Minor wording changes

19 years agoone word change
Michael Kerrisk [Mon, 27 Jun 2005 14:42:14 +0000 (14:42 +0000)] 
one word change

19 years agoSlight rewording
Michael Kerrisk [Fri, 24 Jun 2005 15:56:02 +0000 (15:56 +0000)] 
Slight rewording

19 years agoSpelling fixes
Michael Kerrisk [Fri, 24 Jun 2005 14:58:43 +0000 (14:58 +0000)] 
Spelling fixes

19 years agoSpelling/typo fixes
Michael Kerrisk [Fri, 24 Jun 2005 14:44:16 +0000 (14:44 +0000)] 
Spelling/typo fixes

19 years agoTypos fixes from A Costa (16 May 05, Debian "manpages").
Michael Kerrisk [Fri, 24 Jun 2005 14:17:21 +0000 (14:17 +0000)] 
Typos fixes from A Costa (16 May 05, Debian "manpages").

19 years agoThe return value of isinf() changed in glibc 2.02
Michael Kerrisk [Fri, 24 Jun 2005 12:38:56 +0000 (12:38 +0000)] 
The return value of isinf() changed in glibc 2.02
to differentiate positive and neagtive infinity.
See: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=285765

19 years agoReplaced "selection(1)" by "gpm(8)" under SEE ALSO
Michael Kerrisk [Fri, 24 Jun 2005 11:59:32 +0000 (11:59 +0000)] 
Replaced "selection(1)" by "gpm(8)" under SEE ALSO

19 years agostrtold() and strtof() need _ISOC99_SOURCE of _XOPEN_SOURCE=600
Michael Kerrisk [Fri, 24 Jun 2005 11:29:39 +0000 (11:29 +0000)] 
strtold() and strtof() need _ISOC99_SOURCE of _XOPEN_SOURCE=600
As per http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=246668

19 years agoFormatting changes
Michael Kerrisk [Fri, 24 Jun 2005 10:53:06 +0000 (10:53 +0000)] 
Formatting changes

19 years agoNew link to uri.7
Michael Kerrisk [Thu, 23 Jun 2005 15:29:00 +0000 (15:29 +0000)] 
New link to uri.7

19 years agoWhite space fix
Michael Kerrisk [Thu, 23 Jun 2005 15:27:41 +0000 (15:27 +0000)] 
White space fix

19 years agoSlight rewording
Michael Kerrisk [Thu, 23 Jun 2005 15:27:21 +0000 (15:27 +0000)] 
Slight rewording

19 years agoRemove confusing text describe real and effective IDs.
Michael Kerrisk [Thu, 23 Jun 2005 14:56:40 +0000 (14:56 +0000)] 
Remove confusing text describe real and effective IDs.
As per http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=285852

19 years agoChange "chown root:mem /dev/null /dev/zero" to
Michael Kerrisk [Thu, 23 Jun 2005 14:23:37 +0000 (14:23 +0000)] 
Change "chown root:mem /dev/null /dev/zero" to
"chown root:root /dev/null /dev/zero"

19 years agoChange "chown root:mem /dev/mem" to "chown root:kmem /dev/mem"
Michael Kerrisk [Thu, 23 Jun 2005 14:20:53 +0000 (14:20 +0000)] 
Change "chown root:mem /dev/mem" to "chown root:kmem /dev/mem"

19 years agoAdded tdestroy to .TH line
Michael Kerrisk [Thu, 23 Jun 2005 14:17:03 +0000 (14:17 +0000)] 
Added tdestroy to .TH line

19 years agoNew link to tsearch.3
Michael Kerrisk [Thu, 23 Jun 2005 14:16:40 +0000 (14:16 +0000)] 
New link to tsearch.3

19 years agoAdded definition of Linux dirent structure.
Michael Kerrisk [Thu, 23 Jun 2005 14:08:59 +0000 (14:08 +0000)] 
Added definition of Linux dirent structure.
Some formatting cleanups.

19 years agoAdded #define _BSD_SOURCE to prototype
Michael Kerrisk [Thu, 23 Jun 2005 13:50:48 +0000 (13:50 +0000)] 
Added #define _BSD_SOURCE to prototype

19 years agowhitespace cleanups
Michael Kerrisk [Thu, 23 Jun 2005 13:40:38 +0000 (13:40 +0000)] 
whitespace cleanups

19 years agoNoted that the nice value rande is -20..20 on some systems
Michael Kerrisk [Thu, 23 Jun 2005 13:36:09 +0000 (13:36 +0000)] 
Noted that the nice value rande is -20..20 on some systems

19 years agoChanged range documented in main text from -20..20 to -20..19.
Michael Kerrisk [Thu, 23 Jun 2005 13:33:14 +0000 (13:33 +0000)] 
Changed range documented in main text from -20..20 to -20..19.

19 years agoAdded .\" comment about behaviour change for
Michael Kerrisk [Thu, 23 Jun 2005 12:11:22 +0000 (12:11 +0000)] 
Added .\" comment about behaviour change for
length == 0 in kernel 2.6.12.

19 years agoNoted use of atexit() for establishing function to be invoked on shared library
Michael Kerrisk [Thu, 23 Jun 2005 10:01:26 +0000 (10:01 +0000)] 
Noted use of atexit() for establishing function to be invoked on shared library
unload.
Noted that atexit()-registered functions are not invoked on abnormal
termination.
Formatting fixes.

19 years agoFormatting fixes
Michael Kerrisk [Thu, 23 Jun 2005 09:58:22 +0000 (09:58 +0000)] 
Formatting fixes

19 years agoReversed 2.04 introduction of the term "process termination function".
Michael Kerrisk [Thu, 23 Jun 2005 09:47:01 +0000 (09:47 +0000)] 
Reversed 2.04 introduction of the term "process termination function".
Minor rewording and formatting fixes.

19 years agoReversed 2.04 introduction of the term "process termination function".
Michael Kerrisk [Thu, 23 Jun 2005 09:45:21 +0000 (09:45 +0000)] 
Reversed 2.04 introduction of the term "process termination function".

19 years agoThe short sleep bug (up to 1 jiffy) that was newly noted in
Michael Kerrisk [Thu, 23 Jun 2005 07:16:55 +0000 (07:16 +0000)] 
The short sleep bug (up to 1 jiffy) that was newly noted in
man-pages-2.04 has just been fixed in 2.6.12.

19 years agoMinor wording changes
Michael Kerrisk [Wed, 22 Jun 2005 10:59:21 +0000 (10:59 +0000)] 
Minor wording changes

19 years agoAdded FIXME
Michael Kerrisk [Wed, 22 Jun 2005 10:56:11 +0000 (10:56 +0000)] 
Added FIXME

19 years agoClarified what type of lock close() affects.
Michael Kerrisk [Wed, 22 Jun 2005 10:49:19 +0000 (10:49 +0000)] 
Clarified what type of lock close() affects.
Minor formatting changes.

19 years agoConsistent use of terms "open file description",
Michael Kerrisk [Wed, 22 Jun 2005 09:53:58 +0000 (09:53 +0000)] 
Consistent use of terms "open file description",
"file status flags", and "file decriptor flags"
Some rewriting of discussion of file descriptor flags
Under F_DUPFD, replaced some text duplicated in dup.2 with a cross ref to dup.2
Minor wording and formatting fixes

19 years agoConsistent use of terms "open file description",
Michael Kerrisk [Wed, 22 Jun 2005 09:53:00 +0000 (09:53 +0000)] 
Consistent use of terms "open file description",
"file status flags", and "file decriptor flags"
Removed mention of lock sharing -- it was not accurate.
Minor formatting fixes

19 years agoClarification of term "open file description" along with
Michael Kerrisk [Wed, 22 Jun 2005 09:52:33 +0000 (09:52 +0000)] 
Clarification of term "open file description" along with
explanation of what information it maintains.
Various minor wording changes

19 years agoFormatting changes
Michael Kerrisk [Wed, 22 Jun 2005 08:16:22 +0000 (08:16 +0000)] 
Formatting changes

19 years agoMinor fixes
Michael Kerrisk [Wed, 22 Jun 2005 07:19:03 +0000 (07:19 +0000)] 
Minor fixes

19 years agoMinor wording changes (after email with AEB).
Michael Kerrisk [Wed, 22 Jun 2005 06:52:22 +0000 (06:52 +0000)] 
Minor wording changes (after email with AEB).

19 years agoAdded ERANGE error
Michael Kerrisk [Tue, 21 Jun 2005 16:03:30 +0000 (16:03 +0000)] 
Added ERANGE error

19 years agoInitial setup for 2.05 release
Michael Kerrisk [Tue, 21 Jun 2005 15:08:47 +0000 (15:08 +0000)] 
Initial setup for 2.05 release

19 years agoInitial setup for 2.05 release
Michael Kerrisk [Tue, 21 Jun 2005 15:07:59 +0000 (15:07 +0000)] 
Initial setup for 2.05 release

19 years agoFor 2.04 release man-pages-2.04
Michael Kerrisk [Tue, 21 Jun 2005 14:56:41 +0000 (14:56 +0000)] 
For 2.04 release

19 years agoGetting ready for 2.04 release
Michael Kerrisk [Tue, 21 Jun 2005 14:47:55 +0000 (14:47 +0000)] 
Getting ready for 2.04 release

19 years agoFurther tcp_stdurg and SIOCATMARK work; minor formatting fixes
Michael Kerrisk [Tue, 21 Jun 2005 14:46:08 +0000 (14:46 +0000)] 
Further tcp_stdurg and SIOCATMARK work; minor formatting fixes

19 years agoMinor formatting fixes
Michael Kerrisk [Tue, 21 Jun 2005 14:45:03 +0000 (14:45 +0000)] 
Minor formatting fixes

19 years agoFixed descriptotion of header file reqmts in prototype,
Michael Kerrisk [Tue, 21 Jun 2005 14:44:34 +0000 (14:44 +0000)] 
Fixed descriptotion of header file reqmts in prototype,

19 years agoClarified semantics of relationship between flock() locks
Michael Kerrisk [Tue, 21 Jun 2005 14:43:56 +0000 (14:43 +0000)] 
Clarified semantics of relationship between flock() locks
and open file entries and file descriptors.
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=291121

19 years agoMinor changes
Michael Kerrisk [Tue, 21 Jun 2005 13:50:30 +0000 (13:50 +0000)] 
Minor changes

19 years agoFix description of return value.
Michael Kerrisk [Tue, 21 Jun 2005 13:47:59 +0000 (13:47 +0000)] 
Fix description of return value.

19 years agoAdd log1p(3) to SEE ALSO.
Michael Kerrisk [Tue, 21 Jun 2005 13:00:02 +0000 (13:00 +0000)] 
Add log1p(3) to SEE ALSO.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=309578

19 years agoFix typo: "_SC_2_DEV" should be "_SC_2_C_DEV"
Michael Kerrisk [Tue, 21 Jun 2005 11:30:37 +0000 (11:30 +0000)] 
Fix typo: "_SC_2_DEV" should be "_SC_2_C_DEV"

19 years agoWhen specifying resolved_path as NULL, realpath()
Michael Kerrisk [Tue, 21 Jun 2005 11:20:42 +0000 (11:20 +0000)] 
When specifying resolved_path as NULL, realpath()
will (still) only allocate up to PATH_MAX bytes.
Plus other minor changes.
See also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=239424

19 years agoO_DIRECT needs _GNU_SOURCE.
Michael Kerrisk [Tue, 21 Jun 2005 10:04:56 +0000 (10:04 +0000)] 
O_DIRECT needs _GNU_SOURCE.
O_ASYNC works for pipes and FIFOs in Linux 2.6
Vaious minor fixes

19 years agohttp://bugs.debian.org/cgi-bin/bugreport.cgi?bug=194842
Michael Kerrisk [Tue, 21 Jun 2005 09:22:02 +0000 (09:22 +0000)] 
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=194842

Because RAND_MAX is equal to INT_MAX, the following expression
contained in the manpage for rand(3) is slightly incorrect.
j=1+(int) (10.0*rand()/(RAND_MAX+1.0));

The correct expression should use parentheses to group the division
before the multiplication, thus yielding:
j=1+(int) (10.0*(rand()/(RAND_MAX+1.0)));

This is not an error where 10.0 is a floating point number, however
where 10.0 is replaced with an integer, this will cause the expression
to always evaluate to 1. (The addition of two parentheses would make
this bug a lot more difficult to make.)

19 years agoSee http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=118752
Michael Kerrisk [Tue, 21 Jun 2005 08:55:14 +0000 (08:55 +0000)] 
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=118752

19 years agoMinor formatting change
Michael Kerrisk [Tue, 21 Jun 2005 08:32:40 +0000 (08:32 +0000)] 
Minor formatting change

19 years agoMinor changes
Michael Kerrisk [Tue, 21 Jun 2005 08:30:41 +0000 (08:30 +0000)] 
Minor changes

19 years agoMore tcp_stdurg and SIOCATMARK work
Michael Kerrisk [Mon, 20 Jun 2005 14:45:09 +0000 (14:45 +0000)] 
More tcp_stdurg and SIOCATMARK work

19 years agoSince Linux 2.6, the ru_nvcsw and ru_nivcsw fields are used.
Michael Kerrisk [Mon, 20 Jun 2005 08:58:09 +0000 (08:58 +0000)] 
Since Linux 2.6, the ru_nvcsw and ru_nivcsw fields are used.

19 years agoChanged (char *) to (void *) in example.
Michael Kerrisk [Fri, 17 Jun 2005 13:34:00 +0000 (13:34 +0000)] 
Changed (char *) to (void *) in example.
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=313607

19 years agoArg for %p is a pointer to _a pointer to_ void.
Michael Kerrisk [Fri, 17 Jun 2005 13:06:58 +0000 (13:06 +0000)] 
Arg for %p is a pointer to _a pointer to_ void.
As per http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=263109

19 years agoBUGS: In kernels < 2.6.9, EPOLL_CTL_DEL required a non-NULL
Michael Kerrisk [Fri, 17 Jun 2005 11:33:07 +0000 (11:33 +0000)] 
BUGS: In kernels < 2.6.9, EPOLL_CTL_DEL required a non-NULL
'event', even though this argument is ignored.
As per http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=306517.

19 years agofreopen(3) can change file descriptor associations of stin/stdout/stderr
Michael Kerrisk [Thu, 16 Jun 2005 16:10:05 +0000 (16:10 +0000)] 
freopen(3) can change file descriptor associations of stin/stdout/stderr

19 years agostrerror_r(3) requires #define _XOPEN_SOURCE 600
Michael Kerrisk [Thu, 16 Jun 2005 16:09:25 +0000 (16:09 +0000)] 
strerror_r(3) requires #define _XOPEN_SOURCE 600

19 years agoRewrote description of return value.
Michael Kerrisk [Thu, 16 Jun 2005 15:07:57 +0000 (15:07 +0000)] 
Rewrote description of return value.
As per http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=296183

19 years agoRemoved erroneous description of makecontext() return value.
Michael Kerrisk [Thu, 16 Jun 2005 14:37:57 +0000 (14:37 +0000)] 
Removed erroneous description of makecontext() return value.
As per http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=311800

19 years agoremoved fixed FIXMEs
Michael Kerrisk [Thu, 16 Jun 2005 10:35:03 +0000 (10:35 +0000)] 
removed fixed FIXMEs

19 years agoformatting
Michael Kerrisk [Thu, 16 Jun 2005 10:32:30 +0000 (10:32 +0000)] 
formatting

19 years agoMore SIOCATMARK cahnges.
Michael Kerrisk [Thu, 16 Jun 2005 10:23:59 +0000 (10:23 +0000)] 
More SIOCATMARK cahnges.

19 years agoglobal edit s/ -1/ \\-1/g
Michael Kerrisk [Wed, 15 Jun 2005 14:10:23 +0000 (14:10 +0000)] 
global edit s/ -1/ \\-1/g

19 years agoGlobal edit: s/nonzero/non-zero/
Michael Kerrisk [Wed, 15 Jun 2005 13:32:34 +0000 (13:32 +0000)] 
Global edit: s/nonzero/non-zero/

19 years agoVarious wording and foratting fixes
Michael Kerrisk [Wed, 15 Jun 2005 13:26:36 +0000 (13:26 +0000)] 
Various wording and foratting fixes

19 years agoVarious wording and formatting fixes.
Michael Kerrisk [Wed, 15 Jun 2005 12:56:21 +0000 (12:56 +0000)] 
Various wording and formatting fixes.
Incorporated some new /proc/sys/net/ipv4/tcp_* file descriptions
from the 2.6.12 source file Documentation/networking/ip-sysctl.txt.

19 years agoAdded pointer to ip(7) and proc(7) for /proc/sys/net
Michael Kerrisk [Wed, 15 Jun 2005 12:07:30 +0000 (12:07 +0000)] 
Added pointer to ip(7) and proc(7) for /proc/sys/net

19 years agoRLIMIT_RSS only has affect "in 2.4.x", not "in 2.4 and later".
Michael Kerrisk [Wed, 15 Jun 2005 11:35:49 +0000 (11:35 +0000)] 
RLIMIT_RSS only has affect "in 2.4.x", not "in 2.4 and later".

19 years agoAdded FIXME for mqueue files
Michael Kerrisk [Wed, 15 Jun 2005 08:30:11 +0000 (08:30 +0000)] 
Added FIXME for mqueue files

19 years agoFixes in discussion of SIOCATMARK + general wording and formatting
Michael Kerrisk [Tue, 14 Jun 2005 15:24:55 +0000 (15:24 +0000)] 
Fixes in discussion of SIOCATMARK + general wording and formatting
clean-ups.

19 years agoVarious minor changes
Michael Kerrisk [Tue, 14 Jun 2005 11:25:12 +0000 (11:25 +0000)] 
Various minor changes

19 years agoWording improvements
Michael Kerrisk [Tue, 14 Jun 2005 11:22:23 +0000 (11:22 +0000)] 
Wording improvements

19 years agoWording improvements
Michael Kerrisk [Tue, 14 Jun 2005 11:22:06 +0000 (11:22 +0000)] 
Wording improvements

19 years agoVarious minor changes
Michael Kerrisk [Tue, 14 Jun 2005 11:20:57 +0000 (11:20 +0000)] 
Various minor changes

19 years agoSmall wording fix.
Michael Kerrisk [Mon, 13 Jun 2005 09:51:27 +0000 (09:51 +0000)] 
Small wording fix.

19 years agoSalut Olivier (and Nishanth),
Michael Kerrisk [Mon, 13 Jun 2005 09:01:49 +0000 (09:01 +0000)] 
Salut Olivier (and Nishanth),

Regarding man page documentation of the problem of short sleeps
for setiteimer(2)...

> > -- pointers to those threads
>
> http://bugzilla.kernel.org/show_bug.cgi?id=4569
> http://lkml.org/lkml/2005/4/29/163
>
> > -- indications of which kernel versions show this bahaviour
>
> AFAIK, all versions as far as x86 is concerned.
> Dunno if it is hardware specific.
>
> > -- a (short) test program to demonstrate it, if you have one.
>
> See the bugzilla bug's attachments

Sorry for the long delay in following this up, but I've got to
it now.  I tweaked your suggestions slightly:

{{
Timers will never expire before the requested time,
-instead expiring some short, constant time afterwards, dependent
-on the system timer resolution (currently 10ms).
+but may expire some (short) time afterwards, which depends
+on the system timer resolution and on the system load.
+Upon expiration, a signal will be generated and the timer reset.
+If the timer expires while the process is active (always true for

+On certain systems (including x86), the Linux kernel has a bug which will
+produce premature timer expirations of up to one jiffy under some
+circumstances.
}}

Thanks for this bug reporet,

Nishanth: if and when your changes are accepted, and the problem
is thus fixed, could you please send me a notification of that
fact, and I can then further amend the manual pages.

Cheers,

Michael

/* itimer_short_interval_bug.c

   June 2005

   In current Linux kernels, an interval timer set using setitimer()
   can sometimes sleep *less* than the specified interval.
   This program demonstrates the behaviour by looping through all
   itimer values from 1 microsecond upwards, in one microsecond steps.
*/
/* Adapted from a program by Olivier Croquette, June 2005 */

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/wait.h>

typedef unsigned long long int u_time_t; /* in microsecs */

static int handler_flag;

/* return time as a number of microsecs  */

static u_time_t
gettime(void )
{
    struct timeval tv;

    if ( gettimeofday(&tv, NULL) == -1) {
        perror("gettimeofday()");
        return 0;
    }
    return (tv.tv_usec + tv.tv_sec * 1000000LL);
}

static void
handler (int sig, siginfo_t *siginfo, void *context)
{
    handler_flag++;
    return ;
}

/* Sleep for 'time' microsecs. */
static int
isleep(u_time_t time)
{
    struct itimerval  newtv;
    sigset_t sigset;
    struct sigaction  sigact;

    if (time == 0)
        return 0;

    /* block SIGALRM */
    sigemptyset (&sigset);
    sigaddset (&sigset, SIGALRM);
    sigprocmask (SIG_BLOCK, &sigset, NULL);

    /* set up our handler */
    sigact.sa_sigaction  = handler;
    sigemptyset(&sigact.sa_mask);
    sigact.sa_flags = SA_SIGINFO;
    sigaction (SIGALRM, &sigact, NULL);

    newtv.it_interval.tv_sec  = 0;
    newtv.it_interval.tv_usec = 0;
    newtv.it_value.tv_sec     = time / 1000000;
    newtv.it_value.tv_usec    = time % 1000000;
    if (setitimer(ITIMER_REAL,&newtv,NULL) == -1) {
        perror("setitimer(set)");
        return 1;
    }

    sigemptyset (&sigset);
    sigsuspend (&sigset);
    return 0;
}

int
main(int argc, char *argv[]) {
    u_time_t wait;
    int loop, numLoops;
    u_time_t t1, t2;
    u_time_t actual;
    long long minDiff, maxDiff, totDiff, diff;
    int numFail = 0;

    if (argc != 2) {
fprintf(stderr, "Usage: %s num-loops\n", argv[0]);
exit(EXIT_FAILURE);
    } /* if */

    numLoops = atoi(argv[1]);
    setbuf(stdout, NULL);

    for (wait = 1; ; wait++) {
maxDiff = 0;
numFail = 0;
totDiff = 0;
minDiff = -wait;

        if (wait % 10000 == 0)
    printf("%llu\n", wait);

for (loop = 0; loop < numLoops; loop++) {
            t1 = gettime();

            handler_flag = 0;
            isleep(wait);

    if ( handler_flag != 1 )
                printf("Problem with the handler flag (%d)!\n", handler_flag);

            t2 = gettime();
            actual = t2 - t1;
            if ( actual < wait ) {
        diff = actual - wait;
if (diff < maxDiff)
    maxDiff = diff;
if (diff > minDiff)
    minDiff = diff;
totDiff += diff;
numFail++;
    } /* if */

        } /* for */
if (numFail > 0)
            printf("%llu: %3d fail (%4lld %4lld; avg=%6.1f)\n",
    wait, numFail, minDiff, maxDiff,
    (double) totDiff / numFail);
    } /* for */

    return 0;
} /* main */

19 years agoRemove duplicated CLONE_VFORK text
Michael Kerrisk [Mon, 13 Jun 2005 06:09:43 +0000 (06:09 +0000)] 
Remove duplicated CLONE_VFORK text

19 years agoFormatting fix
Michael Kerrisk [Thu, 9 Jun 2005 07:12:30 +0000 (07:12 +0000)] 
Formatting fix

19 years agoUpdates
Michael Kerrisk [Wed, 8 Jun 2005 13:27:32 +0000 (13:27 +0000)] 
Updates

19 years agoFix discussion of alternate signals stack
Michael Kerrisk [Wed, 8 Jun 2005 13:27:21 +0000 (13:27 +0000)] 
Fix discussion of alternate signals stack

19 years agoNew pthreads.7 page
Michael Kerrisk [Tue, 7 Jun 2005 12:35:32 +0000 (12:35 +0000)] 
New pthreads.7 page

19 years agoMinor fix
Michael Kerrisk [Tue, 7 Jun 2005 06:51:12 +0000 (06:51 +0000)] 
Minor fix

19 years agoFormatting fix
Michael Kerrisk [Fri, 3 Jun 2005 11:14:19 +0000 (11:14 +0000)] 
Formatting fix

19 years agoInitial set-up for 2.04 release
Michael Kerrisk [Thu, 2 Jun 2005 13:28:50 +0000 (13:28 +0000)] 
Initial set-up for 2.04 release

19 years ago2.03 release man-pages-2.03
Michael Kerrisk [Thu, 2 Jun 2005 13:11:04 +0000 (13:11 +0000)] 
2.03 release

19 years ago2.03 release
Michael Kerrisk [Thu, 2 Jun 2005 13:10:44 +0000 (13:10 +0000)] 
2.03 release

19 years agoUpdated copyright date
Michael Kerrisk [Thu, 2 Jun 2005 12:52:15 +0000 (12:52 +0000)] 
Updated copyright date

19 years agoNoted that any thread in a thread group can wait for a child
Michael Kerrisk [Thu, 2 Jun 2005 10:22:34 +0000 (10:22 +0000)] 
Noted that any thread in a thread group can wait for a child
that one of them creates using fork().

19 years agoFix typo
Michael Kerrisk [Tue, 31 May 2005 16:08:45 +0000 (16:08 +0000)] 
Fix typo

19 years agoHi Andries,
Michael Kerrisk [Tue, 31 May 2005 16:07:24 +0000 (16:07 +0000)] 
Hi Andries,

> The question came up whether execve of a suid binary while being ptraced
> would fail or ignore the suid part. The answer today seems to be the
> latter:
>
> E.g. (in 2.6.11) security/dummy.c:
>
> static void dummy_bprm_apply_creds (struct linux_binprm *bprm, int
> unsafe)
> {
>         if (bprm->e_uid != current->uid || bprm->e_gid != current->gid) {
>                 if ((unsafe & ~LSM_UNSAFE_PTRACE_CAP) &&
> !capable(CAP_SETUID)) {
>                         bprm->e_uid = current->uid;
>                         bprm->e_gid = current->gid;
>                 }
>         }
> }
>
> and fs/exec.c:
>
> void compute_creds(struct linux_binprm *bprm) {
>         int unsafe;
>
>         unsafe = unsafe_exec(current);
>         security_bprm_apply_creds(bprm, unsafe);
> }
>
> static inline int unsafe_exec(struct task_struct *p) {
>         int unsafe = 0;
>         if (p->ptrace & PT_PTRACED) {
>                 if (p->ptrace & PT_PTRACE_CAP)
>                         unsafe |= LSM_UNSAFE_PTRACE_CAP;
>                 else
>                         unsafe |= LSM_UNSAFE_PTRACE;
>         }
>         return unsafe;
> }
>
> That is: if the process that calls execve() is being traced,
> the LSM_UNSAFE_PTRACE bit is et in unsafe and security_bprm_apply_creds()
> will make sure the suid/sgid bits are ignored.
>
> ---
>
> In my man page I do not read anything like that. It says
>
>  EPERM  The process is being traced, the user is not the  superuser and
>         the file has an SUID or SGID bit set.
> and
>
>  If  the current program is being ptraced, a SIGTRAP is sent to it after
>  a successful execve().
>
>  If the set-uid bit is set on the program file pointed  to  by filename
>  the  effective user ID of the calling process is changed to that of the
>  owner of the program file.
>
> So, maybe this sentence should be amended to read
>
>  If the set-uid bit is set on the program file pointed  to  by filename
>  and the current process is not being ptraced, the  effective user ID
>  of the calling process is changed to ...

I changed your "current" to "calling" (to be consistent with the
rest of the page), but otherwise applied as you suggest.

The revision will appear in man-pages-2.03, which I can release
any time now.  Are you avialable to do an upload tomorrow?