431
441
if (dict_flags & DICT_FLAG_LOCK) {
432
442
dbm_path = concatenate(path, ".dir", (char *) 0);
433
443
if ((lock_fd = open(dbm_path, open_flags, 0644)) < 0)
434
return (dict_surrogate(DICT_TYPE_DBM, path, open_flags, dict_flags,
436
448
if (myflock(lock_fd, INTERNAL_LOCK, MYFLOCK_OP_SHARED) < 0)
437
449
msg_fatal("shared-lock database %s for open: %m", dbm_path);