Unix/Linux Go Back    

NetBSD 6.1.5 - man page for ttyaction (netbsd section 3)

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:   man
Select Man Page Set:       apropos Keyword Search (sections above)

TTYACTION(3)			   BSD Library Functions Manual 		     TTYACTION(3)

     ttyaction -- ttyaction utility function

     System Utilities Library (libutil, -lutil)

     #include <util.h>

     ttyaction(char *ttyname, char *action, char *username);

     The ttyaction() function is used by login(1), getty(8), telnetd(8) and rlogind(8) to execute
     site-specific commands when a login session begins and ends.

     The ttyaction() function scans the /etc/ttyaction file for any records that match the cur-
     rent ttyname and action parameters, and for each matching record, runs the shell command
     shown in that record.  The record format is described in ttyaction(5).  The parameter
     username is the name of the new owner of the ttyname device.  Note that the ttyname parame-
     ter may be passed as a fully qualified pathname, and the ttyaction() function will skip the
     leading "/dev/" part of the string.  (This is a convenience for login and getty.)

     ttyaction() returns the status of the last command it executed, or zero if no matching com-
     mands were found.



     Gordon W. Ross <gwr@NetBSD.org>,
     Chris G. Demetriou <cgd@NetBSD.org>,
     Ty Sarna <tsarna@NetBSD.org>.

     There should be some other mechanism to allow selection of different access control policies
     on a per-line basis.  It has been suggested that the same ttyaction() mechanism should also
     be used for determining access control, but it was decided (after much discussion) that
     ttyaction() should only describe actions to be performed after the system has decided to
     change the ownership of some tty.	Access control policies will be handled by a separate

BSD					   May 4, 2010					      BSD
Unix & Linux Commands & Man Pages : ©2000 - 2018 Unix and Linux Forums

All times are GMT -4. The time now is 03:47 PM.