summaryrefslogtreecommitdiff
path: root/contrib/sendmail/libsmdb/smdb2.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/sendmail/libsmdb/smdb2.c')
-rw-r--r--contrib/sendmail/libsmdb/smdb2.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/sendmail/libsmdb/smdb2.c b/contrib/sendmail/libsmdb/smdb2.c
index b3274da6d147..0e505e6e096b 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,