auth_unix.h
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:3k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* auth_unix.h - Protocol for UNIX style authentication parameters for RPC */
  2. /* Copyright 1984-1992 Wind River Systems, Inc. */
  3. /*
  4.  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  5.  * unrestricted use provided that this legend is included on all tape
  6.  * media and as a part of the software program in whole or part.  Users
  7.  * may copy or modify Sun RPC without charge, but are not authorized
  8.  * to license or distribute it to anyone else except as part of a product or
  9.  * program developed by the user.
  10.  *
  11.  * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
  12.  * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
  13.  * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
  14.  *
  15.  * Sun RPC is provided with no support and without any obligation on the
  16.  * part of Sun Microsystems, Inc. to assist in its use, correction,
  17.  * modification or enhancement.
  18.  *
  19.  * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
  20.  * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
  21.  * OR ANY PART THEREOF.
  22.  *
  23.  * In no event will Sun Microsystems, Inc. be liable for any lost revenue
  24.  * or profits or other special, indirect and consequential damages, even if
  25.  * Sun has been advised of the possibility of such damages.
  26.  *
  27.  * Sun Microsystems, Inc.
  28.  * 2550 Garcia Avenue
  29.  * Mountain View, California  94043
  30.  */
  31. /*      @(#)auth_unix.h 1.1 86/02/03 SMI      */
  32. /*
  33.  * auth_unix.h, Protocol for UNIX style authentication parameters for RPC
  34.  *
  35.  * Copyright (C) 1984, Sun Microsystems, Inc.
  36.  */
  37. /*
  38. modification history
  39. --------------------
  40. 01g,22sep92,rrr  added support for c++
  41. 01f,26may92,rrr  the tree shuffle
  42. 01e,04oct91,rrr  passed through the ansification filter
  43.   -fixed #else and #endif
  44.   -changed copyright notice
  45. 01d,24oct90,shl  moved authunix_create and authunix_create_default prototypes
  46.  to auth.h. deleted redundant function declarations.
  47. 01c,05oct90,shl  added ANSI function prototypes.
  48.                  added copyright notice.
  49. 01b,26oct89,hjb  upgraded to release 4.0
  50. */
  51. #ifndef __INCauth_unixh
  52. #define __INCauth_unixh
  53. #ifdef __cplusplus
  54. extern "C" {
  55. #endif
  56. /*
  57.  * The system is very weak.  The client uses no encryption for  it
  58.  * credentials and only sends null verifiers.  The server sends backs
  59.  * null verifiers or optionally a verifier that suggests a new short hand
  60.  * for the credentials.
  61.  */
  62. /* The machine name is part of a credential; it may not exceed 255 bytes */
  63. #define MAX_MACHINE_NAME 255
  64. /* gids compose part of a credential; there may not be more than 10 of them */
  65. #define NGRPS 16 /* 4.0 */
  66. /*
  67.  * Unix style credentials.
  68.  */
  69. struct authunix_parms {
  70. u_long  aup_time;
  71. char *aup_machname;
  72. int  aup_uid;
  73. int  aup_gid;
  74. u_int  aup_len;
  75. int *aup_gids;
  76. };
  77. /*
  78.  * If a response verifier has flavor AUTH_SHORT,
  79.  * then the body of the response verifier encapsulates the following structure;
  80.  * again it is serialized in the obvious fashion.
  81.  */
  82. struct short_hand_verf {
  83. struct opaque_auth new_cred;
  84. };
  85. /* function declarations */
  86. #if defined(__STDC__) || defined(__cplusplus)
  87. extern   bool_t       xdr_authunix_parms (XDR *xdrs, struct authunix_parms *p);
  88. #else
  89. extern   bool_t       xdr_authunix_parms ();
  90. #endif /* __STDC__ */
  91. #ifdef __cplusplus
  92. }
  93. #endif
  94. #endif /* __INCauth_unixh */