Commit 00906d3b 00906d3b3bcef1a948ceff6f27b6052e47081552 by Sergey Poznyakoff

Bugfixes.

* libmu_dbm/dbm.c (mu_dbm_create_from_url): Parameter list beginning
with a negative parameter implies default safety criteria.
Fix semantics of the "default" keyword: it is different from "all".
* libmu_dbm/mudbm.h (DEFAULT_DBM_SAFETY_FLAGS): Remove.  Not needed now.
* pop3d/bulletin.c (read_bulletin_db): Remove a leftover call to
mu_dbm_safety_set_flags.
1 parent 1b475f7e
......@@ -179,6 +179,9 @@ mu_dbm_create_from_url (mu_url_t url, mu_dbm_file_t *db, int defsafety)
if (*name == '-')
{
if (!safety_flags_set)
/* Imply default safety settings */
safety_flags = defsafety;
negate = 1;
name++;
}
......@@ -224,7 +227,7 @@ mu_dbm_create_from_url (mu_url_t url, mu_dbm_file_t *db, int defsafety)
}
else if (strcmp (name, "default") == 0)
{
val = DEFAULT_DBM_SAFETY_FLAGS;
val = defsafety;
}
else if (mu_file_safety_name_to_code (name, &val))
return MU_ERR_URL_INVALID_PARAMETER;
......
......@@ -28,8 +28,6 @@
} \
while (0)
#define DEFAULT_DBM_SAFETY_FLAGS MU_FILE_SAFETY_ALL
#ifdef WITH_GDBM
extern struct mu_dbm_impl _mu_dbm_gdbm;
#endif
......
......@@ -133,8 +133,6 @@ read_bulletin_db (size_t *pnum)
return rc;
}
mu_dbm_safety_set_flags (db, DEFAULT_GROUP_DB_SAFETY);
rc = mu_dbm_safety_check (db);
if (rc)
{
......