[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH] Include error messages when logging selinux context get/set failures.



On Tue, 2009-12-15 at 14:14 -0500, Peter Jones wrote:
> On 12/15/2009 02:13 PM, David Lehman wrote:
> 
> > @@ -616,8 +616,8 @@ def setFileContext(fn, con, instroot = '/'):
> >      if con is not None and os.access(full_path, os.F_OK):
> >          try:
> >              rc = (selinux.lsetfilecon(full_path, con) == 0)
> > -        except OSError:
> > -            log.info("failed to set SELinux context for %s" % full_path)
> > +        except OSError as e:
> > +            log.info("failed to set SELinux context for %s: %s" % full_path, e))

Amended commit locally to add opening paren before full_path in above
line.

Dave


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]