diff options
author | Gilles Chehade <gilles@cvs.openbsd.org> | 2011-04-15 17:21:25 +0000 |
---|---|---|
committer | Gilles Chehade <gilles@cvs.openbsd.org> | 2011-04-15 17:21:25 +0000 |
commit | e7348bdd1f5036e8bd812b2296adecb4e2e011e2 (patch) | |
tree | 2c34d4cabc3621a312738e99f39e56e807d3d1c0 /usr.sbin | |
parent | 90577f3ea3ac8dd575ea47a6cab5ca32ea6f379e (diff) |
valid_message_id() and valid_message_uid() are no longer needed
Diffstat (limited to 'usr.sbin')
-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) { |