Hello, 

This patch fixes the rhncfg-client error when trying to deploy a file
with permission 000. 

The BZ# mentioned in $subject were cloned to BZ#702535 and flipped
Product to Satellite. 

Cheers, 
mmello

-- 
Marcelo Moreira de Mello <mme...@redhat.com>
Red Hat Inc.
From: Marcelo Moreira de Mello <mme...@redhat.com>
Date: Fri, 6 May 2011 00:39:56 -0300
Subject: [PATCH] 702524 - fixed the python error when trying to deploy an file with permission 000 using rhncfg-client

---
 client/tools/rhncfg/config_common/transactions.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/client/tools/rhncfg/config_common/transactions.py b/client/tools/rhncfg/config_common/transactions.py
index de7a459..e55b337 100644
--- a/client/tools/rhncfg/config_common/transactions.py
+++ b/client/tools/rhncfg/config_common/transactions.py
@@ -142,9 +142,12 @@ class DeployTransaction:
             if file_info['filetype'] != 'symlink':
                 os.chown(temp_file_path, uid, gid)
 
-                mode = '600'
                 if file_info.has_key('filemode'):
-                    mode = file_info['filemode']
+                    try:
+                        if string.atoi(str(file_info['filemode'])) > 0:
+                            mode = file_info['filemode']
+                    except:
+                        mode='600'
 
                 mode = string.atoi(str(mode), 8)
                 os.chmod(temp_file_path, mode)
-- 
1.7.1

_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to