Main Page | Class List | File List | Class Members | File Members

acls.h

Go to the documentation of this file.
00001 /* Copyright (c) 1993-2002
00002  *      Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
00003  *      Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
00004  * Copyright (c) 1987 Oliver Laumann
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2, or (at your option)
00009  * any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program (see the file COPYING); if not, write to the
00018  * Free Software Foundation, Inc.,
00019  * 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
00020  *
00021  ****************************************************************
00022  */
00023 
00024 #ifdef MULTIUSER
00025 
00026 /* three known bits: */
00027 #define ACL_EXEC 0              
00028 #define ACL_WRITE 1
00029 #define ACL_READ 2
00030 
00031 #define ACL_BITS_PER_CMD 1      /* for comm.h */
00032 #define ACL_BITS_PER_WIN 3      /* for window.h */
00033 
00034 #define USER_CHUNK 8
00035 
00036 #define ACLBYTE(data, w)   ((data)[(w) >> 3])
00037 #define ACLBIT(w)   (0x80 >> ((w) & 7))
00038 
00039 typedef unsigned char * AclBits;
00040 
00041 /*
00042  * How a user joins a group.
00043  * Here is the node to construct one list per user.
00044  */
00045 struct aclusergroup
00046 {
00047   struct acluser *u;    /* the user who borrows us his rights */
00048   struct aclusergroup *next;
00049 };
00050 #endif /* MULTIUSER */
00051 
00052 /***************
00053  *  ==> user.h
00054  */
00055 
00056 /*
00057  * a copy buffer
00058  */
00059 struct plop
00060 {
00061   char *buf;
00062   int len;
00063 #ifdef ENCODINGS
00064   int enc;
00065 #endif
00066 };
00067 
00068 /*
00069  * A User has a list of groups, and points to other users.  
00070  * users is the User entry of the session owner (creator)
00071  * and anchors all other users. Add/Delete users there.
00072  */
00073 typedef struct acluser
00074 {
00075   struct acluser *u_next;               /* continue the main user list */
00076   char u_name[20+1];            /* login name how he showed up */
00077   char *u_password;             /* his password (may be NullStr). */
00078   int  u_checkpassword;         /* nonzero if this u_password is valid */
00079   int  u_detachwin;             /* the window where he last detached */
00080   int  u_detachotherwin;        /* window that was "other" when he detached */
00081   int  u_Esc, u_MetaEsc;        /* the users screen escape character */
00082 #ifdef COPY_PASTE
00083   struct plop u_plop;
00084 #endif
00085 #ifdef MULTIUSER
00086   int u_id;                     /* a uniq index in the bitfields. */
00087   AclBits u_umask_w_bits[ACL_BITS_PER_WIN];     /* his window create umask */
00088   struct aclusergroup *u_group; /* linked list of pointers to other users */
00089 #endif
00090 } User;
00091 
00092 extern int DefaultEsc, DefaultMetaEsc;
00093 

Generated on Sat Jul 2 20:56:15 2005 for GNU Screen by  doxygen 1.4.3