5 * Main header file for `become'
10 /*----- Licensing notice --------------------------------------------------*
12 * This file is part of `become'
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.
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.
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.
36 /*----- Required headers --------------------------------------------------*/
38 #include <sys/types.h>
39 #include <sys/socket.h>
40 #include <netinet/in.h>
41 #include <arpa/inet.h>
47 /*----- Tracing levels ----------------------------------------------------*/
49 #define TRACE_SILENT 0u
51 #define TRACE_SETUP 2u
54 # define TRACE_DAEMON 8u
55 # define TRACE_CHECK 16u
56 # define TRACE_CLIENT 32u
57 # define TRACE_RAND 64u
58 # define TRACE_CRYPTO 128u
60 # define TRACE_DAEMON 0
61 # define TRACE_CHECK 0
62 # define TRACE_CLIENT 0
64 # define TRACE_CRYPTO 0
66 #define TRACE_YACC 256u
67 #define TRACE_DEBUG 512u
69 #define TRACE_PRIV ( TRACE_RAND | TRACE_CRYPTO | TRACE_YACC | \
71 #define TRACE_DFL ( TRACE_MISC | TRACE_SETUP | TRACE_CLIENT | \
72 TRACE_DAEMON | TRACE_CHECK )
73 #define TRACE_ALL 0xFFFFu
75 /*----- Other magic constants ---------------------------------------------*/
77 #define SERVER_PORT 35523 /* Not allocated properly */
79 /*----- Type definitions --------------------------------------------------*/
81 /* --- Request buffer (plaintext) --- */
83 #define CMDLEN_MAX 1016 /* Max length of command */
85 typedef struct request
{
86 struct in_addr host
; /* Requesting host */
87 uid_t from
; /* Current user ID */
88 uid_t to
; /* Requested UID */
89 char cmd
[CMDLEN_MAX
]; /* Command string requested */
92 /*----- That's all, folks -------------------------------------------------*/