i use this solution since i use the passwd->pw_dir and copy it to the begning of CONFDIR.
but the size of CONFDIR is bigger then passwd->pw_dir .
Sorry, that comment was referring to your original method where you are first mallocing one string, then mallocing another chunk of memory for the longer string, and freeing the first string - I didn't realize the code had been changed in that respect.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.