diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2017-02-20 00:14:31 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2017-02-20 00:14:31 +0000 |
commit | d8713bf36156f6c6179cc989fc370a7f9a0ca062 (patch) | |
tree | 64424ef80289d108c33eefd3b304034377707e16 /lib/libfetch/fetch.h | |
parent | d893c36a3568d5bf28a900078d6ce42922be6e58 (diff) | |
download | src-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.h | 1 |
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 { |