-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 This patch looks good to me. acked. Needed for debugging bugs in fc files. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5D5VwACgkQrlYvE4MpobPtwQCgvhJIPn24N7xxwxme15iaJ7q6 SicAoOcO9GzN9CXFEPeNNhsvsNFj15CY =TjaP -----END PGP SIGNATURE-----
>From 99af41b5e19fee4d35a93f1241d8968a819d3b04 Mon Sep 17 00:00:00 2001 From: Dan Walsh <dwalsh@xxxxxxxxxx> Date: Thu, 4 Aug 2011 09:49:56 -0400 Subject: [PATCH 15/96] libsemanage: print error debug info for buggy fc files Currently if you have a bug in a fc file, the store only reports that you have a problem but not the name of the module, or any hint of what is wrong. This patch will print out as much as been collected in the file_spec at the time of the error. Signed-off-by: Eric Paris <eparis@xxxxxxxxxx> --- libsemanage/src/semanage_store.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libsemanage/src/semanage_store.c b/libsemanage/src/semanage_store.c index c2a1431..37b0c7a 100644 --- a/libsemanage/src/semanage_store.c +++ b/libsemanage/src/semanage_store.c @@ -2350,7 +2350,7 @@ int semanage_fc_sort(semanage_handle_t * sh, const char *buf, size_t buf_len, } if (i == line_len) { ERR(sh, - "WARNING: semanage_fc_sort: Incomplete context."); + "WARNING: semanage_fc_sort: Incomplete context. %s", temp->path); semanage_fc_node_destroy(temp); line_buf = line_end + 1; continue; @@ -2362,7 +2362,7 @@ int semanage_fc_sort(semanage_handle_t * sh, const char *buf, size_t buf_len, if (i + type_len >= line_len) { ERR(sh, - "WARNING: semanage_fc_sort: Incomplete context."); + "WARNING: semanage_fc_sort: Incomplete context. %s", temp->path); semanage_fc_node_destroy(temp); line_buf = line_end + 1; continue; @@ -2387,7 +2387,7 @@ int semanage_fc_sort(semanage_handle_t * sh, const char *buf, size_t buf_len, } if (i == line_len) { ERR(sh, - "WARNING: semanage_fc_sort: Incomplete context."); + "WARNING: semanage_fc_sort: Incomplete context. %s", temp->path); semanage_fc_node_destroy(temp); line_buf = line_end + 1; continue; -- 1.7.6
Attachment:
0015-libsemanage-print-error-debug-info-for-buggy-fc-file.patch.sig
Description: PGP signature