LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 08-08-2004, 01:17 PM   #1
plan9
Member
 
Registered: May 2004
Location: USA
Distribution: Slackware-Current
Posts: 74

Rep: Reputation: 15
starting separate syslog for chroot environment


hey there,

i want to get loging working on my chrooted jail for sftp. I read that you need to add something like this to your start up scripts:

/sbin/syslogd -a /usr/chroot/dev/log

where /usr/chroot/dev/log is a file located under the chrooted root.

so, i assume that the startup script wil be /etc/rc.syslog. here is my question- do i need to start up two instances of syslog? seem like i would to me, but i'm not sure. would i just add the above line to the bottom of rc.syslog file? or try to edit it? here is a snip from my current rc.syslog file

<snip>
syslogd_start() {
if [ -x /usr/sbin/syslogd -a -x /usr/sbin/klogd ]; then
echo -n "Starting sysklogd daemons: "
echo -n " /usr/sbin/syslogd"
/usr/sbin/syslogd
sleep 1 # prevent syslogd/klogd race condition on SMP kernels
echo " /usr/sbin/klogd -c 3 -x"
# '-c 3' = display level 'error' or higher messages on console
# '-x' = turn off broken EIP translation
/usr/sbin/klogd -c 3 -x
fi
}
<end snip>

thanks,

plan9
 
Old 08-08-2004, 04:11 PM   #2
bastard23
Member
 
Registered: Mar 2003
Distribution: Debian
Posts: 275

Rep: Reputation: 30
man syslogd

Code:
OPTIONS
       -a socket
              Using this  argument  you  can  specify  additional
              sockets  from  that syslogd has to listen to.  This
              is needed if you're going to let  some  daemon  run
              within  a  chroot() environment.  You can use up to
              19 additional sockets.  If your  environment  needs
              even more, you have to increase the symbol MAXFUNIX
              within the syslogd.c source file.  An example for a
              chroot()  daemon  is  described  by the people from
              OpenBSD at  http://www.psionic.com/papers/dns.html.
Have fun,
chris
 
Old 08-09-2004, 02:31 PM   #3
plan9
Member
 
Registered: May 2004
Location: USA
Distribution: Slackware-Current
Posts: 74

Original Poster
Rep: Reputation: 15
Hey thanks.

Ya, I read the man page too. I guess, the key word here is "additional", which infers that the normal syslog is started no matter what parameters.

Funny how it can all hinge on the interpretation of a single word sometimes huh?

plan9
 
Old 08-09-2004, 05:57 PM   #4
bastard23
Member
 
Registered: Mar 2003
Distribution: Debian
Posts: 275

Rep: Reputation: 30
Yeppers,

(Sorry if I was being redundant)
If you run two instances (which you should be able to), it will be easier to keep the logs seperate, if that's what you desire. Look at the -p and and -f if so. I don't think that the standard syslog wouldn't let you filter on your source.

So two instances would be to add a line just after /usr/sbin/syslogd.
One instance would just add the -a <chrooted log socket> to that line.

I don't think slackware has kill/stop scripts for syslog does it?

Go glenda, go
chris
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
getting started in chroot environment Mystified Linux From Scratch 3 03-28-2005 09:11 AM
mount in chroot environment not possible moskito01 SUSE / openSUSE 5 12-06-2004 04:06 PM
Apache in a chroot environment tarballedtux Linux - Software 1 04-13-2004 07:37 PM
Out of the chroot environment? R2RO Linux - Networking 0 05-14-2003 04:01 PM
Getting in and out and in again in the CHROOT environment? kRu_ZaDeR Linux From Scratch 8 01-13-2003 12:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 07:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration