home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / v22 / 032 / text0000.txt < prev   
Encoding:
Text File  |  1991-03-07  |  2.2 KB  |  54 lines

  1. Submitted-by: rml@hpfcdc.fc.hp.com (Bob Lenk)
  2.  
  3. In article <15827@cs.utexas.edu> nix%valis.asd.sgi.com@SGI.COM (Insufficient Dada) writes:
  4.  
  5. > With TIOCGPGRP disabled, there seems not to be any way to send signals
  6. > to a process running in an inferior shell other than figuring out the
  7. > appropriate control character to send through termio to cause the
  8. > signal to be sent.
  9. > Does POSIX have an alternate mechanism for this?
  10.  
  11. No.
  12.  
  13. >                                                   If not, could
  14. > someone elaborate on the security problems with allowing a process to
  15. > find the pgrp of an arbitrary tty?
  16.  
  17. I have not identified one after asking various people involved in
  18. writing that portion of the standard.
  19.  
  20. >                                     How about allowing a process to
  21. > find the pgrp of the slave side of a pty when it owns the master side?
  22.  
  23. There is nothing in any POSIX standard that specifies the master side
  24. of a pty.  Thus such a feature would have no problems with respect to
  25. the standard.
  26.  
  27. In article  <15891@cs.utexas.edu> sef@kithrup.COM (Sean Eric Fagan) writes:
  28.  
  29. > Second of all, because of the problem with tcgetpgrp() on another process'
  30. > pty, I added (for my own use) a new ioctl to the pty driver, called TIOCSIG
  31. > (as in, ioctl(fd, TIOCSIG, signo)), which sends an arbitray signal to the
  32. > process group on fd.  (Since I did it only for emacs, I didn't put in any
  33. > checks for security, although I plan on doing so eventually.)
  34.  
  35. Again, pty master features are not covered by POSIX.  There are some
  36. tradeoffs between these two approaches.  Supplying the process group ID
  37. through the pty master means that if the process running controlling the
  38. master side is no privileged (typically root), it will be unable to
  39. send signals to processes that have changed user IDs (eg. su).  However,
  40. the ioctl to send a signal requires appropriate security checks in a
  41. production implementation.  There are questions as to what these need to
  42. be; I suggest that the process should be able to send any tty signals
  43. but no others, since any process/user on the slave slide accepted (at
  44. least implicitly) the possibility of receiving these when affiliating
  45. with a (pseudo) terminal.
  46.  
  47.         Bob Lenk
  48.         rml@fc.hp.com
  49.         {uunet,hplabs}!fc.hp.com!rml
  50.  
  51. Volume-Number: Volume 22, Number 32
  52.  
  53.