diff mbox series

[12/47] libsemanage: use unlink on non directory

Message ID 20241111141706.38039-12-cgoettsche@seltendoof.de (mailing list archive)
State New
Delegated to: Petr Lautrbach
Headers show
Series [01/47] libsemanage: white space cleanup | expand

Commit Message

Christian Göttsche Nov. 11, 2024, 2:16 p.m. UTC
From: Christian Göttsche <cgzones@googlemail.com>

remove(3) just calls unlink(2) for non directories.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
---
 libsemanage/src/semanage_store.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libsemanage/src/semanage_store.c b/libsemanage/src/semanage_store.c
index 7c9f5b2a..29bde24a 100644
--- a/libsemanage/src/semanage_store.c
+++ b/libsemanage/src/semanage_store.c
@@ -880,7 +880,7 @@  int semanage_remove_directory(const char *path)
 				return retval;
 			}
 		} else {
-			if (remove(s) == -1) {
+			if (unlink(s) == -1) {
 				return -3;
 			}
 		}