Hello, Bumping a (quite) old mail. If the audit python binding, "semanage login -m -s root root" is crashing with a backtrace in the logging part of the code. It seems that the sename variable is not properly set (type None), the question is, is that expected? The original bug report is located at:https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=734806 Cheers, Laurent Bigonville Le Sun, 18 May 2014 19:18:44 +0200, Laurent Bigonville <bigon@xxxxxxxxxx> a écrit : > 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. _______________________________________________ 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.