1833697 Members
4127 Online
110062 Solutions
New Discussion

GetEvent Issues

 
Stephen Hoare
Occasional Contributor

GetEvent Issues

Hi,

I'm having a issue where calling GetEvent (audit.h)causes a segmentation fault. I think this is due to my incorrect use of the function however the man page is a little unclear. Does anyone have experience of this function and can provide either alternative documentation or code samples.

I'm running on HPUX 11.00 and compiling C++ with GCC 3.2
3 REPLIES 3
Jerome Baron
Respected Contributor

Re: GetEvent Issues

Hi,

Can you give us your getevent utilisation ? And which signal does the program received ?
Are you super user when you're using this system call ?

Regards,
Jerome
Stephen Hoare
Occasional Contributor

Re: GetEvent Issues

The program causing a seg fault, which I think is due to stack or memory issues after the call to getEvent. After looking at the problem today I think this is an issue with MAX_SYSCALL.

code snippet

struct aud_event_tbl ev;
struct aud_type sc[MAX_SYSCALL];

getevent(sc, &ev)

the size of MAX_SYSCALL seems to change in different versions of audit.h
Jerome Baron
Respected Contributor

Re: GetEvent Issues

On my system MAX_SYSCALL is set to 512 :
/usr/include/sys/audit.h:#define MAX_SYSCALL 512 /* Max sys call # + 1 */

Regards,
Jerome