mirror of
https://github.com/topjohnwu/selinux.git
synced 2025-02-12 14:48:35 +00:00
libsemanage: Return commit number if save-previous false
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@btinternet.com>
This commit is contained in:
parent
2f26c1db5d
commit
f47c291cf8
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user