BSD tty security, part 3: How to Fix It
Paul Falstad
pfalstad at phoenix.princeton.edu
Sun May 5 09:32:55 AEST 1991
wes at harem.clydeunix.com (Wes Peters) wrote:
>I think write should reject any input not from a terminal:
> if (!isatty(fileno(stdin))) {
> fprintf(stderr, "write: input must be a terminal!\n");
>I know this will take care of 'cat longfile | write sucker', but does it
>also take care of a 'here is' document (i.e. shell << document)?
Yes, but it doesn't take care of this:
cat longfile | pty write sucker
--
Paul Falstad pfalstad at phoenix.princeton.edu
And on the roads, too, vicious gangs of KEEP LEFT signs!
If Princeton knew my opinions, they'd have expelled me long ago.
More information about the Comp.unix.wizards
mailing list