Bug 127910 - [PATCH] up2date --configure partially imports config from rhn_register
Summary: [PATCH] up2date --configure partially imports config from rhn_register
Alias: None
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: up2date
Version: 2.1
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Bret McMillan
QA Contact: Fanny Augustin
Depends On:
TreeView+ depends on / blocked
Reported: 2004-07-15 08:08 UTC by Alexandre Oliva
Modified: 2007-11-30 22:06 UTC (History)
2 users (show)

Clone Of:
Last Closed: 2007-10-19 19:22:15 UTC

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

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

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 Product and 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:

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.