2 ** Copyright 2000-2004 Double Precision, Inc. See COPYING for
3 ** distribution information.
7 #include "courierauthstaticlist.h"
8 #include "courierauthsasl.h"
10 #include "courierauthdebug.h"
18 #include <sys/select.h>
19 #include "numlib/numlib.h"
20 #include "authchangepwdir.h"
23 extern int authdaemondopasswd(char *, int);
25 static int badstr(const char *p
)
30 if ((int)(unsigned char)*p
< ' ')
37 int auth_passwd(const char *service
,
44 if (badstr(service
) || badstr(uid
) || badstr(opwd
) || badstr(npwd
))
50 buf
=malloc(strlen(service
)+strlen(uid
)+strlen(opwd
)+
56 sprintf(buf
, "PASSWD %s\t%s\t%s\t%s\n",
57 service
, uid
, opwd
, npwd
);
59 if (authdaemondopasswd(buf
, strlen(buf
)))