Re: /usr/src/libexec/talkd notification broken on pty's when user is using misc/screen ports in -CURRENT

From: Cy Schubert <Cy.Schubert_at_komquats.com>
Date: Tue, 01 Jul 2003 12:10:23 -0700
Mine configures as follows:

/*
 * define PTYMODE if you do not like the default of 0622, which allows
 * public write to your pty.
 * define PTYGROUP to some numerical group-id if you do not want the
 * tty to be in "your" group.
 * Note, screen is unable to change mode or group of the pty if it
 * is not installed with sufficient privilege. (e.g. set-uid-root)
 * define PTYROFS if the /dev/pty devices are mounted on a read-only
 * filesystem so screen should not even attempt to set mode or group
 * even if running as root (e.g. on TiVo).
 */
#define PTYMODE 0620
#define PTYGROUP 4
/* #undef PTYROFS */

What does your /etc/group look like?

Could send me a copy of /etc/devfs.conf.

I'd like to see an ls -l of /dev too.

I'm preparing to host a Canada Day barbecue at my house, so I may not 
have a chance to check for email later on today. Please bear with me. 
Thanks. I'm cc'ing this to current_at_ just in the chance that someone 
there might solve this before I do.


Cheers,
--
Cy Schubert <Cy.Schubert_at_komquats.com>        http://www.komquats.com/
BC Government                     .                       FreeBSD UNIX
Cy.Schubert_at_osg.gov.bc.ca         .                     cy_at_FreeBSD.org
http://www.gov.bc.ca/             .            http://www.FreeBSD.org/

