On Thu, Jan 08, 2009 at 11:15:55AM -0500, Timo Sirainen wrote: > On Thu, 2009-01-08 at 11:00 -0500, Dean Brooks wrote: > > On Wed, Jan 07, 2009 at 03:45:28PM -0500, Timo Sirainen wrote: > > > http://dovecot.org/releases/1.1/dovecot-1.1.8.tar.gz > > > http://dovecot.org/releases/1.1/dovecot-1.1.8.tar.gz.sig > > > > > > Most importantly mbox bugfixes. v1.1 should finally be as stable with > > > mboxes as it was with v1.0. Hopefully we'll also soon have the first > > > v1.2 beta release and the final v1.2.0 somewhat soon after that. > > > > Compiling Dovecot 1.1.8 under Solaris 8 using gcc 3.4.6 gives a final > > link error on dovecot-auth. Apparantely, unsetenv() isn't a > > universally available function? > > I'm not really sure how this could be handled best. I guess it would be > possible to implement our own environ variable handling but that would > be pretty ugly.. Or perhaps I could modify the deliver config parsing > code once again so that it wouldn't need to unset the environment.. With > the upcoming v1.3 none of this would be necessary..
I found similar code implementing unsetenv() in a perl module that seems to do the same thing. Completely untested, but example follows. void env_remove(const char *name) { int name_len; extern char **environ; char **envp; name_len = strlen(name); for (envp = environ; *envp != NULL; envp++) { if (strncmp(name, *envp, name_len) == 0 && (*envp)[name_len] == '=') { free(*envp); do { envp[0] = envp[1]; } while (*envp++); break; } } } -- Dean Brooks d...@iglou.com