X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=userv.git;a=blobdiff_plain;f=daemon.h;h=710d854a173f5aa87c5be21bffa836ede22295ee;hp=7b06bf7b77a6e6f3cc1c8a609059c7c433352623;hb=c44b074953734e3b487946b974d44e51f4fd3859;hpb=464d71c37246e556de9ec05f7b97af834a5224ee diff --git a/daemon.h b/daemon.h index 7b06bf7..710d854 100644 --- 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 @@ -106,7 +103,7 @@ " #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; };