Bug 183100 - authconfig reports "critical error"s that aren't, and can't be stopped
authconfig reports "critical error"s that aren't, and can't be stopped
Status: CLOSED NEXTRELEASE
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: authconfig (Show other bugs)
4.0
All Linux
medium Severity low
: ---
: ---
Assigned To: Tomas Mraz
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-02-26 03:25 EST by Rubio
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-27 03:44:54 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Rubio 2006-02-26 03:25:43 EST
Description of problem:

authconfig inappropriately calls procedures to write various configuration
files, which at least in the case of systems with no Samba installed results in
the error:

authconfig: critical error writing /etc//samba/smb.conf: No such file or directory

A quick perusal of the manpage would lead one to believe that specifying
"--disablewinbind --disablewinbindauth" should probably silence this (non-)error
by disabling winbind authentication altogether, the only thing noted as caring
about smb.conf.  However, this doesn't work either and the error is still generated.

Reading the source reveals that, while authconfig maintains lots of flags to
enable and disable various features, the actual code in authconfig.c::main()
ignores them all and blindly calls the authInfoWrite... functions for each in
turn, spamming errors about any which return failure.  This means config files
for features explicitly de-selected are still written (for example, /etc/yp.conf
and /etc/pam_smb.conf are written even when "--disablesmbauth --disablenis" is
given; although essentially empty, they should not be written at all), or at
least attempted to be written (cf. the smb.conf file).  Some of this is masked
by the shvarFile weirdness which prevents some files (/etc/hesiod.conf) from
being created pointlessly, but authInfoWriteNIS and authInfoWriteWinbind don't
use shvarFiles, so if smb is not installed (and thus no /etc/samba/ dir), the
unexpected failure to write /etc/samba/smb.conf is revealed for all the world to
see.

Why main() does what it does is strange, given that authinfo.c provides a
function authInfoWrite() which calls the exact same authInfoWrite... functions
main() does but does so conditionally based on the flags.  Thus "--disablenis"
skips writing /etc/yp.conf and "--disablewinbind --disablewinbindauth" skips
even the attempt to write /etc/samba/smb.conf.  Granted, main() reports errors
as they happen and authInfoWrite() does not, but surely this is correctable --
either by adding flag checking to the former, or by pushing error reporting into
the latter.

Please correct this.

Version-Release number of selected component (if applicable):
authconfig-4.6.10-rhel4.1.x86_64.rpm

How reproducible:
Always


Steps to Reproduce:
1. Make sure samba is not installed and /etc/samba/ does not exist
2. Run "authconfig --disablewinbind --disablewinbindauth"
3. See error message.  Become sad.
  
Actual results:
Spurious error message --

authconfig: critical error writing /etc//samba/smb.conf: No such file or directory


Expected results:
With no samba configured, authconfig shouldn't be doing anything with smb.conf
let alone calling the failure to do so a critical error.
At worst, explicitly specifying "--disablewinbind --disablewinbindauth" should
serve to eliminate the error.  Actually, without samba installed these flags
default to disabled anyway, but the inability to silence the error even after
explicitly specifying these is particularly galling.


Additional info:
Comment 1 Tomas Mraz 2006-02-27 03:44:54 EST
This problem will be resolved in the next release of Red Hat Enterprise Linux.
Red Hat does not currently plan to provide a resolution for this in a Red Hat
Enterprise Linux update for currently deployed systems.

With the goal of minimizing risk of change for deployed systems, and in response
to customer and partner requirements, Red Hat takes a conservative approach when
evaluating changes for inclusion in maintenance updates for currently deployed
products. The primary objectives of update releases are to enable new hardware
platform support and to resolve critical defects. 

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