From d385653e04a9455a5c9e34cc9a63c7de375981d7 Mon Sep 17 00:00:00 2001 From: midipix Date: Thu, 15 Apr 2021 06:41:55 +0000 Subject: library: replace all uses of unlink() with unlinkat(). --- src/driver/slbt_driver_ctx.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/driver/slbt_driver_ctx.c') diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c index be70ad5..13efa37 100644 --- a/src/driver/slbt_driver_ctx.c +++ b/src/driver/slbt_driver_ctx.c @@ -658,6 +658,7 @@ static int slbt_init_host_params( struct slbt_host_params * host, struct slbt_host_params * cfgmeta) { + int fdcwd; int arprobe; int arfd; int ecode; @@ -873,9 +874,12 @@ static int slbt_init_host_params( cfgmeta->ar = cfgnative; } + /* fdcwd */ + fdcwd = slbt_driver_fdcwd(dctx); + /* clean up */ if (arfd >= 0) { - unlink(archivename); + unlinkat(fdcwd,archivename,0); close(arfd); } } -- cgit v1.2.3