[scponly] scponly doesn't work after upgrade to lenny : SOLVED

Kaleb Pederson kaleb.pederson at gmail.com
Thu Oct 22 17:20:11 EDT 2009


On Monday 19 October 2009 02:23:02 pm you wrote:
> >> My solution to this problem is that I wrote a tiny script and put it
> >> into /etc/cron.weekly:
> >>
> >> vvvvvvvvvvvvvvvvvvvvvvvv
> >>
> >> #!/bin/sh
> >>
> >> for a in `grep scponlyc /etc/passwd | cut -d : -f 6`
> >> do
> >>        cd $a
> >>        find bin -type f -exec cp -p /'{}' '{}' ';'
> >>        find usr -type f -exec cp -p /'{}' '{}' ';'
> >>        find lib -type f -exec cp -p /'{}' '{}' ';'
> >> done
> >>
> >> ^^^^^^^^^^^^^^^^^^^^^^^^
> > 
> > If possible, use a program that is intelligent enough to take a look
> > at the shared libraries in use by the commands and update them as
> > well.  If the shared libraries aren't being updated, you're still
> > likely to see something broken.  I have a simple script that works on
> > Linux (or any system that has an identical ldd output format) that
> > I've been using for this purpose, but there's other programs that will
> > do the same thing, such as Jailkit.
> > 
> 
> Hm, you are right: If names of shared libaries change they won't be 
> copied into the jail by this script.
> 
> Can you send me your script?

I've attached my script.  I wrote it in Python over five years ago, but I'm still using it and haven't had any problems, so I guess it works despite whatever poor coding practices I may have used at the time :).

--
Kaleb Pederson

Twitter - http://twitter.com/kalebpederson
Blog - http://kalebpederson.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cplibdeps
Type: text/x-python
Size: 2855 bytes
Desc: not available
Url : http://lists.ccs.neu.edu/pipermail/scponly/attachments/20091022/85b78f9e/attachment.py 


More information about the scponly mailing list