On 2005-06-15, at 17:03, Tuc at T-B-O-H wrote:
Think this might be the fix for FreeBSD too?
Is there any FreeBSD problem that is not fixed with ftp://stunnel.mirt.net/stunnel/bsd.patch ?
Already compiled in.
They are also making changes in client.c :
--- src/client.c.orig Thu May 12 14:01:28 2005 +++ src/client.c Thu May 12 14:04:19 2005 @@ -841,6 +841,14 @@ sigemptyset(&newmask); sigprocmask(SIG_SETMASK, &newmask, NULL); #endif + if (c->opt->execargs != NULL && c->opt->execargs[0] == NULL) { + free(c->opt->execargs); + c->opt->execargs = NULL; + } + if (c->opt->execargs == NULL) { + c->opt->execargs = calloc(2, sizeof(c->opt->execargs[0])); + c->opt->execargs[0] = c->opt->execname; + } execvp(c->opt->execname, c->opt->execargs); ioerror(c->opt->execname); /* execv failed */ _exit(1);
and looks like a few in common.h :
--- src/common.h.orig Sat Apr 23 13:40:10 2005 +++ src/common.h Tue Jun 14 08:27:11 2005 @@ -38,17 +38,44 @@ #endif
/* threads model */ +#if defined(FORCE_THREADING_MODEL) + +#undef USE_UCONTEXT +#undef USE_PTHREAD +#undef USE_FORK + +#ifdef FORCE_UCONTEXT +#define USE_UCONTEXT +#else +#ifdef FORCE_PTHREAD +#define USE_PTHREAD +#else +#define USE_FORK +#endif /* FORCE_PTHREAD */ +#endif /* FORCE_UCONTEXT */ + +#else /* FORCE_THREADING_MODEL */ + #if HAVE_UCONTEXT_H && HAVE_GETCONTEXT && HAVE_POLL #define USE_UCONTEXT -#include <ucontext.h> #elif HAVE_PTHREAD_H && HAVE_LIBPTHREAD #define USE_PTHREAD +#else +#define USE_FORK +#endif + +#endif /* FORCE_THREADING_MODEL */ + +#ifdef USE_UCONTEXT +#include <sys/types.h> +#include <ucontext.h> +#endif + +#ifdef USE_PTHREAD #include <pthread.h> #define THREADS #define _REENTRANT #define _THREAD_SAFE -#else -#define USE_FORK #endif
/* TCP wrapper */
And something tiny in ssl.c :
--- src/ssl.c.orig Mon Dec 27 13:47:16 2004 +++ src/ssl.c Mon Dec 27 13:50:36 2004 @@ -116,6 +116,8 @@ static void init_engine(void) { ENGINE *e;
+ s_log(LOG_ERR, "This version of stunnel was compiled WITHOUT support for Op enSSL hardware engines! If you need this functionality, rebuild the FreeBSD por t with the WITH_STUNNEL_SSL_ENGINE option set to 'yes'; contact Peter Pentchev < roam@FreeBSD.org> for details."); + exit(1); ENGINE_load_builtin_engines(); if(!strcasecmp(options.engine, "auto")) { s_log(LOG_DEBUG, "Enabling auto engine support");
Thanks, Tuc