diff --git a/ChangeLog b/ChangeLog index e09d4b8..e4b1f79 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,5 @@ + Allow filenames with spaces inside + check for fork() and setsid() in configure.ac Version 2.8.1b16 -- 8 Nov 2003 This version fixes 2 major bugs in beta 15 release. fspd: update mtime for directory listing after .FSP_CONTENT write diff --git a/TODO b/TODO index 7c69c8f..ef96dc9 100644 --- a/TODO +++ b/TODO @@ -36,7 +36,7 @@ remove stale lock files if not needed, port code from fspclient. FSP_TIMEOUT should be total number of seconds, not delay between retrys. :low: fver and others add support new syntax fsp://host:port/file -add sem locking method +add sem locking method, possible? flscmd does stat before directory listing, why? :better to write a new code instead fixing old crap =convert to multi threaded= diff --git a/configure.ac b/configure.ac index 9881be5..1e83d4c 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a working configure script. dnl tested with autoconf 2.57 -AC_INIT(fsp,2.8.1b16,hsn@cybermail.net) +AC_INIT(fsp,2.8.1b16+cvs,hsn@cybermail.net) AC_CONFIG_SRCDIR(server/main.c) AM_INIT_AUTOMAKE([dist-bzip2]) AM_MAINTAINER_MODE @@ -108,7 +108,7 @@ AC_CHECK_TYPE(nlink_t, ,AC_DEFINE(nlink_t, int,[declare nlink_t as int if not fo AC_CHECK_TYPE(rlim_t, ,AC_DEFINE(rlim_t, [unsigned int],[declare rlim_t as unsigned int if not found in ]),[#include ]) AC_TYPE_SIGNAL AC_FUNC_CLOSEDIR_VOID -AC_CHECK_FUNCS(random strdup bcopy flock lockf getrlimit) +AC_CHECK_FUNCS(random strdup bcopy flock lockf getrlimit fork setsid) AC_CACHE_CHECK(for working shmget ,fsp_cv_func_shmget, [LOCKPATH="conftestlock" AC_TRY_RUN([ @@ -188,6 +188,7 @@ main() { signal(SIGUSR1,sig_handler); test=0; kill(getpid(),SIGUSR1); + sleep(1); if(test==0) { printf("Signals ARE BROKEN!\n");kill(0,SIGQUIT);} test=0; kill(getpid(),SIGUSR1); diff --git a/fspd.conf b/fspd.conf index 4c752f0..63877a2 100644 --- a/fspd.conf +++ b/fspd.conf @@ -115,7 +115,7 @@ logfile ../logs/logfile # as well as any errors that occur on ONLY those commands. # If no log command is given, logging will be turned of (same as 'log none') # -log all +log all !readonly # The 'thruput' command is used to specify the maximum average # number of bytes per second that the server will transmit. Use diff --git a/server/file.c b/server/file.c index 9f7f6ee..05cefb9 100644 --- a/server/file.c +++ b/server/file.c @@ -270,7 +270,7 @@ static const char *parse_path PROTO3(char *, fullp, unsigned int, len, PPATH *, *s = '\0'; if(dbug) fprintf(stderr,"parse_path: found password field %s\n", s+1); } - else if(*s <= ' ' || *s >= '~') return("Path contains illegal chars"); + else if(*s < ' ' || *s >= '~') return("Path contains illegal chars"); switch(*s) { case '\\': diff --git a/server/main.c b/server/main.c index 4ea6877..e428215 100644 --- a/server/main.c +++ b/server/main.c @@ -246,9 +246,13 @@ int main PROTO2(int, argc, char **, argv) /* Added Alban E J Fellows 12 Jan 93 */ /* Moved by JT Traub to only do this if not running under inetd. */ if(daemonize) { +#if HAVE_FORK if (fork() > 0) _exit(0); +#endif +#if HAVE_SETSID setsid(); +#endif } }