[OpenAFS] backup - order of entries in volume set
Harald Barth
haba@kth.se
Fri, 28 Aug 2015 19:10:57 +0200 (CEST)
>>>> Volume set userbackup:
>>>> Entry 1: server .*, partition .*, volumes: user\..*\.backup
>>>> Entry 2: server .*, partition .*, volumes: user\.backup
It's not clear to me if the specification should include the .backup
and/or .readonly suffixes or if the backup program does add the
.backup automatically if you specify for example "user".
> I think the reason for this is a strncmp in "src/bucoord/commands.c"
> line 311:
>
> for (tavols = ps->dupvdlist; add && tavols;
> tavols = tavols->next) {
> if (strncmp(tavols->name, entries[e].name, l) == 0) {
> if ((strcmp(&entries[e].name[l], ".backup") == 0)
> || (strcmp(&entries[e].name[l], ".readonly")
> == 0)
> || (strcmp(&entries[e].name[l], "") == 0))
> add = 0;
> }
> }
Yes, this looks like a bug. It's no idea to even compare the strings
if they are of different length.
Harald.