a daemon C skeleton

2002-02-15 Thread Magdalinin Kirill
Hello, can anyone, please, point out a C skeleton for FreeBSD daemon. Is the following simple example correct for FreeBSD? if (getppid() != 1) { signal(SIGTTOU, SIG_IGN); signal(SIGTTIN, SIG_IGN); signal(SIGTSTP, SIG_IGN); if (fork() != 0) exit(0); setsid(); } getrlimit(RLIMIT_NOFILE,

Re: a daemon C skeleton

2002-02-15 Thread Mark Santcroos
man 3 daemon On Fri, Feb 15, 2002 at 11:52:22AM +0300, Magdalinin Kirill wrote: Hello, can anyone, please, point out a C skeleton for FreeBSD daemon. Is the following simple example correct for FreeBSD? if (getppid() != 1) { signal(SIGTTOU, SIG_IGN); signal(SIGTTIN, SIG_IGN);

Re: a daemon C skeleton

2002-02-15 Thread Maxim Konovalov
On 11:52+0300, Feb 15, 2002, Magdalinin Kirill wrote: Hello, can anyone, please, point out a C skeleton for FreeBSD daemon. Take a look at src/lib/libc/gen/daemon.c, man 3 daemon HTH, -- Maxim Konovalov, MAcomnet, Internet-Intranet Dept., system engineer phone: +7 (095) 796-9079,

chflags schg problem

2002-02-15 Thread Dmitry A. Bondareff
Hello hackers! What it is mean: Dial# rm kerneloverride r-xr-xr-x root/wheel schg for kernel? yrm: kernel: Operation not permitted Dial# chflags noschg /kernelchflags: /kernel: Operation not permitted Regards, Dmitry.

Re: chflags schg problem

2002-02-15 Thread Maxim Konovalov
On 15:03+0500, Feb 15, 2002, Dmitry A. Bondareff wrote: Hello hackers! What it is mean: Dial# rm kernel override r-xr-xr-x root/wheel schg for kernel? y rm: kernel: Operation not permitted Dial# chflags noschg /kernel chflags: /kernel: Operation not permitted please show sysctl

Re: chflags schg problem

2002-02-15 Thread Chris Faulhaber
On Fri, Feb 15, 2002 at 03:03:10PM +0500, Dmitry A. Bondareff wrote: Hello hackers! What it is mean: Dial# rm kernel override r-xr-xr-x root/wheel schg for kernel? y rm: kernel: Operation not permitted Dial# chflags noschg /kernel chflags: /kernel: Operation not permitted

chroot+su idea

2002-02-15 Thread Walter Hop
Hi all, just like many people, I want to run my dangerous daemons as a non-root user in a chroot environment. Now, I would usually use the ``su'', or ``chroot'' tools from the FreeBSD toolset in the creation of an rc.d script, but the question that puzzles me is how to combine these two

Reading userland environnement from the kernel

2002-02-15 Thread Sansonetti Laurent
Hi hackers, Is there a way to read user-land environ(7) table from the kernel for a given process ? Cheers, -- Laurent To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message

Re: chroot+su idea

2002-02-15 Thread Olivier Cortes
cd /usr/ports less security/chrootuid/pkg-comment A simple wrapper that combines chroot(8) and su(1) into one program gook luck, olivier On Fri, Feb 15, 2002 at 02:02:49PM +0100, Walter Hop wrote: Hi all, just like many people, I want to run my dangerous daemons as a non-root user

Re: chroot+su idea

2002-02-15 Thread David Malone
On Fri, Feb 15, 2002 at 02:02:49PM +0100, Walter Hop wrote: 2) chroot first, then su: undesired, as I would have to move a suid root copy of the su tool into the chroot; also unpractical as I'd have to duplicate a lot of files into the chroot to satisfy su. Have you tried using a

Re: Reading userland environnement from the kernel

2002-02-15 Thread David Malone
On Fri, Feb 15, 2002 at 02:15:34PM +, Sansonetti Laurent wrote: Is there a way to read user-land environ(7) table from the kernel for a given process ? Does 'ps -auxwwwe' do what you want? David. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in

Re[2]: chroot+su idea

2002-02-15 Thread Walter Hop
[in reply to [EMAIL PROTECTED], 15-02-2002] cd /usr/ports less security/chrootuid/pkg-comment A simple wrapper that combines chroot(8) and su(1) into one program Great, how could I have overlooked that one? Thanks!! :) walter -- Walter Hop [EMAIL PROTECTED] | +31 6 24290808 | PGP keyid

