File: authmoduser3.c

package info (click to toggle)
courier-imap 0.31-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 4,032 kB
  • ctags: 1,676
  • sloc: ansic: 23,913; sh: 878; makefile: 745; perl: 592; cpp: 284
file content (28 lines) | stat: -rw-r--r-- 630 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
** 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);
}