semanage: TypeError: cannot concatenate 'str' and 'NoneType' objects

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

 



Hello,

On a machine without python-audit installed, changing the seuser is
creating the following backtrace.

$ sudo semanage login -m -s root root
Traceback (most recent call last):
  File "/usr/sbin/semanage", line 840, in <module>
    do_parser()
  File "/usr/sbin/semanage", line 819, in do_parser
    args.func(args)
  File "/usr/sbin/semanage", line 201, in handleLogin
    OBJECT.modify(args.login, args.seuser, args.range)
  File "/usr/lib/python2.7/dist-packages/seobject.py", line 594, in modify
    self.__modify(name, sename, serange)
  File "/usr/lib/python2.7/dist-packages/seobject.py", line 589, in __modify
    self.mylog.log("login", name,sename=self.sename,serange=self.serange, serole=",".join(serole), oldserole=",".join(oldserole), oldsename=self.oldsename, oldserange=self.oldserange);
  File "/usr/lib/python2.7/dist-packages/seobject.py", line 110, in log
    message += " sename=" + sename
TypeError: cannot concatenate 'str' and 'NoneType' objects

Looking at the code, it seems that semange is only checking if sename
is an empty string or not (if sename != "") but here it seems that
sename is a None object. I guess the code should also check this?

Cheers,

Laurent Bigonville
_______________________________________________
Selinux mailing list
Selinux@xxxxxxxxxxxxx
To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx.
To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.




[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux