Description of problem:
A user accidentally created a "configuration file" named /usr/local/sbin. As this matches a standard directory name, Satellite should prohibit this, or at least rhncfg-client should fail gracefully.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create a configuration file that matches a directory already on the system (e.g., /usr/local/sbin)
2. Attempt to deploy the configuration file
[root@XXXX log]# rhncfg-client get
Traceback (most recent call last):
File "/usr/bin/rhncfg-client", line 34, in ?
sys.exit(Main().main() or 0)
File "/usr/share/rhn/config_common/rhn_main.py", line 187, in main
File "/usr/share/rhn/config_client/rhncfgcli_get.py", line 101, in run
File "/usr/share/rhn/config_common/transactions.py", line 241, in rollback
self._chown_chmod_chcon(d, d, val)
File "/usr/share/rhn/config_common/transactions.py", line 107, in _chown_chmod_chcon
if file_info['filetype'] != 'symlink':
- Deployment of all configuration files shouldn't fail because 1 file is invalid.
- It should be clear which configuration file failed. In the example above, the relevant file was /usr/local/bin, but that is not obvious from the output. Only determined the failed file by editing transactions.py to tell me.
This was fixed a while ago as a side-effect of bug 637833