1: #include "parms.h"
2: #include "structs.h"
3:
4: #ifdef RCSIDENT
5: static char rcsid[] = "$Header: permit.c,v 1.7 85/01/18 15:34:30 notes Rel $";
6: #endif RCSIDENT
7:
8:
9: /*
10: * this package contains routines which tell whether a person is
11: * allowed various priviledges in the current notefile.
12: *
13: * It is assumed that the notefile descriptor in the notefile base
14: * is up-to-date. No disk I/O is performed to get a more recent copy
15: * of the descriptor.
16: *
17: * original author : Ray Essick may 29, 1981
18: * Modified: Ray Essick November 17, 1981
19: * Modified: Ray Essick January 1982
20: *
21: */
22:
23: allow (io, mode)
24: struct io_f *io;
25: {
26: switch (mode)
27: {
28: case RESPOK:
29: return io -> access & (RESPOK + WRITOK + DRCTOK);
30: break;
31: case READOK:
32: return io -> access & (READOK + DRCTOK);
33: break;
34: case WRITOK:
35: return io -> access & (WRITOK + DRCTOK);
36: break;
37: case DRCTOK:
38: return io -> access & (DRCTOK);
39: break;
40: default:
41: x (1, "permit: bad mode");
42: }
43: return 0; /* to please lint */
44: }
Defined functions
allow
defined in line
23; used 34 times
- in /usr/src/new/notes/src/adnote.c line
39,
49,
81
- in /usr/src/new/notes/src/adresp.c line
33,
60
- in /usr/src/new/notes/src/archiver.c line
71
- in /usr/src/new/notes/src/control.c line
82,
99,
126
- in /usr/src/new/notes/src/dropt.c line
70
- in /usr/src/new/notes/src/dump.c line
31
- in /usr/src/new/notes/src/index.c line
176
- in /usr/src/new/notes/src/loadem.c line
199,
378
- in /usr/src/new/notes/src/newsinput.c line
423,
474,
590
- in /usr/src/new/notes/src/nfaccess.c line
58
- in /usr/src/new/notes/src/nfadmin.c line
139
- in /usr/src/new/notes/src/nfpipe.c line
78,
94,
103
- in /usr/src/new/notes/src/nfprint.c line
123
- in /usr/src/new/notes/src/nfsend.c line
100
- in /usr/src/new/notes/src/nftimestamp.c line
115
- in /usr/src/new/notes/src/readem.c line
272,
465,
509,
553,
645-647(4),
708
Defined variables
rcsid
defined in line
5;
never used