Security / Implementing a Secure Server with GDC |
This topic covers the steps required to replace a login shell with a customized script.
The shell script accepts the information on the command line and parses it, assigning values as needed to start the application. The application name is matched in a case statement, preventing direct execution of what the user sends.
user1:x:569:569::/home/user1:/home/user1/gdcstart
The script LOGIN_SCRIPT is designed to recognize the difference between being started from sshd or from telnetd. You could modify it to handle either condition differently. For example, you may want it to start an application in text mode when accessed via telnet, or in GUI mode when accessed via ssh.