home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 8
/
FreshFishVol8-CD1.bin
/
new
/
util
/
misc
/
multiuser
/
include
/
libraries
/
multiuser.h
< prev
Wrap
C/C++ Source or Header
|
1994-07-02
|
18KB
|
523 lines
#ifndef LIBRARIES_MULTIUSER_H
#define LIBRARIES_MULTIUSER_H
/*
** $VER: multiuser.h 39.14 (29.6.94)
** MultiUser Release 1.8
**
** multiuser.library definitions
**
** (C) Copyright 1993-1994 Geert Uytterhoeven
** All Rights Reserved
*/
#ifndef EXEC_TYPES_H
#include <exec/types.h>
#endif /* EXEC_TYPES_H */
#ifndef EXEC_LISTS_H
#include <exec/lists.h>
#endif /* EXEC_LISTS_H */
#ifndef EXEC_LIBRARIES_H
#include <exec/libraries.h>
#endif /* EXEC_LIBRARIES_H */
#ifndef EXEC_EXECBASE_H
#include <exec/execbase.h>
#endif /* EXEC_EXECBASE_H */
#ifndef EXEC_PORTS_H
#include <exec/ports.h>
#endif /* EXEC_PORTS_H */
#ifndef LIBRARIES_DOS_H
#include <libraries/dos.h>
#endif /* LIBRARIES_DOS_H */
#ifndef UTILITY_TAGITEM_H
#include <utility/tagitem.h>
#endif /* UTILITY_TAGITEM_H */
#ifndef LIBRARIES_LOCALE_H
#include <libraries/locale.h>
#endif /* LIBRARIES_LOCALE_H */
#define MULTIUSERNAME "multiuser.library"
#define MULTIUSERVERSION (39)
#define MULTIUSERCATALOGNAME "multiuser.catalog"
#define MULTIUSERCATALOGVERSION (1)
/*
* Reserved users/groups
*
* WARNING: a uid may NOT be zero, a gid may be zero
*/
#define muOWNER_NOBODY (0x00000000) /* no rights */
#define muOWNER_SYSTEM (0xffffffff) /* always owner */
#define muMASK_UID (0xffff0000) /* Mask for uid bits */
#define muMASK_GID (0x0000ffff) /* Mask for gid bits */
#define muROOT_UID (0xffff) /* super user uid */
#define muROOT_GID (0xffff) /* super user gid */
#define muNOBODY_UID (0x0000) /* nobody uid */
#define muUSERIDSIZE (32) /* Maximum size for a User ID */
#define muGROUPIDSIZE (32) /* Maximum size for a Group ID */
#define muPASSWORDSIZE (32) /* Maximum size for a Password */
#define muUSERNAMESIZE (220) /* Maximum size for a User Name */
#define muGROUPNAMESIZE (220) /* Maximum size for a Group Name */
#define muHOMEDIRSIZE (256) /* Maximum size for a Home Directory */
#define muSHELLSIZE (256) /* Maximum size for a Shell */
/*
* Password File
*
*
* For each user, the Password File must contain a line like this:
*
* <UserID>|<Password>|<uid>|<gid>|<UserName>|<HomeDir>|<Shell>
*
* with:
*
* <UserID> User Login ID (max. muUSERIDSIZE-1 characters)
* <PassKey> Encrypted Password
* <uid> User Number (1 - 65535)
* <gid> Primary Group Number (0 - 65535)
* <UserName> Full User Name (max. muUSERNAMESIZE-1 characters)
* <HomeDir> Home directory (max. muHOMEDIRSIZE-1 characters)
* <Shell> Default Shell (max. muSHELLSIZE-1 characters)
* (not used yet, AS225 compatibility)
*/
#define muPasswd_FileName "passwd" /* for AS225 compatibility */
/*
* Group File
*
*
* This file gives more information about the groups and defines
* the secondary groups (other than the primary group) a user
* belongs to. It exists out of two parts, separated by a blank line.
*
* The first part contains lines with the format:
*
* <GroupID>|<gid>|<MgrUid>|<GroupName>
*
* with:
*
* <GroupID> Group short ID (max. muGROUPIDSIZE-1 characters)
* <gid> Group Number (0 - 65535)
* <MgrUid> User Number of this group's manager, 0 for no
* manager. A group's manager must not belong to the
* group.
* <GroupName> Full Group Name (max. muGROUPNAMESIZE-1 characters)
*
* NOTE: Not every group must have a line in this file, but at least
* one group must have one.
*
*
* The seconds part contains lines with the format:
*
* <uid>:<gid>[,<gid>...]
*
* with:
*
* <uid> User Number (1-65535)
* <gid> Group Number (0 - 65535)
*
* If you think you'll exceed the maximum line length (circa 1K),
* you may use more than one line per user.
*/
#define muGroup_FileName "MultiUser.group"
/*
* Configuration File
*
*
* This file contains lines with options in the form <OPT>=<val>.
* 0 is used for OFF, 1 for ON.
* Defaults to the values between square brackets.
*
* LIMITDOSSETPROTECTION dos.library/SetProtection() cannot change
* protection bits for GROUP and OTHER [1]
* PROFILE execute the Profile if it exists [1]
* LASTLOGINREQ display the Lastlogin requester [1]
* LOGSTARTUP log startup [0]
* LOGLOGIN log successful logins [0]
* LOGLOGINFAIL log failed logins [0]
* LOGPASSWD log successful password changes [0]
* LOGPASSWDFAIL log failed password changes [0]
* LOGCHECKPASSWD log successful password checks [0]
* LOGCHECKPASSWDFAIL log failed password checks [0]
* PASSWDUIDLEVEL users with a uid greather than or equal to
* <val> can change their passwords [0]
* PASSWDGIDLEVEL users with a gid greather than or equal to
* <val> can change their passwords [0]
*
* NOTE: if a user has a uid less than the PASSWDUIDLEVEL AND a gid
* less than PASSWDGIDLEVEL he/she is NOT allowed to change
* his/her password!
*/
#define muConfig_FileName "MultiUser.config"
/*
* Log File
*/
#define muLog_FileName "MultiUser.log"
/*
* Lastlogin File
*/
#define muLastLogin_FileName ".lastlogin"
/*
* Profile
*/
#define muProfile_FileName ".profile"
/*
* Plan file
*/
#define muPlan_FileName ".plan"
/*
* Key File
*
*
* This file must be present in the root directory of every volume
* that uses the MultiUserFileSystem. It must contain 3 lines:
*
* - a pseudo random ASCII key (max. 1023 characters).
* - the directory of the password file, if located on this volume,
* otherwise an empty line (no spaces!).
* e.g. ":MultiUser"
* e.g. ":inet/db" for AS225 compatibility
* - the directory of the configuration file, if located on this
* volume, otherwise an empty line (no spaces!).
* e.g. ":MultiUser"
*
* If there is ANY inconsistency the system will refuse to work!!
*/
#define muKey_FileName ":.MultiUser.keyfile"
/*
* Tags for muLogoutA()
* muLoginA()
* muSetDefProtectionA()
*/
#define muT_Input (TAG_USER+1) /* filehandle - default is Input() */
#define muT_Output (TAG_USER+2) /* filehandle - default is Output() */
#define muT_Graphical (TAG_USER+3) /* boolean - default is FALSE */
#define muT_PubScrName (TAG_USER+4) /* name of public screen */
#define muT_Task (TAG_USER+5) /* task (NOT the name!!) */
#define muT_Own (TAG_USER+6) /* make a task owned by this user */
#define muT_Global (TAG_USER+7) /* change it for all tasks on the */
/* same level as this one */
#define muT_Quiet (TAG_USER+8) /* for muLogoutA(), don't give a */
/* login prompt, simply logout */
#define muT_UserID (TAG_USER+9) /* UserID for muLoginA() */
#define muT_Password (TAG_USER+10) /* Password for muLoginA(), must */
/* be combined with muT_UserID!! */
#define muT_DefProtection (TAG_USER+11) /* Default protection bits */
/* default is RWED GROUP R OTHER R */
#define muT_All (TAG_USER+12) /* for muLogoutA(), logout until */
/* user stack is empty */
#define m