diff options
author | 2011-04-15 17:21:24 +0000 | |
---|---|---|
committer | 2011-04-15 17:21:24 +0000 | |
commit | 91cc34aacb3ef87b460135eb6bae436b6de77d25 (patch) | |
tree | 8335f72d060ae139b8ff2472b3176cc393b80d13 | |
parent | kill message_id and message_uid (diff) | |
download | wireguard-openbsd-91cc34aacb3ef87b460135eb6bae436b6de77d25.tar.xz wireguard-openbsd-91cc34aacb3ef87b460135eb6bae436b6de77d25.zip |
valid_message_id() and valid_message_uid() are no longer needed
-rw-r--r-- | usr.sbin/smtpd/util.c | 49 |
1 files changed, 1 insertions, 48 deletions
diff --git a/usr.sbin/smtpd/util.c b/usr.sbin/smtpd/util.c index 59746f79bcc..2adb910efda 100644 --- a/usr.sbin/smtpd/util.c +++ b/usr.sbin/smtpd/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.41 2011/04/15 17:01:05 gilles Exp $ */ +/* $OpenBSD: util.c,v 1.42 2011/04/15 17:21:24 gilles Exp $ */ /* * Copyright (c) 2000,2001 Markus Friedl. All rights reserved. @@ -227,53 +227,6 @@ ss_to_text(struct sockaddr_storage *ss) return (buf); } -int -valid_message_id(char *mid) -{ - u_int8_t cnt; - - /* [0-9]{10}\.[a-zA-Z0-9]{16} */ - for (cnt = 0; cnt < 10; ++cnt, ++mid) - if (! isdigit((int)*mid)) - return 0; - - if (*mid++ != '.') - return 0; - - for (cnt = 0; cnt < 16; ++cnt, ++mid) - if (! isalnum((int)*mid)) - return 0; - - return (*mid == '\0'); -} - -int -valid_message_uid(char *muid) -{ - u_int8_t cnt; - - /* [0-9]{10}\.[a-zA-Z0-9]{16}\.[0-9]{0,} */ - for (cnt = 0; cnt < 10; ++cnt, ++muid) - if (! isdigit((int)*muid)) - return 0; - - if (*muid++ != '.') - return 0; - - for (cnt = 0; cnt < 16; ++cnt, ++muid) - if (! isalnum((int)*muid)) - return 0; - - if (*muid++ != '.') - return 0; - - for (cnt = 0; *muid != '\0'; ++cnt, ++muid) - if (! isdigit((int)*muid)) - return 0; - - return (cnt != 0); -} - char * time_to_text(time_t when) { |