projects
/
kopensolaris-gnu
/
glibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
843110b
)
Transmit and print AVC statistics.
author
drepper
<drepper>
Fri, 17 Sep 2004 00:03:02 +0000
(
00:03
+0000)
committer
drepper
<drepper>
Fri, 17 Sep 2004 00:03:02 +0000
(
00:03
+0000)
nscd/nscd_stat.c
patch
|
blob
|
history
diff --git
a/nscd/nscd_stat.c
b/nscd/nscd_stat.c
index
ebdfeac
..
3e3be5b
100644
(file)
--- a/
nscd/nscd_stat.c
+++ b/
nscd/nscd_stat.c
@@
-29,6
+29,12
@@
#include "nscd.h"
#include "dbg_log.h"
#include "nscd.h"
#include "dbg_log.h"
+#include "selinux.h"
+#ifdef HAVE_SELINUX
+# include <selinux/selinux.h>
+# include <selinux/avc.h>
+#endif /* HAVE_SELINUX */
+
/* We use this to make sure the receiver is the same. */
static const char compilation[21] = __DATE__ " " __TIME__;
/* We use this to make sure the receiver is the same. */
static const char compilation[21] = __DATE__ " " __TIME__;
@@
-71,6
+77,9
@@
struct statdata
unsigned long int client_queued;
int ndbs;
struct dbstat dbs[lastdb];
unsigned long int client_queued;
int ndbs;
struct dbstat dbs[lastdb];
+#ifdef HAVE_SELINUX
+ struct avc_cache_stats cstats;
+#endif /* HAVE_SELINUX */
};
};
@@
-113,6
+122,9
@@
send_stats (int fd, struct database_dyn dbs[lastdb])
}
}
}
}
+ if (selinux_enabled)
+ nscd_avc_cache_stats (&data.cstats);
+
if (TEMP_FAILURE_RETRY (write (fd, &data, sizeof (data))) != sizeof (data))
{
char buf[256];
if (TEMP_FAILURE_RETRY (write (fd, &data, sizeof (data))) != sizeof (data))
{
char buf[256];
@@
-276,6
+288,9
@@
receive_print_stats (void)
data.dbs[i].addfailed, check_file, dbnames[i]);
}
data.dbs[i].addfailed, check_file, dbnames[i]);
}
+ if (selinux_enabled)
+ nscd_avc_print_stats (&data.cstats);
+
close (fd);
exit (0);
close (fd);
exit (0);