Bug 713098 - adding config file with strict permissions fails when adding into config channel
adding config file with strict permissions fails when adding into config channel
Status: CLOSED DUPLICATE of bug 843041
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Client (Show other bugs)
540
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: Michael Mráka
Red Hat Satellite QA List
:
: 738963 (view as bug list)
Depends On:
Blocks: 819027
  Show dependency treegraph
 
Reported: 2011-06-14 06:07 EDT by Petr Sklenar
Modified: 2013-06-20 09:57 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-20 09:57:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Petr Sklenar 2011-06-14 06:07:28 EDT
Description of problem:
adding config file with special character fails when adding into config channel

Version-Release number of selected component (if applicable):
rhncfg-management-5.9.27-17.el6.noarch

How reproducible:
always

Steps to Reproduce:
1. have a file with special char, try /etc/shadow
2. rhncfg-manager add -c created-from-ppc-machine /etc/shadow
  
Actual results:
# rhncfg-manager add -c created-from-ppc-machine /etc/shadow
Pushing to channel created-from-ppc-machine:
Traceback (most recent call last):
  File "/usr/bin/rhncfg-manager", line 46, in <module>
    sys.exit(Main().main() or 0)
  File "/usr/share/rhn/config_common/rhn_main.py", line 187, in main
    handler.run()
  File "/usr/share/rhn/config_management/rhncfg_add.py", line 111, in run
    delim_end=delim_end)
  File "/usr/share/rhn/config_management/rpc_repository.py", line 145, in put_file
    delim_start=delim_start, delim_end=delim_end)
  File "/usr/share/rhn/config_common/repository.py", line 199, in _make_file_info
    params.update(self.make_stat_info(local_path, file_stat))
  File "/usr/share/rhn/config_common/repository.py", line 104, in make_stat_info
    ret['mode'] = deci_to_octal(ret['mode'] & 07777)
  File "/usr/share/rhn/config_common/repository.py", line 51, in deci_to_octal
    return int(oct_str)
ValueError: invalid literal for int() with base 10: '

Expected results:
file is added

Additional info:
this is not Regression
Comment 2 Petr Sklenar 2011-06-14 06:12:20 EDT
it looks like its issue with permssions, when rhncfg cannot read the file (etc/shadow=chmod 0700)

# touch /tmp/a
# chmod a-rw /tmp/a
# ll /tmp/a
----------. 1 root root 0 Jun 14 06:09 /tmp/a
# rhncfg-manager add -c created-from-ppc-machine /tmp/a 
Pushing to channel created-from-ppc-machine:
Traceback (most recent call last):
  File "/usr/bin/rhncfg-manager", line 46, in <module>
    sys.exit(Main().main() or 0)
  File "/usr/share/rhn/config_common/rhn_main.py", line 187, in main
    handler.run()
  File "/usr/share/rhn/config_management/rhncfg_add.py", line 111, in run
    delim_end=delim_end)
  File "/usr/share/rhn/config_management/rpc_repository.py", line 145, in put_file
    delim_start=delim_start, delim_end=delim_end)
  File "/usr/share/rhn/config_common/repository.py", line 199, in _make_file_info
    params.update(self.make_stat_info(local_path, file_stat))
  File "/usr/share/rhn/config_common/repository.py", line 104, in make_stat_info
    ret['mode'] = deci_to_octal(ret['mode'] & 07777)
  File "/usr/share/rhn/config_common/repository.py", line 51, in deci_to_octal
    return int(oct_str)
ValueError: invalid literal for int() with base 10: ''
Comment 3 Jan Pazdziora 2012-03-15 11:19:54 EDT
*** Bug 738963 has been marked as a duplicate of this bug. ***
Comment 6 Lukas Pramuk 2013-06-20 09:57:44 EDT

*** This bug has been marked as a duplicate of bug 843041 ***

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