mirror of
https://github.com/samba-team/samba.git
synced 2025-09-16 01:44:21 +03:00
Ran DFS on Linux and found that readlink() on Linux does not append NUL
to the link read. So add a NUL..
This commit is contained in:
@@ -262,7 +262,9 @@ BOOL get_referred_path(struct junction_map* junction)
|
|||||||
if(S_ISLNK(st.st_mode))
|
if(S_ISLNK(st.st_mode))
|
||||||
{
|
{
|
||||||
/* open the link and read it to get the dfs referral */
|
/* open the link and read it to get the dfs referral */
|
||||||
readlink(path, buf, sizeof(buf));
|
int linkcnt = 0;
|
||||||
|
linkcnt = readlink(path, buf, sizeof(buf));
|
||||||
|
buf[linkcnt] = '\0';
|
||||||
DEBUG(5,("get_referred_path: Referral: %s\n",buf));
|
DEBUG(5,("get_referred_path: Referral: %s\n",buf));
|
||||||
if(parse_symlink(buf, &junction->referral_list,
|
if(parse_symlink(buf, &junction->referral_list,
|
||||||
&junction->referral_count))
|
&junction->referral_count))
|
||||||
|
Reference in New Issue
Block a user