SYS_NMLN strange value

2002-03-29 Thread Sansonetti Laurent
Hi hackers, Just a little question about utsname.h (on a 4.4-release), is it normal to see a value of 32 for SYS_NMLN instead of 256 (like other implementations such as OpenBSD 3.0) ? Which is the correct one (according to POSIX) ? -- Laurent To Unsubscribe: send mail to [EMAIL PROTECTED] w

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: Hijack lpt_intr() from lpt driver

2001-11-12 Thread Sansonetti Laurent
On Mon, 2001-11-12 at 16:28, Poul-Henning Kamp wrote: > > Uhm, why don't you simply use the pps driver ? > Yes, why not.. but I have the same problem : how to hijack current interrupt handler ? I don't want to patch the kernel.. Thanks in advance, -- Sanson

Hijack lpt_intr() from lpt driver

2001-11-12 Thread Sansonetti Laurent
cookie from lpt driver, so before doing bad things I would want to know if this is the right way to hijack a hardware interrupt handler. Thanks in advance, -- Sansonetti Laurent - http://lrz.linuxbe.org To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" i

Re: Simple pthread question

2001-10-31 Thread Sansonetti Laurent
tation, there is something like pthread_delay_np() which you can still use. Hope that helps. > > TIA > Arjan > > > To Unsubscribe: send mail to [EMAIL PROTECTED] > with "unsubscribe freebsd-hackers" in the body of the message -- -- Sansonetti Laurent - http://lr

storing routine code in kernel memory using kvm interface

2001-09-15 Thread Sansonetti Laurent
Hi, Is there a way to store a function in kernel memory using KVM interface ? I have written a tty spy'er, which simply hijack discipline line entries for a tty, and as you know probably, those routines must be situated in kernel land. I know that I should use KLD for that, but i'm still curiou

error in man page kvm_nlist(3) ?

2001-09-15 Thread Sansonetti Laurent
Hi, I think there's an error in man page for kvm_nlist(3): a reference to kldsym(2) which doesn't exist in the manual... pinux@arrakis ~> man kvm_nlist | grep kldsym kldsym(2) is used to locate the symbol. This is a less than perfect emu- kldsym(2), kvm(3), kvm_close(3), kvm_getarg

Re: Kernel-loadable Root Kits

2001-09-09 Thread Sansonetti Laurent
rrying after the module has been loaded it's much safer > to run the kernel in securelevel>=1 when modules cannot be loaded > without a reboot to single-user mode. You might see this: http://www.s0ftpj.org/tools/securelvl.tgz (I didn't tested it yet). > -giorgos >

Re: Kernel-loadable Root Kits

2001-09-08 Thread Sansonetti Laurent
in MOD_LOAD) Hope this help, -- Sansonetti Laurent - http://lrz.linuxbe.org To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

Re: Should URL's be pervasive.

2001-09-04 Thread Sansonetti Laurent
> Anyway, the point is that a file that I can access should be a file I > can access via VI or MORE or EMACS or GREP or any other tool without > having those tools each having FTP and HTTP and SSH support built in to > them. The OS should handle it. Yes, this should be nice. There's a similar p

struct module

2001-08-22 Thread Sansonetti Laurent
Hi hackers, First of all thank to all people who help me, my KLD module is almost finished. I have however a small question : why the module structure is definied in /sys/kern/kern_module.c and not in ? I'm sure this question has a stupid answer.. ;-) Bye, and thanks in advance for your answe

Getting filename from descriptor or vnode struct

2001-08-16 Thread Sansonetti Laurent
Hi hackers, I'm confronted to a problem when I try to hack getdirentries(2) in a kld module : To summarize, getdirentries() filled in a buffer a series of dirent struct, and the 'd_name' field represents the filename (without the full path). I must recover the full path because I've on disk a l

Re: Reading files within the kernel (was Re: allocating userland space...)

2001-08-13 Thread Sansonetti Laurent
Hello Ian, Thanks you for your help, now I can read my cfg file from my module in a easier way ;) A another stupid question, how can I do to stop the loading process in MOD_LOAD event handler (in my case, if the cfg file doesn't exist, it should be better to interrupt..) ? Returning EINTR does

allocating userland space to call open() on a kernel module

2001-08-13 Thread Sansonetti Laurent
Hello hackers, I'm currently working on a kld syscall module which needs to read a config file at startup (MOD_LOAD). Following the advice of Eugene L. Vorokov, I tried to allocate some userland space with mmap() to store a open_args struct, fill-it with copyout() / subyte()... and call open with

Doing file operations on syscalls handler

2001-08-10 Thread Sansonetti Laurent
Hello hackers, I'm new on FreeBSD modules programming, and I've a little question... How can I do file operations (like open(), read()..) on a syscall handler of a syscall module ? In fact I've met the problem since my module must open a file which contains some informations for the hacked syscal