diff options
author | gshapiro <gshapiro@FreeBSD.org> | 2003-09-19 23:11:30 +0000 |
---|---|---|
committer | gshapiro <gshapiro@FreeBSD.org> | 2003-09-19 23:11:30 +0000 |
commit | 96b960fca637a0765d566591885b7d42576e723f (patch) | |
tree | e6205d213aedfefacf00b4211611f436bae5e680 /contrib/sendmail/libsmdb/smdb2.c | |
parent | ac5ff30ae19ff6f7473f23c0d36d94301124b150 (diff) | |
download | FreeBSD-src-96b960fca637a0765d566591885b7d42576e723f.zip FreeBSD-src-96b960fca637a0765d566591885b7d42576e723f.tar.gz |
Import sendmail 8.12.10
Diffstat (limited to 'contrib/sendmail/libsmdb/smdb2.c')
-rw-r--r-- | contrib/sendmail/libsmdb/smdb2.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/sendmail/libsmdb/smdb2.c b/contrib/sendmail/libsmdb/smdb2.c index b3274da..0e505e6 100644 --- a/contrib/sendmail/libsmdb/smdb2.c +++ b/contrib/sendmail/libsmdb/smdb2.c @@ -8,7 +8,7 @@ */ #include <sm/gen.h> -SM_RCSID("@(#)$Id: smdb2.c,v 8.72.2.6 2003/01/23 22:21:39 ca Exp $") +SM_RCSID("@(#)$Id: smdb2.c,v 8.72.2.7 2003/06/24 17:16:10 ca Exp $") #include <fcntl.h> #include <stdlib.h> @@ -578,6 +578,7 @@ smdb_db_open(database, db_name, mode, mode_mask, sff, type, user_info, db_params int db_flags; int lock_fd; int db_fd; + int major_v, minor_v, patch_v; SMDB_DATABASE *smdb_db; SMDB_DB2_DATABASE *db2; DB *db; @@ -585,6 +586,10 @@ smdb_db_open(database, db_name, mode, mode_mask, sff, type, user_info, db_params struct stat stat_info; char db_file_name[MAXPATHLEN]; + (void) db_version(&major_v, &minor_v, &patch_v); + if (major_v != DB_VERSION_MAJOR || minor_v != DB_VERSION_MINOR) + return SMDBE_VERSION_MISMATCH; + *database = NULL; result = smdb_add_extension(db_file_name, sizeof db_file_name, |