Bug #8089


RPC: RQCRED_SIZE is not a public interface

Added by Marcel Telka about 4 years ago. Updated about 4 years ago.

In Progress
lib - userland libraries
Start date:
Due date:
% Done:


Estimated time:
Gerrit CR:


The RQCRED_SIZE macro is internal for libnsl(3lib) and it should not be used by the libnsl(3lib) consumers.

In the rpc(3nsl) man page it is documented that rq_clntcred is a pointer to the read only cooked cred. IOW it means that the rq_clntcred field contains a valid pointer to the appropriate structure with the auth parameters. The libnsl(3lib) consumers have no reason to check (or assert) the size of such structures against any (arbitrary) values, like RQCRED_SIZE. Unfortunately, with the #8085 fix many (if not all) libnsl(3lib) consumers were modified to do such asserts. This is plain wrong. If there is any problem with the size of the auth parameters structure(s) the libnsl(3lib) should act appropriately internally. If it does not, it should be fixed, similarly as it was done in #8085 by increasing of the RQCRED_SIZE value from 400 to 700.

Related issues

Related to illumos gate - Bug #8085: Handle RPC groups betterClosedAlex Wilson2017-04-19

Actions #1

Updated by Marcel Telka about 4 years ago

  • Related to Bug #8085: Handle RPC groups better added
Actions #2

Updated by Joshua M. Clulow about 4 years ago

In this case, it seems like it's an invariant that the backing storage for rq_clntcred needs to be big enough for all of the consumers which cast that storage to a particular type. Why would we not want to assert, at build time, that the code is correct?

The header file into which RQCRED_SIZE was moved is probably not the best venue, and we could move it into an internal header file which we do not ship. But the software is otherwise entirely in-gate -- can you explain why we can't check, at compile time, that the invariant holds?

Actions #3

Updated by Gordon Ross about 4 years ago

Would prepending an underscore to the name satisfy your concerns?

Actions #4

Updated by Marcel Telka about 4 years ago

Joshua, Gordon, redmine bug report is not a good tool for discussions. Please raise your questions and/or concerns using some better channel, like the illumos-dev mailing list. Thanks.

Actions #5

Updated by Joshua M. Clulow about 4 years ago

We've asked you to better explain the justification for your bug report, which is here. If this is still a bug, please just answer the questions.

Actions #6

Updated by Marcel Telka about 4 years ago

  • Description updated (diff)

Also available in: Atom PDF