summaryrefslogtreecommitdiff
path: root/smrsh
diff options
context:
space:
mode:
authorAndreas Beckmann <debian@abeckmann.de>2012-10-01 19:58:38 +0200
committerAndreas Beckmann <debian@abeckmann.de>2012-10-01 19:58:38 +0200
commit6b71060b84a2d9111ec847e66cc5160aab8a45e8 (patch)
tree599eb55ae3e0ec0f95d829c185831f3027eec78b /smrsh
parent6c193ce1dd1d07ebdc1372e38bc4908ab1c37705 (diff)
downloadsendmail-6b71060b84a2d9111ec847e66cc5160aab8a45e8.tar.gz
Imported Upstream version 8.9.3upstream/8.9.3
Diffstat (limited to 'smrsh')
l---------smrsh/Build1
-rw-r--r--smrsh/Makefile8
-rw-r--r--smrsh/Makefile.dist76
-rw-r--r--smrsh/Makefile.m496
-rw-r--r--smrsh/README2
-rw-r--r--smrsh/smrsh.834
-rw-r--r--smrsh/smrsh.c35
7 files changed, 111 insertions, 141 deletions
diff --git a/smrsh/Build b/smrsh/Build
new file mode 120000
index 0000000..6308dba
--- /dev/null
+++ b/smrsh/Build
@@ -0,0 +1 @@
+../BuildTools/bin/Build \ No newline at end of file
diff --git a/smrsh/Makefile b/smrsh/Makefile
deleted file mode 100644
index f2629a8..0000000
--- a/smrsh/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# @(#)Makefile 8.1 (Berkeley) 7/2/95
-
-PROG= smrsh
-MAN8= smrsh.0
-CFLAGS+=-I${.CURDIR}/../src -DNDBM -DNEWDB
-
-.include "../../Makefile.inc"
-.include <bsd.prog.mk>
diff --git a/smrsh/Makefile.dist b/smrsh/Makefile.dist
deleted file mode 100644
index 52b4a20..0000000
--- a/smrsh/Makefile.dist
+++ /dev/null
@@ -1,76 +0,0 @@
-#
-# This Makefile is designed to work on the old "make" program. It does
-# not use the obj subdirectory. It also does not install documentation
-# automatically -- think of it as a quick start for sites that have the
-# old make program (I recommend that you get and port the new make if you
-# are going to be doing any signficant work on sendmail).
-#
-# @(#)Makefile.dist 8.2 (Berkeley) 9/25/96
-#
-
-# use O=-O (usual) or O=-g (debugging)
-O= -O
-
-# location of sendmail source directory
-SRCDIR= ../src
-
-# environment definitions (e.g., -D_AIX3)
-ENVDEF=
-
-# include directories
-INCDIRS=-I${SRCDIR} -I/usr/sww/include
-
-# loader options
-LDOPTS=
-
-# library directories
-LIBDIRS=-L/usr/sww/lib
-
-# libraries required on your system
-LIBS=
-
-# location of smrsh binary (usually /usr/libexec or /usr/etc)
-BINDIR= ${DESTDIR}/usr/libexec
-
-# additional .o files needed
-OBJADD=
-
-################### end of user configuration flags ######################
-
-CFLAGS= -I. $O ${INCDIRS} ${ENVDEF}
-
-OBJS= smrsh.o ${OBJADD}
-
-BINOWN= bin
-BINGRP= bin
-BINMODE=555
-
-ALL= smrsh smrsh.0
-
-all: ${ALL}
-
-smrsh: ${BEFORE} ${OBJS}
- ${CC} -o smrsh ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS}
-
-# Which *roff program has -mandoc support
-NROFF= groff -Tascii
-#NROFF= nroff -h
-MANDOC= -mandoc
-
-smrsh.0: smrsh.8
- ${NROFF} ${MANDOC} smrsh.8 > smrsh.0
-
-install: install-smrsh install-docs
-
-install-smrsh: smrsh
- install -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} smrsh ${BINDIR}
-
-# doesn't actually install them -- you may want to install pre-nroff versions
-install-docs: smrsh.0
-
-clean:
- rm -f ${OBJS} smrsh smrsh.0
-
-# dependencies
-# gross overkill, and yet still not quite enough....
-${OBJS}: ${SRCDIR}/conf.h
diff --git a/smrsh/Makefile.m4 b/smrsh/Makefile.m4
new file mode 100644
index 0000000..5cae3f0
--- /dev/null
+++ b/smrsh/Makefile.m4
@@ -0,0 +1,96 @@
+#
+# This Makefile is designed to work on the old "make" program.
+#
+# @(#)Makefile.m4 8.14 (Berkeley) 7/12/1998
+#
+
+# C compiler
+CC= confCC
+
+# Shell
+SHELL= confSHELL
+
+# use O=-O (usual) or O=-g (debugging)
+O= ifdef(`confOPTIMIZE', `confOPTIMIZE', `-O')
+
+# location of sendmail source directory
+SRCDIR= ifdef(`confSRCDIR', `confSRCDIR', `../../src')
+
+# environment definitions (e.g., -D_AIX3)
+ENVDEF= ifdef(`confENVDEF', `confENVDEF')
+
+# include directories
+INCDIRS=-I${SRCDIR} confINCDIRS
+
+# loader options
+LDOPTS= ifdef(`confLDOPTS', `confLDOPTS')
+
+# library directories
+LIBDIRS=confLIBDIRS
+
+# libraries required on your system
+LIBS= ifdef(`confLIBS', `confLIBS')
+
+# location of smrsh binary (usually /usr/libexec or /usr/etc)
+EBINDIR=${DESTDIR}ifdef(`confEBINDIR', `confEBINDIR', `/usr/libexec')
+
+# additional .o files needed
+OBJADD= ifdef(`confOBJADD', `confOBJADD')
+
+undivert(1)
+
+################### end of user configuration flags ######################
+
+BUILDBIN=confBUILDBIN
+COPTS= -I. ${INCDIRS} ${ENVDEF}
+CFLAGS= $O ${COPTS}
+
+BEFORE= confBEFORE
+OBJS= smrsh.o ${OBJADD}
+
+# Which *roff program has -mandoc support
+NROFF= ifdef(`confNROFF', `confNROFF', `groff -Tascii')
+MANDOC= ifdef(`confMANDOC', `confMANDOC', `-mandoc')
+
+INSTALL=ifdef(`confINSTALL', `confINSTALL', `install')
+BINOWN= ifdef(`confUBINOWN', `confUBINOWN', `bin')
+BINGRP= ifdef(`confUBINGRP', `confUBINGRP', `bin')
+BINMODE=ifdef(`confUBINMODE', `confUBINMODE', `555')
+
+MANOWN= ifdef(`confMANOWN', `confMANOWN', `bin')
+MANGRP= ifdef(`confMANGRP', `confMANGRP', `bin')
+MANMODE=ifdef(`confMANMODE', `confMANMODE', `444')
+
+MANROOT=${DESTDIR}ifdef(`confMANROOT', `confMANROOT', `/usr/share/man/cat')
+MAN8= ${MANROOT}ifdef(`confMAN8', `confMAN8', `8')
+MAN8EXT=ifdef(`confMAN8EXT', `confMAN8EXT', `8')
+MAN8SRC=ifdef(`confMAN8SRC', `confMAN8SRC', `0')
+
+ALL= smrsh smrsh.${MAN8SRC}
+
+all: ${ALL}
+
+smrsh: ${BEFORE} ${OBJS}
+ ${CC} -o smrsh ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS}
+
+undivert(3)
+
+smrsh.${MAN8SRC}: smrsh.8
+ ${NROFF} ${MANDOC} smrsh.8 > smrsh.${MAN8SRC}
+
+install: install-smrsh install-docs
+
+install-smrsh: smrsh
+ ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} smrsh ${EBINDIR}
+
+install-docs: smrsh.${MAN8SRC}
+ifdef(`confNO_MAN_INSTALL', `dnl',
+` ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} smrsh.${MAN8SRC} ${MAN8}/smrsh.${MAN8EXT}')
+
+clean:
+ rm -f ${OBJS} smrsh smrsh.${MAN8SRC}
+
+################ Dependency scripts
+include(confBUILDTOOLSDIR/M4/depend/ifdef(`confDEPEND_TYPE', `confDEPEND_TYPE',
+`generic').m4)dnl
+################ End of dependency scripts
diff --git a/smrsh/README b/smrsh/README
index 13f545c..fa4e2de 100644
--- a/smrsh/README
+++ b/smrsh/README
@@ -3,7 +3,7 @@
README smrsh - sendmail restricted shell.
- @(#)README 8.2 11/11/95
+ @(#)README 8.2 11/11/1995
This README file is provided as a courtesy of the CERT Coordination Center,
diff --git a/smrsh/smrsh.8 b/smrsh/smrsh.8
index a28bd0a..af08fc4 100644
--- a/smrsh/smrsh.8
+++ b/smrsh/smrsh.8
@@ -1,36 +1,14 @@
-.\" Copyright (c) 1993 Eric P. Allman
+.\" Copyright (c) 1998 Sendmail, Inc. All rights reserved.
+.\" Copyright (c) 1993 Eric P. Allman. All rights reserved.
.\" Copyright (c) 1993
.\" The Regents of the University of California. All rights reserved.
.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
+.\" By using this file, you agree to the terms and conditions set
+.\" forth in the LICENSE file which can be found at the top level of
+.\" the sendmail distribution.
.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
.\"
-.\" @(#)smrsh.8 8.2 (Berkeley) 1/9/96
+.\" @(#)smrsh.8 8.7 (Berkeley) 5/19/1998
.\"
.TH SMRSH 8 11/02/93
.SH NAME
diff --git a/smrsh/smrsh.c b/smrsh/smrsh.c
index c3314e6..d4af285 100644
--- a/smrsh/smrsh.c
+++ b/smrsh/smrsh.c
@@ -1,39 +1,17 @@
/*
- * Copyright (c) 1993 Eric P. Allman
+ * Copyright (c) 1998 Sendmail, Inc. All rights reserved.
+ * Copyright (c) 1993 Eric P. Allman. All rights reserved.
* Copyright (c) 1993
* The Regents of the University of California. All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
+ * By using this file, you agree to the terms and conditions set
+ * forth in the LICENSE file which can be found at the top level of
+ * the sendmail distribution.
*
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
*/
#ifndef lint
-static char sccsid[] = "@(#)smrsh.c 8.5 (Berkeley) 10/19/97";
+static char sccsid[] = "@(#)smrsh.c 8.11 (Berkeley) 5/19/1998";
#endif /* not lint */
/*
@@ -91,6 +69,7 @@ static char sccsid[] = "@(#)smrsh.c 8.5 (Berkeley) 10/19/97";
# define PATH "/bin:/usr/bin:/usr/ucb"
#endif
+int
main(argc, argv)
int argc;
char **argv;