Bug 713098 - adding config file with strict permissions fails when adding into config channel
Summary: adding config file with strict permissions fails when adding into config channel
Keywords:
Status: CLOSED DUPLICATE of bug 843041
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Client
Version: 540
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
: 738963 (view as bug list)
Depends On:
Blocks: 819027
TreeView+ depends on / blocked
 
Reported: 2011-06-14 10:07 UTC by Petr Sklenar
Modified: 2013-06-20 13:57 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-06-20 13:57:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Petr Sklenar 2011-06-14 10:07:28 UTC
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 10:12:20 UTC
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 (Red Hat) 2012-03-15 15:19:54 UTC
*** Bug 738963 has been marked as a duplicate of this bug. ***

Comment 6 Lukas Pramuk 2013-06-20 13:57:44 UTC

*** 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.