summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/lka.c
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2009-08-07 20:21:49 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2009-08-07 20:21:49 +0000
commitb10b63a94e21cd3e2dc553a03a4964b967b9420f (patch)
tree8893c52e3609bac905690af485100ab30d6c81ce /usr.sbin/smtpd/lka.c
parent468afa9966703755ed46f0394e66dda494a978dc (diff)
we were linking to libkeynote to use kn_base64_encode/decode, but honestly
this was a ugly hack, and i'd rather include resolv.h and use __b64_encode and __b64_decode as openssh does. this commit kills all references to libkeynote in smtpd, should help a bit with porting ... no functionnal change.
Diffstat (limited to 'usr.sbin/smtpd/lka.c')
-rw-r--r--usr.sbin/smtpd/lka.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.sbin/smtpd/lka.c b/usr.sbin/smtpd/lka.c
index 66978b8165d..b3e24c5c23e 100644
--- a/usr.sbin/smtpd/lka.c
+++ b/usr.sbin/smtpd/lka.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lka.c,v 1.60 2009/06/07 05:56:25 eric Exp $ */
+/* $OpenBSD: lka.c,v 1.61 2009/08/07 20:21:48 gilles Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -33,14 +33,13 @@
#include <netdb.h>
#include <pwd.h>
#include <regex.h>
+#include <resolv.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <keynote.h>
-
#include "smtpd.h"
__dead void lka_shutdown(void);
@@ -1161,7 +1160,7 @@ lka_encode_credentials(char *dst, size_t size, char *user)
if ((buflen = asprintf(&buf, "%c%s%c%s", '\0', user, '\0', pass)) == -1)
fatal(NULL);
- if (kn_encode_base64(buf, buflen, dst, size) == -1) {
+ if (__b64_ntop(buf, buflen, dst, size) == -1) {
free(buf);
return 0;
}