LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] PDF Creation

[ILUG] PDF Creation

Conor Daly conor.daly at oceanfree.net
Sat Apr 28 14:31:51 IST 2001


On Sat, Apr 28, 2001 at 12:57:27PM +0100 or so it is rumoured hereabouts, 
Kenn Humborg thought:
> On Sat, Apr 28, 2001 at 11:02:57AM +0100, Conor Daly wrote:
> > If you want to use it in a pipe, you'll need to generate a tmp file from
> > stdin and then ps2pdf the tmp file.
> > 
> > pipe or console?
> > if [ -t 0 ]; then
> >   # We're in a console here
> >   ps2pdf $1
> > else
> >   # Here, we're in a pipe
> >   # We need a temporary file here so something else can carry on
> >   cat > /tmp/input-file$$.ps
> >   ps2pdf /tmp/input-file$$.ps
> >   mv /tmp/input-file$$.pdf suitable/location/and/filename.pdf
> >   rm /tmp/input-file$$.ps
> > fi
> 
> This is very insecure.  If this runs as root and J. Random Cracker
> does 
> 
>    $ ln -s /etc/passwd /tmp/input-file2.ps 
>    $ ln -s /etc/passwd /tmp/input-file3.ps 
>    $ ...
>    $ ln -s /etc/passwd /tmp/input-file32767.ps 
> 
> and then prints a new passwd file to this printer, then you're rooted.
 
Very pretty!

Thanks Kenn,  I wouldn't *ever* have thought of something like that!  I'm
more used to working with a small HAN where I trust everyone.

Conor
-- 
Conor Daly <conor.daly at oceanfree.net>

Domestic Sysadmin :-)
---------------------
Faenor.cod.ie
  2:30pm  up 13 days, 45 min,  0 users,  load average: 0.00, 0.06, 0.06
Hobbiton.cod.ie
  2:30pm  up 60 days, 7 min,  2 users,  load average: 0.15, 0.10, 0.06




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell