diff -NuarwbB nss_db-2.2.3pre1.orig/src/db-compat.c nss_db-2.2.3pre1/src/db-compat.c --- nss_db-2.2.3pre1.orig/src/db-compat.c 2005-06-07 00:08:39.000000000 -0700 +++ nss_db-2.2.3pre1/src/db-compat.c 2005-06-07 00:53:00.000000000 -0700 @@ -20,6 +20,9 @@ #include #include #include +#include +#include + #if DB_VERSION_MAJOR > 2 @@ -39,8 +42,13 @@ if (err) return err; + uid_t uid = geteuid(); + + if(uid == 0) { /* Make sure we upgrade, in case this is an older database */ + /* However we need root access to do so */ db->upgrade(db, file, 0); + } err = db->open (db, NULL, file, NULL, type, flags, mode); if (err)