On 07/30/2009 04:42 PM, Joshua Roys wrote:
On 07/30/2009 04:19 PM, Pradeep Kilambi wrote:
Joshua:
Seeing more issues,
- If you try to deploy a file with a content it hits the below block.
D: do_call configfiles.deploy ({'files': [{'config_channel': 'pradtest',
'username': 'root', 'md5sum': '71b517126a29976c78b478065104bc04',
'encoding': 'base64', 'filetype': 'file', 'delim_start': '{|',
'file_contents': 'aGkgc2VsaW51eA==\n', 'groupname': 'root', 'delim_end':
'|}', 'selinux_ctx': 'user_home_t', 'filemode': 644, 'path':
'/tmp/foo.txt', 'revision': 2}]},)
global name 'setfilecon' is not defined
D: Sending back response (49, "Failed deployment, rolled back: global
name 'setfilecon' is not defined", {})
D: do_call packages.checkNeedUpdate ('rhnsd=1',)
D: local action status: (0, 'rpm database not modified since last update
(or package list recently updated)', {})
D: closed db index /var/lib/rpm/Providename
D: closed db index /var/lib/rpm/Packages
D: closed db environment /var/lib/rpm/Packages
D: May free Score board((nil))
diff --git a/client/tools/rhncfg/config_common/transactions.py
b/client/tools/rhncfg/config_common/transactions.py
index 9f87700..2458f9a 100644
--- a/client/tools/rhncfg/config_common/transactions.py
+++ b/client/tools/rhncfg/config_common/transactions.py
...
+ if file_info.has_key('selinux_ctx'):
+ sectx = file_info.get('selinux_ctx')
+ if sectx is not None:
+ log_debug(1, "selinux context: " + sectx);
+ setfilecon(temp_file_path, sectx);
+
...
In the above block setfilecon here is not defined, so it will fail with
a global setfilecon not set. Looks like you left out parts in your patch
that is suppose to set the content of the file once the client gets the
request.
~ Prad
Hello,
How strange, I did somehow completely delete that from all copies of
my code... luckily it's actually one line.
from selinux import setfilecon
And now the package that file is in will depend on libselinux-python,
if it doesn't already.
Sorry about that.
I'll try to address the issues you've found and produce a more
official patch tomorrow.
Joshua Roys
No Problem. I'll wait for your final patch and retest it. I have all
your code deployed and setup so its gonna be a quick test this time.
Thanks again for your contribution.
~ Prad
--
--
Pradeep Kilambi
RHN Satellite Engineering
[email protected]
Phone: +1 919 754 4285
RHCE # 805008680430554
_______________________________________________
Spacewalk-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/spacewalk-devel