Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > 07bca630c4b37879f698c5eb23a853a7 > files > 2

libtdb-1.0.6-9mdv2008.0.src.rpm

diff -Naur tdb-1.0.6/tdb.c tdb-1.0.6.oden/tdb.c
--- tdb-1.0.6/tdb.c	2001-12-11 04:39:51.000000000 +0100
+++ tdb-1.0.6.oden/tdb.c	2004-06-13 14:38:57.899545551 +0200
@@ -1303,6 +1303,9 @@
 	char *p = NULL;
 	int ret = 0;
 
+	/* do not allow a store to read-only database */
+	if (tdb->read_only) return -1;
+
 	/* find which hash bucket it is in */
 	hash = tdb_hash(&key);
 	if (!tdb_keylocked(tdb, hash))
diff -Naur tdb-1.0.6/tdb_open.3 tdb-1.0.6.oden/tdb_open.3
--- tdb-1.0.6/tdb_open.3	2001-05-08 15:35:46.000000000 +0200
+++ tdb-1.0.6.oden/tdb_open.3	2004-06-13 14:38:57.899545551 +0200
@@ -20,10 +20,8 @@
 .TP
 .B TDB_INTERNAL
 Don't use a file, instead store the data in memory. The 
-.I pathname
-,
-.I open_flags
-, and
+.I pathname 
+and
 .I mode
 are ignored in
 this case. This is useful if you need a quick associative array or map.