ssfs rev 31
Add info abour ssfs-sh in README and copy in when gen-vdisk
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sun Jun 12 11:08:25 2011 +0200 (2011-06-12) |
parents | 8727a2a80b10 |
children | bb7a9ec53298 |
files | README ssfs-server |
line diff
1.1 --- a/README Sun Jun 12 09:49:52 2011 +0200 1.2 +++ b/README Sun Jun 12 11:08:25 2011 +0200 1.3 @@ -86,6 +86,17 @@ 1.4 wiki, etc. 1.5 1.6 1.7 +Ssfs chroot SHell 1.8 +----------------- 1.9 +The tool ssfs-sh is used to chroot a user on login and set minimal environment 1.10 +variables. For each users ssfs-sh is the default SHell on the server and is 1.11 +executed inside the new root. So ssfs-sh must be installed on the server and 1.12 +in the virtual disk minimal chroot. Using a custom tool such as Ssfs SHell 1.13 +enforce security and let execute commands on login, ssfs-sh also export the 1.14 +new user $HOME and change directory do it since chroot will drop us in / by 1.15 +default. 1.16 + 1.17 + 1.18 Get configs on boot 1.19 ------------------- 1.20 Ssfs can be used in a boot scripts to connect to a remote host and retrieve data
2.1 --- a/ssfs-server Sun Jun 12 09:49:52 2011 +0200 2.2 +++ b/ssfs-server Sun Jun 12 11:08:25 2011 +0200 2.3 @@ -238,7 +238,6 @@ 2.4 mkdir -p $d 2.5 done && status 2.6 cp -a /etc/slitaz-release $root/etc 2.7 - #cp -a /etc/nsswitch.conf $root/etc 2.8 echo "root:x:0:0:root:/root:/bin/sh" > etc/passwd 2.9 echo "root::13525:0:99999:7:::" > etc/shadow 2.10 echo "root:x:0:" > etc/group 2.11 @@ -261,8 +260,8 @@ 2.12 cp -a fs/usr/bin fs/usr/sbin $root/usr 2.13 rm -rf fs && chmod 4755 $root/bin/busybox 2.14 status 2.15 - gettext "Creatin restrictive Busybox config file..." 2.16 - echo '# /etc/busybox.conf: Ssfs Busybox configuration.' \ 2.17 + gettext "Creating restrictive Busybox config file..." 2.18 + echo '# Ssfs Busybox configuration.' \ 2.19 > $root/etc/busybox.conf 2.20 echo -e "\n[SUID]" >> $root/etc/busybox.conf 2.21 echo -e "su = --- root.root" >> $root/etc/busybox.conf 2.22 @@ -275,7 +274,13 @@ 2.23 for l in ld-*.*so* libc-*.*so libc.so.* libnss_files* 2.24 do 2.25 cp -a /lib/$l* $root/lib 2.26 - done && status 2.27 + done && chmod 0644 $root/lib/* && status 2.28 + 2.29 + # Ssfs chroot SHell 2.30 + gettext "Installing Ssfs SHell..." 2.31 + install -m 0755 /bin/ssfs-sh $root/bin 2.32 + status 2.33 + 2.34 size=$(du -sh $root | awk '{print $1}') 2.35 separator 2.36 gettext "Vdisk used space:"; echo -e " $size\n" ;;