auth_unix.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /* @(#)auth_unix.h 2.2 88/07/29 4.0 RPCSRC; from 1.8 88/02/08 SMI */
  2. /*
  3. * Copyright (c) 2010, Oracle America, Inc.
  4. *
  5. * All rights reserved.
  6. *
  7. * Redistribution and use in source and binary forms, with or without
  8. * modification, are permitted provided that the following conditions are met:
  9. *
  10. * * Redistributions of source code must retain the above copyright
  11. * notice, this list of conditions and the following disclaimer.
  12. *
  13. * * Redistributions in binary form must reproduce the above copyright
  14. * notice, this list of conditions and the following disclaimer in
  15. * the documentation and/or other materials provided with the
  16. * distribution.
  17. *
  18. * * Neither the name of the "Oracle America, Inc." nor the names of
  19. * its contributors may be used to endorse or promote products
  20. * derived from this software without specific prior written permission.
  21. *
  22. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
  23. * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  24. * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
  25. * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  26. * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  27. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
  28. * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  29. * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  30. * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  31. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  32. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  33. */
  34. /* @(#)auth_unix.h 1.5 86/07/16 SMI */
  35. /*
  36. * auth_unix.h, Protocol for UNIX style authentication parameters for RPC
  37. */
  38. #ifndef GSSRPC_AUTH_UNIX_H
  39. #define GSSRPC_AUTH_UNIX_H
  40. GSSRPC__BEGIN_DECLS
  41. /*
  42. * The system is very weak. The client uses no encryption for it
  43. * credentials and only sends null verifiers. The server sends backs
  44. * null verifiers or optionally a verifier that suggests a new short hand
  45. * for the credentials.
  46. */
  47. /* The machine name is part of a credential; it may not exceed 255 bytes */
  48. #define MAX_MACHINE_NAME 255
  49. /* gids compose part of a credential; there may not be more than 16 of them */
  50. #define NGRPS 16
  51. /*
  52. * Unix style credentials.
  53. */
  54. struct authunix_parms {
  55. uint32_t aup_time;
  56. char *aup_machname;
  57. int aup_uid;
  58. int aup_gid;
  59. u_int aup_len;
  60. int *aup_gids;
  61. };
  62. extern bool_t xdr_authunix_parms(XDR *, struct authunix_parms *);
  63. /*
  64. * If a response verifier has flavor AUTH_SHORT,
  65. * then the body of the response verifier encapsulates the following structure;
  66. * again it is serialized in the obvious fashion.
  67. */
  68. struct short_hand_verf {
  69. struct opaque_auth new_cred;
  70. };
  71. GSSRPC__END_DECLS
  72. #endif /* !defined(GSSRPC_AUTH_UNIX_H) */