Report underlying integer for unknown capabilities
Ieb1ea2ab45d76fc838c11489c2b029d7a5295e0e added a fix to report unknown capabilities as "CAP_UNDEFINED". This change improves on that slightly to use `str(c)` for undefined capabilities rather than losing information. This also better parallels the oslo.config "input" behaviour in `priv_context.CapNameOrInt` Change-Id: Ic59576a4eba7bb8d40aee9e3d383417386aa08aa
This commit is contained in:
@@ -380,7 +380,7 @@ class Daemon(object):
|
||||
def fmt_caps(capset):
|
||||
if not capset:
|
||||
return 'none'
|
||||
fc = [capabilities.CAPS_BYVALUE.get(c, 'CAP_UNDEFINED')
|
||||
fc = [capabilities.CAPS_BYVALUE.get(c, str(c))
|
||||
for c in capset]
|
||||
fc.sort()
|
||||
return '|'.join(fc)
|
||||
|
||||
Reference in New Issue
Block a user