- Fix avcstat to clear totals
This commit is contained in:
parent
8f3fa78bf6
commit
8371f522b4
@ -1,6 +1,6 @@
|
|||||||
diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/selinux.8 libselinux-1.23.10/man/man8/selinux.8
|
diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/selinux.8 libselinux-1.23.10/man/man8/selinux.8
|
||||||
--- nsalibselinux/man/man8/selinux.8 2004-11-02 14:26:19.000000000 -0500
|
--- nsalibselinux/man/man8/selinux.8 2004-11-02 14:26:19.000000000 -0500
|
||||||
+++ libselinux-1.23.10/man/man8/selinux.8 2005-04-29 14:58:05.000000000 -0400
|
+++ libselinux-1.23.10/man/man8/selinux.8 2005-05-11 10:34:11.000000000 -0400
|
||||||
@@ -1,4 +1,4 @@
|
@@ -1,4 +1,4 @@
|
||||||
-.TH "selinux" "8" "11 Aug 2004" "dwalsh@redhat.com" "SELinux Command Line documentation"
|
-.TH "selinux" "8" "11 Aug 2004" "dwalsh@redhat.com" "SELinux Command Line documentation"
|
||||||
+.TH "selinux" "8" "29 Apr 2005" "dwalsh@redhat.com" "SELinux Command Line documentation"
|
+.TH "selinux" "8" "29 Apr 2005" "dwalsh@redhat.com" "SELinux Command Line documentation"
|
||||||
@ -31,3 +31,40 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/selinux.8 libselinux
|
|||||||
|
|
||||||
.SH FILES
|
.SH FILES
|
||||||
/etc/selinux/config
|
/etc/selinux/config
|
||||||
|
Binary files nsalibselinux/utils/avcstat and libselinux-1.23.10/utils/avcstat differ
|
||||||
|
diff --exclude-from=exclude -N -u -r nsalibselinux/utils/avcstat.c libselinux-1.23.10/utils/avcstat.c
|
||||||
|
--- nsalibselinux/utils/avcstat.c 2005-05-11 10:42:09.000000000 -0400
|
||||||
|
+++ libselinux-1.23.10/utils/avcstat.c 2005-05-11 10:45:11.000000000 -0400
|
||||||
|
@@ -90,12 +90,17 @@
|
||||||
|
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
+ struct avc_cache_stats tot, rel, last;
|
||||||
|
int fd, i, cumulative = 0;
|
||||||
|
struct sigaction sa;
|
||||||
|
char avcstatfile[PATH_MAX];
|
||||||
|
snprintf(avcstatfile, sizeof avcstatfile, "%s%s", selinux_mnt, DEF_STAT_FILE);
|
||||||
|
progname = basename(argv[0]);
|
||||||
|
|
||||||
|
+ memset(&last, 0, sizeof(last));
|
||||||
|
+ memset(&tot, 0, sizeof(tot));
|
||||||
|
+ memset(&rel, 0, sizeof(rel));
|
||||||
|
+
|
||||||
|
while((i = getopt(argc, argv, "cf:h?-")) != -1) {
|
||||||
|
switch (i) {
|
||||||
|
case 'c':
|
||||||
|
@@ -141,11 +146,9 @@
|
||||||
|
if (fd < 0)
|
||||||
|
die("open: \'%s\'", avcstatfile);
|
||||||
|
|
||||||
|
- memset(&last, 0, sizeof(last));
|
||||||
|
for (i = 0;; i++) {
|
||||||
|
char *line;
|
||||||
|
ssize_t ret, parsed = 0;
|
||||||
|
- struct avc_cache_stats tot, rel, last;
|
||||||
|
|
||||||
|
memset(buf, 0, DEF_BUF_SIZE);
|
||||||
|
ret = read(fd, buf, DEF_BUF_SIZE);
|
||||||
|
Binary files nsalibselinux/utils/compute_av and libselinux-1.23.10/utils/compute_av differ
|
||||||
|
Binary files nsalibselinux/utils/compute_create and libselinux-1.23.10/utils/compute_create differ
|
||||||
|
Binary files nsalibselinux/utils/compute_member and libselinux-1.23.10/utils/compute_member differ
|
||||||
|
Loading…
Reference in New Issue
Block a user