From: mdw Date: Thu, 7 Aug 1997 09:40:01 +0000 (+0000) Subject: Added. No idea why this wasn't done before. X-Git-Tag: 1.3.3~136 X-Git-Url: https://git.distorted.org.uk/~mdw/become/commitdiff_plain/1ad37b9272a5bf18fc4ba0e2485734f63ce45ed3 Added. No idea why this wasn't done before. --- diff --git a/src/become.h b/src/become.h new file mode 100644 index 0000000..a38eaad --- /dev/null +++ b/src/become.h @@ -0,0 +1,94 @@ +/* -*-c-*- + * + * $Id* + * + * Main header file for `become' + * + * (c) 1997 EBI + */ + +/*----- Licensing notice --------------------------------------------------* + * + * This file is part of `become' + * + * `Become' is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * `Become' is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with `become'; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/*----- Revision history --------------------------------------------------* + * + * $Log: become.h,v $ + * Revision 1.1 1997/08/07 09:40:01 mdw + * Added. No idea why this wasn't done before. + * + */ + +#ifndef BECOME_H +#define BECOME_H + +#ifdef __cplusplus + extern "C" { +#endif + +/*----- Required headers --------------------------------------------------*/ + +#include +#include +#include +#include + +#ifndef CONFIG_H +# include "config.h" +#endif + +/*----- Tracing levels ----------------------------------------------------*/ + +#define TRACE_SILENT 0u +#define TRACE_MISC 1u +#define TRACE_SETUP 2u +#define TRACE_DAEMON 4u +#define TRACE_RULE 8u +#define TRACE_CHECK 16u +#define TRACE_CLIENT 32u +#define TRACE_RAND 64u +#define TRACE_CRYPTO 128u +#define TRACE_YACC 256u +#define TRACE_DEBUG 512u + +#define TRACE_PRIV ( TRACE_RAND | TRACE_CRYPTO | TRACE_YACC | \ + TRACE_DEBUG ) +#define TRACE_DFL ( TRACE_MISC | TRACE_SETUP | TRACE_CLIENT | \ + TRACE_DAEMON | TRACE_CHECK ) +#define TRACE_ALL 0xFFFFu + +/*----- Type definitions --------------------------------------------------*/ + +/* --- Request buffer (plaintext) --- */ + +#define CMDLEN_MAX 1016 /* Max length of command */ + +typedef struct request { + struct in_addr host; /* Requesting host */ + uid_t from; /* Current user ID */ + uid_t to; /* Requested UID */ + char cmd[CMDLEN_MAX]; /* Command string requested */ +} request; + +/*----- That's all, folks -------------------------------------------------*/ + +#ifdef __cplusplus + } +#endif + +#endif