diff options
Diffstat (limited to 'net-misc/nxserver-freenx/files/nxserver-freenx-0.7.3_p104-nxnode_setup_samba.patch')
-rw-r--r-- | net-misc/nxserver-freenx/files/nxserver-freenx-0.7.3_p104-nxnode_setup_samba.patch | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/net-misc/nxserver-freenx/files/nxserver-freenx-0.7.3_p104-nxnode_setup_samba.patch b/net-misc/nxserver-freenx/files/nxserver-freenx-0.7.3_p104-nxnode_setup_samba.patch new file mode 100644 index 0000000..543cc16 --- /dev/null +++ b/net-misc/nxserver-freenx/files/nxserver-freenx-0.7.3_p104-nxnode_setup_samba.patch @@ -0,0 +1,106 @@ +diff -ruN freenx-server.orig/nxnode freenx-server/nxnode +--- freenx-server.orig/nxnode 2009-03-29 14:07:27.000000000 +0200 ++++ freenx-server/nxnode 2009-05-12 19:19:28.090537066 +0200 +@@ -85,6 +85,45 @@ + echo $sessionid + } + ++setup_samba() ++{ ++ smbport="" ++ ++ # We know from protocol traces that client=linux,winnt,macosx are valid values. ++ # I hope with smbclientproto=smb on default and smbclientproto=cifs on all valid ++ # values we get support for all those systems. ++ ++ smbproto="$SAMBA_MOUNT_SHARE_PROTOCOL" ++ ++ if [ "$smbproto" = "both" ] ++ then ++ smbproto="smbfs" ++ ++ [ "$client" = "linux" ] && smbproto="cifs" ++ [ "$client" = "winnt" ] && smbproto="cifs" ++ [ "$client" = "macosx" ] && smbproto="cifs" ++ ++ # FIXME: This is a rather wild guess ++ [ "$client" = "win9x" ] && smbproto="smbfs" ++ fi ++ ++ if [ "$smbproto" = "cifs" ] ++ then ++ smbport=445 ++ COMMAND_SMBMOUNT=$COMMAND_SMBMOUNT_CIFS ++ COMMAND_SMBUMOUNT=$COMMAND_SMBUMOUNT_CIFS ++ elif [ "$smbproto" = "none" ] # none ++ then ++ # we set this to true so that the ++ # SMB mount does not give an error message. ++ ++ COMMAND_SMBMOUNT=/bin/true ++ COMMAND_SMBUMOUNT=/bin/true ++ else # smbfs ++ smbport=139 ++ fi ++} ++ + # + # ----------------------------------------------------------------------------- + # Node functions module +@@ -735,6 +774,7 @@ + + node_umount_smb() + { ++ setup_samba + [ -e "$USER_FAKE_HOME/.nx/C-$sess_id/scripts/mpoint" ] || return + cat "$USER_FAKE_HOME/.nx/C-$sess_id/scripts/mpoint" | while read mpoint + do +@@ -1136,39 +1176,7 @@ + + if [ "$samba" = "1" ] + then +- # We know from protocol traces that client=linux,winnt,macosx are valid values. +- # I hope with smbclientproto=smb on default and smbclientproto=cifs on all valid +- # values we get support for all those systems. +- +- smbproto="$SAMBA_MOUNT_SHARE_PROTOCOL" +- +- if [ "$smbproto" = "both" ] +- then +- smbproto="smbfs" +- +- [ "$client" = "linux" ] && smbproto="cifs" +- [ "$client" = "winnt" ] && smbproto="cifs" +- [ "$client" = "macosx" ] && smbproto="cifs" +- +- # FIXME: This is a rather wild guess +- [ "$client" = "win9x" ] && smbproto="smbfs" +- fi +- +- if [ "$smbproto" = "cifs" ] +- then +- smbport=445 +- COMMAND_SMBMOUNT=$COMMAND_SMBMOUNT_CIFS +- COMMAND_SMBUMOUNT=$COMMAND_SMBUMOUNT_CIFS +- elif [ "$smbproto" = "none" ] # none +- then +- # we set this to true so that the +- # SMB mount does not give an error message. +- +- COMMAND_SMBMOUNT=/bin/true +- COMMAND_SMBUMOUNT=/bin/true +- else # smbfs +- smbport=139 +- fi ++ setup_samba + fi + + # FreeNX specific variables +@@ -1430,6 +1438,7 @@ + + cmd_node_smbmount() + { ++ setup_samba + sessionid=$(getparam_sessionid) + port=$(getparam port) + username=$(getparam username) |