chiark / gitweb /
Internal code review complete.
[userv.git] / daemon.h
index 7b06bf7b77a6e6f3cc1c8a609059c7c433352623..710d854a173f5aa87c5be21bffa836ede22295ee 100644 (file)
--- a/daemon.h
+++ b/daemon.h
@@ -65,8 +65,8 @@
 #define EMPTYINCLUDELOOKUP          ":empty"
 
 #define USERCONFIGDIRBASE           SYSTEMUSERVCONFIGDIR
-#define USERCONFIGDIR               HIDDENPREFIX USERCONFIGDIRBASE
-#define USERUSERVCONFIGPATH         USERDIR "/" USERCONFIGDIR
+#define USERCONFIGDIR               "." USERCONFIGDIRBASE
+#define USERUSERVCONFIGPATH         "~/" USERCONFIGDIR
 #define USERRCFILEPATH              USERUSERVCONFIGPATH "/" USERRCFILE
 #define SYSTEMUSERVCONFIGPATH       SYSTEMCONFIGDIR "/" SYSTEMUSERVCONFIGDIR
 #define SYSTEMRCFILEDEFAULTPATH     SYSTEMUSERVCONFIGPATH "/" SYSTEMRCFILEDEFAULT
@@ -74,9 +74,6 @@
 #define SHELLLISTPATH               SYSTEMCONFIGDIR "/" SHELLLIST
 #define SETENVIRONMENTPATH          SYSTEMCONFIGDIR "/" SETENVIRONMENT
 
-#define USERDIR                     "~"
-#define HIDDENPREFIX                "."
-
 #define USERVD_LOGIDENT "uservd"
 #define USERVD_LOGFACILITY LOG_DAEMON
 #define DEFUSERLOGFACILITY LOG_DAEMON
 "
 
 #define MAX_INCLUDE_NEST 40
-#define MAX_ERRMSG_LEN 2048
+#define MAX_ERRMSG_LEN (MAX_ERRMSG_STRING-1024)
 #define ERRMSG_RESERVE_ERRNO 128
 
 int parse_string(const char *string, const char *descrip, int isinternal);
@@ -138,12 +135,12 @@ int synchread(int fd, int ch);
 const char *defaultpath(void);
 
 struct fdstate {
-  int iswrite, realfd, holdfd;
+  int iswrite; /* 0 or 1; -1 if not open */
+  int realfd, holdfd; /* -1 if not open */
   int wantstate;
   /* tokv_word_requirefd, tokv_word_allowfd, tokv_nullfd, tokv_word_rejectfd
    * (all of which have tokt_wantfdstate set) */
-  int wantrw;
-  /* tokv_word_read, tokv_word_write */
+  int wantrw; /* tokv_word_read, tokv_word_write, 0 for either/both */
 };
 
 struct keyvaluepair { char *key, *value; };