RE: Reading userland environnement from the kernel

2002-02-15 Thread Andy Sporner
Hi, Is there a way to read user-land environ(7) table from the kernel for a given process ? You have to look at the proc structure for a process and there you will find a buffer for the 'ps_strings' and a few offset variables to show where the environment variables are. Andy Cheers,

lpd filter stderr log files

2002-02-15 Thread Konrad Heuer
Unfortunately, some changes in the lpd code that happened last year (as far as I remember) are very disadvantageous for the operation of our (heavily loaded) printer server which is based on FreeBSD for years now. My input filter programs are designed to write useful debugging information to

Re: Reading userland environnement from the kernel

2002-02-15 Thread Andy Sporner
Hi Terry (and others!) You seem to know a lot about the kernel (as you always expand on my Cliff Notes versions of my answers). Can you give me any hints on the device driver question I posted a few days ago. There was a response, however I don't see how it applies for these reasons. 1.

Re: chroot+su idea

2002-02-15 Thread Crist J. Clark
Also have a look at jail(8). -- Crist J. Clark | [EMAIL PROTECTED] | [EMAIL PROTECTED] http://people.freebsd.org/~cjc/| [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the

Re: lpd filter stderr log files

2002-02-15 Thread Garance A Drosihn
At 3:16 PM +0100 2/15/02, Konrad Heuer wrote: Unfortunately, some changes in the lpd code that happened last year (as far as I remember) are very disadvantageous for the operation of our (heavily loaded) printer server which is based on FreeBSD for years now. Well, I'm willing to see what we can

Odd ipfw behaviour

2002-02-15 Thread Michael R. Wayne
ipfw seems to be confused about where to forward packets if no interface is specifically mentioned. Before I file a PR on it, I'd like someone who is more familiar with how ipfw operates to quickly look over my findings. Test setup, showing 2 ethernets with 2 FreeBSD boxes and another machine

RE: IPv6-over-IPv4 problems since the upgrade to 4.5

2002-02-15 Thread DOROVSKOY,IGOR (A-Portsmouth,ex1)
I cannt reproduce it. Whats the version of the NetBSD box on other side? Does somebody IPv6 routing in your segment? Igor. -Original Message- From: Edwin Groothuis [mailto:[EMAIL PROTECTED]] Sent: Monday, February 11, 2002 8:30 PM To: [EMAIL PROTECTED] Subject: IPv6-over-IPv4 problems

Re: a daemon C skeleton

2002-02-15 Thread Julian Elischer
try daemon(args..); . (man 3 daemon) On Fri, 15 Feb 2002, Magdalinin Kirill wrote: Hello, can anyone, please, point out a C skeleton for FreeBSD daemon. Is the following simple example correct for FreeBSD? if (getppid() != 1) { signal(SIGTTOU, SIG_IGN);

Re: chroot+su idea

2002-02-15 Thread Julian Elischer
check out 'jail' start the daemon within the startup script of the jail. On Fri, 15 Feb 2002, Walter Hop wrote: Hi all, just like many people, I want to run my dangerous daemons as a non-root user in a chroot environment. Now, I would usually use the ``su'', or ``chroot'' tools from

bktr driver signaling broken

2002-02-15 Thread Charles Henrich
Okay after bashing my skull against this problem for some time now, I've narrowed this problem down. What Im attempting to do is get a signal from the bktr driver after each frame is posted. The code in the kernel supports this. It even works for some output formats. The problem is the driver