Exemple #1
0
def sepolicy_common_info():
    sestatus()
    data = {
        "date": util.time(),
        "platform": util.platform_info(),
        "python": util.python_info(),
        "policy": sepolicy.get_installed_policy(),
        "status": sestatus(),
    }
    return data
Exemple #2
0
def manpage(args):
    from sepolicy.manpage import ManPage, HTMLManPages, manpage_domains, manpage_roles, gen_domains

    path = args.path
    if not args.policy and args.root != "/":
        sepolicy.policy(sepolicy.get_installed_policy(args.root))
    if args.source_files and args.root == "/":
        raise ValueError(_("Alternative root needs to be setup"))

    if args.all:
        test_domains = gen_domains()
    else:
        test_domains = args.domain

    for domain in test_domains:
        m = ManPage(domain, path, args.root,args.source_files, args.web)
        print(m.get_man_page_path())

    if args.web:
        HTMLManPages(manpage_roles, manpage_domains, path, args.os)
Exemple #3
0
def manpage(args):
    from sepolicy.manpage import ManPage, HTMLManPages, manpage_domains, manpage_roles, gen_domains

    path = args.path
    if not args.policy and args.root != "/":
        sepolicy.policy(sepolicy.get_installed_policy(args.root))
    if args.source_files and args.root == "/":
        raise ValueError(_("Alternative root needs to be setup"))

    if args.all:
        test_domains = gen_domains()
    else:
        test_domains = args.domain

    for domain in test_domains:
        m = ManPage(domain, path, args.root, args.source_files, args.web)
        print m.get_man_page_path()

    if args.web:
        HTMLManPages(manpage_roles, manpage_domains, path, args.os)
Exemple #4
0
def manpage(args):
    from sepolicy.manpage import HTMLManPages, manpage_domains, manpage_roles, gen_domains

    path = args.path
    if not args.policy and args.root != "/":
        sepolicy.policy(sepolicy.get_installed_policy(args.root))
    if args.source_files and args.root == "/":
        raise ValueError(_("Alternative root needs to be setup"))

    if args.all:
        test_domains = gen_domains()
    else:
        test_domains = args.domain

    p = Pool()
    for domain in test_domains:
        p.apply_async(manpage_work, [domain, path, args.root, args.source_files, args.web])
    p.close()
    p.join()

    if args.web:
        HTMLManPages(manpage_roles, manpage_domains, path, args.os)