summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-01-17 19:23:29 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-01-17 19:23:29 +0000
commit80f0ac7e0ddc7a9313b0d47c2317ba577516461b (patch)
tree0f1099d0286613b29dce227b0fd865b464d6b30b
parent3c9efbc8dfcbab7f0dd3f31eb3de8febadb429a5 (diff)
use _exit() in signal handlers, and flag that the pmap_unset() calls are unsafe
-rw-r--r--libexec/rpc.rquotad/rquotad.c6
-rw-r--r--libexec/rpc.rstatd/rstat_proc.c6
-rw-r--r--libexec/rpc.rstatd/rstatd.c6
-rw-r--r--libexec/rpc.rusersd/rusers_proc.c4
-rw-r--r--libexec/rpc.rusersd/rusersd.c6
-rw-r--r--libexec/rpc.rwalld/rwalld.c6
-rw-r--r--libexec/rpc.sprayd/sprayd.c10
7 files changed, 22 insertions, 22 deletions
diff --git a/libexec/rpc.rquotad/rquotad.c b/libexec/rpc.rquotad/rquotad.c
index 6fe944cdb30..d37cec41443 100644
--- a/libexec/rpc.rquotad/rquotad.c
+++ b/libexec/rpc.rquotad/rquotad.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rquotad.c,v 1.7 2000/10/19 01:56:05 pjanzen Exp $ */
+/* $OpenBSD: rquotad.c,v 1.8 2001/01/17 19:23:26 deraadt Exp $ */
/*
* by Manuel Bouyer (bouyer@ensta.fr)
*
@@ -53,8 +53,8 @@ int from_inetd = 1;
void
cleanup()
{
- (void) pmap_unset(RQUOTAPROG, RQUOTAVERS);
- exit(0);
+ (void) pmap_unset(RQUOTAPROG, RQUOTAVERS); /* XXX signal races */
+ _exit(0);
}
int
diff --git a/libexec/rpc.rstatd/rstat_proc.c b/libexec/rpc.rstatd/rstat_proc.c
index 0f9bbc056c2..fddb974d62c 100644
--- a/libexec/rpc.rstatd/rstat_proc.c
+++ b/libexec/rpc.rstatd/rstat_proc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rstat_proc.c,v 1.11 1999/11/30 07:39:26 art Exp $ */
+/* $OpenBSD: rstat_proc.c,v 1.12 2001/01/17 19:23:26 deraadt Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -31,7 +31,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)rpc.rstatd.c 1.1 86/09/25 Copyr 1984 Sun Micro";*/
/*static char sccsid[] = "from: @(#)rstat_proc.c 2.2 88/08/01 4.0 RPCSRC";*/
-static char rcsid[] = "$OpenBSD: rstat_proc.c,v 1.11 1999/11/30 07:39:26 art Exp $";
+static char rcsid[] = "$OpenBSD: rstat_proc.c,v 1.12 2001/01/17 19:23:26 deraadt Exp $";
#endif
/*
@@ -142,7 +142,7 @@ stat_init()
stat_is_init = 1;
setup();
updatestat();
- (void) signal(SIGALRM, updatestat);
+ (void) signal(SIGALRM, updatestat); /* XXX huge signal race */
alarm(1);
}
diff --git a/libexec/rpc.rstatd/rstatd.c b/libexec/rpc.rstatd/rstatd.c
index 0df791f334c..f1cd71e99aa 100644
--- a/libexec/rpc.rstatd/rstatd.c
+++ b/libexec/rpc.rstatd/rstatd.c
@@ -32,7 +32,7 @@
*/
#ifndef lint
-static char rcsid[] = "$Id: rstatd.c,v 1.3 1997/07/23 20:36:32 kstailey Exp $";
+static char rcsid[] = "$Id: rstatd.c,v 1.4 2001/01/17 19:23:26 deraadt Exp $";
#endif /* not lint */
#include <stdio.h>
@@ -49,10 +49,10 @@ int closedown = 20; /* how long to wait before going dormant */
void
cleanup()
{
- (void) pmap_unset(RSTATPROG, RSTATVERS_TIME);
+ (void) pmap_unset(RSTATPROG, RSTATVERS_TIME); /* XXX signal races */
(void) pmap_unset(RSTATPROG, RSTATVERS_SWTCH);
(void) pmap_unset(RSTATPROG, RSTATVERS_ORIG);
- exit(0);
+ _exit(0);
}
main(argc, argv)
diff --git a/libexec/rpc.rusersd/rusers_proc.c b/libexec/rpc.rusersd/rusers_proc.c
index 761a78571d8..b344db0952f 100644
--- a/libexec/rpc.rusersd/rusers_proc.c
+++ b/libexec/rpc.rusersd/rusers_proc.c
@@ -27,7 +27,7 @@
*/
#ifndef lint
-static char rcsid[] = "$Id: rusers_proc.c,v 1.6 1999/06/16 10:15:14 espie Exp $";
+static char rcsid[] = "$Id: rusers_proc.c,v 1.7 2001/01/17 19:23:27 deraadt Exp $";
#endif /* not lint */
#include <signal.h>
@@ -97,7 +97,7 @@ static sigjmp_buf openAbort;
static void
abortOpen()
{
- siglongjmp(openAbort, 1);
+ siglongjmp(openAbort, 1); /* XXX signal/longjmp resource leaks */
}
XqueryIdle(display)
diff --git a/libexec/rpc.rusersd/rusersd.c b/libexec/rpc.rusersd/rusersd.c
index 34f98b00272..6d6ebeaa30c 100644
--- a/libexec/rpc.rusersd/rusersd.c
+++ b/libexec/rpc.rusersd/rusersd.c
@@ -27,7 +27,7 @@
*/
#ifndef lint
-static char rcsid[] = "$Id: rusersd.c,v 1.3 1997/09/19 09:28:03 deraadt Exp $";
+static char rcsid[] = "$Id: rusersd.c,v 1.4 2001/01/17 19:23:27 deraadt Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -49,10 +49,10 @@ int from_inetd = 1;
void
cleanup()
{
- (void) pmap_unset(RUSERSPROG, RUSERSVERS_3);
+ (void) pmap_unset(RUSERSPROG, RUSERSVERS_3); /* XXX signal races */
(void) pmap_unset(RUSERSPROG, RUSERSVERS_IDLE);
(void) pmap_unset(RUSERSPROG, RUSERSVERS_ORIG);
- exit(0);
+ _exit(0);
}
int
diff --git a/libexec/rpc.rwalld/rwalld.c b/libexec/rpc.rwalld/rwalld.c
index e0e65892e51..b23ffad5338 100644
--- a/libexec/rpc.rwalld/rwalld.c
+++ b/libexec/rpc.rwalld/rwalld.c
@@ -28,7 +28,7 @@
*/
#ifndef lint
-static char rcsid[] = "$Id: rwalld.c,v 1.2 1996/12/22 03:41:18 tholo Exp $";
+static char rcsid[] = "$Id: rwalld.c,v 1.3 2001/01/17 19:23:27 deraadt Exp $";
#endif /* not lint */
#include <unistd.h>
@@ -57,8 +57,8 @@ int from_inetd = 1;
void
cleanup()
{
- (void) pmap_unset(WALLPROG, WALLVERS);
- exit(0);
+ (void) pmap_unset(WALLPROG, WALLVERS); /* XXX signal race */
+ _exit(0);
}
main(argc, argv)
diff --git a/libexec/rpc.sprayd/sprayd.c b/libexec/rpc.sprayd/sprayd.c
index b5f8e98eb7b..9ed64b49831 100644
--- a/libexec/rpc.sprayd/sprayd.c
+++ b/libexec/rpc.sprayd/sprayd.c
@@ -27,11 +27,11 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: sprayd.c,v 1.1 1995/10/18 08:43:22 deraadt Exp $
+ * $Id: sprayd.c,v 1.2 2001/01/17 19:23:28 deraadt Exp $
*/
#ifndef lint
-static char rcsid[] = "$Id: sprayd.c,v 1.1 1995/10/18 08:43:22 deraadt Exp $";
+static char rcsid[] = "$Id: sprayd.c,v 1.2 2001/01/17 19:23:28 deraadt Exp $";
#endif /* not lint */
#include <stdio.h>
@@ -50,14 +50,14 @@ static int from_inetd = 1;
void
cleanup()
{
- (void) pmap_unset(SPRAYPROG, SPRAYVERS);
- exit(0);
+ (void) pmap_unset(SPRAYPROG, SPRAYVERS); /* XXX signal race */
+ _exit(0);
}
void
die()
{
- exit(0);
+ _exit(0);
}
int