]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Tue, 28 Sep 2004 22:44:12 +0000 (22:44 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 28 Sep 2004 22:44:12 +0000 (22:44 +0000)
* sysdeps/unix/sysv/linux/sigwait.c (do_sigwait): Make sure
SIGSETXID is not blocked.
* sysdeps/unix/sysv/linux/sigwaitinfo.c (do_sigwaitinfo): Likewise.
* sysdeps/unix/sysv/linux/sigtimedwait.c (do_sigtimedwait): Likewise.
* sysdeps/unix/sysv/linux/sigprocmask.c (__sigprocmask): Likewise.
* sysdeps/generic/sigfillset.c (sigfillset): Don't set SIGSETXID.

ChangeLog
nptl/sysdeps/pthread/pthread_sigmask.c
nptl/sysdeps/pthread/sigaction.c
nptl/sysdeps/unix/sysv/linux/pthread_kill.c
sysdeps/generic/sigfillset.c
sysdeps/unix/sysv/linux/sigprocmask.c
sysdeps/unix/sysv/linux/sigtimedwait.c
sysdeps/unix/sysv/linux/sigwait.c
sysdeps/unix/sysv/linux/sigwaitinfo.c

index ccf33bf625014be1bb1678a0deee8d28923ed595..f96596caec9c3809d9664e56554423964cf1e472 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
 
+       * sysdeps/unix/sysv/linux/sigwait.c (do_sigwait): Make sure
+       SIGSETXID is not blocked.
+       * sysdeps/unix/sysv/linux/sigwaitinfo.c (do_sigwaitinfo): Likewise.
+       * sysdeps/unix/sysv/linux/sigtimedwait.c (do_sigtimedwait): Likewise.
+       * sysdeps/unix/sysv/linux/sigprocmask.c (__sigprocmask): Likewise.
+       * sysdeps/generic/sigfillset.c (sigfillset): Don't set SIGSETXID.
+
        * sunrpc/get_myaddr.c (get_myaddress): Fix test for failing
        getifaddrs call.
        * sunrpc/pmap_clnt.c (__get_myaddress): Likewise.
index efe186ac2c8c2a221f0ec3cbf6fb8c377e2d7ef6..0d12fe6bf064568f7d64a52eeb1d2192768030e9 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -31,13 +31,15 @@ pthread_sigmask (how, newmask, oldmask)
 {
   sigset_t local_newmask;
 
-  /* The only thing we have to make sure here is that SIGCANCEL is not
-     blocked.  */
+  /* The only thing we have to make sure here is that SIGCANCEL and
+     SIGSETXID is not blocked.  */
   if (newmask != NULL
-      && __builtin_expect (__sigismember (newmask, SIGCANCEL), 0))
+      && (__builtin_expect (__sigismember (newmask, SIGCANCEL), 0)
+         || __builtin_expect (__sigismember (newmask, SIGSETXID), 0)))
     {
       local_newmask = *newmask;
       __sigdelset (&local_newmask, SIGCANCEL);
+      __sigdelset (&local_newmask, SIGSETXID);
       newmask = &local_newmask;
     }
 
index 392cb65c90058c9b48bc1884fcfe5d94b99f2360..4d36150a90ae585559179b055f34ae6f3f6e11f7 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -36,7 +36,7 @@ __sigaction (sig, act, oact)
      const struct sigaction *act;
      struct sigaction *oact;
 {
-  if (sig == SIGCANCEL)
+  if (__builtin_expect (sig == SIGCANCEL || sig == SIGSETXID, 0))
     {
       __set_errno (EINVAL);
       return -1;
index 87577be4dcaa9d16ccbd30c841eaee311a68f47b..9115d6f40b271908e98b4f4ddfea2cbbdb2259c1 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -37,8 +37,9 @@ __pthread_kill (threadid, signo)
     /* Not a valid thread handle.  */
     return ESRCH;
 
-  /* Disallow sending the signal we use for cancellation.  */
-  if (signo == SIGCANCEL || signo == SIGTIMER)
+  /* Disallow sending the signal we use for cancellation, timers, for
+     for the setxid implementation.  */
+  if (signo == SIGCANCEL || signo == SIGTIMER || signo == SIGSETXID)
     return EINVAL;
 
   /* We have a special syscall to do the work.  */
index 5f91fa6bda0374f3e7e7fc184b1cbd99fede7545..95d52cf0c047ff2bb343024894f744a798363bd2 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,96,97,2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1991,96,97,2002,2003,2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -37,6 +37,10 @@ sigfillset (set)
 #ifdef SIGCANCEL
   __sigdelset (set, SIGCANCEL);
 #endif
+  /* Likewise for the signal to implement setxid.  */
+#ifdef SIGSETXID
+  __sigdelset (set, SIGSETXID);
+#endif
 
   return 0;
 }
index e1b57566a5af2ea53639571f39be1731691fc740..1573780d8ee668726822c9e24b9ebb03ebd2e9cc 100644 (file)
@@ -43,12 +43,20 @@ __sigprocmask (how, set, oset)
 #ifdef SIGCANCEL
   sigset_t local_newmask;
 
-  /* The only thing we have to make sure here is that SIGCANCEL is not
-     blocked.  */
-  if (set != NULL && __builtin_expect (__sigismember (set, SIGCANCEL), 0))
+  /* The only thing we have to make sure here is that SIGCANCEL and
+     SIGSETXID are not blocked.  */
+  if (set != NULL
+      && (__builtin_expect (__sigismember (set, SIGCANCEL), 0)
+# ifdef SIGSETXID
+         || __builtin_expect (__sigismember (set, SIGSETXID), 0)
+# endif
+         ))
     {
       local_newmask = *set;
       __sigdelset (&local_newmask, SIGCANCEL);
+# ifdef SIGSETXID
+      __sigdelset (&local_newmask, SIGSETXID);
+# endif
       set = &local_newmask;
     }
 #endif
index 1705cb10bda0bbc7bd32f90e8cfb1b2e65eb5317..adeadc1587cbdd1eb5cb88166208e18d4490e638 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,2000,2002,2003,2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -32,12 +32,20 @@ do_sigtimedwait (const sigset_t *set, siginfo_t *info,
 {
 #ifdef SIGCANCEL
   sigset_t tmpset;
-  if (set != NULL && __sigismember (set, SIGCANCEL))
+  if (set != NULL
+      && (__builtin_expect (__sigismember (set, SIGCANCEL), 0)
+# ifdef SIGSETXID
+         || __builtin_expect (__sigismember (set, SIGSETXID), 0)
+# endif
+         ))
     {
       /* Create a temporary mask without the bit for SIGCANCEL set.  */
       // We are not copying more than we have to.
       memcpy (&tmpset, set, _NSIG / 8);
       __sigdelset (&tmpset, SIGCANCEL);
+# ifdef SIGSETXID
+      __sigdelset (&tmpset, SIGSETXID);
+# endif
       set = &tmpset;
     }
 #endif
index f755928493d05255ac771610485a82209f179197..7c865963cdedd28e7a5da75b4a663d9041436229 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,2000,2002,2003,2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -36,12 +36,20 @@ do_sigwait (const sigset_t *set, int *sig)
 
 #ifdef SIGCANCEL
   sigset_t tmpset;
-  if (set != NULL && __sigismember (set, SIGCANCEL))
+  if (set != NULL
+      && (__builtin_expect (__sigismember (set, SIGCANCEL), 0)
+# ifdef SIGSETXID
+         || __builtin_expect (__sigismember (set, SIGSETXID), 0)
+# endif
+         ))
     {
       /* Create a temporary mask without the bit for SIGCANCEL set.  */
       // We are not copying more than we have to.
       memcpy (&tmpset, set, _NSIG / 8);
       __sigdelset (&tmpset, SIGCANCEL);
+# ifdef SIGSETXID
+      __sigdelset (&tmpset, SIGSETXID);
+# endif
       set = &tmpset;
     }
 #endif
index a2dec820fc224e2dc308a5fcb5d4cb344312845d..a51a01f20bdce5a56497aa7d2153db3f5978f237 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,2000,2002,2003,2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -33,12 +33,20 @@ do_sigwaitinfo (const sigset_t *set, siginfo_t *info)
 {
 #ifdef SIGCANCEL
   sigset_t tmpset;
-  if (set != NULL && __sigismember (set, SIGCANCEL))
+  if (set != NULL
+      && (__builtin_expect (__sigismember (set, SIGCANCEL), 0)
+# ifdef SIGSETXID
+         || __builtin_expect (__sigismember (set, SIGSETXID), 0)
+# endif
+         ))
     {
       /* Create a temporary mask without the bit for SIGCANCEL set.  */
       // We are not copying more than we have to.
       memcpy (&tmpset, set, _NSIG / 8);
       __sigdelset (&tmpset, SIGCANCEL);
+# ifdef SIGSETXID
+      __sigdelset (&tmpset, SIGSETXID);
+# endif
       set = &tmpset;
     }
 #endif