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.
Showing
3 changed files
with
4 additions
and
5 deletions
... | @@ -179,6 +179,9 @@ mu_dbm_create_from_url (mu_url_t url, mu_dbm_file_t *db, int defsafety) | ... | @@ -179,6 +179,9 @@ mu_dbm_create_from_url (mu_url_t url, mu_dbm_file_t *db, int defsafety) |
179 | 179 | ||
180 | if (*name == '-') | 180 | if (*name == '-') |
181 | { | 181 | { |
182 | if (!safety_flags_set) | ||
183 | /* Imply default safety settings */ | ||
184 | safety_flags = defsafety; | ||
182 | negate = 1; | 185 | negate = 1; |
183 | name++; | 186 | name++; |
184 | } | 187 | } |
... | @@ -224,7 +227,7 @@ mu_dbm_create_from_url (mu_url_t url, mu_dbm_file_t *db, int defsafety) | ... | @@ -224,7 +227,7 @@ mu_dbm_create_from_url (mu_url_t url, mu_dbm_file_t *db, int defsafety) |
224 | } | 227 | } |
225 | else if (strcmp (name, "default") == 0) | 228 | else if (strcmp (name, "default") == 0) |
226 | { | 229 | { |
227 | val = DEFAULT_DBM_SAFETY_FLAGS; | 230 | val = defsafety; |
228 | } | 231 | } |
229 | else if (mu_file_safety_name_to_code (name, &val)) | 232 | else if (mu_file_safety_name_to_code (name, &val)) |
230 | return MU_ERR_URL_INVALID_PARAMETER; | 233 | return MU_ERR_URL_INVALID_PARAMETER; | ... | ... |
... | @@ -133,8 +133,6 @@ read_bulletin_db (size_t *pnum) | ... | @@ -133,8 +133,6 @@ read_bulletin_db (size_t *pnum) |
133 | return rc; | 133 | return rc; |
134 | } | 134 | } |
135 | 135 | ||
136 | mu_dbm_safety_set_flags (db, DEFAULT_GROUP_DB_SAFETY); | ||
137 | |||
138 | rc = mu_dbm_safety_check (db); | 136 | rc = mu_dbm_safety_check (db); |
139 | if (rc) | 137 | if (rc) |
140 | { | 138 | { | ... | ... |
-
Please register or sign in to post a comment