home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 8.ddi / usr / include / sys / idtab.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-08  |  1.3 KB  |  55 lines

  1. /*    Copyright (c) 1990 UNIX System Laboratories, Inc.    */
  2. /*    Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T    */
  3. /*      All Rights Reserved      */
  4.  
  5. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF         */
  6. /*    UNIX System Laboratories, Inc.                         */
  7. /*    The copyright notice above does not evidence any       */
  8. /*    actual or intended publication of such source code.    */
  9.  
  10. #ifndef _SYS_IDTAB_H
  11. #define _SYS_IDTAB_H
  12.  
  13. #ident    "@(#)/usr/include/sys/idtab.h.sl 1.1 4.0 12/08/90 6404 AT&T-USL"
  14. /*
  15.  *
  16.  *    defines for uid/gid translation.
  17.  *
  18.  */
  19. #define MAXSNAME    20
  20. #define CFREE        0
  21. #define CINUSE        1
  22. #define CINTER        2
  23. #define GLOBAL_CH    '.'    /* name of the "global" table    */
  24. #define UID_DEV        0    /* minor device number for uid device    */
  25. #define    GID_DEV        1    /* minor device number for gid device    */
  26. #define UID_MAP        UID_DEV
  27. #define GID_MAP        GID_DEV
  28.  
  29. struct idtab    {
  30.     uid_t        i_rem;
  31.     uid_t        i_loc;
  32. };
  33. #define i_defval i_rem
  34. #define i_tblsiz i_loc
  35.  
  36. struct idhead {
  37.     uid_t        i_default;
  38.     uid_t        i_size;
  39.     unsigned long    i_cend;
  40.     unsigned long    i_next;
  41.     unsigned long    i_tries;
  42.     unsigned long    i_hits;
  43. };
  44. #define HEADSIZE \
  45.     ((sizeof(struct idhead) + sizeof(struct idtab) -1) / sizeof(struct idtab))
  46. #ifdef _KERNEL
  47. extern char    rfheap[];
  48. extern int    rfsize;
  49.  
  50. #define    gluid(a,b)    glid(UID_DEV,a,b)
  51. #define glgid(a,b)    glid(GID_DEV,a,b)
  52. #endif
  53.  
  54. #endif    /* _SYS_IDTAB_H */
  55.