From owner-freebsd-ports Tue Feb 19 7: 0:21 2002 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id A72BE37B404 for ; Tue, 19 Feb 2002 07:00:05 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g1JF05I67966; Tue, 19 Feb 2002 07:00:05 -0800 (PST) (envelope-from gnats) Date: Tue, 19 Feb 2002 07:00:05 -0800 (PST) Message-Id: <200202191500.g1JF05I67966@freefall.freebsd.org> To: freebsd-ports@FreeBSD.org Cc: From: Ken Stailey Subject: Re: ports/33818: Bootable ITS image for KLH-10 PDP-10 emulator Reply-To: Ken Stailey Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR ports/33818; it has been noted by GNATS. From: Ken Stailey To: freebsd-gnats-submit@FreeBSD.org, kstailey@yahoo.com Cc: Subject: Re: ports/33818: Bootable ITS image for KLH-10 PDP-10 emulator Date: Tue, 19 Feb 2002 09:57:46 -0500 (EST) Patched to prevent unprivleged users from running dpimp. Users must now be in group network in order to use a networked KLH-10 and ITS. Non-networked versions may still be used. Also fixed a few typos. diff -ur its/files/its-user-install.sh /usr/ports/emulators/its/files/its-user-install.sh --- its/files/its-user-install.sh Tue Feb 19 09:32:15 2002 +++ /usr/ports/emulators/its/files/its-user-install.sh Tue Feb 19 09:50:44 2002 @@ -50,8 +50,8 @@ IFS=. set $1 for i in $* ; do - if [ $1 -gt 255 ]; then - echo its-install-user: Octet of IP address must not exceed 255. + if [ $i -gt 255 ]; then + echo its-install-user: Octets of IP address must not exceed 255. IFS="$OLDIFS" return 1 fi @@ -59,6 +59,23 @@ IFS="$OLDIFS" return 0 } + +in_network=false +for i in `groups`; do + if [ $i = network ]; then + in_network=true + break + fi +done + +if [ `whoami` = root ]; then + in_network=true +fi + +if [ $in_network = false ]; then + echo WARNING: You must be in group network in order to run a networked ITS. + echo WARNING: You may still run a non-networked ITS. +fi if [ ! -d @KLH-SHARE@ ]; then echo its-install-user: Can\'t find the emulator directory. diff -ur its/files/its.sh /usr/ports/emulators/its/files/its.sh --- its/files/its.sh Tue Feb 19 09:32:15 2002 +++ /usr/ports/emulators/its/files/its.sh Tue Feb 19 09:38:07 2002 @@ -5,6 +5,23 @@ # Run KLH10 with KS-ITS hardware configuration and ITS OS configuration # to bring up MIT Incompatible Timesharing System emulation. +in_network=false +for i in `groups`; do + if [ $i = network ]; then + in_network=true + break + fi +done + +if [ `whoami` = root ]; then + in_network=true +fi + +if [ $in_network = false ]; then + echo WARNING: You must be in group network in order to run a networked ITS. + echo WARNING: You may still run a non-networked ITS. +fi + if [ ! -r ~/.itsrc ]; then echo its: My config file '(~/.itsrc)' is missing! echo its: Did you remember to run its-user-install\? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message