summaryrefslogtreecommitdiff
path: root/src/driver
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2021-04-15 06:41:55 +0000
committermidipix <writeonce@midipix.org>2021-04-15 09:44:27 +0000
commitd385653e04a9455a5c9e34cc9a63c7de375981d7 (patch)
tree826766dbed097a65054d22a509cdeeb5d2af4328 /src/driver
parente524bdc940fa8826a9d076a9b9cb250d1bad71c4 (diff)
downloadslibtool-d385653e04a9455a5c9e34cc9a63c7de375981d7.tar.bz2
slibtool-d385653e04a9455a5c9e34cc9a63c7de375981d7.tar.xz
library: replace all uses of unlink() with unlinkat().
Diffstat (limited to 'src/driver')
-rw-r--r--src/driver/slbt_driver_ctx.c6
1 files changed, 5 insertions, 1 deletions
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);
}
}