summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorcjep <cjep@pkgsrc.org>2002-06-04 09:56:38 +0000
committercjep <cjep@pkgsrc.org>2002-06-04 09:56:38 +0000
commit17cd33ab801e24a423b77d5acc8b73c0a887a178 (patch)
treee6f88a4cc9359069027d60a2659ba6ee384a6f60 /sysutils
parentcfdd163ef7def47283e4d5221a9187d5a26b86ba (diff)
downloadpkgsrc-17cd33ab801e24a423b77d5acc8b73c0a887a178.tar.gz
Initial import of su2 1.3 into the NetBSD packages collection.
su2 is a replacement for the su program. su2 gives you the ability to masquerade with the UID of other users, using your own password to switch. Submitted by collver at linuxfreemail.com in PR#14141. Thanks! (MD5 checksum of the su2 distribution checked against FreeBSD ports' entry.)
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/su2/DESCR18
-rw-r--r--sysutils/su2/Makefile15
-rw-r--r--sysutils/su2/PLIST3
-rw-r--r--sysutils/su2/distinfo7
-rw-r--r--sysutils/su2/patches/patch-aa48
-rw-r--r--sysutils/su2/patches/patch-ab25
-rw-r--r--sysutils/su2/patches/patch-ac55
7 files changed, 171 insertions, 0 deletions
diff --git a/sysutils/su2/DESCR b/sysutils/su2/DESCR
new file mode 100644
index 00000000000..0c71b55bd63
--- /dev/null
+++ b/sysutils/su2/DESCR
@@ -0,0 +1,18 @@
+ su2 is a great program for anyone that has anything to do with
+system administration. su2 gives you the ability to masquerade with
+the UID of other users. You use own password to switch. Probably the
+biggest benefit of su2 is that you retain your own customized shell
+environment.
+
+ For the most part, this program is used by system administrators to
+become root, but su2 has been written to enable much more flexibility
+than this. Regular users can put a .su2rc file in their home
+directory to enable other users to become them. While this may sound
+odd, it is sometimes useful to allow a number of users to masquerade
+around with the uid of restricted accounts. One such example of this
+is a 'www' account which is a common occurance with the proliferation
+of the web. While the www user's password may be starred out to
+disable direct logins, root could put a set of user names into
+~www/.su2rc to enable these users to 'become' www and do Web
+administration. [This feature can be disabled if you are worried
+about 'account sharing.']
diff --git a/sysutils/su2/Makefile b/sysutils/su2/Makefile
new file mode 100644
index 00000000000..d07396a8e27
--- /dev/null
+++ b/sysutils/su2/Makefile
@@ -0,0 +1,15 @@
+# $NetBSD: Makefile,v 1.1.1.1 2002/06/04 09:56:38 cjep Exp $
+#
+
+DISTNAME= su2-1.3
+CATEGORIES= sysutils security
+MASTER_SITES= ftp://ftp.ccs.neu.edu/pub/sysadmin/
+
+MAINTAINER= collver@linuxfreemail.com
+HOMEPAGE= ftp://ftp.ccs.neu.edu/pub/sysadmin/
+COMMENT= enhanced su, users su with own password + more
+
+LICENSE= no-profit
+NO_CONFIGURE= yes
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/su2/PLIST b/sysutils/su2/PLIST
new file mode 100644
index 00000000000..1a7ec9157c6
--- /dev/null
+++ b/sysutils/su2/PLIST
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2002/06/04 09:56:38 cjep Exp $
+bin/su2
+man/man1/su2.1
diff --git a/sysutils/su2/distinfo b/sysutils/su2/distinfo
new file mode 100644
index 00000000000..e419e9de9f9
--- /dev/null
+++ b/sysutils/su2/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1.1.1 2002/06/04 09:56:38 cjep Exp $
+
+SHA1 (su2-1.3.tar.gz) = 0b84a070c0cc95098c0d61566663c89ec2d1189e
+Size (su2-1.3.tar.gz) = 31067 bytes
+SHA1 (patch-aa) = 8e08931b017b367b2127fdc5dac0c7beefa717dd
+SHA1 (patch-ab) = 12aa6e167ae0623c549da5a4deb43a9fb5e109a3
+SHA1 (patch-ac) = 5f0799f9ed62b656fad7bbde776393700e2407c6
diff --git a/sysutils/su2/patches/patch-aa b/sysutils/su2/patches/patch-aa
new file mode 100644
index 00000000000..2877c1df301
--- /dev/null
+++ b/sysutils/su2/patches/patch-aa
@@ -0,0 +1,48 @@
+$NetBSD: patch-aa,v 1.1.1.1 2002/06/04 09:56:38 cjep Exp $
+
+--- Makefile.orig Thu Sep 7 13:50:58 1995
++++ Makefile
+@@ -8,16 +8,16 @@
+ # /etc/super-users and /usr/adm/sulog that are defined
+ # separately.
+ #
+-DEST=/usr/local
++DEST=${PREFIX}
+ BINDIR=$(DEST)/bin
+-MANDIR=$(DEST)/man
++MANDIR=$(DEST)/man/man1
+
+ # OPTIONS:
+ # There are a number of DEFINES that can be used to configure su2. Please
+ # see the source to su2.c for a full listing of all of the available options.
+
+ # Standard
+-OPTIONS=-DFULLPATH
++OPTIONS=-DSU2LOGFILE="\"/var/log/su2.log\"" -DSUPERUSERS="\"$(PREFIX)/etc/super-users\"" -DBROKENCUSERID
+
+ # m88k
+ # OPTIONS=-DFULLPATH -DNOVFORK
+@@ -31,13 +31,19 @@
+ # Shadow Passwords (Solaris)
+ # OPTIONS=-DFULLPATH -DUSE_SHADOW
+
+-CFLAGS=-O $(OPTIONS)
++CFLAGS+= $(OPTIONS)
++LDLIBS=-lcrypt -lcompat
+
+ su2: su2.c
+
+-install: su2
+- install -c -m 4711 -o root su2 $(BINDIR)/su2
+- install -c su2.man $(MANDIR)/su2.1
++su2.1:
++ sed 's,/etc/super,${PREFIX}/etc/super,g' <su2.man >su2.1
++
++all: su2 su2.1
++
++install: su2 su2.1
++ install -c -s -m 4711 -o root su2 $(BINDIR)/su2
++ install -c su2.1 $(MANDIR)/su2.1
+
+ clean:
+ rm -f su2 *.o *.a
diff --git a/sysutils/su2/patches/patch-ab b/sysutils/su2/patches/patch-ab
new file mode 100644
index 00000000000..be3c610ec7a
--- /dev/null
+++ b/sysutils/su2/patches/patch-ab
@@ -0,0 +1,25 @@
+$NetBSD: patch-ab,v 1.1.1.1 2002/06/04 09:56:38 cjep Exp $
+
+--- su2.c.orig Thu Sep 7 13:10:11 1995
++++ su2.c
+@@ -113,9 +113,9 @@
+ #ifndef NOSU2RC
+ char *UsersNameFile = ".su2rc";
+ #endif NOSU2RC
+-char *SULog = "/usr/adm/sulog";
++char *SULog = SU2LOGFILE;
+
+-char *UtmpFile = "/etc/utmp";
++char *UtmpFile = "/var/run/utmp";
+
+ #ifndef PATH
+ # ifdef BSD
+@@ -188,7 +188,7 @@
+ void setpwent ();
+ #endif
+
+-#ifndef sgi
++#if !defined(sgi) && !defined(__NetBSD__)
+ struct passwd *getpwuid ();
+ struct passwd *getpwnam ();
+ void endpwent ();
diff --git a/sysutils/su2/patches/patch-ac b/sysutils/su2/patches/patch-ac
new file mode 100644
index 00000000000..ceea31829d3
--- /dev/null
+++ b/sysutils/su2/patches/patch-ac
@@ -0,0 +1,55 @@
+$NetBSD: patch-ac,v 1.1.1.1 2002/06/04 09:56:38 cjep Exp $
+
+--- su2.man.orig Tue Oct 2 22:09:48 2001
++++ su2.man
+@@ -84,7 +84,7 @@
+ .I Su2\^
+ logs all attempts to
+ .I su2\^
+-in /usr/adm/sulog, including failures. Successful attempts are flagged
++in /var/log/sulog, including failures. Successful attempts are flagged
+ with "+", failures with "-".
+ .LP
+ The file
+@@ -110,7 +110,7 @@
+ .B \-u
+ is used to specify a user against whom to check authorization and password.
+ The default value is obtained from
+-.I /etc/utmp.
++.I /var/run/utmp.
+ .TP
+ .B \-x
+ when specified will cause
+@@ -118,7 +118,7 @@
+ to exec the shell without first forking a new process. This option should
+ only be used when the system is out of process slots. When it is used
+ su2 will neither clean up the
+-.I /etc/utmp
++.I /var/run/utmp
+ entry nor reset the ownership and mode of the current
+ .IR /dev/tty?? .
+ Both may be reset with the
+@@ -127,12 +127,12 @@
+ .TP
+ .B \-s
+ will change the current
+-.I /etc/utmp
++.I /var/run/utmp
+ entry to reflect the new user name.
+ .TP
+ .B \-r
+ is used to replace the username in
+-.I /etc/utmp
++.I /var/run/utmp
+ and the mode and ownership of
+ .I /dev/tty??
+ with that associated with the current process userid.
+@@ -178,7 +178,7 @@
+ $HOME/.su2rc
+ list of users authorized to change to a specific user.
+ .TP
+-/usr/adm/sulog
++/var/log/su2.log
+ log of
+ .I su2
+ and