]> git.sur5r.net Git - openldap/blobdiff - servers/slurpd/admin.c
Avoid sprintf buffer overrun if huge hostname
[openldap] / servers / slurpd / admin.c
index d3017932e12c19b190bba068ed031082b4ca3cc9..b34cce996f71d831283e6b5094da7410271fa550 100644 (file)
@@ -1,6 +1,18 @@
 /* $OpenLDAP$ */
-/*
- * Copyright (c) 1996 Regents of the University of Michigan.
+/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
+ *
+ * Copyright 1998-2006 The OpenLDAP Foundation.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.
+ *
+ * A copy of this license is available in file LICENSE in the
+ * top-level directory of the distribution or, alternatively, at
+ * <http://www.OpenLDAP.org/license.html>.
+ */
+/* Portions Copyright (c) 1996 Regents of the University of Michigan.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms are permitted
  * software without specific prior written permission. This software
  * is provided ``as is'' without express or implied warranty.
  */
+/* ACKNOWLEDGEMENTS:
+ * This work was originally developed by the University of Michigan
+ * (as part of U-MICH LDAP).
+ */
 
 /*
  * admin.c - routines for performing administrative tasks, e.g. on-the-fly
@@ -19,6 +35,7 @@
 #include "portable.h"
 
 #include <stdio.h>
+#include <ac/stdlib.h>
 
 #include <ac/signal.h>
 
@@ -40,5 +57,5 @@ RETSIGTYPE
 do_admin( int sig )
 {
     sglob->rq->rq_dump( sglob->rq );
-    (void) SIGNAL( sig, do_admin );
+    (void) SIGNAL_REINSTALL( sig, do_admin );
 }