From: Matthias A. <mat...@gm...> - 2006-12-19 02:15:35
|
Jim Correia <jim...@po...> writes: > It looks like env.c:105 sets up the user global by making a copy > > user = xstrdup(pwp->pw_name); > > but env.c:111 does not make a copy when setting up the home global > > home = pwp->pw_dir; > > The memory pointed at by home later gets modified because fetchmail > calls getpwname at fetchmail.c:1214 (after setting up the globals. > > The man page for getpwnam says: > > The functions getpwent(), getpwnam(), and getpwuid(), leave their > results > in an internal static object and return a pointer to that object. > Subse- > quent calls to the same function will modify the same object. > > Patch attached. I've taken the patch, thank you! Unfortunately, the patch isn't part of -rc5, but will become part of 6.3.6. Best, -- Matthias Andree |