libsepol/cil: Add hexadecimal support for Xen ioportcon statements

Add hexadecimal support for Xen ioportcon statements which was
left out of commit c408c70.

Signed-off-by: James Carter <jwcart2@tycho.nsa.gov>
This commit is contained in:
James Carter 2017-03-22 14:52:46 -04:00
parent da2f2316a3
commit af0ce03ec7

View file

@ -4689,12 +4689,12 @@ int cil_gen_ioportcon(struct cil_db *db, struct cil_tree_node *parse_current, st
if (parse_current->next->cl_head != NULL) {
if (parse_current->next->cl_head->next != NULL &&
parse_current->next->cl_head->next->next == NULL) {
rc = cil_fill_integer(parse_current->next->cl_head, &ioportcon->ioport_low, 10);
rc = cil_fill_integer(parse_current->next->cl_head, &ioportcon->ioport_low, 0);
if (rc != SEPOL_OK) {
cil_log(CIL_ERR, "Improper ioport specified\n");
goto exit;
}
rc = cil_fill_integer(parse_current->next->cl_head->next, &ioportcon->ioport_high, 10);
rc = cil_fill_integer(parse_current->next->cl_head->next, &ioportcon->ioport_high, 0);
if (rc != SEPOL_OK) {
cil_log(CIL_ERR, "Improper ioport specified\n");
goto exit;
@ -4705,7 +4705,7 @@ int cil_gen_ioportcon(struct cil_db *db, struct cil_tree_node *parse_current, st
goto exit;
}
} else {
rc = cil_fill_integer(parse_current->next, &ioportcon->ioport_low, 10);
rc = cil_fill_integer(parse_current->next, &ioportcon->ioport_low, 0);
if (rc != SEPOL_OK) {
cil_log(CIL_ERR, "Improper ioport specified\n");
goto exit;