Bugzilla – Attachment 769 Details for
Bug 97
Shadowing doesn't log disconnect to vsmserver.log
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Example for auditd logging of application events
auditapp.c (text/x-csrc), 673 bytes, created by
Henrik Andersson
on 2017-01-19 09:20:21 CET
(
hide
)
Description:
Example for auditd logging of application events
Filename:
MIME Type:
Creator:
Henrik Andersson
Created:
2017-01-19 09:20:21 CET
Size:
673 bytes
patch
obsolete
>#include <stdio.h> >#include <stdlib.h> >#include <errno.h> >#include <libaudit.h> > >int main(int argc, char **argv) { > int audit_fd; > int ret; > char msg[160]; > > char *nv_key_operation; > > // open audit log > audit_fd = audit_open(); > if (audit_fd == -1) { > perror("Failed to open audit fd"); > } > > // create an application specific event and send it to audit log > nv_key_operation = audit_encode_nv_string("op", "MYAPP:my_application_defined_event", 0); > sprintf(msg, "%s", nv_key_operation); > free(nv_key_operation); > > if (audit_log_user_message(audit_fd, AUDIT_TRUSTED_APP, msg, NULL, NULL, NULL, 1) == -1) { > perror("Failed to log user message"); > } > > close(audit_fd); >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 97
: 769