Arko Provo Mukherjee wrote:
> 
> Can we make a program that can, own its own change its own terminal and
> start working in another?

At startup, every Unix process inherits a "default terminal" from its
parent process. It is not possible for a process to change its default
terminal, AFAIK.

> If this is possible then a virus can check whether in any terminal an
> user is logged in as root and can go to that terminal and create a mess
> of the system.

Subject to being permitted by the current owner of a terminal, an
extraneous process may write to that terminal. (See, for example,
commands like talk(1) and write(1).) But /dev/tty* permissions are setup
so at login that only processes owned by the current owner of the
terminal (which is the same as the user who is logged in) may read from
that device. So it is not possible for an extraneous process to read
information from root's (or anyone elese's) terminal.

- Manas Laha

--
To unsubscribe, send mail to [EMAIL PROTECTED] with the body
"unsubscribe ilug-cal" and an empty subject line.
FAQ: http://www.ilug-cal.org/node.php?id=3

Reply via email to