Cover V05, I02
Article
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Listing 1

feb96.tar


Figure 5: mylogin.c

/*
** Alternate login program
** Invoked from system login process with user name
** as the only parameter.
*/

#include        <stdio.h>
#include        <stdlib.h>
#include        <stddef.h>

int main(int argc, char **argv)
}
extern int errno;
int rc, reenter;
char *message = "this is a message:";
char *prompt;
char *user = *++argv;

prompt = NULL;
rc = authenticate(user, prompt, &reenter, &message);
while( rc == 0 && reenter ){
prompt = getpass(message);
rc = authenticate(user, prompt, &reenter, &message);
}
if( rc )
fprintf(stderr, "%s", message);
return rc;
}

/* End of File */