From adrian at smop.co.uk Sun Feb 4 18:17:05 2007 From: adrian at smop.co.uk (Adrian Bridgett) Date: Sun, 4 Feb 2007 23:17:05 +0000 Subject: [osiris-devel] context in filters Message-ID: <20070204231705.GA31995@smop.co.uk> Hi, and a huge thank you for osiris, I'm a huge fan :D I've had a problem where if the daemon is asked to scan a directory including a named pipe then it hangs. Initially I thought this would be a simple "find the check code and skip if it's a named pipe" However scanner.c does the right thing (tm) - it skips the checksum of the file if it's zero length. A little digging later shows that it's the filters that are biting me - I watch for executable and scripts in /tmp - and they do not skip trying to open and read a file if it's zero length. I'd submit a patch but I have a question - there seems to be a bit of confusion over what state context is in when filters are called and whether "context" and/or "context->file_stats" can be null in a filter. For example, filter_sticky.c checks if context or context->file_stats is NULL, however, filter_group doesn't bother. filter_uid checks to see if context->file_stats or context is NULL (well, it would have crashed by then if context was NULL...) Does anyone know the answer? Many thanks, Adrian -- Adrian Bridgett - adrian at smop.co.uk GPG key available on public key servers From dmvasil at ornl.gov Thu Feb 8 11:21:13 2007 From: dmvasil at ornl.gov (David Vasil) Date: Thu, 08 Feb 2007 11:21:13 -0500 Subject: [osiris-devel] Re: context in filters In-Reply-To: <20070204231705.GA31995@smop.co.uk> References: <20070204231705.GA31995@smop.co.uk> Message-ID: <45CB4DF9.8030507@ornl.gov> Adrian Bridgett wrote: > Hi, and a huge thank you for osiris, I'm a huge fan :D > > I've had a problem where if the daemon is asked to scan a directory > including a named pipe then it hangs. Initially I thought this would > be a simple "find the check code and skip if it's a named pipe" > > However scanner.c does the right thing (tm) - it skips the checksum of > the file if it's zero length. > > A little digging later shows that it's the filters that are biting me > - I watch for executable and scripts in /tmp - and they do not skip > trying to open and read a file if it's zero length. > > I'd submit a patch but I have a question - there seems to be a bit of > confusion over what state context is in when filters are called and > whether "context" and/or "context->file_stats" can be null in a filter. > > For example, filter_sticky.c checks if context or context->file_stats > is NULL, however, filter_group doesn't bother. > > filter_uid checks to see if context->file_stats or context is NULL > (well, it would have crashed by then if context was NULL...) > > Does anyone know the answer? The original developer of Osiris is on hiatus, so some people have been helping out with patches and stuff like this. It is likely an oversight in the filter_group code that it does not first check if the file_stats is null. It looks like there are two options to fix this. Either check if file_stats is null in scanner.c:process_file() before the filters are applied, or check if it is null in each of the filters that would use it. Is there any reason why file_stats could be null in process_file and filters would still want to be applied? Maybe something like filter_regex, etc... Anyhow, there are several filters that dont properly check for file_stats != NULL right now before using file_stats. Those are filter_user, filter_tar, and filter_group. Maybe it would be better to just add in those file_stats != NULL to those ones. -- -dave From Gerhard.Lausser at consol.de Mon Feb 26 14:07:47 2007 From: Gerhard.Lausser at consol.de (Gerhard Lausser) Date: Mon, 26 Feb 2007 20:07:47 +0100 Subject: [osiris-devel] patch for HP-UX Message-ID: <029b01c759d9$676f2120$0202fea9@int.consol.de> Hi list, i made a patch for osiris-4.2.3 leading to successful compiles under the following OS/C combinations: 1) HP-UX B.11.23 ia64 C-ANSI-C C.06.10 2) HP-UX B.11.23 ia64 C-ANSI-C C.05.55 3) HP-UX B.11.11 9000 C-ANSI-C B.11.11.10 4) HP-UX B.11.11 9000 GCC 4.1.1 Instead of using the systems' ssl-libraries, i compiled my own (0.9.8e) for 1)2) ./Configure hpux-ia64-cc no-zlib no-asm no-share for 3) ./Configure hpux-parisc-cc no-zlib no-asm no-shared "+DD32" for 4) ./Configure hpux-parisc-gcc no-zlib no-asm no-shared I used a temporary installation path for the static libssl.a like this: LOCALDIR=/tmp/local cd openssl-0.9.8e ./Configure hpux-parisc-cc --prefix=$LOCALDIR \ no-zlib no-asm no-shared make install cd ../osiris-4.2.3 ./configure --with-ssl-dir=$LOCALDIR make agent make install You can download the patch and a description of the changes at http://people.consol.de/~lausser/osiris Greetings from Munich, Gerhard