diff options
Diffstat (limited to 'net/rmsg')
-rw-r--r-- | net/rmsg/Makefile | 19 | ||||
-rw-r--r-- | net/rmsg/distinfo | 1 | ||||
-rw-r--r-- | net/rmsg/files/patch-aa | 52 | ||||
-rw-r--r-- | net/rmsg/files/patch-ab | 46 | ||||
-rw-r--r-- | net/rmsg/files/patch-ac | 36 | ||||
-rw-r--r-- | net/rmsg/files/patch-ad | 49 | ||||
-rw-r--r-- | net/rmsg/pkg-comment | 1 | ||||
-rw-r--r-- | net/rmsg/pkg-descr | 49 | ||||
-rw-r--r-- | net/rmsg/pkg-plist | 4 |
9 files changed, 257 insertions, 0 deletions
diff --git a/net/rmsg/Makefile b/net/rmsg/Makefile new file mode 100644 index 000000000000..869edaa43974 --- /dev/null +++ b/net/rmsg/Makefile @@ -0,0 +1,19 @@ +# New ports collection makefile for: rmsg +# Version required: 1.64 +# Date created: 9 October 1995 +# Whom: torstenb@FreeBSD.ORG +# +# $Id$ +# + +DISTNAME= rmsg-1.64 +CATEGORIES= networking +MASTER_SITES= ftp://ftp.funet.fi/pub/networking/tcpip/ \ + ftp://proton.elka.pw.edu.pl/pub/unix/network/ + +WRKSRC= ${WRKDIR}/rmsg + +post-install: + gzip -9nf ${PREFIX}/man/man1/rmsg.1 ${PREFIX}/man/man8/rmsgd.8 + +.include <bsd.port.mk> diff --git a/net/rmsg/distinfo b/net/rmsg/distinfo new file mode 100644 index 000000000000..e2d58c973734 --- /dev/null +++ b/net/rmsg/distinfo @@ -0,0 +1 @@ +MD5 (rmsg-1.64.tar.gz) = affebc3cd652cf84fe6a71b6042f1290 diff --git a/net/rmsg/files/patch-aa b/net/rmsg/files/patch-aa new file mode 100644 index 000000000000..817aeae21708 --- /dev/null +++ b/net/rmsg/files/patch-aa @@ -0,0 +1,52 @@ +*** Makefile.orig Mon Oct 9 13:12:47 1995 +--- Makefile Mon Oct 9 13:17:04 1995 +*************** +*** 3,25 **** + # -DBSD if on a BSD system, -DHPUX and -DUSG5 if on hp-ux + # -DBSD and -DSUNOS for SUNOS. + # -DNOBODY=100 numeric id for nobody user if setuid to user fails +! # (shouldn't happen) + #CFLAGS = -O -DBITNET -DNOBODY=100 + #CFLAGS = -O -DBSD -DBITNET -DNOBODY=65534 -DSUNOS +! CFLAGS = -O2 -DSVR4 -DNOBODY=32 + OBJS = xdr.o parser.o misc.o + SRC = xdr.c parser.c misc.c +! CC = gcc +! LIBS = -lrpcsvc -lsocket -lnsl + BIN = rmsg rmsgd + + # These are for make install +! DAEMONDIR = /usr/local/etc +! BINDIR = /usr/local/bin + +! MAN1 = /usr/local/man/man1 + # place for rmsg.1 +! MAN8 = /usr/local/man/man8 + # place for rmsgd.8 + + all: $(BIN) +--- 3,26 ---- + # -DBSD if on a BSD system, -DHPUX and -DUSG5 if on hp-ux + # -DBSD and -DSUNOS for SUNOS. + # -DNOBODY=100 numeric id for nobody user if setuid to user fails +! # (shouldn't hap + #CFLAGS = -O -DBITNET -DNOBODY=100 + #CFLAGS = -O -DBSD -DBITNET -DNOBODY=65534 -DSUNOS +! #CFLAGS = -O2 -DSVR4 -DNOBODY=32 +! CFLAGS+= -D_HAVE_PARAM_H + OBJS = xdr.o parser.o misc.o + SRC = xdr.c parser.c misc.c +! #CC = gcc +! LIBS = -lrpcsvc # -lsocket -lnsl + BIN = rmsg rmsgd + + # These are for make install +! DAEMONDIR = ${PREFIX}/sbin +! BINDIR = ${PREFIX}/bin + +! MAN1 = ${PREFIX}/man/man1 + # place for rmsg.1 +! MAN8 = ${PREFIX}/man/man8 + # place for rmsgd.8 + + all: $(BIN) diff --git a/net/rmsg/files/patch-ab b/net/rmsg/files/patch-ab new file mode 100644 index 000000000000..a53bb61bfdba --- /dev/null +++ b/net/rmsg/files/patch-ab @@ -0,0 +1,46 @@ +*** parser.c.orig Sat Jun 26 23:04:41 1993 +--- parser.c Mon Oct 9 14:20:54 1995 +*************** +*** 89,94 **** +--- 89,95 ---- + char *user; + { + struct passwd *pwd; ++ uid_t nobody; + static char line[LINE_LEN]; + static char config[PATHLEN]; + +*************** +*** 107,119 **** + a->next = 0; + cur_ali = aliases = a; + + if (!(pwd = getpwnam(user))) + return(ERR_UNK_USER); + + if (root) { + (void) setgid (pwd->pw_gid); + if (setuid (pwd->pw_uid) == -1) +! (void) setuid(NOBODY); + } + + (void) strcpy (home, pwd->pw_dir); +--- 108,125 ---- + a->next = 0; + cur_ali = aliases = a; + ++ if (!(pwd = getpwnam("nobody"))) ++ exit(67); ++ ++ nobody = pwd->pw_uid; ++ + if (!(pwd = getpwnam(user))) + return(ERR_UNK_USER); + + if (root) { + (void) setgid (pwd->pw_gid); + if (setuid (pwd->pw_uid) == -1) +! (void) setuid(nobody); + } + + (void) strcpy (home, pwd->pw_dir); diff --git a/net/rmsg/files/patch-ac b/net/rmsg/files/patch-ac new file mode 100644 index 000000000000..201ca5602b93 --- /dev/null +++ b/net/rmsg/files/patch-ac @@ -0,0 +1,36 @@ +*** rmsg.h.orig Mon Oct 9 13:17:57 1995 +--- rmsg.h Mon Oct 9 13:31:18 1995 +*************** +*** 11,16 **** +--- 11,20 ---- + * Last modified: Sat Aug 20 16:43:03 1988 + */ + ++ #ifdef _HAVE_PARAM_H ++ #include <sys/param.h> ++ #endif ++ + #if defined(USG5) || defined(SVR4) + # define index strchr + # define rindex strrchr +*************** +*** 46,54 **** +--- 50,67 ---- + #define PATHLEN 1024 + #define LINELEN 1024 + ++ ++ #if (defined(BSD) && (BSD >= 199103)) ++ #include <paths.h> ++ #include <utmp.h> ++ #define UTMP _PATH_UTMP ++ #define UTMP_TTY_SIZE UT_LINESIZE ++ #define UTMP_NAME_SIZE UT_NAMESIZE ++ #else + #define UTMP "/etc/utmp" + #define UTMP_TTY_SIZE 8 + #define UTMP_NAME_SIZE 8 ++ #endif + + struct command { + char *token; /* Command name, e.g. msglast */ diff --git a/net/rmsg/files/patch-ad b/net/rmsg/files/patch-ad new file mode 100644 index 000000000000..04fc20e31f2f --- /dev/null +++ b/net/rmsg/files/patch-ad @@ -0,0 +1,49 @@ +*** server.c.orig Sat Jun 26 23:23:23 1993 +--- server.c Mon Oct 9 14:23:17 1995 +*************** +*** 99,118 **** + } + + if (! strcmp (basename (progname), "rmsgd")) { + if (fork()) _exit(0); /* make myself a daemon */ +! #ifdef BSD + fd = open("/dev/tty", O_RDWR); /* disconnect from control tty */ + if (fd >= 0) { + (void) ioctl(fd, TIOCNOTTY, (char *)0); + (void) close(fd); /* close this, don't need any more*/ + } +! #else + (void) setpgrp (); + #endif + } + + else { +! (void) fprintf (stderr, "Starting from inetd not yet supported, rename me ase rmsgd and start\nfrom /etc/rc\n"); + } + + if (argc > 1) +--- 99,122 ---- + } + + if (! strcmp (basename (progname), "rmsgd")) { ++ #if (defined(BSD) && (BSD >= 199306)) ++ (void)daemon(0,0); ++ #else + if (fork()) _exit(0); /* make myself a daemon */ +! # ifdef BSD + fd = open("/dev/tty", O_RDWR); /* disconnect from control tty */ + if (fd >= 0) { + (void) ioctl(fd, TIOCNOTTY, (char *)0); + (void) close(fd); /* close this, don't need any more*/ + } +! # else + (void) setpgrp (); ++ # endif + #endif + } + + else { +! (void) fprintf (stderr, "Starting from inetd not yet supported, rename me ase rmsgd and start\nfrom /etc/rc.local\n"); + } + + if (argc > 1) diff --git a/net/rmsg/pkg-comment b/net/rmsg/pkg-comment new file mode 100644 index 000000000000..556a095c84c4 --- /dev/null +++ b/net/rmsg/pkg-comment @@ -0,0 +1 @@ +rmsg - a network messaging system, version 1.64 diff --git a/net/rmsg/pkg-descr b/net/rmsg/pkg-descr new file mode 100644 index 000000000000..0e3960d97c7d --- /dev/null +++ b/net/rmsg/pkg-descr @@ -0,0 +1,49 @@ +rmsg contains a messaging system which can be used to send +write-like messages to logged-on users. The system can cross machine +boundaries, so if another machine has the rmsgd program running, you can +send messages to users on it. + +The system also allows bitnet virtual machine-like 'virtual users' +to whom any user can send messages and they can answer the messages. +The rmsgd server makes this possible by allowing a command 'exec' in a users +.msgconf file, and whenever the user receives a message this command is +executed and the message is piped to it. + +It is also possible to log incoming and outgoing messages and resend previous +sent message. You can specify a file to which the last (or every) incoming +message will be stored. + +Using the programs: +------------------- + +Rmsgd: + +Rmsgd is the server program for the system. It should be started by root, +but for now it works even if started by ordinary users, even though +some capabilities are disabled for security reasons (that is, exec and +logging of incoming messages, since that would be done by the user-id +who started rmsgd and not the receiver). + +At any time, there should be only one rmsgd running. It doesn't do any harm +to have several rmsgds other than the newly-started servers unmap the +previous and thus the previous servers are unusable. + +The server should be named 'rmsgd' to have it start as a daemon. + + +Rmsg: + +Rmsg is the client end of the system. Rmsg is used by ordinary users +to send messages. For example, rmsg foo@bar hello there ! ^D would +send a message 'hello there !' to user foo at machine bar. By +default, rmsg stores the last outgoing message in the user's home +directory in the file .msgout. Then msg -r user@machine can be used +to resend the message. Message is normally read from standard input +until EOF. + +Configuration: +-------------- + +The messages system has many options which the user can set by making +a file '.msgconf' in her home directory and placing various command in it. +Read the manual page for rmsg for more information. diff --git a/net/rmsg/pkg-plist b/net/rmsg/pkg-plist new file mode 100644 index 000000000000..092864041360 --- /dev/null +++ b/net/rmsg/pkg-plist @@ -0,0 +1,4 @@ +bin/rmsg +sbin/rmsgd +man/man1/rmsg.1.gz +man/man8/rmsgd.8.gz |