xmalloc_follow_symlinks() -- fix ELOOP issue with absolute paths,

return full path in cases where path doesn't resolve to a link. 
change name to better differentiate from xmalloc_readlink().
This commit is contained in:
Paul Fox
2007-11-08 20:00:36 +00:00
parent abbd363261
commit 599bbfbd9b
3 changed files with 25 additions and 18 deletions

View File

@@ -52,7 +52,7 @@ int update_passwd(const char *filename, const char *username,
int cnt = 0;
int ret = -1; /* failure */
filename = xmalloc_readlink_follow(filename);
filename = xmalloc_follow_symlinks(filename);
if (filename == NULL)
return -1;