In message <20030701082011.Y3146-100000_at_oahu.WURLDLINK.NET>, Vincent 
Poy writes
:
> On Tue, 1 Jul 2003, Cy Schubert wrote:
> 
> > In message <20030701052615.G3146-100000_at_oahu.WURLDLINK.NET>, Vincent
> > Poy writes
> > :
> > [a bunch of lines edited out for brevity, see archives]
> > > Hi Cy:
> > >
> > > 	I found the problem.  In 5.1-CURRENT and I think 5.1-RELEASE, /dev
> > > uses the devfs for the devices so it no longer has to be manually
> > > generated.  I login to the system using /dev/ttyp0 which shows up as:
> > >
> > > crw--w----  1 vince  tty    -   5,   0 Jul  1 08:28 /dev/ttyp0
> > >
> > > 	However, the 10 tty's that screen uses is ttyp1-pa which has the
> > > group as users or the same as my login:
> > >
> > > crw--w----  1 vince  users    -   5,   1 Jul  1 08:28 /dev/ttyp1
> > > crw-------  1 vince  users  -   5,   2 Jul  1 08:26 /dev/ttyp2
> > > crw--w----  1 vince  users  -   5,   3 Jun 30 16:18 /dev/ttyp3
> > > crw--w----  1 vince  users  -   5,   4 Jun 29 00:35 /dev/ttyp4
> > > crw--w----  1 vince  users  -   5,   5 Jun 29 00:35 /dev/ttyp5
> > > crw--w----  1 vince  users  -   5,   6 Jun 29 00:35 /dev/ttyp6
> > > crw--w----  1 vince  users  -   5,   7 Jun 29 00:35 /dev/ttyp7
> > > crw--w----  1 vince  users  -   5,   8 Jun 29 00:35 /dev/ttyp8
> > > crw--w----  1 vince  users  -   5,   9 Jul  1 08:18 /dev/ttyp9
> > > crw--w----  1 vince  users  -   5,  10 Jul  1 08:28 /dev/ttypa
> > >
> > > 	As soon as I changed the ttyp1 to the group tty, everything started
> > > working correctly.  So it seems that the /dev has the incorrect group whe
> n
> > > the tty is from screen.
> >
> > No problems here.
> >
> > cwsys$ ll ttyp?
> > crw-rw-rw-  1 root  wheel    5,   0 Jun 26 13:19 ttyp0
> > crw--w----  1 cy    tty      5,   1 Jul  1 10:05 ttyp1
> > crw--w----  1 cy    tty      5,   2 Jul  1 10:05 ttyp2
> > crw--w----  1 cy    tty      5,   3 Jul  1 10:05 ttyp3
> > crw--w----  1 cy    tty      5,   4 Jul  1 10:05 ttyp4
> > crw--w----  1 cy    tty      5,   5 Jul  1 10:05 ttyp5
> > crw--w----  1 cy    tty      5,   6 Jul  1 10:05 ttyp6
> > crw--w----  1 cy    tty      5,   7 Jul  1 10:05 ttyp7
> > crw--w----  1 cy    tty      5,   8 Jul  1 10:05 ttyp8
> > crw--w----  1 cy    tty      5,   9 Jul  1 10:05 ttyp9
> > crw--w----  1 cy    tty      5,  10 Jul  1 10:05 ttypa
> > crw--w----  1 cy    tty      5,  11 Jul  1 10:05 ttypb
> > crw--w----  1 cy    tty      5,  12 Jul  1 10:05 ttypc
> > crw--w----  1 cy    tty      5,  13 Jul  1 10:05 ttypd
> > crw--w----  1 cy    tty      5,  14 Jul  1 10:05 ttype
> > crw--w----  1 cy    tty      5,  15 Jul  1 10:05 ttypf
> > cwsys$
> >
> > I have a locally built package here at http://komquats.com/pkg/screen-3.
> > 9.15_1.tbz/. It's built from the stock 3.9.15_1. See if it makes a
> > difference. Other than that it could be a myriad of configuration
> > things on your system. Anyhow give it a try and let us know your
> > results.
> 
> 	I tried your package with the extracted bin/screen binary and
> yours work correctly.
> 
> vince_at_bigbang [11:20am][~] >> tty
> /dev/ttypb
> vince_at_bigbang [11:20am][~] >> dir /dev/ttypb
> crw--w----  1 vince  tty  -   5,  11 Jul  1 11:20 /dev/ttypb
> vince_at_bigbang [11:20am][~] >>
> 
> Message from Talk_Daemon_at_bigbang.DNALOGIC.NET at 11:20 on 2003/07/01 ...
> talk: connection requested by vince_at_oahu.wurldlink.net
> talk: respond with:  talk vince_at_oahu.wurldlink.net
> 
> vince_at_bigbang [11:20am][~] >>
> 
> 	So this means that the configure script might have something
> configured incorrectly.   I just tried to rebuild the port and it's the
> configure script which generates the config.h with the wrong PTYGROUP.
> 
> /*
>  * define PTYMODE if you do not like the default of 0622, which allows
>  * public write to your pty.
>  * define PTYGROUP to some numerical group-id if you do not want the
>  * tty to be in "your" group.
>  * Note, screen is unable to change mode or group of the pty if it
>  * is not installed with sufficient privilege. (e.g. set-uid-root)
>  * define PTYROFS if the /dev/pty devices are mounted on a read-only
>  * filesystem so screen should not even attempt to set mode or group
>  * even if running as root (e.g. on TiVo).
>  */
> #define PTYMODE 0620
> #define PTYGROUP 32
> /* #undef PTYROFS */
> 
> 	Somehow the autodetection is definining a PTYGROUP instead of
> leaving it at the default of tty.
> 
> 
> Cheers,
> Vince - vince_at_WURLDLINK.NET - Vice President             ________   __ ____
> Unix Networking Operations - FreeBSD-Real Unix for Free / / / / |  / |[__  ]
> WurldLink Corporation                                  / / / /  | /  | __] ]
> San Francisco - Honolulu - Hong Kong                  / / / / / |/ / | __] ]
> HongKong Stars/Gravis UltraSound Mailing Lists Admin /_/_/_/_/|___/|_|[____]
> Almighty1_at_IRC - oahu.DAL.NET Hawaii's DALnet IRC Network Server Admin
> 
Received on Tue Jul 01 2003 - 10:10:28 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:13 UTC