X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=server-src%2Famadmin.c;fp=server-src%2Famadmin.c;h=bd26906c1553ac5e6ce6131dae8d209206967b9b;hb=c6f0a88c567f8536c498f554285aed1f8150da18;hp=216f46ad43f22aa45a343bac8b47205e2b89f887;hpb=cd0b924f27312d57bd42f6c4fae2b795139e2d0b;p=debian%2Famanda diff --git a/server-src/amadmin.c b/server-src/amadmin.c index 216f46a..bd26906 100644 --- a/server-src/amadmin.c +++ b/server-src/amadmin.c @@ -1723,7 +1723,10 @@ import_db( skip_whitespace(s, ch); if(ch == '\0' || sscanf(s - 1, "%d.%d.%d", &vers_maj, &vers_min, &vers_patch) != 3) { - goto bad_header; + vers_patch = -1; + if (sscanf(s - 1, "%d.%d", &vers_maj, &vers_min) != 2) { + goto bad_header; + } } skip_integer(s, ch); /* skip over major */ @@ -1732,11 +1735,15 @@ import_db( } ch = *s++; skip_integer(s, ch); /* skip over minor */ - if(ch != '.') { - goto bad_header; + if (vers_patch != -1) { + if (ch != '.') { + goto bad_header; + } + ch = *s++; + skip_integer(s, ch); /* skip over patch */ + } else { + vers_patch = 0; } - ch = *s++; - skip_integer(s, ch); /* skip over patch */ hdr = "comment"; if(ch == '\0') { @@ -2093,7 +2100,7 @@ disklist_one( hp = dp->host; ip = hp->netif; - g_printf("line %d:\n", dp->line); + g_printf("line %d (%s):\n", dp->line, dp->filename); g_printf(" host %s:\n", hp->hostname); g_printf(" interface %s\n",