Quote Originally Posted by jabka View Post
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.