Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

http_proxy et al no longer passed to skopeo #582

Closed
srd424 opened this issue Jan 5, 2024 · 1 comment · Fixed by #583 or #590
Closed

http_proxy et al no longer passed to skopeo #582

srd424 opened this issue Jan 5, 2024 · 1 comment · Fixed by #583 or #590
Labels

Comments

@srd424
Copy link

srd424 commented Jan 5, 2024

#566 added --reset-env to the setpriv call that invokes skopeo, which means information about proxies is no longer passed through.

As a totally horrible hack, putting this in /usr/local/bin/skopeo works:

#! /bin/bash

if [ $(systemctl whoami) = "rpm-ostreed.service" ]; then
	export http_proxy=http://nuc-cache-ostree.lan:3128
	export https_proxy=http://nuc-cache-ostree.lan:3128
fi

/usr/bin/skopeo "$@"

setpriv doesn't seem to support to whitelist env vars - perhaps they could be extracted from the environment before calling it, then passed to env?

@cgwalters
Copy link
Member

Urgh yes...messy. Hmmm...now I'm a bit confused since the commit message there says

Otherwise in some cases the containers/image stack can try to look at things like $HOME which might be set to /root if we're running outside of systemd,

Yet, early on in this function we just return if we're not running in systemd, so we shouldn't in theory hit this code path in the conditions I described...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
2 participants