Index: trunk/src/sh_calls.c
===================================================================
--- trunk/src/sh_calls.c	(revision 22)
+++ trunk/src/sh_calls.c	(revision 132)
@@ -115,4 +115,5 @@
   int error;
   long int val_retry = -1;
+  char errbuf[SH_ERRBUF_SIZE];
   errno              = 0;
 
@@ -126,5 +127,5 @@
   if (val_retry < 0) {
       sh_error_handle ((-1), file, line, error, MSG_ERR_SIGACT, 
-		       sh_error_message(error),
+		       sh_error_message(error, errbuf, sizeof(errbuf)),
 		       (long) signum );
   }
@@ -161,4 +162,5 @@
   long int val_retry = 0;
   static struct sockaddr_in new_addr;
+  char errbuf[SH_ERRBUF_SIZE];
 
   SL_ENTER(_("retry_connect"));
@@ -189,5 +191,5 @@
      */
     sh_error_handle ((-1), file, line, error, MSG_ERR_CONNECT, 
-		     sh_error_message(error),
+		     sh_error_message(error, errbuf, sizeof(errbuf)),
 		     (long) sockfd,
 		     /*@-unrecog -type@*/
@@ -212,4 +214,6 @@
   int  error;
   long int val_retry = -1;
+  char errbuf[SH_ERRBUF_SIZE];
+
   ACCEPT_TYPE_ARG3 my_addrlen = (ACCEPT_TYPE_ARG3) *addrlen;
 
@@ -225,5 +229,5 @@
   if (val_retry < 0) {
       sh_error_handle ((-1), file, line, error, MSG_ERR_ACCEPT, 
-		       sh_error_message(error),
+		       sh_error_message(error, errbuf, sizeof(errbuf)),
 		       (long) fd );
   }
@@ -237,4 +241,5 @@
   int error;
   long int val_retry = -1;
+  char errbuf[SH_ERRBUF_SIZE];
  
   SL_ENTER(_("retry_lstat"));
@@ -245,7 +250,7 @@
   error = errno;
   if (val_retry < 0) {
-      (void) sl_strlcpy(aud_err_message, sh_error_message(error), 64);
+      (void) sl_strlcpy(aud_err_message, sh_error_message(error, errbuf, sizeof(errbuf)), 64);
       sh_error_handle ((-1), file, line, error, MSG_ERR_LSTAT, 
-		       sh_error_message(error),
+		       sh_error_message(error, errbuf, sizeof(errbuf)),
 		       file_name );
   }
@@ -259,4 +264,5 @@
   int error;
   long int val_retry = -1;
+  char errbuf[SH_ERRBUF_SIZE];
  
   SL_ENTER(_("retry_stat"));
@@ -267,7 +273,7 @@
   error = errno;
   if (val_retry < 0) {
-      (void) sl_strlcpy(aud_err_message, sh_error_message(error), 64);
+      (void) sl_strlcpy(aud_err_message, sh_error_message(error, errbuf, sizeof(errbuf)), 64);
       sh_error_handle ((-1), file, line, error, MSG_ERR_STAT, 
-		       sh_error_message(error),
+		       sh_error_message(error, errbuf, sizeof(errbuf)),
 		       file_name );
   }
@@ -280,4 +286,5 @@
   int error;
   long int val_retry = -1;
+  char errbuf[SH_ERRBUF_SIZE];
  
   SL_ENTER(_("retry_fstat"));
@@ -289,5 +296,5 @@
   if (val_retry < 0) {
       sh_error_handle ((-1), file, line, error, MSG_ERR_FSTAT, 
-		       sh_error_message(error),
+		       sh_error_message(error, errbuf, sizeof(errbuf)),
 		       (long) filed );
   }
@@ -300,4 +307,5 @@
   int error;
   long int val_retry = -1;
+  char errbuf[SH_ERRBUF_SIZE];
   errno              = 0;
 
@@ -319,5 +327,5 @@
   if (val_retry < 0) {
       sh_error_handle ((-1), file, line, error, MSG_ERR_FCNTL, 
-		       sh_error_message(error),
+		       sh_error_message(error, errbuf, sizeof(errbuf)),
 		       (long) fd, (long) cmd, arg );
   }
@@ -389,4 +397,5 @@
   int   i;
   int   error;
+  char errbuf[SH_ERRBUF_SIZE];
 
   SL_ENTER(_("retry_aud_execve"));
@@ -401,5 +410,6 @@
   error = errno;
   if (i < 0) {
-      sh_error_handle ((-1), file, line, error, MSG_ERR_EXEC, sh_error_message(error),
+      sh_error_handle ((-1), file, line, error, MSG_ERR_EXEC, 
+		       sh_error_message(error, errbuf, sizeof(errbuf)),
 		       dateiname, (long) a, (long) b );
   }
@@ -414,4 +424,5 @@
   long int val_return;
   int  error;
+  char errbuf[SH_ERRBUF_SIZE];
   errno      = 0;
 
@@ -430,5 +441,5 @@
   if (val_return < 0) {
       sh_error_handle ((-1), file, line, error, MSG_ERR_UTIME, 
-		       sh_error_message(error),
+		       sh_error_message(error, errbuf, sizeof(errbuf)),
 		       path, 
 		       (unsigned long) buf->actime, 
@@ -444,4 +455,5 @@
   long int val_return;
   int error;
+  char errbuf[SH_ERRBUF_SIZE];
   errno      = 0;
 
@@ -457,5 +469,6 @@
 		     path);
   if (val_return < 0) {
-      sh_error_handle ((-1), file, line, error, MSG_ERR_UNLINK, sh_error_message(error),
+      sh_error_handle ((-1), file, line, error, MSG_ERR_UNLINK, 
+		       sh_error_message(error, errbuf, sizeof(errbuf)),
 		       path);
   }
@@ -469,4 +482,5 @@
   long int val_return;
   int error;
+  char errbuf[SH_ERRBUF_SIZE];
   errno      = 0;
 
@@ -483,5 +497,5 @@
   if (val_return < 0) {
       sh_error_handle ((-1), file, line, error, MSG_ERR_DUP, 
-		       sh_error_message(error),
+		       sh_error_message(error, errbuf, sizeof(errbuf)),
 		       (long) fd, val_return);
   }
@@ -495,4 +509,5 @@
   long int val_return;
   int error;
+  char errbuf[SH_ERRBUF_SIZE];
   errno      = 0;
 
@@ -508,5 +523,5 @@
   if (val_return < 0) {
       sh_error_handle ((-1), file, line, error, MSG_ERR_DUP, 
-		       sh_error_message(error),
+		       sh_error_message(error, errbuf, sizeof(errbuf)),
 		       (long) fd, val_return);
   }
@@ -522,4 +537,5 @@
   long int val_return;
   int      error      = 0;
+  char errbuf[SH_ERRBUF_SIZE];
   errno      = 0;
 
@@ -535,5 +551,6 @@
 		     path);
   if (val_return < 0) {
-      sh_error_handle ((-1), file, line, error, MSG_ERR_CHDIR, sh_error_message(error),
+      sh_error_handle ((-1), file, line, error, MSG_ERR_CHDIR, 
+		       sh_error_message(error, errbuf, sizeof(errbuf)),
 		       path);
   }
@@ -549,4 +566,5 @@
   long int val_return;
   int error;
+  char errbuf[SH_ERRBUF_SIZE];
 
   SL_ENTER(_("aud_open"));
@@ -566,5 +584,5 @@
   if (val_return < 0)
     {
-      (void) sl_strlcpy(aud_err_message, sh_error_message(error), 64);
+      (void) sl_strlcpy(aud_err_message, sh_error_message(error, errbuf, sizeof(errbuf)), 64);
     }
 
@@ -576,5 +594,5 @@
   if (val_return < 0) {
     sh_error_handle ((-1), file, line, error, MSG_ERR_OPEN, 
-		     sh_error_message(error),
+		     sh_error_message(error, errbuf, sizeof(errbuf)),
 		     pathname, (long) flags, (long) mode, val_return);
   }
@@ -588,4 +606,5 @@
   long int val_return;
   int error;
+  char errbuf[SH_ERRBUF_SIZE];
 
   SL_ENTER(_("aud_open"));
@@ -599,5 +618,5 @@
   if (val_return < 0)
     {
-      (void) sl_strlcpy(aud_err_message, sh_error_message(error), 64);
+      (void) sl_strlcpy(aud_err_message, sh_error_message(error, errbuf, sizeof(errbuf)), 64);
     }
 
@@ -609,5 +628,5 @@
   if (val_return < 0) {
     sh_error_handle ((-1), file, line, error, MSG_ERR_OPEN, 
-		     sh_error_message(error),
+		     sh_error_message(error, errbuf, sizeof(errbuf)),
 		     pathname, (long) flags, (long) mode, val_return);
   }
@@ -620,4 +639,5 @@
   int  myerror;
   long int val_return = kill (pid, sig);
+  char errbuf[SH_ERRBUF_SIZE];
   myerror = errno;
 
@@ -629,5 +649,5 @@
   if (val_return < 0) {
       sh_error_handle ((-1), file, line, myerror, MSG_ERR_KILL, 
-		       sh_error_message(myerror),
+		       sh_error_message(myerror, errbuf, sizeof(errbuf)),
 		       (long) pid, (long) sig);
   }
@@ -666,4 +686,5 @@
   int error;
   pid_t i = fork();
+  char errbuf[SH_ERRBUF_SIZE];
 
   error = errno;
@@ -675,5 +696,5 @@
   if (i == (pid_t) -1) {
     sh_error_handle ((-1), file, line, error, MSG_ERR_FORK, 
-		     sh_error_message(error),
+		     sh_error_message(error, errbuf, sizeof(errbuf)),
 		     (long) i);
   }
@@ -686,4 +707,5 @@
   int error = 0;
   int i = 0;
+  char errbuf[SH_ERRBUF_SIZE];
 
   SL_ENTER(_("aud_setuid"));
@@ -702,5 +724,5 @@
   if (i < 0) {
     sh_error_handle ((-1), file, line, error, MSG_ERR_SETUID, 
-		     sh_error_message(error),
+		     sh_error_message(error, errbuf, sizeof(errbuf)),
 		     (long) uid);
   }
@@ -713,4 +735,5 @@
   int error = 0;
   int i = 0;
+  char errbuf[SH_ERRBUF_SIZE];
 
   SL_ENTER(_("aud_setgid"));
@@ -730,5 +753,5 @@
   if (i < 0) {
     sh_error_handle ((-1), file, line, error, MSG_ERR_SETGID, 
-		     sh_error_message(error),
+		     sh_error_message(error, errbuf, sizeof(errbuf)),
 		     (long) gid);
   }
@@ -741,4 +764,5 @@
   int error;
   int i = pipe (modus);
+  char errbuf[SH_ERRBUF_SIZE];
 
   SL_ENTER(_("aud_pipe"));
@@ -761,5 +785,5 @@
     else
       sh_error_handle ((-1), file, line, error, MSG_ERR_PIPE, 
-		       sh_error_message(error),
+		       sh_error_message(error, errbuf, sizeof(errbuf)),
 		       (long) modus[0], (long) modus[1]);
   }
