home *** CD-ROM | disk | FTP | other *** search
/ Micro R&D 1 / MicroRD-CD-ROM-Vol1-1994.iso / disktools / misc / mufs.lha / muFS / devel / multiuser.h < prev    next >
C/C++ Source or Header  |  1993-02-16  |  3KB  |  107 lines

  1. #ifndef LIBRARIES_MULTIUSER_H
  2. #define LIBRARIES_MULTIUSER_H
  3. /*
  4. **      $Filename: libraries/multiuser.h $
  5. **      $Release: 0.2ß $
  6. **      $Revision: 39.0 $
  7. **
  8. **      multiuser.library definitions
  9. **
  10. **      (C) Copyright 1993 Geert Uytterhoeven
  11. **      All Rights Reserved
  12. */
  13.  
  14. #ifndef EXEC_TYPES_H
  15. #include <exec/types.h>
  16. #endif  /* EXEC_TYPES_H */
  17.  
  18. #ifndef EXEC_LISTS_H
  19. #include <exec/lists.h>
  20. #endif  /* EXEC_LISTS_H */
  21.  
  22. #ifndef EXEC_LIBRARIES_H
  23. #include <exec/libraries.h>
  24. #endif  /* EXEC_LIBRARIES_H */
  25.  
  26. #ifndef LIBRARIES_DOS_H
  27. #include <libraries/dos.h>
  28. #endif  /* LIBRARIES_DOS_H */
  29.  
  30. #ifndef GRAPHICS_TEXT_H
  31. #include <graphics/text.h>
  32. #endif  /* GRAPHICS_TEXT_H */
  33.  
  34. #ifndef UTILITY_TAGITEM_H
  35. #include <utility/tagitem.h>
  36. #endif  /* UTILITY_TAGITEM_H */
  37.  
  38.  
  39. #define MULTIUSERNAME      "multiuser.library"
  40. #define MULTIUSERVERSION   39
  41.  
  42.  
  43. #define muUSERIDSIZE    (32)           /* Maximum size for a UserID */
  44. #define muPASSWORDSIZE  (32)           /* Maximum size for a Password */
  45. #define muUSERNAMESIZE  (220)          /* Maximum size for a User Name */
  46. #define muHOMEDIRSIZE   (256)          /* Maximum size for a Home Directory */
  47.  
  48.  
  49.    /*
  50.     *    Reserved users/groups
  51.     *
  52.     *        WARNING: a uid may NOT be zero, a gid may be zero
  53.     */
  54.  
  55. #define muOWNER_NOBODY  (0x00000000)   /* no rights */
  56. #define muOWNER_SYSTEM  (0xffffffff)   /* always owner */
  57.  
  58. #define muMASK_UID      (0xffff0000)   /* Mask for uid bits */
  59. #define muMASK_GID      (0x0000ffff)   /* Mask for gid bits */
  60.  
  61.  
  62.    /*
  63.     *    Tags for muLogoutA()/muLoginA()
  64.     */
  65.  
  66. #define muT_Input       (TAG_USER+1)   /* filehandle - default is Input() */
  67. #define muT_Output      (TAG_USER+2)   /* filehandle - default is Output() */
  68. #define muT_Graphical   (TAG_USER+3)   /* boolean - default is FALSE */
  69. #define muT_PubScrName  (TAG_USER+4)   /* name of public screen */
  70. #define muT_Task            (TAG_USER+5)    /* name of a task */
  71. #define muT_Own            (TAG_USER+6)    /* make a task of this user */
  72. #define muT_Global        (TAG_USER+7)    /* change it for all tasks on the */
  73.                                                     /* same level as this one */
  74. #define muT_Quiet            (TAG_USER+8)    /* For muLogOutA(), don't give a */
  75.                                                     /* login prompt, simply logout */
  76.  
  77.    /*
  78.     *    User Information Structure
  79.     *
  80.     *    For future compatibility, you should ALWAYS use muAllocUserInfo()
  81.     *    to allocate this structure. NEVER do it by yourself!!
  82.     */
  83.  
  84. struct muUserInfo {
  85.    char UserID[muUSERIDSIZE];
  86.    UWORD uid;
  87.    UWORD gid;
  88.    char UserName[muUSERNAMESIZE];
  89.    char HomeDir[muHOMEDIRSIZE];
  90. };
  91.  
  92.  
  93.    /*
  94.     *    KeyTypes for muGetUserInfo
  95.     */
  96.  
  97. #define muKeyType_First    0
  98. #define muKeyType_Next     1
  99. #define muKeyType_UserID   2  /* Case-sensitive */
  100. #define muKeyType_uid      3
  101. #define muKeyType_gid      4
  102. #define muKeyType_gidNext  5
  103. #define muKeyType_UserName 6  /* Case-insensitive */
  104.  
  105.  
  106. #endif  /* LIBRARIES_MULTIUSER_H */
  107.