"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "bus/audit.c" between
dbus-1.13.12.tar.xz and dbus-1.13.14.tar.xz

About: D-Bus is an inter-process communication (IPC) system, allowing multiple, concurrently-running applications to communicate with one another. D-Bus supplies both a system daemon and a per-user-login-session daemon. Development version.

audit.c  (dbus-1.13.12.tar.xz):audit.c  (dbus-1.13.14.tar.xz)
skipping to change at line 57 skipping to change at line 57
/** /**
* Open the libaudit fd if appropriate. * Open the libaudit fd if appropriate.
*/ */
void void
bus_audit_init (BusContext *context) bus_audit_init (BusContext *context)
{ {
#ifdef HAVE_LIBAUDIT #ifdef HAVE_LIBAUDIT
int i; int i;
if (audit_fd >= 0)
return;
capng_get_caps_process (); capng_get_caps_process ();
/* Work around a bug in libcap-ng < 0.7.7: it leaks a fd, which isn't /* Work around a bug in libcap-ng < 0.7.7: it leaks a fd, which isn't
* close-on-exec. Assume it will be one of the first few fds. */ * close-on-exec. Assume it will be one of the first few fds. */
for (i = 3; i < 42; i++) for (i = 3; i < 42; i++)
_dbus_fd_set_close_on_exec (i); _dbus_fd_set_close_on_exec (i);
if (!capng_have_capability (CAPNG_EFFECTIVE, CAP_AUDIT_WRITE)) if (!capng_have_capability (CAPNG_EFFECTIVE, CAP_AUDIT_WRITE))
return; return;
skipping to change at line 108 skipping to change at line 111
return -1; return -1;
} }
/** /**
* Close the libaudit fd. * Close the libaudit fd.
*/ */
void void
bus_audit_shutdown (void) bus_audit_shutdown (void)
{ {
#ifdef HAVE_LIBAUDIT #ifdef HAVE_LIBAUDIT
audit_close (audit_fd); if (audit_fd >= 0)
{
audit_close (audit_fd);
audit_fd = -1;
}
#endif /* HAVE_LIBAUDIT */ #endif /* HAVE_LIBAUDIT */
} }
/* The !HAVE_LIBAUDIT case lives in dbus-sysdeps-util-unix.c */ /* The !HAVE_LIBAUDIT case lives in dbus-sysdeps-util-unix.c */
#ifdef HAVE_LIBAUDIT #ifdef HAVE_LIBAUDIT
/** /**
* Changes the user and group the bus is running as. * Changes the user and group the bus is running as.
* *
* @param user the user to become * @param user the user to become
* @param error return location for errors * @param error return location for errors
 End of changes. 2 change blocks. 
1 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)