# HG changeset patch # User Christophe Lincoln # Date 1307869705 -7200 # Node ID d9e1240da61a12ba1a639b57310fa0c9a48fc804 # Parent 8727a2a80b104013ecf5de005f41261f9abb2e2e Add info abour ssfs-sh in README and copy in when gen-vdisk diff -r 8727a2a80b10 -r d9e1240da61a README --- a/README Sun Jun 12 09:49:52 2011 +0200 +++ b/README Sun Jun 12 11:08:25 2011 +0200 @@ -86,6 +86,17 @@ wiki, etc. +Ssfs chroot SHell +----------------- +The tool ssfs-sh is used to chroot a user on login and set minimal environment +variables. For each users ssfs-sh is the default SHell on the server and is +executed inside the new root. So ssfs-sh must be installed on the server and +in the virtual disk minimal chroot. Using a custom tool such as Ssfs SHell +enforce security and let execute commands on login, ssfs-sh also export the +new user $HOME and change directory do it since chroot will drop us in / by +default. + + Get configs on boot ------------------- Ssfs can be used in a boot scripts to connect to a remote host and retrieve data diff -r 8727a2a80b10 -r d9e1240da61a ssfs-server --- a/ssfs-server Sun Jun 12 09:49:52 2011 +0200 +++ b/ssfs-server Sun Jun 12 11:08:25 2011 +0200 @@ -238,7 +238,6 @@ mkdir -p $d done && status cp -a /etc/slitaz-release $root/etc - #cp -a /etc/nsswitch.conf $root/etc echo "root:x:0:0:root:/root:/bin/sh" > etc/passwd echo "root::13525:0:99999:7:::" > etc/shadow echo "root:x:0:" > etc/group @@ -261,8 +260,8 @@ cp -a fs/usr/bin fs/usr/sbin $root/usr rm -rf fs && chmod 4755 $root/bin/busybox status - gettext "Creatin restrictive Busybox config file..." - echo '# /etc/busybox.conf: Ssfs Busybox configuration.' \ + gettext "Creating restrictive Busybox config file..." + echo '# Ssfs Busybox configuration.' \ > $root/etc/busybox.conf echo -e "\n[SUID]" >> $root/etc/busybox.conf echo -e "su = --- root.root" >> $root/etc/busybox.conf @@ -275,7 +274,13 @@ for l in ld-*.*so* libc-*.*so libc.so.* libnss_files* do cp -a /lib/$l* $root/lib - done && status + done && chmod 0644 $root/lib/* && status + + # Ssfs chroot SHell + gettext "Installing Ssfs SHell..." + install -m 0755 /bin/ssfs-sh $root/bin + status + size=$(du -sh $root | awk '{print $1}') separator gettext "Vdisk used space:"; echo -e " $size\n" ;;