Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
need help with start-stop-daemon to run chrooted program.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
seriv
n00b
n00b


Joined: 07 Feb 2003
Posts: 17
Location: maryland

PostPosted: Wed May 21, 2003 9:36 pm    Post subject: need help with start-stop-daemon to run chrooted program. Reply with quote

Hi All!
I need help, I do not understand details of start-stop-daemon program handling. I want use it to run XMail mail server in chrooted jail from regular user xmail.
I prepared this chrooted jail, copied all setup, executable and library files. When I run this with '-Md' parameter, which is similar to '-d' in sshd, preventing forks and detaching from console, it works fine. The only problem was to bind to privileged ports, I was to switch to unprivileged and use iptable packet redirection to immitate binding on pop3 and smtp ports.
===
start-stop-daemon --start -c xmail -r /chroot/xmail \
--startas /var/MailRoot/bin/XMail --pidfile=/var/run/XMail.pid --\
-Pp 29110 -Sp 29025 -Fp 29079 -Md
===
it works fine, I've checked it's SMTP and POP3 sessions. But if I remove '-Md' parameter from XMail's commandline to fire it as a daemon, it returns immediately without any error message.
Can anybody help?

Thank you,
Sergey.
Back to top
View user's profile Send private message
seriv
n00b
n00b


Joined: 07 Feb 2003
Posts: 17
Location: maryland

PostPosted: Mon May 26, 2003 10:06 pm    Post subject: results Reply with quote

1) the problem was in /dev/null, I forgot to create it in chroot.
2) the tool to find it is strace. with option -f to trace forked processes.
3) the result as a ebuild for great XMail mail daemon is published at http://www.spectr.org/sergey/XMail_for_Gentoo.html
Sergey
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum