
Listing 1

/* read username and lookup info */
getuser()
{
        gets(user);
        if (0 == (pwent = getpwent(user))) {

                ... complain about illegal user ...
                ... exit 
        }

/* read and test password */
getpass()
{
        gets(password);
        if (strcmp(user,"anonymous") == 0 ||
            strcmp(encrypt(password),pwent->pwd) == 0) ...

