security.h

Definitions pertaining to access levels and security.
This header implements system security. Namely, sysop privilege checking and key/lock security.

Sysops have an array of flags denoting a number of different command and privileges. Most of those privileges are available within the Remote Sysop module, but they have to be checked for in other places, too.

Keys are similar to sysop privileges, but are available everywhere. Keys are numerical (work is underway to establish a better, database-driven, alphanumeric key system). On a normal system (i.e. not hacked and kludged), there are 130 keys, 128 of which are available to people:

0
All users implicitly have this key. It cannot be added or removed, but it can be checked for.

1--128
These keys can be added or removed freely.

129
Only the user ID `Sysop' has this key, or whatever user ID is specified in the SYSOP macro in config.h. The key cannot be added to anyone and it cannot be removed from Sysop's keyring.

BBS features have locks on them. Each lock can only be unlocked by one, specified key. A user needs to possess this key in order to access locked features.

There are two sources of keys for users: their class keyring, and their own, personal keyring. The class keyring is a set of keys granted to an entire user class. Belonging to the class implies ownership of those keys. The personal keyring is the obvious: a keyring that only the user possesses. Operators can grant keys to individuals in addition to the keys their classes provide.

Original banner, legalese and change history follow.


 *****************************************************************************
 **                                                                         **
 **  FILE:     security.h                                                   **
 **  AUTHORS:  Alexios                                                      **
 **  REVISION: A, December 98                                               **
 **  PURPOSE:  Interface to security.c                                      **
 **  NOTES:                                                                 **
 **  LEGALESE:                                                              **
 **                                                                         **
 **  This program 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.                                        **
 **                                                                         **
 **  This program 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    this program;  if   not, write  to  the   Free Software  **
 **  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.              **
 **                                                                         **
 *****************************************************************************


 *
 * $Id: security.h,v 1.3 2001/04/22 14:49:04 alexios Exp $
 *
 * $Log: security.h,v $
 * Revision 1.3  2001/04/22 14:49:04  alexios
 * Merged in leftover 0.99.2 changes and additional bug fixes.
 *
 * Revision 1.0  1998/12/27 15:19:02  alexios
 * Initial revision
 *
 *
 *


o hassysaxs
Check if a user has a certain operator command.
o key_make
Unites user and class keyrings.
o key_exists
Check for a key in a key array.
o key_owns
Check if a user owns a key.
o key_set
Add or remove keys from a key array.
Author:
Alexios

Alphabetic index



This page was generated with the help of DOC++.