On Wed, Sep 03, 2008 at 07:52:30PM +0000, Clint Adams wrote: > On Tue, Sep 02, 2008 at 01:33:54AM -0700, Steve Langasek wrote: > > echo "source ../test/test.tcl; run_std env007" | tclsh8.5
> > How do these tcl commands map to C, for better debugging? > Without looking into the tcl bindings, I would guess that > berkdb_env -create -home ./TESTDIR -txn -encryptaes $passwd > berkdb_open -create -btree -mode 0644 -env $env -encrypt a.db > maps (modulo error checking) to something like > DB_ENV *env; > DB *d; > int i; > > i = db_env_create(&env, 0); > i = env->set_encrypt(env, "passw0rd", DB_ENCRYPT_AES); > i = env->open(env, "./TESTDIR", DB_INIT_TXN | DB_CREATE, 0666); > i = db_create(&d, env, 0); > i = d->open(d, NULL, "a.db", NULL, DB_BTREE, DB_CREATE, 0644); > or something. > As for disabling encryption on a release arch, I don't know. Had to refine this a bit to reproduce the error from the tcl test: #include <stdio.h> #include <string.h> #include <db.h> int main() { DB_ENV *env; DB *d; int i; i = db_env_create(&env, 0); i = env->set_encrypt(env, "passw0rd", DB_ENCRYPT_AES); i = env->open(env, "./TESTDIR", DB_INIT_MPOOL | DB_INIT_TXN | DB_CREATE, 0666); i = db_create(&d, env, 0); i = d->set_flags(d, DB_ENCRYPT); i = d->open(d, NULL, "a.db", NULL, DB_BTREE, DB_CREATE, 0644); printf("error is: %s\n",strerror(i)); } This gives the EINVAL from the tcl test, and appears to be otherwise correct. But figuring out where this EINVAL originates seems to be non-trivial. -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. Ubuntu Developer http://www.debian.org/ [EMAIL PROTECTED] [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]