aboutsummaryrefslogtreecommitdiffstats
path: root/tools/security/secpol_xml2bin.c
diff options
context:
space:
mode:
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-03-29 19:26:13 +0100
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-03-29 19:26:13 +0100
commit7f6d8fe5c9edca501420059a857116e42cd409ee (patch)
tree675e369c9728c656bb291c3c7dbeed3504cd2e09 /tools/security/secpol_xml2bin.c
parent61e7893dafdfa84717d362986c8328effd1a2320 (diff)
downloadxen-7f6d8fe5c9edca501420059a857116e42cd409ee.tar.gz
xen-7f6d8fe5c9edca501420059a857116e42cd409ee.tar.bz2
xen-7f6d8fe5c9edca501420059a857116e42cd409ee.zip
acm: Provide the possibility to choose the VM label of domain-0 in the
kernel line in grub.conf. The format is ssidref=<ssidref>:sHype:<policy name>:<vm label>. The name of the policy specified here must be the same name as the in the policy provided as a module during boot, otherwise the policy will not be accepted and the system then starts without a policy. The user tool for 'xm dumppolicy' has been adapted to show which entry in the binary policy is used by domain-0. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
Diffstat (limited to 'tools/security/secpol_xml2bin.c')
-rw-r--r--tools/security/secpol_xml2bin.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/security/secpol_xml2bin.c b/tools/security/secpol_xml2bin.c
index 581ede1b64..4b8f1dc7cd 100644
--- a/tools/security/secpol_xml2bin.c
+++ b/tools/security/secpol_xml2bin.c
@@ -1163,7 +1163,8 @@ int write_binary(char *filename)
u_int32_t len_ste = 0, len_chwall = 0, len_pr = 0; /* length of policy components */
- sscanf(policy_version_string,"%d.%d", &major, &minor);
+ if (policy_version_string)
+ sscanf(policy_version_string,"%d.%d", &major, &minor);
/* open binary file */
if ((fd =