whoops, forgot to provide linus.h with integrity.c
Steven M. Kramer
smk at linus.UUCP
Wed Jun 29 12:08:25 AEST 1983
so here it is (some of the info here is superfluous for this program alone):
/*
L I N U S I I I
e n o n e
a t t i c
d o i x u
i c r
n e i
g a t
b y
l
e
Copyright October, 1982 Steven M. Kramer
..!linus!smk
This header is part of the LINUS III Security package
and is not to be reproduced, copied, or redistributed without
the expressed consent of the author. This header may not be
redistributed for any commercial venture. The author does not
guarantee or promise in any way that the software works as
advertised. There may be outstanding problems with the software
and the author is not responsible for any security, functional,
or performance problems arising from this software.
*/
/* Standard UNIX header files needed for LINUS III */
#include <stdio.h>
#include <signal.h>
#include <fstab.h>
#include <ctype.h>
#include <sys/types.h>
#include <sgtty.h>
#include <pwd.h>
#include <grp.h>
#include <utmp.h>
#include <time.h>
#include <ndir.h>
#include <setjmp.h>
#include <lastlog.h>
#include <sys/stat.h>
/* Standard UNIX file used for LINUS III */
#define MOUNT_TABLE "/etc/mtab"
#define LAST_LOG "/usr/adm/lastlog"
/* Non-standard UNIX files used for LINUS III */
/* Temp file for attaching */
#define TEMP "/etc/attach"
/* Timeout file that is settable on the fly */
#define TIMEOUT "/etc/timeout"
/* Permissions for initialize/attach/detach */
#define PERMISSIONS "/etc/fstypes"
/* Name of fsck-expected file for new file systems */
#define LOSTFOUND "lost+found"
/* Temporary (already-existing) directory needed to
initialize file systems */
#define MOUNT_DIRECTORY "/mnt"
/* All LINUS III privileges are recorded here */
#define ACCT "/usr/adm/privcmdacct"
/* The file containing a record of all kills from force */
#define IDLE_LOG "/usr/adm/forcelog"
/* Programs used by LINUS III (including full pathname) */
#define FSCK "/etc/fsck"
#define MOUNT "/etc/mount"
#define UMOUNT "/etc/umount"
#define NCHECK "/etc/ncheck"
#define MKFS "/etc/mkfs"
#define MKLOSTFOUND "/etc/mklost+found"
/* Programs used by LINUS III (not including
full pathname) */
#define MAKE_DIRECTORY "mkdir"
#define REMOVE "rm -r"
/* Various definitions used throughout LINUS III */
/* For type boolean */
#define TRUE 1
#define FALSE 0
/* For access(2) call */
#define READ 4
#define WRITE 2
#define EXECUTE 1
/* One minute in units used by time(2) and stat(2) [seconds] */
#define AMINUTE (60L)
/* Maximum number of users ever expected */
#define MAXUSERS 200
#define FLOPPY "rx"
#define OWNER_OF_LOSTFOUND "root"
/* To shield attach temp files from others */
#define PROTECTED_MODE (0600)
#define LINE_SIZE 500
/* For sizing mount_table_template structure */
#define NAMSIZ 32
/* Owners of files systems get this mode for their
file systems they just created with initialize */
#define PROTECTED_EXECUTE_MODE 0750
/* Initialize gives this mode to the
LOSTFOUND file */
#define SEMIPROTECTED_EXECUTE_MODE 0755
/* Maximum full count of characters in
a full pathname of a program */
#define COUNT 200
/* Parameters for the read program */
#define TO 0
#define FROM 1
/* maximum size of a user's name on the system */
#define USER_SIZE 9
#define MAX_FILE_SIZE (sizeof ("/tmp/_senx") + USER_SIZE)
#define eq(x,y) (!strcmp(x,y))
#ifdef GROUP_ACCESS
#define S_IGREAD 0000040
#define S_IGEXEC 0000010
#endif
#ifndef NOJOBCONTROL
#define signal sigset
#endif
/* Boolean type defined here for convenience */
typedef int boolean;
/* Files where special user privileges are defined */
char *PRIV = "/usr/adm/allow.\000\000\000\000\000\000\000\000\000";
/* External system declarations */
extern struct passwd *getpwuid ();
extern struct passwd *getpwnam ();
extern struct passwd *getpwent ();
extern struct group *getgrnam ();
extern struct group *getgrgid ();
struct fstab *getfsent ();
extern time_t time ();
extern FILE * popen ();
extern char *sprintf ();
extern char *ctime ();
extern char *strcpy ();
extern char *strcat ();
extern char *index ();
extern char *rindex ();
extern char *getlogin ();
extern char *mktemp ();
extern char *fgets ();
extern char *malloc ();
extern char *re_comp ();
extern char *ttyname ();
/* External LINUS III declaration */
extern void finish ();
/* Structure used by initialize/attach/detach file system
programs */
struct mount_table_template
{
char file[NAMSIZ];
char spec[NAMSIZ];
};
--
--steve kramer
{allegra,genrad,ihnp4,utzoo,philabs,uw-beaver}!linus!smk (UUCP)
linus!smk at mitre-bedford (ARPA)
More information about the Comp.sources.unix
mailing list