Bug 191352 - ports-mgmt/pkg v 1.2.7_3 does not honor the HTTP_PROXY_AUTH variable.
Summary: ports-mgmt/pkg v 1.2.7_3 does not honor the HTTP_PROXY_AUTH variable.
Status: Closed Feedback Timeout
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-pkg (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-25 01:59 UTC by Victor Sudakov
Modified: 2016-04-20 09:02 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Sudakov 2014-06-25 01:59:46 UTC
[root@km ~] printenv | grep -i prox
HTTP_PROXY=http://proxy.sibptus.ru:3128
HTTP_PROXY_AUTH=basic:*:XXXXXXX:YYYYYYYYYYYYY
NO_PROXY=svn.sibptus.ru
[root@km ~] pkg audit -F
pkg: http://www.vuxml.org/freebsd/vuln.xml.bz2: Forbidden
pkg: Cannot fetch vulnxml file!
[root@km ~]

 From the squid logs at proxy.sibptus.ru I see that pkg does not try to authenticate itself with the proxy:

1403660801.249      0 217.29.84.104 TCP_DENIED/403 1371 GET http://www.vuxml.org/freebsd/vuln.xml.bz2 - NONE/- text/html
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2014-06-25 02:58:45 UTC
Over to maintainers.
Comment 2 Baptiste Daroussin freebsd_committer freebsd_triage 2014-08-05 07:56:48 UTC
pkg is using libfetch and support all what libfetch support which does not include HTTP_PROXY_AUTH

If you want authentication via proxy then http_proxy=http://XXX:YYY@proxy:port
Comment 3 Victor Sudakov 2014-08-05 13:44:34 UTC
(In reply to Baptiste Daroussin from comment #2)
> pkg is using libfetch and support all what libfetch support which does not
> include HTTP_PROXY_AUTH
> 
> If you want authentication via proxy then
> http_proxy=http://XXX:YYY@proxy:port

You are mistaken, man 3 fetch, look for HTTP_PROXY_AUTH
Comment 4 Baptiste Daroussin freebsd_committer freebsd_triage 2014-08-05 13:52:32 UTC
We have no code at all concerning http_proxy* and 100% let libfetch handle and do not catch/modify anything in regards to env variable meaning if pkg(8) does not support HTTP_PROXY_AUTH then it is a libfetch problem
Comment 5 Victor Sudakov 2014-08-05 14:30:13 UTC
(In reply to Baptiste Daroussin from comment #4)
> We have no code at all concerning http_proxy* and 100% let libfetch handle
> and do not catch/modify anything in regards to env variable meaning if
> pkg(8) does not support HTTP_PROXY_AUTH then it is a libfetch problem

Are you sure pkg does not clean up the environment variables in any way?
Comment 6 Victor Sudakov 2014-09-28 06:32:45 UTC
I think this could be related to https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=186398
Comment 7 Baptiste Daroussin freebsd_committer freebsd_triage 2014-12-29 23:36:12 UTC
No it is not freebsd-update portsnap does not use libfetch, we don't.

No pkg does not cleanup env vars
Comment 8 Victor Sudakov 2014-12-30 04:03:57 UTC
(In reply to Baptiste Daroussin from comment #7)
> No it is not freebsd-update portsnap does not use libfetch, we don't.
> 
> No pkg does not cleanup env vars

Excuse me? Who does not use libfetch?

[sudakov@admin ~] ldd `which pkg`
/usr/sbin/pkg:
        libarchive.so.5 => /usr/lib/libarchive.so.5 (0x28079000)
        libelf.so.1 => /usr/lib/libelf.so.1 (0x280b8000)
        libfetch.so.6 => /usr/lib/libfetch.so.6 (0x280d9000)
        libucl.so.1 => /usr/lib/private/libucl.so.1 (0x280ea000)
        libsbuf.so.6 => /lib/libsbuf.so.6 (0x280f8000)
        libssl.so.6 => /usr/lib/libssl.so.6 (0x280fb000)
        libcrypto.so.6 => /lib/libcrypto.so.6 (0x28147000)
        libc.so.7 => /lib/libc.so.7 (0x282aa000)
        libz.so.6 => /lib/libz.so.6 (0x283dc000)
        libbz2.so.4 => /usr/lib/libbz2.so.4 (0x283f0000)
        liblzma.so.5 => /usr/lib/liblzma.so.5 (0x28400000)
        libbsdxml.so.4 => /lib/libbsdxml.so.4 (0x28423000)
[sudakov@admin ~]
Comment 9 Baptiste Daroussin freebsd_committer freebsd_triage 2015-01-17 18:14:07 UTC
erg typo :)
I mean we do :)
Comment 10 Victor Sudakov 2015-01-18 07:25:01 UTC
(In reply to Baptiste Daroussin from comment #9)

Did anyone care to reproduce the problem?
Comment 11 Baptiste Daroussin freebsd_committer freebsd_triage 2015-04-14 19:49:05 UTC
Sorry for late reply , but I cannot reproduce, can you tell me if that still happens with pkg 1.5.0?