1ad37b92 |
1 | /* -*-c-*- |
2 | * |
3 | * $Id* |
4 | * |
5 | * Main header file for `become' |
6 | * |
7 | * (c) 1997 EBI |
8 | */ |
9 | |
10 | /*----- Licensing notice --------------------------------------------------* |
11 | * |
12 | * This file is part of `become' |
13 | * |
14 | * `Become' is free software; you can redistribute it and/or modify |
15 | * it under the terms of the GNU General Public License as published by |
16 | * the Free Software Foundation; either version 2 of the License, or |
17 | * (at your option) any later version. |
18 | * |
19 | * `Become' is distributed in the hope that it will be useful, |
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
22 | * GNU General Public License for more details. |
23 | * |
24 | * You should have received a copy of the GNU General Public License |
25 | * along with `become'; if not, write to the Free Software Foundation, |
26 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
27 | */ |
28 | |
29 | /*----- Revision history --------------------------------------------------* |
30 | * |
31 | * $Log: become.h,v $ |
32 | * Revision 1.1 1997/08/07 09:40:01 mdw |
33 | * Added. No idea why this wasn't done before. |
34 | * |
35 | */ |
36 | |
37 | #ifndef BECOME_H |
38 | #define BECOME_H |
39 | |
40 | #ifdef __cplusplus |
41 | extern "C" { |
42 | #endif |
43 | |
44 | /*----- Required headers --------------------------------------------------*/ |
45 | |
46 | #include <sys/types.h> |
47 | #include <sys/socket.h> |
48 | #include <netinet/in.h> |
49 | #include <arpa/inet.h> |
50 | |
51 | #ifndef CONFIG_H |
52 | # include "config.h" |
53 | #endif |
54 | |
55 | /*----- Tracing levels ----------------------------------------------------*/ |
56 | |
57 | #define TRACE_SILENT 0u |
58 | #define TRACE_MISC 1u |
59 | #define TRACE_SETUP 2u |
60 | #define TRACE_DAEMON 4u |
61 | #define TRACE_RULE 8u |
62 | #define TRACE_CHECK 16u |
63 | #define TRACE_CLIENT 32u |
64 | #define TRACE_RAND 64u |
65 | #define TRACE_CRYPTO 128u |
66 | #define TRACE_YACC 256u |
67 | #define TRACE_DEBUG 512u |
68 | |
69 | #define TRACE_PRIV ( TRACE_RAND | TRACE_CRYPTO | TRACE_YACC | \ |
70 | TRACE_DEBUG ) |
71 | #define TRACE_DFL ( TRACE_MISC | TRACE_SETUP | TRACE_CLIENT | \ |
72 | TRACE_DAEMON | TRACE_CHECK ) |
73 | #define TRACE_ALL 0xFFFFu |
74 | |
75 | /*----- Type definitions --------------------------------------------------*/ |
76 | |
77 | /* --- Request buffer (plaintext) --- */ |
78 | |
79 | #define CMDLEN_MAX 1016 /* Max length of command */ |
80 | |
81 | typedef struct request { |
82 | struct in_addr host; /* Requesting host */ |
83 | uid_t from; /* Current user ID */ |
84 | uid_t to; /* Requested UID */ |
85 | char cmd[CMDLEN_MAX]; /* Command string requested */ |
86 | } request; |
87 | |
88 | /*----- That's all, folks -------------------------------------------------*/ |
89 | |
90 | #ifdef __cplusplus |
91 | } |
92 | #endif |
93 | |
94 | #endif |