Index: trunk/src/sh_socket.c
===================================================================
--- trunk/src/sh_socket.c	(revision 118)
+++ trunk/src/sh_socket.c	(revision 132)
@@ -342,4 +342,5 @@
 #endif
   struct stat buf;
+  char errbuf[SH_ERRBUF_SIZE];
   
   SL_ENTER(_("sh_socket_open_int"));
@@ -364,5 +365,5 @@
     {
       sh_error_handle ((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN,
-		       sh_error_message (errno), 
+		       sh_error_message (errno, errbuf, sizeof(errbuf)), 
 		       _("sh_socket_open_int: socket"));
       SL_RETURN( (-1), _("sh_socket_open_int"));
@@ -405,5 +406,5 @@
       close(pf_unix_fd); pf_unix_fd = -1;
       sh_error_handle ((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN,
-		       sh_error_message (errno), 
+		       sh_error_message (errno, errbuf, sizeof(errbuf)), 
 		       _("sh_socket_open_int: bind"));
       SL_RETURN( (-1), _("sh_socket_open_int"));
@@ -416,5 +417,5 @@
       close(pf_unix_fd); pf_unix_fd = -1;
       sh_error_handle ((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN,
-		       sh_error_message (errno), 
+		       sh_error_message (errno, errbuf, sizeof(errbuf)), 
 		       _("sh_socket_open_int: setsockopt"));
       SL_RETURN( (-1), _("sh_socket_open_int"));
@@ -427,5 +428,5 @@
       close(pf_unix_fd); pf_unix_fd = -1;
       sh_error_handle ((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN,
-		       sh_error_message (errno), 
+		       sh_error_message (errno, errbuf, sizeof(errbuf)), 
 		       _("sh_socket_open_int: fcntl1"));
       SL_RETURN( (-1), _("sh_socket_open_int"));
@@ -437,5 +438,5 @@
       close(pf_unix_fd); pf_unix_fd = -1;
       sh_error_handle((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN,
-		      sh_error_message (errno), 
+		      sh_error_message (errno, errbuf, sizeof(errbuf)), 
 		      _("sh_socket_open_int: fcntl2"));
       SL_RETURN( (-1), _("sh_socket_open_int"));
@@ -446,5 +447,5 @@
       close(pf_unix_fd); pf_unix_fd = -1;
       sh_error_handle ((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN,
-		       sh_error_message (errno), 
+		       sh_error_message (errno, errbuf, sizeof(errbuf)), 
 		       _("sh_socket_open_int: listen"));
       SL_RETURN( (-1), _("sh_socket_open_int"));
@@ -509,4 +510,5 @@
 
   int  client_uid = -1;
+  char errbuf[SH_ERRBUF_SIZE];
 
 
@@ -588,5 +590,5 @@
     {
       sh_error_handle((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN,
-		      sh_error_message (errno), 
+		      sh_error_message (errno, errbuf, sizeof(errbuf)), 
 		      _("sh_socket_read: accept"));
       return -1;
@@ -602,5 +604,5 @@
       {
 	sh_error_handle((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN,
-			sh_error_message (errno), 
+			sh_error_message (errno, errbuf, sizeof(errbuf)), 
 			_("sh_socket_read: setsockopt"));
 	close(talkfd);
@@ -615,5 +617,5 @@
       {
 	sh_error_handle((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN,
-			sh_error_message (errno),
+			sh_error_message (errno, errbuf, sizeof(errbuf)),
 			_("sh_socket_read: recvmsg"));
 	close(talkfd);	
@@ -644,5 +646,5 @@
 	}
       sh_error_handle((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN,
-		      sh_error_message (errno), 
+		      sh_error_message (errno, errbuf, sizeof(errbuf)), 
 		      _("sh_socket_read: recvfrom"));
       close(talkfd);
@@ -654,5 +656,5 @@
     {
       sh_error_handle((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN,
-		      sh_error_message (errno), 
+		      sh_error_message (errno, errbuf, sizeof(errbuf)), 
 		      _("sh_socket_read: getpeereid"));
       close(talkfd);
@@ -665,5 +667,5 @@
     {
       sh_error_handle((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN,
-		      sh_error_message (errno), 
+		      sh_error_message (errno, errbuf, sizeof(errbuf)), 
 		      _("sh_socket_read: getsockopt"));
       close(talkfd);
@@ -843,5 +845,5 @@
     {
       sh_error_handle((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN,
-		      sh_error_message (errno), 
+		      sh_error_message (errno, errbuf, sizeof(errbuf)), 
 		      _("sh_socket_read: send"));
       return -1;
@@ -876,5 +878,5 @@
 	    {
 	      sh_error_handle((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN,
-			      sh_error_message (errno), 
+			      sh_error_message (errno, errbuf, sizeof(errbuf)), 
 			      _("sh_socket_read: sendto"));
 	      close(talkfd);
@@ -907,5 +909,5 @@
 	{
 	  sh_error_handle((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN,
-			  sh_error_message (errno), 
+			  sh_error_message (errno, errbuf, sizeof(errbuf)), 
 			  _("sh_socket_read: sendto"));
 	  close(talkfd);
@@ -933,5 +935,5 @@
   sl_strlcpy (new->cmd, in->cmd, sizeof(new->cmd));
   sl_strlcpy (new->clt, in->clt, sizeof(new->clt));
-  sl_strlcpy (new->cti, sh_unix_time(0), sizeof(new->cti));
+  (void) sh_unix_time(0, new->cti, sizeof(new->cti));
   new->next = cmdlist;
   cmdlist   = new;
@@ -951,5 +953,5 @@
 	  sl_strlcpy (new->cmd, in->cmd, sizeof(new->cmd));
 	  sl_strlcpy (new->clt, in->clt, sizeof(new->clt));
-	  sl_strlcpy (new->cti, sh_unix_time(0), sizeof(new->cti));
+	  (void) sh_unix_time(0, new->cti, sizeof(new->cti));
 	  return;
 	}
@@ -960,5 +962,5 @@
   sl_strlcpy (new->cmd, in->cmd, sizeof(new->cmd));
   sl_strlcpy (new->clt, in->clt, sizeof(new->clt));
-  sl_strlcpy (new->cti, sh_unix_time(0), sizeof(new->cti));
+  (void) sh_unix_time(0, new->cti, sizeof(new->cti));
   new->next = runlist;
   runlist   = new;
