ptuser: pr_SNameToId/SIdToName: if RPC response empty, force error
authorGarrett Wollman <wollman@csail.mit.edu>
Tue, 24 Jul 2012 02:07:38 +0000 (22:07 -0400)
committerDerrick Brashear <shadow@dementix.org>
Tue, 24 Jul 2012 03:26:43 +0000 (20:26 -0700)
commita738c8dcff8410d82b631a0e71c23b8447db9a0d
tree5e0bcc9a078e22aff15b8fcd2a637579b7a758db
parent98f86cfc53fc987fdaed2f5bb733b5b5d21bfda9
ptuser: pr_SNameToId/SIdToName: if RPC response empty, force error

If the prserver returns an empty response to ubik_PR_NameToID
or ubik_PR_IDToName, but doesn't otherwise give an error,
force a PRINTERNAL error return so that the client knows that the
the return parameter was not updated.  Existing callers seem to
expect this, as pr_SNameToId is often called without initializing
the variable which receives the result and checking only for the
error code.

PRINTERNAL is a new error code.

Change-Id: I3e598a22deb39792a0f208ac09b3c1991d6f1e58
Reviewed-on: http://gerrit.openafs.org/7836
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
src/ptserver/pterror.et
src/ptserver/ptuser.c