Stop overwriting the commit number for the default save-previous flag setting (false) in semanage.conf. Allows semodule -v -i <policy> to show the correct commit number. Signed-off-by: Richard Haines <richard_c_haines@xxxxxxxxxxxxxx> --- libsemanage/src/semanage_store.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libsemanage/src/semanage_store.c b/libsemanage/src/semanage_store.c index 37ff5ace..936e6495 100644 --- a/libsemanage/src/semanage_store.c +++ b/libsemanage/src/semanage_store.c @@ -1740,9 +1740,9 @@ static int semanage_commit_sandbox(semanage_handle_t * sh) if (!sh->conf->save_previous) { int errsv = errno; - retval = semanage_remove_directory(backup); - if (retval < 0) { + if (semanage_remove_directory(backup) != 0) { ERR(sh, "Could not delete previous directory %s.", backup); + retval = -1; goto cleanup; } errno = errsv; -- 2.14.3