Ian Tester wrote:

> This won't work with lpd. lpd runs as a seperate user and shouldn't have
> permission to pop up any window on a users display.
>
> Perhaps you could write a two-stage system.
>
> Something like:
>         1. A tcl/tk program is run when the user starts their X session
>            (i.e run it in xinitrc or somehere)
>            This program creates a pipe /tmp/.smbprint.<user> and listens to it.
>
>         2. When a user prints to the NT print share, the input filter opens the
>            appropriate pipe and asks for a password.
>
>         3. The tcl/tk program prompts the user for a password and passes it back
>            along the pipe.
>
>         4. The input filter uses the password to print to the NT print share.

I originally had a two stage system consisting of the input filter, and a backend
process which would optionally cache the smbclient parameters entered by the user,
server/share/workgroup/username/password etc.

The input filter would query the backend process (smbproxy) and ask for the
appropriate parameters... if no parameters were cached, it would throw up the
GUI... but alas, as Ian pointed out, this won't work.

I shifted the GUI code from the input filter (smbprint) into the backend process
(smbproxy)... a much cleaner approach all round, and it works like a dream. But...

I have included code in smbproxy to optionally cache the tokens for the duration of
the users current login session, but I'm hesitant to enable this functionality.
smbproxy uses two pipes to communicate with smbprint, it listens on the incoming
pipe (/tmp/.smbproxy.user.i), and replies on the outgoing pipe
(/tmp/.smbproxy.user.o). Since the printcap input filter (smbprint) is executed by
the user daemon, I have had to make the pipes chmod 0666... and therein lies the
problem.... any process, written/executed by any user could make a request on the
incoming pipe and smbproxy would spit out the cached tokens, including the password
if one has been provided. I'm sure we all agree that this is bad.

Any suggestions or comments from the SLUG oracle?

Shaun

--
Shaun Cloherty
Graduate School of Biomedical Engineering
University of New South Wales




-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug

Reply via email to