summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Faurot <eric@cvs.openbsd.org>2014-02-04 10:03:33 +0000
committerEric Faurot <eric@cvs.openbsd.org>2014-02-04 10:03:33 +0000
commite4acb755438aec2286fce86f249e31f05c09f94a (patch)
tree9286f487a6eb73f0ceab6abd560533f6b717821b
parentd97b888141f9c1d6eaa7c843c3e58230d3a201fd (diff)
fix dump function with some combinations of flag
-rw-r--r--usr.sbin/smtpd/to.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/usr.sbin/smtpd/to.c b/usr.sbin/smtpd/to.c
index 4362678fc74..0e846d4da67 100644
--- a/usr.sbin/smtpd/to.c
+++ b/usr.sbin/smtpd/to.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: to.c,v 1.14 2013/12/26 17:25:32 eric Exp $ */
+/* $OpenBSD: to.c,v 1.15 2014/02/04 10:03:32 eric Exp $ */
/*
* Copyright (c) 2009 Jacek Masiulaniec <jacekm@dobremiasto.net>
@@ -414,9 +414,10 @@ relayhost_to_text(const struct relayhost *relay)
{
static char buf[4096];
char port[4096];
+ uint16_t mask = F_SMTPS|F_STARTTLS|F_AUTH|F_TLS_OPTIONAL|F_LMTP;
memset(buf, 0, sizeof buf);
- switch (relay->flags) {
+ switch (relay->flags & mask) {
case F_SMTPS|F_STARTTLS|F_AUTH:
strlcat(buf, "secure+auth://", sizeof buf);
break;
@@ -429,18 +430,12 @@ relayhost_to_text(const struct relayhost *relay)
case F_SMTPS|F_AUTH:
strlcat(buf, "smtps+auth://", sizeof buf);
break;
- case F_STARTTLS|F_TLS_VERIFY:
- strlcat(buf, "tls://", sizeof buf);
- break;
case F_STARTTLS:
strlcat(buf, "tls://", sizeof buf);
break;
case F_SMTPS:
strlcat(buf, "smtps://", sizeof buf);
break;
- case F_SMTPS|F_TLS_VERIFY:
- strlcat(buf, "smtps://", sizeof buf);
- break;
case F_BACKUP:
strlcat(buf, "backup://", sizeof buf);
break;