Bring back --with-sys-screenrc configure flag.
[screen-lua.git] / src / acls.h
blob907e9530b1c79ecbd17353c3f5362545199c6ce6
1 /* Copyright (c) 2008, 2009
2 * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
3 * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
4 * Micah Cowan (micah@cowan.name)
5 * Sadrul Habib Chowdhury (sadrul@users.sourceforge.net)
6 * Copyright (c) 1993-2002, 2003, 2005, 2006, 2007
7 * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
8 * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
9 * Copyright (c) 1987 Oliver Laumann
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 3, or (at your option)
14 * any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program (see the file COPYING); if not, see
23 * http://www.gnu.org/licenses/, or contact Free Software Foundation, Inc.,
24 * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
26 ****************************************************************
29 #ifdef MULTIUSER
31 /* three known bits: */
32 #define ACL_EXEC 0
33 #define ACL_WRITE 1
34 #define ACL_READ 2
36 #define ACL_BITS_PER_CMD 1 /* for comm.h */
37 #define ACL_BITS_PER_WIN 3 /* for window.h */
39 #define USER_CHUNK 8
41 #define ACLBYTE(data, w) ((data)[(w) >> 3])
42 #define ACLBIT(w) (0x80 >> ((w) & 7))
44 typedef unsigned char * AclBits;
47 * How a user joins a group.
48 * Here is the node to construct one list per user.
50 struct aclusergroup
52 struct acluser *u; /* the user who borrows us his rights */
53 struct aclusergroup *next;
55 #endif /* MULTIUSER */
57 /***************
58 * ==> user.h
62 * a copy buffer
64 struct plop
66 char *buf;
67 int len;
68 #ifdef ENCODINGS
69 int enc;
70 #endif
74 * A User has a list of groups, and points to other users.
75 * users is the User entry of the session owner (creator)
76 * and anchors all other users. Add/Delete users there.
78 typedef struct acluser
80 struct acluser *u_next; /* continue the main user list */
81 char u_name[20+1]; /* login name how he showed up */
82 char *u_password; /* his password (may be NullStr). */
83 int u_checkpassword; /* nonzero if this u_password is valid */
84 int u_detachwin; /* the window where he last detached */
85 int u_detachotherwin; /* window that was "other" when he detached */
86 int u_Esc, u_MetaEsc; /* the users screen escape character */
87 #ifdef COPY_PASTE
88 struct plop u_plop;
89 #endif
90 #ifdef MULTIUSER
91 int u_id; /* a uniq index in the bitfields. */
92 AclBits u_umask_w_bits[ACL_BITS_PER_WIN]; /* his window create umask */
93 struct aclusergroup *u_group; /* linked list of pointers to other users */
94 #endif
95 } User;
97 extern int DefaultEsc, DefaultMetaEsc;