From: "kunal chandarana" <chandarana.kunal@gmail.com>
To: linux-audit@redhat.com
Subject: Auparse library event...............
Date: Fri, 18 Jan 2008 14:28:10 +0530 [thread overview]
Message-ID: <770716a30801180058h4fedb392tce3c27a89e479d27@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1080 bytes --]
+#include <stdio.h>
+#include "auparse.h"
+#include <stdlib.h>
+#include <malloc.h>
int main()
{
auparse_state_t *au;
au = auparse_init(AUSOURCE_LOGS, NULL);
if (au == NULL)
exit(1);
if (!ausearch_set_param(au, "auid", "=", "500", AUSEARCH_STOP_EVENT))
exit(1);
while (ausearch_next_event(au)) {
if (auparse_find_field(au, "auid")) {
printf("auid=%s\n", auparse_interpret_field(au));
}
}
auparse_destroy(au);
}
I tried the above program for but after compilation its giving following
linking error.
/tmp/ccMo3ClJ.o: In function `main':
parselib.c:(.text+0x21): undefined reference to `auparse_init'
parselib.c:(.text+0x61): undefined reference to `ausearch_set_param'
parselib.c:(.text+0x84): undefined reference to `auparse_find_field'
parselib.c:(.text+0x93): undefined reference to `auparse_interpret_field'
parselib.c:(.text+0xae): undefined reference to `ausearch_next_event'
parselib.c:(.text+0xbd): undefined reference to `auparse_destroy'
collect2: ld returned 1 exit status
Do help.......
[-- Attachment #1.2: Type: text/html, Size: 1583 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next reply other threads:[~2008-01-18 8:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-18 8:58 kunal chandarana [this message]
2008-01-18 11:03 ` Auparse library event Valdis.Kletnieks
2008-01-18 11:10 ` Valdis.Kletnieks
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=770716a30801180058h4fedb392tce3c27a89e479d27@mail.gmail.com \
--to=chandarana.kunal@gmail.com \
--cc=linux-audit@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox