diff options
-rw-r--r-- | NEWS | 5 | ||||
-rw-r--r-- | URPM.xs | 6 |
2 files changed, 11 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Verison 4.23 - 2011, by Per Øyvind Karlsen + +- check that rpmdb was properly opened in read/write mode to prevent segfault + if no write permissions + Version 4.22 - 26 April 2011, by Per Øyvind Karlsen - add support for notriggers @@ -3175,6 +3175,12 @@ Db_open(prefix=NULL, write_perm=0, log_auto_remove=1) if(write_perm) { rpmdb rdb = rpmtsGetRdb(db->ts); DB_ENV *dbenv = rdb->db_dbenv; + + if (dbenv == NULL) { + (void)rpmtsFree(db->ts); + croak("unable to open rpmdb in read/write mode, write permissions missing?"); + } + /* TODO: allow for user configuration? */ if(log_auto_remove) dbenv->log_set_config(dbenv, DB_LOG_AUTO_REMOVE, 1); |