On Wed, Mar 23, 2011 at 05:13:36PM +0100, Miroslav Suchý wrote: > On 03/18/2011 08:54 AM, Michael Mraka wrote: > > Marcelo Moreira de Mello wrote: > > % Hello, > > > > Hi Marcelo, > > > > % Following as attached a patch which fixes the python exception when > > % comparing files using the web UI in RHEL6 when SELinux is disabled. > > % > > % The BZ# is flagged to RHN Satellite, but the same issue occurs in > > % Spacewalk. > > % > > % Thank you. > > % > > % Kind Regards, > > % Marcelo Moreira de Mello > > > > I applied your patch to spacewalk master, thanks for it. > > Well, > I have little problem with this patch. > I have no problem with client/tools/rhncfg/config_common/repository.py > part. But I have with client/tools/rhncfg/config_common/file_utils.py part. > > Lets do some exercise: > > [root@XXX190 ~]# ls -ldZ /root > drwxr-x--- root root root:object_r:user_home_dir_t:s0 /root > [root@XXX190 ~]# python > Python 2.4.3 (#1, Dec 10 2010, 17:24:32) > [GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from selinux import lgetfilecon, is_selinux_enabled > >>> is_selinux_enabled() > 0 > >>> lgetfilecon('/root') > [33, 'root:object_r:user_home_dir_t:s0'] > >>> > [root@XXX190 ~]# getenforce > Disabled > > So with this patch the selinux content will not be used even if it has > some content. > Accoring my investigation lgetfilecon(path)[1] returns None (RHEL6, > python 2.4) or 'unlabeled' (Fedora14, python 2.7). > > I would like first see which problem in web UI we are solving. > > Isn't correct fix?: > if cur_sectx == None or cur_sectx == 'unlabeled': > cur_sectx = ''
Mirek, what was the resolution to this issue? -- Jan Pazdziora Principal Software Engineer, Satellite Engineering, Red Hat _______________________________________________ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel