From 0a9522210abcefb62495a50399953a7aace45889 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 26 Dec 2013 07:59:11 +0100 Subject: [PATCH] bin/xbps-rindex/sign.c: use access(2) to check if pkg signature exists. --- bin/xbps-rindex/sign.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/xbps-rindex/sign.c b/bin/xbps-rindex/sign.c index 56a13b02..f889d4c9 100644 --- a/bin/xbps-rindex/sign.c +++ b/bin/xbps-rindex/sign.c @@ -183,7 +183,7 @@ sign_repo(struct xbps_handle *xhp, const char *repodir, /* * Skip pkg if file signature exists */ - if ((binpkg_sig_fd = open(binpkg_sig, O_RDONLY)) == 0) { + if ((binpkg_sig_fd = access(binpkg_sig, R_OK)) == 0) { fprintf(stdout, "skipping %s, file signature found.\n", pkgver); free(binpkg); free(binpkg_sig);