
HERE documents and setuid programs
Quote:
>which calls the system command rwall which in turn uses the concept of
>HERE documents as its input.
No, it does not.
The rwall command uses the concept of reading from STDIN until EOF.
The examples of how to run rwall from the shell may show how to use the
shell's concept of HERE documents when writing a shell script, but
that's not the only way of providing STDIN to a program.
For instance,
head /etc/motd | rwall remote_host # Using Unix shell
or
$msg = "A multi-line\n message\n";
open RW,"|/usr/bin/rwall $_" and print RW $msg and close RW;
}
-Joe
--
See http://www.inwap.com/ for PDP-10 and "ReBoot" pages.