authmoduser3.c
上传用户:s81996212
上传日期:2007-01-04
资源大小:722k
文件大小:1k
- /*
- ** Copyright 1998 - 1999 Double Precision, Inc. See COPYING for
- ** distribution information.
- */
- #include "auth.h"
- #include "authmod.h"
- #include <stdio.h>
- #include <string.h>
- #include <stdlib.h>
- #include <ctype.h>
- static const char rcsid[]="$Id: authmoduser3.c,v 1.3 1999/12/20 03:10:53 mrsam Exp $";
- void authmod_login(int argc, char **argv, const char *service,
- const char *userid,
- const char *passwd)
- {
- char *p=malloc(strlen(userid)+strlen(passwd)+3);
- if (!p)
- {
- perror("malloc");
- authexit(1);
- }
- strcat(strcat(strcat(strcpy(p, userid), "n"), passwd), "n");
- authmod(argc, argv, service, AUTHTYPE_LOGIN, p);
- }