On Tue, Jul 11, 2000 at 09:23:13AM -0700, [EMAIL PROTECTED] wrote:
> On Tue, Jul 11, 2000 at 04:10:05PM +0300, Theodor Milkov wrote:
> > Hello,
> > 
> > I'm running qmail for a long time without any problems.
> > Now I should run qbiff for a couple of users, but
> > without success. Diging in the source I found this:
> > 
> >         if (!(st.st_mode & 0100)){
> >                 close (fdtty);
> >                 continue;
> >     }
> > 
> > I'm not a C programmer, so please tell me what this
> > means ? As far as I can read it, in st.st_mode is
> > stored mode of respective tty line. In my case this
> 
> Correct. It's the obscurity of how certain commands,
> such as biff and mesg set/define access for other commands
> like qbiff, write, talk etc which want to write to your
> tty.
> 
> You may want to look at the man pages for mesg to help
> understand what's going on, but essentially dmesg/biff
> set the mode bits and use group tty access to determine
> whether or not qbiff/write/talk can or should write something
> to your tty.

Hmm... looks like:

toto:~$ mesg
is y
toto:~$ ls -al `tty`
crw--w----   1 zimage   tty        3,   2 Jul 12 13:32 /dev/ttyp2
toto:~$ mesg n
toto:~$ mesg
is n
toto:~$ ls -al `tty`
crw-------   1 zimage   tty        3,   2 Jul 12 13:32 /dev/ttyp2
toto:~$

mesg actualy changes the g+w bit to g-w (0620 -> 0600) and not
u+x bit (0620 -> 0720)...


> > is /dev/ttyp0 wich mode is 20620. (20620 & 0100) is
> > 0, so fdtty gets closed and qbiff doesn't send notify.
> > Is this mean, that in order to receive notifications
> > about incoming mails I must set all my tty's in
> > mode 700 ? Why ?
> 
> I would think 0100 or '+x'.
> 
> 
> Regards.

But if tty is in 0100 mode, qbiff will be unable to open it
for writing ?

-- 
        =- --rw------- =--=--=--=--=--=--=--=--=--=--=--=--=--=
          Theodor Milkov           Administrator IP Networks
          Davidov Electric Ltd.    Phone: +359 (2) 730158
          PGP: http://www.zimage.delbg.com/zimage.pkr
        =--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=

Reply via email to