# Sharing a mounted XP directory?



## Ruler2112 (May 21, 2014)

A server running XP has a network share to install a specific piece of software off of. The share needs to be mapped to a drive letter on the client PC when the software is started. XP has a built-in hard-coded limit of 5 client machines total connected to shared drives as an incentive for people to pay more money and get a 'server' OS. (Any server I put in runs *nix, but some require Windows.)

I am trying to get around this limitation by using a FreeBSD server. I can mount the XP shared drive using the `mount_smbfs` command. I see the files and all is well. It's an easy enough job to share the directory with Samba, right? Nope. Every time I try to access the mounted shared drive from another Windows-based PC, it tells me "access denied" and the following is added to the Samba logs:


```
[2014/05/21 14:10:03,  1] smbd/vfs.c:932(check_reduced_name)
  reduce_name: couldn't get realpath for *
```

The only thing I've been able to find online is reference to a bug where this is added to the log at too low of a debug level, nothing on how to actually fix the problem.

I've changed the Samba share to a different directory and confirmed that everything is right otherwise, but when I change it back to the mounted directory, it fails. I tried creating a symbolic link in the shared directory to the mounted one, but that didn't work either.

Does anyone know what I'm missing or something else I could try?


----------



## kpa (May 22, 2014)

I've had many bad experiences with the built in mount_smbfs(8) command, it just doesn't work many times and causes kernel crashes. I would instead try the FUSE system that is integrated in the kernel of FreeBSD 10. I haven't used it myself but I think what you need is the sysutils/fusefs-smbnetfs port.


----------



## Ruler2112 (May 22, 2014)

Thanks for the tip, @kpa. I'm certainly willing to try using it, but installing FUSE on my 8.2 amd64 box isn't going so well.

While I got the sysutils/fusefs-smbnetfs port to install, it needs sysutils/fusefs-kmod and that one will not install. Won't even compile in fact. I tried it with the port version that was on the system (old) and the latest from ~3 months ago with the same result. Googling for the error produces one page on Pastebin with the same exact output, but there's no solution and searching for the Pastebin URL didn't turn up anything.

Any ideas?


```
===>  Found saved configuration for fusefs-kmod-0.3.9.p1.20080208_11
===>  Extracting for fusefs-kmod-0.3.9.p1.20080208_11
=> SHA256 Checksum OK for fuse4bsd/498acaef33b0.tar.gz.
===>  Patching for fusefs-kmod-0.3.9.p1.20080208_11
===>  Applying FreeBSD patches for fusefs-kmod-0.3.9.p1.20080208_11
===>   fusefs-kmod-0.3.9.p1.20080208_11 depends on package: fusefs-libs>2.4.1 - found
===>  Configuring for fusefs-kmod-0.3.9.p1.20080208_11
===>  Building for fusefs-kmod-0.3.9.p1.20080208_11
===> fuse_module (all)
Warning: Object directory not changed from original /usr/ports/sysutils/fusefs-kmod/work/fuse4bsd-498acaef33b0/fuse_module
@ -> /usr/src/sys
machine -> /usr/src/sys/amd64/include
awk -f @/tools/vnode_if.awk @/kern/vnode_if.src -p
awk -f @/tools/vnode_if.awk @/kern/vnode_if.src -q
awk -f @/tools/vnode_if.awk @/kern/vnode_if.src -h
cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I../include -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common  -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -c fuse_main.c
cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I../include -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common  -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -c fuse_msg.c
cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I../include -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common  -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -c fuse_dev.c
cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I../include -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common  -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -c fuse_vfsops.c
cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I../include -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common  -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -c fuse_vnops.c
fuse_vnops.c: In function 'create_filehandle':
fuse_vnops.c:1574: error: dereferencing pointer to incomplete type
fuse_vnops.c:1585: error: dereferencing pointer to incomplete type
fuse_vnops.c:1586: error: dereferencing pointer to incomplete type
fuse_vnops.c:1588: error: dereferencing pointer to incomplete type
fuse_vnops.c:1590: error: dereferencing pointer to incomplete type
*** Error code 1

Stop in /usr/ports/sysutils/fusefs-kmod/work/fuse4bsd-498acaef33b0/fuse_module.
*** Error code 1

Stop in /usr/ports/sysutils/fusefs-kmod/work/fuse4bsd-498acaef33b0.
*** Error code 1

Stop in /usr/ports/sysutils/fusefs-kmod.
*** Error code 1

Stop in /usr/ports/sysutils/fusefs-kmod.
```


----------



## SirDice (May 23, 2014)

Support for FreeBSD 8.2 ended in July 2012 so it's not surprising some ports do not work any more, especially kernel modules. Please upgrade to at least 8.4.

http://www.freebsd.org/security/unsupported.html


----------

