]> git.michaelhowe.org Git - packages/o/openafs.git/commit
Add additional vlprocs safety checks
authorAndrew Deason <adeason@sinenomine.net>
Mon, 20 Jul 2009 17:31:44 +0000 (12:31 -0500)
committerDerrick Brashear <shadow@dementia.org>
Mon, 10 Aug 2009 19:58:00 +0000 (12:58 -0700)
commit0b5686001dff731ad0813213805eb15ede581a06
tree1b0b3bf947317b6cb4d5fbe35f468a17c91c263a
parent33cb5112090e6c375cba9d13934fa7e3c83d7e54
Add additional vlprocs safety checks

This adds additional safety checks to the vlserver's implementation of
the VL_CreateEntry, VL_ReplaceEntry, and VL_UpdateEntry RPCs. Now in all
three of these, any new volume ID that would be added to the VLDB or
that would be newly referenced in a VLDB entry is checked against
duplication in other entries. Additionally, any new volume names added
to the VLDB (either by creation, or modifying an existing volume) are
checked against duplication. This should make it impossible for clients
to make a volume ID or volume name correspond to multiple volume groups
(either conceptually or literally in the vldb).

This also alters the vlserver's implementation of the VL_GetNewVolumeId
RPC such that the vlserver increments maxvolid until the range of volume
IDs [*newvolumeid, *newvolumeid+bumpcount) is unused. 'vos' is modified
to only allocate one new volume id at a time, so we don't skip over
potentially-usable vol ids.

Reviewed-on: http://gerrit.openafs.org/158
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit ef7e0d64e7c29675405299f36ee3b7343b31cb35)
Reviewed-on: http://gerrit.openafs.org/280
src/vlserver/vlprocs.c
src/vlserver/vlutils.c
src/volser/vsprocs.c