From f6d86af4a2488aee1b8fdacc7228c18e12edde37 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 29 Mar 2004 11:40:43 +0000 Subject: Some fixes to expand_msdfs module. Volker (This used to be commit 558b5bc1d81d8ccd2048b37357e4b3e5b9b4e011) --- source3/modules/vfs_expand_msdfs.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'source3') 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; -- cgit