aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/linux/modules/block.mk
Commit message (Expand)AuthorAgeFilesLines
* kernel: make kmod package dependencies forward compatibleFelix Fietkau2017-01-271-1/+1
* kernel: remove kmod-ata-imx, it is already built into the kernelFelix Fietkau2017-01-101-19/+0
* kernel: remove obsolete legacy ide kernel module packagesFelix Fietkau2016-08-281-109/+0
* mvebu: enable core drivers in the kernel config instead of packaging themFelix Fietkau2016-05-211-17/+1
* oxnas: move target-specific modules into target's modules.mkDaniel Golle2016-05-171-16/+0
* package: kernel: update dependencies for 4.4Jonas Gorski2015-12-021-1/+1
* kernel: fix menu for scsi-tapeHauke Mehrtens2015-11-181-1/+1
* kernel: support for scsi tape devicesHauke Mehrtens2015-11-151-0/+14
* Newer kernels make use of libahci in ahci-platform, ie. also on non-PCI platf...Zoltan Herpai2015-08-211-5/+7
* kernel: kmod-scsi-core: fix load on installJonas Gorski2015-07-041-2/+2
* generic: add linux 4.1 supportJonas Gorski2015-06-221-0/+2
* modules: package the mvebu ahci driverImre Kaloz2015-04-121-1/+17
* modules: make ahci-platform depend on TARGET_ipq806xJohn Crispin2015-02-251-1/+1
* modules: add ahci-platformJohn Crispin2015-02-241-0/+17
* oxnas: build S-ATA driver as a moduleJohn Crispin2014-12-121-0/+16
* kernel: make most modules use AutoProbeJohn Crispin2013-09-171-6/+2
* kernel: fix imx sata moduleLuka Perkov2013-09-111-1/+2
* kernel: add imx sata moduleLuka Perkov2013-09-101-0/+18
* kernel: be consistent with formatting styleLuka Perkov2013-07-261-13/+12
* kernel: move xor into its own packageJonas Gorski2013-07-181-5/+3
* kernel: split out lib-raid6Jonas Gorski2013-07-181-4/+2
* kernel: kmod-dm depends on cryptoJonas Gorski2013-07-181-0/+1
* kernel: drop kmod-ata-sisJonas Gorski2013-07-181-15/+0
* kernel: make libsas depend on x86Felix Fietkau2013-07-111-0/+1
* packages: clean up the package folderJohn Crispin2013-06-211-0/+606
of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #============================================================================ # Copyright (C) 2007 International Business Machines Corp. # Author: Stefan Berger <stefanb@us.ibm.com> #============================================================================ """Get the managed policy of the system. """ import sys from xen.util import xsconstants from xml.dom import minidom from xen.xm.opts import OptionError from xen.util.acmpolicy import ACMPolicy from xen.xm import main as xm_main from xen.xm.main import server def help(): return """ Usage: xm getpolicy [options] The following options are defined --dumpxml Display the XML of the policy Get the policy managed by xend.""" def display_policy_info(acmpol, policytype, uuid, version, flags, dumpxml, xml): print "Policy name : %s" % acmpol.get_name() print "Policy type : %s" % policytype if uuid: print "Reference : %s" % uuid print "Version of XML policy : %s" % version state = [] if flags & xsconstants.XS_INST_LOAD: state.append("loaded") if flags & xsconstants.XS_INST_BOOT: state.append("activated for boot") print "Policy configuration : %s" % ", ".join(state) if dumpxml: if xml: dom = minidom.parseString(xml.encode("utf-8")) print "%s" % dom.toprettyxml(indent=" ",newl="\n") def display_security_subsystems(xstype): types = [] if xstype & xsconstants.XS_POLICY_ACM: types.append("ACM") xstype ^= xsconstants.XS_POLICY_ACM if xstype != 0: types.append("unsupported (%08x)" % xstype) if len(types) == 0: types.append("None") print "Supported security subsystems : %s \n" % ", ".join(types) def getpolicy(dumpxml): if xm_main.serverType == xm_main.SERVER_XEN_API: xstype = int(server.xenapi.XSPolicy.get_xstype()) display_security_subsystems(xstype) policystate = server.xenapi.XSPolicy.get_xspolicy() if int(policystate['type']) == 0: print "No policy is installed." return if int(policystate['type']) != xsconstants.XS_POLICY_ACM: print "Unknown policy type '%s'." % policystate['type'] else: xml = policystate['repr'] acmpol = None if xml: acmpol = ACMPolicy(xml=xml) display_policy_info(acmpol, xsconstants.ACM_POLICY_ID, policystate['xs_ref'], policystate['version'], int(policystate['flags']), dumpxml, xml) else: xstype = server.xend.security.get_xstype() display_security_subsystems(xstype) xml, flags = server.xend.security.get_policy() acmpol = None if xml != "": dom = None try: dom = minidom.parseString(xml) if dom: acmpol = ACMPolicy(dom=dom) except Exception, e: print "Error parsing the library: " + str(e) if acmpol: display_policy_info(acmpol, xsconstants.ACM_POLICY_ID, None, acmpol.get_version(), flags, dumpxml, xml) else: print "No policy is installed." def main(argv): dumpxml = False if '--dumpxml' in argv: dumpxml = True getpolicy(dumpxml) if __name__ == '__main__': try: main(sys.argv) except Exception, e: sys.stderr.write('Error: %s\n' % str(e)) sys.exit(-1)