Index: trunk/include/samhain.h
===================================================================
--- trunk/include/samhain.h	(revision 25)
+++ trunk/include/samhain.h	(revision 27)
@@ -138,5 +138,8 @@
   SH_LEVEL_USER0       = 7,
   SH_LEVEL_USER1       = 8,
-  SH_LEVEL_PRELINK     = 9
+  SH_LEVEL_USER2       = 9,
+  SH_LEVEL_USER3       = 10,
+  SH_LEVEL_USER4       = 11,
+  SH_LEVEL_PRELINK     = 12
 };
 
Index: trunk/include/sh_error.h
===================================================================
--- trunk/include/sh_error.h	(revision 25)
+++ trunk/include/sh_error.h	(revision 27)
@@ -30,5 +30,5 @@
   SH_ERR_T_START  = 0,
 
-  /* 1-9 = SH_LEVEL_XXX */
+  /* 1-13 = SH_LEVEL_XXX */
 
   SH_ERR_T_RO      = SH_LEVEL_READONLY,
@@ -40,11 +40,14 @@
   SH_ERR_T_USER0   = SH_LEVEL_USER0,  
   SH_ERR_T_USER1   = SH_LEVEL_USER1,  
+  SH_ERR_T_USER2   = SH_LEVEL_USER2,  
+  SH_ERR_T_USER3   = SH_LEVEL_USER3,  
+  SH_ERR_T_USER4   = SH_LEVEL_USER4,  
   SH_ERR_T_PRELINK = SH_LEVEL_PRELINK,  
 
-  SH_ERR_T_DIR    = 10,
-  SH_ERR_T_FILE   = 11,
-  SH_ERR_T_NAME   = 12,
+  SH_ERR_T_DIR    = 13,
+  SH_ERR_T_FILE   = 14,
+  SH_ERR_T_NAME   = 15,
 
-  SH_ERR_T_END    = 13
+  SH_ERR_T_END    = 16
 };
 
Index: trunk/include/sh_files.h
===================================================================
--- trunk/include/sh_files.h	(revision 25)
+++ trunk/include/sh_files.h	(revision 27)
@@ -73,4 +73,16 @@
 int  sh_files_pushdir_user1 (const char * dirName);
 
+/* push a directory on the stack USER2
+ */
+int  sh_files_pushdir_user2 (const char * dirName);
+
+/* push a directory on the stack USER3
+ */
+int  sh_files_pushdir_user3 (const char * dirName);
+
+/* push a directory on the stack USER4
+ */
+int  sh_files_pushdir_user4 (const char * dirName);
+
 /* push a directory on the stack PRELINK
  */
@@ -109,4 +121,16 @@
  */
 int  sh_files_pushfile_user1 (const char * dirName);
+
+/* push a file on the stack USER2
+ */
+int  sh_files_pushfile_user2 (const char * dirName);
+
+/* push a file on the stack USER3
+ */
+int  sh_files_pushfile_user3 (const char * dirName);
+
+/* push a file on the stack USER4
+ */
+int  sh_files_pushfile_user4 (const char * dirName);
 
 /* push a file on the stack PRELINK
@@ -155,4 +179,7 @@
 int sh_files_redef_user0(const char * str);
 int sh_files_redef_user1(const char * str);
+int sh_files_redef_user2(const char * str);
+int sh_files_redef_user3(const char * str);
+int sh_files_redef_user4(const char * str);
 int sh_files_redef_prelink(const char * str);
 int sh_files_redef_readonly(const char * str);
Index: trunk/include/sh_forward.h
===================================================================
--- trunk/include/sh_forward.h	(revision 25)
+++ trunk/include/sh_forward.h	(revision 27)
@@ -41,4 +41,8 @@
  */
 int sh_forward_make_client (const char * str);
+
+/* set port to which we connect
+ */
+int sh_forward_server_port (const char * str);
 
 #ifdef SH_WITH_SERVER
@@ -91,9 +95,16 @@
 #endif
 
-#ifdef SH_WITH_CLIENT
+#if defined(SH_WITH_CLIENT) || defined(SH_WITH_SERVER)
 /* talk to server
  */
 long  sh_forward (char * errmsg);
 
+/* set log server
+ */
+int sh_forward_setlogserver (const char * address);
+void reset_count_dev_server(void);
+#endif
+
+#ifdef SH_WITH_CLIENT
 
 /* request file from server. file may be "CONF" or "DATA".
@@ -101,9 +112,4 @@
 long sh_forward_req_file (char * file);
 
-/* set log server
- */
-int sh_forward_setlogserver (const char * address);
-void reset_count_dev_server(void);
-
 #endif
 
Index: trunk/include/sh_tools.h
===================================================================
--- trunk/include/sh_tools.h	(revision 25)
+++ trunk/include/sh_tools.h	(revision 27)
@@ -53,5 +53,5 @@
 
 
-#if defined (SH_WITH_CLIENT)
+#if defined (SH_WITH_CLIENT) || defined(SH_WITH_SERVER)
 
 unsigned long write_port (int sockfd, char *buf, unsigned long nbytes, 
@@ -65,8 +65,9 @@
 		 unsigned long * length, char * u);
 
-
-SL_TICKET open_tmp (void);
-int close_tmp (SL_TICKET fd);
-int rewind_tmp (SL_TICKET fd);
+/*
+  SL_TICKET open_tmp (void);
+  int close_tmp (SL_TICKET fd);
+  int rewind_tmp (SL_TICKET fd);
+*/
 
 void sh_tools_server_cmd(const char * srvcmd);
@@ -78,4 +79,9 @@
 #endif
 
+#if defined(SH_WITH_CLIENT) || defined(SH_WITH_SERVER) || defined(SH_STEALTH) || defined(WITH_GPG) || defined(WITH_PGP)
+SL_TICKET open_tmp (void);
+int close_tmp (SL_TICKET fd);
+int rewind_tmp (SL_TICKET fd);
+#endif
 
 #endif
Index: trunk/include/sh_unix.h
===================================================================
--- trunk/include/sh_unix.h	(revision 25)
+++ trunk/include/sh_unix.h	(revision 27)
@@ -99,4 +99,7 @@
 extern  unsigned long mask_USER0;
 extern  unsigned long mask_USER1;
+extern  unsigned long mask_USER2;
+extern  unsigned long mask_USER3;
+extern  unsigned long mask_USER4;
 /* like READONLY, but without MTM,CTM,SIZ,INO, abd with PREL)
  */
