/*************************************************
* Exim - an Internet mail transport agent *
*************************************************/
/*************************************************
* Exim - an Internet mail transport agent *
*************************************************/
On success, dbblock is returned. This contains the dbm pointer and
the fd of the locked lock file.
On success, dbblock is returned. This contains the dbm pointer and
the fd of the locked lock file.
log_write(0, LOG_MAIN, "Failed to get %s lock for %s: %s",
((flags & O_RDONLY) != 0)? "read" : "write", buffer,
(errno == ETIMEDOUT)? "timed out" : strerror(errno));
log_write(0, LOG_MAIN, "Failed to get %s lock for %s: %s",
((flags & O_RDONLY) != 0)? "read" : "write", buffer,
(errno == ETIMEDOUT)? "timed out" : strerror(errno));
if (Ustat(buffer, &statbuf) >= 0 && statbuf.st_uid != exim_uid)
{
DEBUG(D_hints_lookup) debug_printf("ensuring %s is owned by exim\n", buffer);
if (Ustat(buffer, &statbuf) >= 0 && statbuf.st_uid != exim_uid)
{
DEBUG(D_hints_lookup) debug_printf("ensuring %s is owned by exim\n", buffer);
debug_printf("%s", CS string_open_failed(save_errno, "DB file %s\n",
buffer));
}
debug_printf("%s", CS string_open_failed(save_errno, "DB file %s\n",
buffer));
}
- debug_printf("opened hints database %s: flags=%x\n", buffer, flags);
+ debug_printf("opened hints database %s: flags=%s\n", buffer,
+ (flags == O_RDONLY)? "O_RDONLY" : (flags == O_RDWR)? "O_RDWR" :
+ (flags == (O_RDWR|O_CREAT))? "O_RDWR|O_CREAT" : "??");