Bug 127910 - [PATCH] up2date --configure partially imports config from rhn_register
[PATCH] up2date --configure partially imports config from rhn_register
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: up2date (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bret McMillan
Fanny Augustin
Depends On:
  Show dependency treegraph
Reported: 2004-07-15 04:08 EDT by Alexandre Oliva
Modified: 2007-11-30 17:06 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-10-19 15:22:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Get the proxy config to be copied atomically (1.82 KB, patch)
2004-07-15 04:21 EDT, Alexandre Oliva
no flags Details | Diff

  None (edit)
Description Alexandre Oliva 2004-07-15 04:08:40 EDT
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
Comment 2 Alexandre Oliva 2004-07-15 04:21:59 EDT
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 14:51:15 EDT
sounds reasonable
Comment 5 RHEL Product and Program Management 2007-10-19 15:22:15 EDT
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:

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.

Note You need to log in before you can comment on or make changes to this bug.