← Back to team overview

freenx-team team mailing list archive

Re: Samba shares working?

 

What about this?

--- nxnode    2009-05-27 20:35:30 +0000
+++ nxnode    2009-05-27 20:48:59 +0000
@@ -1567,9 +1567,19 @@
         cmd_node_suspend
     ;;
     --smbmount)
+        if [ ! "$SLAVE_MODE" = "1" ]
+        then
+            # double fork
+            trap '' 1; for ((i=3; i<255; i++)); do eval "exec $i<&- $i>&-";
done
+        fi
         cmd_node_smbmount &>/dev/null </dev/null &
     ;;
     --addprinter)
+        if [ ! "$SLAVE_MODE" = "1" ]
+        then
+            # double fork
+            trap '' 1; for ((i=3; i<255; i++)); do eval "exec $i<&- $i>&-";
done
+        fi
         cmd_node_addprinter &>/dev/null </dev/null &
     ;;
     --check)
@@ -1606,6 +1616,7 @@
     # New slave mode accepts more than 1 command at a time
     echo "NX> 716 Slave mode started successfully."
     NODE_SESSION=""
+    SLAVE_MODE="1"

     while read CMD
     do

Regards

On Wed, May 27, 2009 at 4:24 PM, Marcelo Boveto Shima <
marceloshima@xxxxxxxxx> wrote:

>
>
> On Wed, May 27, 2009 at 7:31 AM, Thilo Uttendorfer <
> t.uttendorfer@xxxxxxxxxxxx> wrote:
>
>> Hi Marcelo,
>>
>> what do you think about the patch? Do you you can include it?
>>
>
>
> Are you using the slave mode? I think on slave mode this patch is not
> needed.
> My concern about this patch on slave mode the primary nxnode process can
> make
> some operations using the closed fds.
>
> If you are not using the slave mode, then we should use close the fds
> inside the
> function like I did on my patch and add a 0.5 sleep time after the function
> call to
> make sure it is already forked.
>
>
>> At the moment I have still some problems with printing. There is at least
>> a
>> problem with incorrect session-id paths and a problem with apparmor that
>> doesn't allow users to start a cups server.
>>
>
> Problem with session-id paths?
>
> The apparmor problem is trick, the only good solution I found is to fill a
> bug against
> cups package and ask them to add a profiled cupsd to a non default
> directory and
> let /usr/sbin/cupsd without a apparmor profile.
> As an workaround you can copy cupsd to the session dir and the execute it
> there.
>
> The only way i got printing working is to add a nxsmb backend. The preload
> way
> didn't work for me. Print to smb with non standard port seems to be broken.
>
>
>>
>> So I'll probably come up with another patch, but it'll take some more
>> weeks.
>> Unfortunately not much time left at the moment...
>>
>
> I got smb printer support working for tacix. So I will prepare the package
> to make
> it work.
>
>
>> Bye,
>> Thilo
>>
>>
>> p.s.: I haven't mentioned that, yet: Thank you for the really good work on
>> the
>> Ubuntu freenx packages!
>>
>
> Thanks
>

References