Bug 259581

Summary: pup is not using the configured (by GNOME panel) proxy value
Product: [Fedora] Fedora Reporter: Eric Lassauge <lassauge>
Component: pirutAssignee: Jeremy Katz <katzj>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: medium    
Version: 7CC: ivazqueznet, james.antill, katzj, rstrode
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-10-05 17:27:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 235703    

Description Eric Lassauge 2007-08-28 10:25:26 UTC
Description of problem:
When starting pirut from the Fedora menu, the proxy configuration done through
the configuration menu with the GNOME panel is not used:
System->Preferences->Network->proxy (I'm not sure of the exact labels of the
menu because I'm running with a french locale)

Version-Release number of selected component (if applicable):
pirut-1.3.9-1.fc7

How reproducible:
See above

Steps to Reproduce:
See above
  
Actual results:
If connected through a proxy pirut can not connect to any servern (and does not
even show it's main window)

Expected results:


Additional info:

[lassauge@dhc02637]$ LANG=C date
Tue Aug 28 12:17:47 CEST 2007
[lassauge@dhc02637]$ ps -efwww | grep pup
lassauge  6050     1  0 12:10 ?        00:00:00 /usr/bin/pup
root      6051  6050  0 12:10 ?        00:00:00 /usr/sbin/userhelper -w pup
root      6054  6051  0 12:10 ?        00:00:01 /usr/bin/python -tt /usr/sbin/pup
lassauge  8684  2642  0 12:17 pts/0    00:00:00 grep pup

Comment 1 Jeremy Katz 2007-08-28 14:40:18 UTC
Have you logged out and logged back in since changing the proxy values?

Comment 2 Eric Lassauge 2007-08-29 17:07:35 UTC
Yes ....
Proxy values are configured since ages on my machine.
If started from a terminal (at least gnome-terminal) the environment variables
are (of course) correctly set and pup is working but never from the GNOME panel
menu entry.

BTW this configured value should (could ?) be used by several other applications
(not speaking from firefox which uses its own configuration for this). I think I
had also the same problem with deluge for example.

Comment 3 Jeremy Katz 2007-08-30 19:59:50 UTC
This had been fixed up... not sure what's regressed; I'll do some poking at it.

Comment 4 Jeremy Katz 2007-09-11 17:05:15 UTC
It looks like gnome-session no longer sets environment variables for the proxy
values configured.

Comment 5 Ray Strode [halfline] 2007-09-11 17:33:22 UTC
It was causing a lot of problems, so I reverted it.

Also, tt didn't work at all if proxy auto configuration was being used.

http_proxy isn't really sufficient I guess.

Comment 6 Jeremy Katz 2007-09-11 22:14:17 UTC
Lots of problems?  Like what?  It shouldn't be any different than the users who
have a proxy set in their environment via their shell initialization.  Except
that it's something which is actually accessible to people rather than requiring
people to go off and edit a shell script.  

Comment 7 Ray Strode [halfline] 2007-09-12 13:54:02 UTC
See bug 217332

Anyway, even if we did set http_proxy, it isn't a good enough solution for
setting your http proxy.  It doesn't cover autoconfiguration...

http_proxy only solves the problem for some users, and given that it's an
environment variable, it isn't dynamic enough to be able to deal with instant apply.

Comment 8 Ignacio Vazquez-Abrams 2007-10-02 18:47:24 UTC
pup/pirut should read the proxy values from wherever they're stored (gconf?) and
apply them when setting up yum.

Comment 9 Jeremy Katz 2007-10-02 18:55:33 UTC
(In reply to comment #8)
> pup/pirut should read the proxy values from wherever they're stored (gconf?) and
> apply them when setting up yum.

pup/pirut running as root can't read settings that the user has stored in gconf.
   Your home directory may require a key (in the kernel keyring) which only the
user session has in cases like AFS, kerberized NFS or ecryptfs.

That's why they need to be set in the environment to be usable.

Comment 10 Ray Strode [halfline] 2007-10-02 19:30:35 UTC
Ideally they wouldn't run as root (but that's the whole consolehelper known
architectual issue).

Could probably setuid based on parent pid I guess, but that's pretty fragile...
 Maybe the solution here is "punt until policykit".

Another option would be to hook consolehelper up to a helper app, and have pirut
run unprivileged and spawn the helper app through consolehelper

Comment 11 Jeremy Katz 2007-10-05 17:27:01 UTC
Wrote a wrapper script to snag the details out of gconf and then exec the real
utilities.  Will be in pirut-1.3.23