> From [EMAIL PROTECTED] Tue Nov 14 02:49:12 2000
> From: "Torsten Curdt" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Subject: LPRng: filter user
> Date: Tue, 14 Nov 2000 10:42:55 +0100
>
> Hi,there!
>
> I'm wondering if there is any possibility
> to let a filter run as a different user
> than lp.
> In my printcap I have
>
>   if=/var/lib/lpdfilter/myfilter
>
> Now when a user calls "lpr file.txt"
> the filter is called under user
> id "lp". The filter tries to write
> to the user's home dir so the user
> id of the calling user or root
> is needed.
>
> Is there any way to do this?
> --
> Torsten

Yes.

But it is a security loophole,  and in order to do this
you must read the documentation about the security loophole.
It is in the LPRng HOWTO,  buried in a footnote,  and
marked with 'DANGER DANGER Will Robinson' as well.

YOU HAVE BEEN WARNED!

(ummmm... ok:  filter=| ROOT /....)

I suggest you modify the script so that it:

a) looks up the user information in the password or other
   database.

b) checks to see if it can write to the file in the user
   directory.

c) if it cannot,  puts out a message on 'STDERR' so that
   is logged.

d) Sends email if you do not like c.

Don't blame me when you get your system whacked.

Patrick ("Never seen him before, officer.  Pretty
   ugly looking corpse,  eh?") Powell

-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:                           | example:
subscribe LIST <mailaddr>       |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr>     |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------

Reply via email to