aboutsummaryrefslogtreecommitdiff
path: root/lib/libfetch/fetch.h
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2017-02-20 00:14:31 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2017-02-20 00:14:31 +0000
commitd8713bf36156f6c6179cc989fc370a7f9a0ca062 (patch)
tree64424ef80289d108c33eefd3b304034377707e16 /lib/libfetch/fetch.h
parentd893c36a3568d5bf28a900078d6ce42922be6e58 (diff)
downloadsrc-d8713bf36156f6c6179cc989fc370a7f9a0ca062.tar.gz
src-d8713bf36156f6c6179cc989fc370a7f9a0ca062.zip
Add a file descriptor in struct url for netrc
When using libfetch in an application that drops privileges when fetching like pkg(8) then user complain because the application does not read anymore ${HOME}/.netrc. Now a caller can prepare a fd to the said file and manually assign it to the structure. It is also a first step to allow to capsicumize libfetch applications Reviewed by: allanjude, des Approved by: des Differential Revision: https://reviews.freebsd.org/D9678
Notes
Notes: svn path=/head/; revision=313974
Diffstat (limited to 'lib/libfetch/fetch.h')
-rw-r--r--lib/libfetch/fetch.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libfetch/fetch.h b/lib/libfetch/fetch.h
index d56a1036a462..319fca92b847 100644
--- a/lib/libfetch/fetch.h
+++ b/lib/libfetch/fetch.h
@@ -47,6 +47,7 @@ struct url {
off_t offset;
size_t length;
time_t ims_time;
+ int netrcfd;
};
struct url_stat {