commit
82e7d11db8
1
lib/external/fexec.c
vendored
1
lib/external/fexec.c
vendored
@ -69,6 +69,7 @@ pfcexec(struct xbps_handle *xhp, const char *file, const char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
umask(022);
|
||||||
(void)execv(file, __UNCONST(argv));
|
(void)execv(file, __UNCONST(argv));
|
||||||
_exit(errno);
|
_exit(errno);
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
|
@ -103,12 +103,14 @@ xbps_repo_sync(struct xbps_handle *xhp, const char *uri)
|
|||||||
/*
|
/*
|
||||||
* Create repodir in metadir.
|
* Create repodir in metadir.
|
||||||
*/
|
*/
|
||||||
|
prev_umask = umask(022);
|
||||||
if ((rv = xbps_mkpath(lrepodir, 0755)) == -1) {
|
if ((rv = xbps_mkpath(lrepodir, 0755)) == -1) {
|
||||||
if (errno != EEXIST) {
|
if (errno != EEXIST) {
|
||||||
xbps_set_cb_state(xhp, XBPS_STATE_REPOSYNC_FAIL,
|
xbps_set_cb_state(xhp, XBPS_STATE_REPOSYNC_FAIL,
|
||||||
errno, NULL, "[reposync] failed "
|
errno, NULL, "[reposync] failed "
|
||||||
"to create repodir `%s': %s", lrepodir,
|
"to create repodir `%s': %s", lrepodir,
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
|
umask(prev_umask);
|
||||||
free(lrepodir);
|
free(lrepodir);
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
@ -117,6 +119,7 @@ xbps_repo_sync(struct xbps_handle *xhp, const char *uri)
|
|||||||
xbps_set_cb_state(xhp, XBPS_STATE_REPOSYNC_FAIL, errno, NULL,
|
xbps_set_cb_state(xhp, XBPS_STATE_REPOSYNC_FAIL, errno, NULL,
|
||||||
"[reposync] failed to change dir to repodir `%s': %s",
|
"[reposync] failed to change dir to repodir `%s': %s",
|
||||||
lrepodir, strerror(errno));
|
lrepodir, strerror(errno));
|
||||||
|
umask(prev_umask);
|
||||||
free(lrepodir);
|
free(lrepodir);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -131,7 +134,6 @@ xbps_repo_sync(struct xbps_handle *xhp, const char *uri)
|
|||||||
/*
|
/*
|
||||||
* Download plist index file from repository.
|
* Download plist index file from repository.
|
||||||
*/
|
*/
|
||||||
prev_umask = umask(022);
|
|
||||||
if ((rv = xbps_fetch_file(xhp, repodata, NULL)) == -1) {
|
if ((rv = xbps_fetch_file(xhp, repodata, NULL)) == -1) {
|
||||||
/* reposync error cb */
|
/* reposync error cb */
|
||||||
fetchstr = xbps_fetch_error_string();
|
fetchstr = xbps_fetch_error_string();
|
||||||
|
Loading…
Reference in New Issue
Block a user