[FreeNX-kNX] windows/osx shares fail to mount

Boris Savelev boris.savelev at gmail.com
Tue Jul 27 06:09:02 UTC 2010


2010/7/26 Johannes Scholz <lgdlubyou at googlemail.com>:
> After some debugging I found two issues.
> Issue number seems to be a bash related error.
> Minimal example:
> # OSX
> kebab:~ me$ bash --version
> GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)
> Copyright (C) 2007 Free Software Foundation, Inc.
> kebab:~ me$ test_cmd="ENVVAR=\"foo\" ls"
> kebab:~ me$ $test_cmd
> -bash: ENVVAR="foo": command not found
> kebab:~ me$ $($test_cmd)
> -bash: ENVVAR="foo": command not found
> # LINUX, Ubuntu 10.04
> apollo:~$ bash --version
> GNU bash, version 4.1.5(1)-release (i486-pc-linux-gnu)
> Copyright (C) 2009 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> <http://gnu.org/licenses/gpl.html>
> This is free software; you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
> apollo:~$ test_cmd="ENVVAR=\"foo\" ls"
> apollo:~$ $test_cmd
> ENVVAR="foo": command not found
> apollo:~$ $($test_cmd)
> ENVVAR="foo": command not found
> I do not know whether this is a bug in bash or expected behaviour.
> I mention the examples here because a code pattern like that is used
> in nxnode. I managed to fix it by changing it to the following:
>
> --- nxnode.orig 2010-07-26 18:56:00.000000000 +0200
> +++ nxnode      2010-07-26 19:05:10.000000000 +0200
> @@ -1921,9 +1921,9 @@
>         # dimbor: add russian, save cmdstr and kill dialogs
>         if [ -n "$SMB_MOUNT_OPTIONS" ]
>         then
> -           MNTSTR="PASSWD=\"$password\" $COMMAND_SMBMOUNT
> //$computername/$share $dir -o
> username=$username,ip=127.0.0.1,port=$port,$SMB_MOUNT_OPTIONS 2>&1"
> +           MNTSTR="$COMMAND_SMBMOUNT //$computername/$share $dir -o
> username=$username%$password,ip=127.0.0.1,port=$port,$SMB_MOUNT_OPTIONS
> 2>&1"
>         else
> -           MNTSTR="PASSWD=\"$password\" $COMMAND_SMBMOUNT
> //$computername/$share $dir -o username=$username,ip=127.0.0.1,port=$port
> 2>&1"
> +           MNTSTR="$COMMAND_SMBMOUNT //$computername/$share $dir -o
> username%$password=$username,ip=127.0.0.1,port=$port 2>&1"
>         fi
>         echo "$DELIM 701 Attempt to start $MNTSTR"
>         error=$($MNTSTR)
> This seems to work when manually trying on the command line.
> The other issue i am having is that nxnode seems to be called with
> normal user uid instead of uid 0, thus mount fails.
> I guess it would be nice if Marcelo Boveto Shima could say something about t
> his, because it seems that he is the one who packaged freenx for the freenx
> stable ppa.
> I could of course set the sticky bit on mount.cifs/mount.smbfs, but i do not
> think
> that that is the right approach.

why not?
suid bit on cifsmount and cifsumount seems to be right approach. I use
smb share forward with suid without any problems.
in Russia ( http://git.altlinux.org/people/boris/packages/?p=freenx-server.git;a=summary
) share and printer forwarding is an important feature, so I and some
people from unixforum.org work on this

thanks for patch, i'll apply and check

ps: sorry for my english


-- 
Boris



More information about the FreeNX-kNX mailing list