iopsys-feed/samba3/files
Alex Oprea 6a713b2933 samba: increase path security, no share outside /mnt
If the path is still outside /mnt/ after all the previous checks and
	enforces have been applied, overwrite the path to "/mnt/".

	This is usefull in the following scenario:
	- "/mnt/tmp" is a soft link to "/tmp"
	- $path is pushed from the web gui as "/"
	- $dirpath is pushed from the web gui as "tmp"
	The init script prepends "/mnt/", the $path becomes "/mnt/tmp".
	Further, the smb.conf would receive "path = /mnt/tmp" and
	samba would export for share "/tmp".

	A while-loop (that always prepends "/mnt/" to $(readlink -f $path)
		if it does not start with "/mnt")
	would not prevent this case exactly because
	the soft link and the target directory have the same name,
	thus the loop would never end.
2016-08-08 10:27:07 +02:00
..
config-lfs.h samba3: add mising files 2016-06-08 14:27:35 +02:00
samba-nmbd.init samba3: add mising files 2016-06-08 14:27:35 +02:00
samba-smbd.init samba3: add mising files 2016-06-08 14:27:35 +02:00
samba.config samba3: add mising files 2016-06-08 14:27:35 +02:00
samba.init samba: increase path security, no share outside /mnt 2016-08-08 10:27:07 +02:00
smb.conf.template samba: restrict share paths to /mnt refs #9862 2016-08-04 14:30:24 +02:00