bozo: Return BZDOM when BOZO_EnumerateInstance index is negative 31/15031/3
authorMichael Meffie <mmeffie@sinenomine.net>
Wed, 8 Jun 2022 13:03:32 +0000 (09:03 -0400)
committerBenjamin Kaduk <kaduk@mit.edu>
Tue, 21 Jun 2022 23:52:53 +0000 (19:52 -0400)
commit6c7c9f781b3ef3fe084ec7e5eb170a7ce977f3f1
treee2b3bd3af7d3eef38f007977d52b97549b84b466
parent61c391bf7c4edc12a3f37da3662cffb47025279d
bozo: Return BZDOM when BOZO_EnumerateInstance index is negative

The BOZO_EnumerateInstance looks up a bnode instance with a zero-based
index (anum) and returns BZDOM when the index is out of range for the
current list of bosserver bnode instances.

The index is defined as a signed integer by the RPC, but the implementation
does not check for a negative index.  Currently, the implementation
returns an empty string when a negative (out of range) index is given.

Instead, return a BZDOM error to indicate the index is out of range.

Commit ea276e83e37e5bd27285a3d639f2158639172786 (OPENAFS-SA-2019-001:
Skip server OUT args on error) is a prerequisite for this change.

Change-Id: I4df5d35aaccdbfcbe8e8dcc4fa1aa45ee06b06ab
Reviewed-on: https://gerrit.openafs.org/15031
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/bozo/bosoprocs.c