From 20c65310ead803d21b3bd92417b600885652b324 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Mon, 1 Feb 2010 20:10:13 -0800 Subject: [PATCH] Support MIT dump formats 5 and 6 in hprop Dump formats 5 and 6 differ from the supported version 4 dump format only in that they include policy information for each principal in an extension that the dump parsing code already knows how to ignore and that they include policy lines. Ignore the policy information, since there isn't a corresponding concept in Heimdal, and accept the new dump format versions. Signed-off-by: Love Hornquist Astrand --- kdc/mit_dump.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kdc/mit_dump.c b/kdc/mit_dump.c index 7d39134dc..60f3bbf49 100644 --- a/kdc/mit_dump.c +++ b/kdc/mit_dump.c @@ -256,8 +256,11 @@ mit_prop_dump(void *arg, const char *file) q = nexttoken(&p); /* x.0 */ if(sscanf(q, "%d", &major) != 1) errx(1, "line %d: unknown version", lineno); - if(major != 4) - errx(1, "unknown dump file format, got %d, expected 4", major); + if(major != 4 && major != 5 && major != 6) + errx(1, "unknown dump file format, got %d, expected 4-6", + major); + continue; + } else if(strcmp(q, "policy") == 0) { continue; } else if(strcmp(q, "princ") != 0) { warnx("line %d: not a principal", lineno);