From e524bdc940fa8826a9d076a9b9cb250d1bad71c4 Mon Sep 17 00:00:00 2001 From: midipix Date: Thu, 15 Apr 2021 06:27:57 +0000 Subject: library: replace all uses of rmdir() with unlinkat(). --- src/logic/slbt_exec_uninstall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/logic/slbt_exec_uninstall.c b/src/logic/slbt_exec_uninstall.c index 2930c26..b904ef7 100644 --- a/src/logic/slbt_exec_uninstall.c +++ b/src/logic/slbt_exec_uninstall.c @@ -90,7 +90,7 @@ static int slbt_exec_uninstall_fs_entry( /* directory? */ if (S_ISDIR(st.st_mode)) { - if (!(rmdir(path))) + if (!unlinkat(fdcwd,path,AT_REMOVEDIR)) return 0; else if ((errno == EEXIST) || (errno == ENOTEMPTY)) @@ -114,7 +114,7 @@ static int slbt_exec_uninstall_fs_entry( *slash = 0; - if (rmdir(dpath)) + if (unlinkat(fdcwd,dpath,AT_REMOVEDIR)) return SLBT_SYSTEM_ERROR(dctx,dpath); } -- cgit v1.2.3