Ejemplo n.º 1
0
def booleans(args):
    from sepolicy import boolean_desc
    if args.all:
        rc, args.booleans = selinux.security_get_boolean_names()
    args.booleans.sort()

    for b in args.booleans:
        print "%s=_(\"%s\")" % (b, boolean_desc(b))
Ejemplo n.º 2
0
def booleans(args):
    from sepolicy import boolean_desc
    if args.all:
        rc, args.booleans = selinux.security_get_boolean_names()
    args.booleans.sort()

    for b in args.booleans:
        print "%s=_(\"%s\")" % (b, boolean_desc(b))
Ejemplo n.º 3
0
def booleans(args):
    from sepolicy import boolean_desc
    if args.all:
        rc, args.booleans = selinux.security_get_boolean_names()
        if util.PY3:
            args.booleans = [util.decode_input(x) for x in args.booleans]
    args.booleans.sort()

    for b in args.booleans:
        print("%s=_(\"%s\")" % (b, boolean_desc(b)))
Ejemplo n.º 4
0
def booleans(args):
    from sepolicy import boolean_desc
    if args.all:
        rc, args.booleans = selinux.security_get_boolean_names()
        if util.PY3:
            args.booleans = [util.decode_input(x) for x in args.booleans]
    args.booleans.sort()

    for b in args.booleans:
        print("%s=_(\"%s\")" % (b, boolean_desc(b)))
 def get_if_text(self, avc, args):
     txt=sepolicy.boolean_desc(args[0])
     if not isinstance(txt, six.text_type):
         txt=six.text_type(txt, encoding="utf8")
     return _("If you want to %s") % (txt[0].lower() + txt[1:])