1 /* b-excwho.h --- exclusivity / identity
2 
3    Copyright (C) 2010-2020 Thien-Thi Nguyen
4    Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert
5    Copyright (C) 1982, 1988, 1989 Walter Tichy
6 
7    This file is part of GNU RCS.
8 
9    GNU RCS is free software: you can redistribute it and/or modify it
10    under the terms of the GNU General Public License as published by
11    the Free Software Foundation, either version 3 of the License, or
12    (at your option) any later version.
13 
14    GNU RCS is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty
16    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17    See the GNU General Public License for more details.
18 
19    You should have received a copy of the GNU General Public License
20    along with this program.  If not, see <http://www.gnu.org/licenses/>.
21 */
22 
23 extern bool stat_mine_p (struct stat *st)
24   ALL_NONNULL;
25 extern bool currently_setuid_p (void);
26 extern void nosetid (void);
27 extern void seteid (void);
28 extern void setrid (void);
29 extern char const *getusername (bool suspicious);
30 extern char const *getcaller (void);
31 extern bool caller_login_p (char const *login)
32   ALL_NONNULL;
33 extern struct link *lock_memq (struct link *ls, bool login, void const *x)
34   ALL_NONNULL;
35 extern struct rcslock const *lock_on (struct delta const *delta)
36   ALL_NONNULL;
37 extern void lock_drop (struct link *box, struct link *tp)
38   ALL_NONNULL;
39 extern int addlock_maybe (struct delta *delta, bool selfsame, bool verbose)
40   ALL_NONNULL;
41 
42 /* Idioms.  */
43 
44 #define lock_login_memq(ls,login)  lock_memq (ls,  true, login)
45 #define lock_delta_memq(ls,delta)  lock_memq (ls, false, delta)
46 #define addlock(delta,verbose)  addlock_maybe (delta, false, verbose)
47 
48 /* b-excwho.h ends here */
49