diff options
author | Volker Lendecke <vlendec@samba.org> | 2004-03-29 11:40:43 +0000 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2004-03-29 11:40:43 +0000 |
commit | f6d86af4a2488aee1b8fdacc7228c18e12edde37 (patch) | |
tree | 258e49540d04c44b483c3b10a09da226d4dbba30 /source3 | |
parent | fb53eff3e1a2cbd917f22de26534f84adacd8ca8 (diff) | |
download | samba-f6d86af4a2488aee1b8fdacc7228c18e12edde37.tar.gz samba-f6d86af4a2488aee1b8fdacc7228c18e12edde37.tar.bz2 samba-f6d86af4a2488aee1b8fdacc7228c18e12edde37.zip |
Some fixes to expand_msdfs module.
Volker
(This used to be commit 558b5bc1d81d8ccd2048b37357e4b3e5b9b4e011)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/modules/vfs_expand_msdfs.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source3/modules/vfs_expand_msdfs.c b/source3/modules/vfs_expand_msdfs.c index 954f28a411..46a6616db9 100644 --- a/source3/modules/vfs_expand_msdfs.c +++ b/source3/modules/vfs_expand_msdfs.c @@ -53,7 +53,13 @@ static BOOL read_target_host(const char *mapfile, pstring targethost) DEBUG(10, ("Scanning mapfile [%s]\n", mapfile)); - while ((s=fgets_slash(buf, sizeof(buf), f)) != NULL) { + while ((s=x_fgets(buf, sizeof(buf), f)) != NULL) { + + if (buf[strlen(buf)-1] == '\n') + buf[strlen(buf)-1] = '\0'; + + DEBUG(10, ("Scanning line [%s]\n", buf)); + space = strchr_m(buf, ' '); if (space == NULL) { @@ -158,7 +164,8 @@ static int expand_msdfs_readlink(struct vfs_handle_struct *handle, target[result] = '\0'; - if (strchr_m(target, '@') != NULL) { + if ((strncmp(target, "msdfs:", strlen("msdfs:")) == 0) && + (strchr_m(target, '@') != NULL)) { if (!expand_msdfs_target(conn, target)) { errno = ENOENT; return -1; |