lists.arthurdejong.org
RSS feed

Re: cvsd with RootJail and cvsspam

[Date Prev][Date Next] [Thread Prev][Thread Next]

Re: cvsd with RootJail and cvsspam



Hi,

Mission Impossible has been acomplished!! cvs+cvsd+rootJail+cvsspam working all together!

Thanks for your help, I'll post the complete solution somewhere on the net. I'll let you know.


2011/7/18 Pablo Ramirez <pablo.ramirez [at] excelsys.net>
Hi Arthur,

Finally i get the ruby scripts work, to do that, i needed to change the shebang with this:

#!/bin/ruby -I/lib/ruby/1.8

But you're right on ruby files and libraries, now i'm stuck because ruby needs sendmail, and sendmail MTA agent will be hard to chroot. Anyway i'll try to use another mail client like mutt.

The strace wasn't usefull, because it shows the same output with or without cvsspam.

Anyway, the buginfo it's attached.

Thanks a lot.

2011/7/15 Arthur de Jong <arthur [at] arthurdejong.org>
On Thu, 2011-07-14 at 18:05 -0400, Pablo Ramirez wrote:
> I've been working on trying to get cvsspam work with cvsd rootjailing
> pserver but i'm a little frustrated because I 've not even added the
> `cat` bin command.

Can you include the output of cvsd-buginfo? It should include the layout
of the chroot jail and more debugging information that may be helpful.

> - cp -p /bin/cat <RootJailDir>/bin/cat and cvsd-buildroot
> <RootJailDir>. This command return WARNING: extra (unknown) file
> found: /opt/cvsd/bin/cat but finishes ok.
> - edit the cvsd-buildroot script and add
> BINARIES="/usr/bin/cvs /bin/cat", a little tricky but no WARNING and
> the cat binary is copied to <RootJailDir>/bin.

You should be able to ignore the cvsd-buildroot warning. It just
complains about files that it finds but doesn't expect. It does install
needed libraries for those binaries though.

> Anyway, when I try to commit, cvs exit with error "cvs commit: cannot
> exec /bin/cat>/dev/null: No such file or directory"

The executing of commands within the chroot jail is hard to debug. For
the exact cause of the error message you should be able to use strace -f
to get more information.

> Thinking about the command "/bin/cat>/dev/null" I thought, what if I
> change that "ugly" command for a simplier one, so I've created a dummy
> shell script that returns nothing, and add the /bin/sh
> and /bin/dummy.sh to <RootJailDir> and cvsd-buildroot it again.
>
> Same occurs, cvs commit: cannot exec /bin/dummy: No such file or
> directory.

There is a good chance that /bin/sh is needed by cvs to start
subcommands. Since CVSspam is implemented in ruby you also have to
install the needed Ruby files and libraries and I doubt that
cvsd-buildroot will be able to install enough stuff for that.

--
-- arthur - arthur [at] arthurdejong.org - http://arthurdejong.org --

--
To unsubscribe send an email to
cvsd-users-unsubscribe [at] lists.arthurdejong.org or see
http://lists.arthurdejong.org/cvsd-users


-- 
To unsubscribe send an email to
cvsd-users-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/cvsd-users