home *** CD-ROM | disk | FTP | other *** search
- /* $Id: libfunc.h,v 4.1 1994/05/16 14:09:07 ppessi Exp $
- *
- * Internal prototypes for usergroup.library functions
- *
- * Author: ppessi <Pekka.Pessi@hut.fi>
- *
- * This file is part of the AmiTCP/IP User Library.
- *
- * Copyright © 1993 AmiTCP/IP Group, <AmiTCP-Group@hut.fi>
- * Helsinki University of Technology, Finland.
- *
- * Created : Sun Nov 28 17:45:55 1993 ppessi
- * Last modified: Mon May 16 02:15:18 1994 ppessi
- *
- * $Log: libfunc.h,v $
- * Revision 4.1 1994/05/16 14:09:07 ppessi
- * Added getcredentials() function call
- *
- * Revision 3.1 1994/02/24 16:54:18 ppessi
- * Release 3
- *
- * Revision 2.5 1994/02/22 03:01:12 ppessi
- * Removed tty from setlastlog() arguments
- *
- * Revision 2.4 1994/02/17 12:09:16 ppessi
- * Release 2
- *
- * Revision 2.3 1994/02/17 02:22:22 ppessi
- * Saving before downgrading library
- *
- * Revision 2.2 1994/01/27 13:06:03 ppessi
- * Fixed login/logout calls.
- *
- * Revision 2.1 1994/01/24 07:50:18 ppessi
- * Removed gettimeofday()
- *
- * Revision 1.3 1994/01/21 08:30:53 ppessi
- * Removed obsolete functions
- *
- * Revision 1.2 1994/01/20 03:10:16 ppessi
- * Changed the ug_StrError argument type to signed version
- *
- * Revision 1.1 94/01/19 10:06:00 ppessi
- * Initial revision
- */
-
- /*$Date: 1994/05/16 14:09:07 $*/
- /*$Revision: 4.1 $*/
-
- /* Setup functions */
- ASM int R_ug_SetupContextTagList(REG(a0) const UBYTE* pname, REG(a1) struct TagItem *taglist);
- /* TAGCALL ug_SetupContextTags */
- ASM int R_ug_GetErr(void);
- ASM const char *R_ug_StrError(REG(d1) LONG code);
-
- /* User identification */
- ASM uid_t R_getuid(void);
- ASM uid_t R_geteuid(void);
- ASM int R_setreuid(REG(d0) uid_t real, REG(d1) uid_t eff);
- ASM int R_setuid(REG(d0) uid_t id);
-
- /* Group membership */
- ASM gid_t R_getgid(void);
- ASM gid_t R_getegid(void);
- ASM int R_setregid(REG(d0) gid_t real, REG(d1) gid_t eff);
- ASM int R_setgid(REG(d0) gid_t id);
- ASM int R_getgroups(REG(d0) int ngroups, REG(a1) gid_t *groups);
- ASM int R_setgroups(REG(d0) int ngroups, REG(a1) const gid_t *groups);
- ASM int R_initgroups(REG(a1) const char *name, REG(d0) gid_t basegroup);
-
- /* User database */
- ASM struct passwd *getpwnam(REG(a1) const char *name);
- ASM struct passwd *getpwuid(REG(d0) uid_t uid);
- ASM void R_setpwent(void);
- ASM struct passwd *R_getpwent(void);
- ASM void R_endpwent(void);
-
- /* Group database */
- ASM struct group *getgrnam(REG(a1) const char * name);
- ASM struct group *getgrgid(REG(d0) gid_t gid);
- ASM void R_setgrent(void);
- ASM struct group *R_getgrent(void);
- ASM void R_endgrent(void);
-
- /* Password handling */
- ASM char *R_crypt(REG(a0) const char *key, REG(a1) const char *salt);
- ASM char *R_ug_GetSalt(REG(a0) const struct passwd *user, REG(a1) char *buffer, REG(d0) ULONG size);
- ASM char *R_getpass(REG(a1) const char *prompt);
-
- /* Default protections */
- ASM mode_t R_umask(REG(d0) mode_t mask);
- ASM mode_t R_getumask(void);
-
- /* Sessions */
- ASM pid_t R_setsid(void);
- ASM pid_t R_getpgrp(void);
- ASM char *R_getlogin(void);
- ASM int R_setlogin(REG(a1) const char *buffer);
-
- /* Sessions, user login database (utmp) */
- ASM void R_setutent(void);
- ASM struct utmp *R_getutent(void);
- ASM void R_endutent(void);
- ASM struct lastlog *R_getlastlog(REG(d0) uid_t uid);
- ASM int R_setlastlog(REG(d0) uid_t uid, REG(a0) char *name, REG(a1) char *host);
-
- /* Credentials */
- ASM struct UserGroupCredentials *R_getcredentials(REG(a0) struct Task *task);
-