1.1 --- a/osecvm-config Thu Feb 27 17:14:59 2014 +0100
1.2 +++ b/osecvm-config Tue Nov 04 14:58:00 2014 +0100
1.3 @@ -7,9 +7,9 @@
1.4 Standards-Version: 3.9.2
1.5
1.6 Package: osecvm-config
1.7 -Version: 0.0.30
1.8 +Version: 0.0.42
1.9 Maintainer: ft <ft@x-net.at>
1.10 -Pre-Depends: samba,usbmount,python,python-fuse,python-requests,ntfs-3g,rsyslog,logrotate,osecfs,python-webpy,python-netifaces,osecvm-password-receiver,python-netifaces,python-netaddr,ipcalc,file,sudo,hibernate
1.11 +Pre-Depends: samba,usbmount,python,python-fuse,python-requests,ntfs-3g,rsyslog,logrotate,osecfs,python-webpy,python-netifaces,encryptionprovider,python-netifaces,python-netaddr,ipcalc,file,sudo,hibernate,chromium,update-notifier-common
1.12 # Depends: <comma-separated list of packages>
1.13 # Recommends: <comma-separated list of packages>
1.14 # Suggests: <comma-separated list of packages>
1.15 @@ -52,6 +52,12 @@
1.16 .
1.17 for f in $PKG_LIST
1.18 do
1.19 +
1.20 + if dpkg-divert --package ${PKG} --list | grep /etc/$f.distrib
1.21 + then
1.22 + rm /etc/$f
1.23 + dpkg-divert --remove --package ${PKG} --rename --divert /etc/$f.distrib /etc/$f
1.24 + fi
1.25 dpkg-divert --add --package ${PKG} --rename --divert /etc/$f.distrib /etc/$f
1.26 [ \! -e /etc/$f -o -L /etc/$f ] && ln -sf /etc/osecvm-configs/$f /etc/$f
1.27 done
2.1 Binary file osecvm-config_0.0.31_all.deb has changed
3.1 Binary file osecvm-config_0.0.32_all.deb has changed
4.1 Binary file osecvm-config_0.0.33_all.deb has changed
5.1 Binary file osecvm-config_0.0.34_all.deb has changed
6.1 Binary file osecvm-config_0.0.35_all.deb has changed
7.1 Binary file osecvm-config_0.0.36_all.deb has changed
8.1 Binary file osecvm-config_0.0.37_all.deb has changed
9.1 Binary file osecvm-config_0.0.38_all.deb has changed
10.1 Binary file osecvm-config_0.0.39_all.deb has changed
11.1 Binary file osecvm-config_0.0.40_all.deb has changed
12.1 Binary file osecvm-config_0.0.41_all.deb has changed
13.1 Binary file osecvm-config_0.0.42_all.deb has changed
14.1 --- a/samba/smb.conf Thu Feb 27 17:14:59 2014 +0100
14.2 +++ b/samba/smb.conf Tue Nov 04 14:58:00 2014 +0100
14.3 @@ -22,7 +22,7 @@
14.4
14.5 [USB]
14.6 comment = Zugriff auf USB Sticks
14.7 - path = /var/run/usbmount/
14.8 + path = /tmp/usbmount/
14.9 read only = no
14.10 browseable = yes
14.11 writeable = yes
15.1 --- a/usbmount/mount.d/00_create_model_symlink Thu Feb 27 17:14:59 2014 +0100
15.2 +++ b/usbmount/mount.d/00_create_model_symlink Tue Nov 04 14:58:00 2014 +0100
15.3 @@ -13,6 +13,23 @@
15.4 #
15.5 set -e
15.6
15.7 +log()
15.8 +{
15.9 + if [ $1 != debug ] || expr "$VERBOSE" : "[yY]" > /dev/null; then
15.10 + logger -p user.$1 -t "usbmount[$$]" -- "$2"
15.11 + fi
15.12 +}
15.13 +
15.14 +getRemoteIp ()
15.15 +{
15.16 + ip_address=$(ifconfig eth0 | grep "inet " | awk '{ print $2 }' | cut -d ":" -f 2)
15.17 + ip_netmask=$(ifconfig eth0 | grep "inet " | awk '{ print $4 }' | cut -d ":" -f 2)
15.18 + remote_ip=$(ipcalc $ip_address/$ip_netmask | grep HostMin | awk '{ print $2}')
15.19 +
15.20 + echo $remote_ip
15.21 +}
15.22 +
15.23 +
15.24 # Replace spaces with underscores, remove special characters in vendor
15.25 # and model name.
15.26 UM_VENDOR=`echo "$UM_VENDOR" | sed 's/ /_/g; s/[^0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ._-]//g'`
15.27 @@ -34,8 +51,37 @@
15.28 name="${name}_$partition"
15.29 fi
15.30
15.31 -mkdir -p "/var/run/usbmount/$name"
15.32 -osecfs /etc/osecfs/osecfs_usb.cfg /var/run/usbmount/$name ro
15.33 +set +e
15.34 +#if [ -f "/media/usb0/opensecurity.tc" ]
15.35 +#then
15.36 +# log info "Found Truecrypt file on Stick. Try to mount"
15.37 +# wget -q -T 3 -t 1 -O /dev/null http://$(getRemoteIp):8090/password?text=Please+enter+the+password
15.38 +# if [ "$?" != "0" ]
15.39 +# then
15.40 +# log err "ERROR: Connection to http://$(getRemoteIp):8090/password?text=Please+enter+the+password failed"
15.41 +# exit 1
15.42 +# fi
15.43 +#
15.44 +# log info "Password notification sended, wait for response"
15.45 +# mkdir -p "/media/encrypted"
15.46 +# /usr/bin/encryptionprovider.py -m eth0 58080 /media/usb0/opensecurity.tc /media/encrypted
15.47 +# if [ "$?" != "0" ]
15.48 +# then
15.49 +# log err "Stick removed. exit"
15.50 +# exit 1
15.51 +# fi
15.52 +# mkdir -p "/var/run/usbmount/encrypted"
15.53 +# /usr/bin/osecfs /etc/osecfs/osecfs_usb.cfg "/var/run/usbmount/encrypted" rw
15.54 +# log info "Encrypted stick mounted"
15.55 +#else
15.56 +# mkdir -p "/var/run/usbmount/$name"
15.57 + chattr -i "/tmp/usbmount"
15.58 + mkdir -p "/tmp/usbmount/$name"
15.59 + osecfs /etc/osecfs/osecfs_usb.cfg /tmp/usbmount/$name ro
15.60 + encryptionprovider.py -i eth0 58081 "$UM_DEVICE" /media/usb0 &
15.61 + chattr +i "/tmp/usbmount"
15.62 + #run_initlistener.sh $UM_DEVICE &
15.63 +#fi
15.64
15.65
15.66 exit 0
16.1 --- a/usbmount/umount.d/00_remove_model_symlink Thu Feb 27 17:14:59 2014 +0100
16.2 +++ b/usbmount/umount.d/00_remove_model_symlink Tue Nov 04 14:58:00 2014 +0100
16.3 @@ -11,9 +11,18 @@
16.4 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
16.5 # PARTICULAR PURPOSE.
16.6 #
16.7 -set -e
16.8 +#set -e
16.9
16.10 -umount "/var/run/usbmount/"*
16.11 -rmdir "/var/run/usbmount/"*
16.12 +#umount "/var/run/usbmount/"*
16.13 +#rmdir "/var/run/usbmount/"*
16.14 +
16.15 +chattr -i "/tmp/usbmount"
16.16 +umount "/tmp/usbmount/"*
16.17 +rmdir "/tmp/usbmount/"*
16.18 +
16.19 +#for tcfile in $(/usr/bin/encryptionprovider.py -g)
16.20 +#do
16.21 +# /usr/bin/encryptionprovider.py -u "$tcfile"
16.22 +#done
16.23
16.24 exit 0
17.1 --- a/usr/share/usbmount/async_usbmount Thu Feb 27 17:14:59 2014 +0100
17.2 +++ b/usr/share/usbmount/async_usbmount Tue Nov 04 14:58:00 2014 +0100
17.3 @@ -38,6 +38,14 @@
17.4 return 1
17.5 }
17.6
17.7 +getRemoteIp ()
17.8 +{
17.9 + ip_address=$(ifconfig eth0 | grep "inet " | awk '{ print $2 }' | cut -d ":" -f 2)
17.10 + ip_netmask=$(ifconfig eth0 | grep "inet " | awk '{ print $4 }' | cut -d ":" -f 2)
17.11 + remote_ip=$(ipcalc $ip_address/$ip_netmask | grep HostMin | awk '{ print $2}')
17.12 +
17.13 + echo $remote_ip
17.14 +}
17.15
17.16 ######################################################################
17.17 # Main program
17.18 @@ -72,6 +80,11 @@
17.19 log debug "creating /var/run/usbmount directory"
17.20 fi
17.21
17.22 +if [ ! -e /tmp/usbmount ]; then
17.23 + mkdir -p /tmp/usbmount
17.24 + log debug "creating /tmp/usbmount directory"
17.25 +fi
17.26 +
17.27 umask 022
17.28
17.29 if [ "$1" = add ]; then
17.30 @@ -94,24 +107,29 @@
17.31 then
17.32 log info "blkid -p $DEVNAME has retured with $BLKID_RESULT"
17.33 log info "Stick is maybe encrypted. Try decrypt"
17.34 - wget -q -T 3 -t 1 -O /dev/null http://192.168.56.1:8090/password?text=Please+send+me+the+password
17.35 + wget -q -T 3 -t 1 -O /dev/null http://$(getRemoteIp):8090/password?text=Please+enter+the+password
17.36 if [ "$?" != "0" ]
17.37 then
17.38 - log err "Connection to http://192.168.56.1:8090/password?text=Please+send+me+the+password failed"
17.39 + log err "Connection to \"http://$(getRemoteIp):8090/password?text=Please+enter+the+password\" failed"
17.40 exit 1
17.41 fi
17.42 log info "Password notification sended, wait for response"
17.43
17.44 - /usr/bin/osecvm-password-receiver.py eth0 58080 $DEVNAME /media/usb0
17.45 + /usr/bin/encryptionprovider.py -m eth0 58080 $DEVNAME /media/usb0
17.46 if [ "$?" != "0" ]
17.47 then
17.48 log err "Stick removed. exit"
17.49 exit 1
17.50 fi
17.51
17.52 - mkdir -p "/var/run/usbmount/encrypted"
17.53 - /usr/bin/osecfs /etc/osecfs/osecfs_usb.cfg "/var/run/usbmount/encrypted" rw
17.54 + chattr -i "/tmp/usbmount"
17.55 + mkdir -p "/tmp/usbmount/encrypted"
17.56 + /usr/bin/osecfs /etc/osecfs/osecfs_usb.cfg "/tmp/usbmount/encrypted" rw
17.57 log info "Encrypted stick mounted"
17.58 +
17.59 + #run_initlistener.sh $DEVNAME &
17.60 + encryptionprovider.py -i eth0 58081 "$DEVNAME" /media/usb0 &
17.61 + chattr +i "/tmp/usbmount"
17.62 exit 0
17.63 fi
17.64 set -e
17.65 @@ -212,15 +230,16 @@
17.66
17.67 # A block or partition device has been removed.
17.68 # Test if it is mounted.
17.69 - for device in $(/usr/bin/truecrypt -l | awk '{ print $2}')
17.70 + for device in $(/usr/bin/encryptionprovider.py -g)
17.71 do
17.72 if [ "$DEVNAME" = "$device" ]
17.73 then
17.74 - log info "encrypted device was removed"
17.75 - umount "/var/run/usbmount/encrypted"
17.76 - rmdir "/var/run/usbmount/encrypted"
17.77 - log info "/usr/bin/truecrypt -d $DEVNAME"
17.78 - /usr/bin/truecrypt -d "$DEVNAME"
17.79 + log info "umout encrypted device"
17.80 + chattr -i "/tmp/usbmount"
17.81 + umount "/tmp/usbmount/encrypted"
17.82 + rmdir "/tmp/usbmount/encrypted"
17.83 + log info "/usr/bin/encryptionprovider.py -u $DEVNAME"
17.84 + /usr/bin/encryptionprovider.py -u "$DEVNAME"
17.85 log info "everything done"
17.86 fi
17.87 done