Bug 127910

Summary: [PATCH] up2date --configure partially imports config from rhn_register
Product: Red Hat Enterprise Linux 2.1 Reporter: Alexandre Oliva <aoliva>
Component: up2dateAssignee: Bret McMillan <bretm>
Status: CLOSED WONTFIX QA Contact: Fanny Augustin <fmoquete>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.1CC: barryn, tao
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-19 19:22:15 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:
Attachments:
Description Flags
Get the proxy config to be copied atomically none

Description Alexandre Oliva 2004-07-15 08:08:40 UTC
some configuration parameters for up2date are silently migrated from
rhn_register, others aren't
===
* run "up2date --configure"
* enable HTTP proxy
* write "your.proxy.com:8080" in the proxy line
* enable "Use Authentication"
* choose "good_id" and "good_pw" as your user and password
* click "OK"
* run "rhn_register --configure"
* enable HTTP proxy
* write "this.is.bad.com:8080" in the proxy line
* enable "Use Authentication"
* choose "bad_id" and "bad_pw" as user and password
* disable "Use Authentication"
* disable HTTP proxy
* click "OK"
* run "up2date --configure"
* the "enable HTTP proxy" option is NOT migrated but the proxy itself is
* the "Use Authentication" option is NOT migrated but user and
password are
* (and this is bad) if you exit with "Cancel"
/etc/sysconfig/rhn/up2date is overwritten anyway! (Infact, it is
overwritten before the user has a chance to modify the values in the
interface)

Comment 2 Alexandre Oliva 2004-07-15 08:21:59 UTC
Created attachment 101934 [details]
Get the proxy config to be copied atomically

I've been staring at the code, and I can't see how it can be a good idea to
copy settings just because they're non-0 or non-"".  Heck, consider running
rhn_register once, choosing incorrect settings, then running up2date
--configure to fix them.  Every time you run up2date, you'll get teh incorrect
settings migrated.  Fixing this would require moving the rhn_register->up2date
config copying from up2date to rhn_register, or comparing the config file
timestamps to make sure the up2date config is not newer.

Anyhow, this patch takes a different, simpler approach: get the proxy settings
to be copied as a unit, and only if they're enabled.  This guarantees the proxy
settings will at least be self-consistent.

The (untested) patch also disables automatic saving of the config file, which
enables the user to cancel up2date --configure without saving the
modified-by-import config file.  FWIW, I haven't actually verified that
cancelling actually refrains from saving the config file, but, heck, I hope it
behaves sanely :-)

Does this patch look reasonable, or should I pursue one of the other
alternatives presented above?

Comment 4 Adrian Likins 2004-07-28 18:51:15 UTC
sounds reasonable

Comment 5 RHEL Program Management 2007-10-19 19:22:15 UTC
This bug is filed against RHEL2.1, which is in maintenance phase.
During the maintenance phase, only security errata and select mission
critical bug fixes will be released for enterprise products.  Since
this bug does not meet that criteria, it is now being closed.

For more information of the RHEL errata support policy, please visit:
http://www.redhat.com/security/updates/errata/

If you feel this bug is indeed mission critical, please contact your
support representative.  You may be asked to provide detailed
information on how this bug is affecting you.