Subject: bin/30170: src/libexec/comsat complains about: '/' in "/dev/pts/1"
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: None <mk@kilbi.de>
List: netbsd-bugs
Date: 05/07/2005 23:01:00
>Number:         30170
>Category:       bin
>Synopsis:       src/libexec/comsat complains about: '/' in "/dev/pts/1"
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat May 07 23:01:00 +0000 2005
>Originator:     Markus W Kilbinger
>Release:        NetBSD 3.99.3
>Organization:
	
>Environment:
System: NetBSD qube 3.99.3 NetBSD 3.99.3 (QUBE) #2: Sat May 7 20:49:50 MEST 2005 kilbi@qie:/usr/src/sys/arch/cobalt/compile/QUBE cobalt
Architecture: mipsel
Machine: cobalt
Should involve all /dev/pts aware branches
>Description:
	As anticipated in its source comments (comsat.c v1.32 line 245
	ff.)

          if (strchr(tty + sizeof(_PATH_DEV) - 1, '/')) {
                /* A slash is an attempt to break security... */
                /*
                 * XXX but what about something like "/dev/pts/5"
                 * that we may one day "support". ?
                 */
                syslog(LOG_AUTH | LOG_NOTICE, "'/' in \"%s\"", tty);


	libexec/comsat complains about dev/pts/[number] name scheme
	which became reality now:

	  May  8 00:34:41 qube comsat[1224]: '/' in "/dev/pts/1"
	  May  8 00:34:41 qube comsat[1224]: '/' in "/dev/pts/2"

	Because comsat stops functioning due to this 'warning' I rated
	this problem at 'high' priority.
>How-To-Repeat:
	Activate inetd(.conf)'s comsat entries and watch its activity
	while receiving local mail.
>Fix:
	Many ways... from ignoring the '/'s to implementing some kind
	of 'pts/[number >= 1]' pattern check.

>Unformatted: