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@redhat.com>
Acked-by: Dan Walsh <dwalsh@redhat.com>
This commit is contained in:
Dan Walsh 2011-08-04 09:49:56 -04:00 committed by Eric Paris
parent 9cd587f553
commit 4b00b5c6a4

View File

@ -2296,7 +2296,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;
@ -2308,7 +2308,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;
@ -2333,7 +2333,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;