summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/nxserver-freenx/files/nxserver-freenx-0.7.1-samba.patch')
-rw-r--r--net-misc/nxserver-freenx/files/nxserver-freenx-0.7.1-samba.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/net-misc/nxserver-freenx/files/nxserver-freenx-0.7.1-samba.patch b/net-misc/nxserver-freenx/files/nxserver-freenx-0.7.1-samba.patch
new file mode 100644
index 000000000000..01601dd966f1
--- /dev/null
+++ b/net-misc/nxserver-freenx/files/nxserver-freenx-0.7.1-samba.patch
@@ -0,0 +1,32 @@
+--- nxnode~ 2007-12-05 18:41:09.714867153 +0100
++++ nxnode 2007-12-10 18:19:20.572614463 +0100
+@@ -56,7 +56,7 @@
+ {
+ stringinstring "&$1=" "$CMDLINE" || return 1
+
+- echo "$CMDLINE" | tr "&" "\n" | egrep "^"$1"=" | awk -F= '{ VAL=$2 } END { print VAL }'
++ echo "$CMDLINE" | tr "&" "\n" | egrep "^"$1"=" | awk -F= '{ VAL=$2 } END { print VAL }' | sed 's|%24|$|'
+
+ return 0
+ }
+@@ -720,7 +720,7 @@
+ # Catch NXAGENT SMB Port (sometimes the port differs from what we got from nxserver)
+ #
+
+- if stringinstring "Info: Listening for SMB connections on port" "$line"
++ if stringinstring "Info: Listening * SMB connections on port" "$line"
+ then
+ SMBMOUNT_PORT=$(echo $line | cut -d"'" -f2)
+ echo "$SMBMOUNT_PORT" >"$USER_FAKE_HOME/.nx/C-$sess_id/scripts/mport"
+@@ -1314,8 +1314,9 @@
+ sleep 1
+ done
+ # sometimes the samba port we get from nxserver is not the right one, so let's get it from nxagent
+- port=$(cat "$USER_FAKE_HOME/.nx/C-$SERVER_NAME-$display-$sessionid/scripts/mport")
+- error=$(PASSWD="$password" $COMMAND_SMBMOUNT "//$computername/$share" "$HOME/$dir" -o username="$username,ip=127.0.0.1,port=$port" 2>&1)
++ realport=$(cat "$USER_FAKE_HOME/.nx/C-$SERVER_NAME-$display-$sessionid/scripts/mport")
++ [ -n "$realport" ] && port=$realport
++ error=$(PASSWD="$password" $COMMAND_SMBMOUNT "//$computername/$share" "$HOME/$dir" -o username="$username",ip=127.0.0.1,port=$port 2>&1)
+ if [ $? -eq 0 ]
+ then
+ $PATH_BIN/nxdialog -dialog ok -caption "NXServer Message" -message "Info: Share: '//$computername/$share' mounted on: '$HOME/$dir'" -display :$display &