git.samba.org
/
jra
/
samba
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0f1c800
)
Ran DFS on Linux and found that readlink() on Linux does not append NUL
author
Shirish Kalele
<kalele@samba.org>
Tue, 28 Nov 2000 00:26:42 +0000
(
00:26
+0000)
committer
Shirish Kalele
<kalele@samba.org>
Tue, 28 Nov 2000 00:26:42 +0000
(
00:26
+0000)
to the link read. So add a NUL..
(This used to be commit
04ebcf954c7568fc16ff4a75b31715d6b0a34aa4
)
source3/msdfs/msdfs.c
patch
|
blob
|
history
diff --git
a/source3/msdfs/msdfs.c
b/source3/msdfs/msdfs.c
index 999ffa78b73725e4e06fb7f3b593bbfea17dc8a3..d525edab3cfc874f367ecf63dac5b64719b2275b 100644
(file)
--- a/
source3/msdfs/msdfs.c
+++ b/
source3/msdfs/msdfs.c
@@
-262,7
+262,9
@@
BOOL get_referred_path(struct junction_map* junction)
if(S_ISLNK(st.st_mode))
{
/* 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));
if(parse_symlink(buf, &junction->referral_list,
&junction->referral_count))