- debug_printf("EXIM_DBOPEN: file <%s> dir <%s> flags 0x%x\n", \
- (name), (dirname), flags); \
- EXIM_DBOPEN__(name, dirname, flags, mode, dbpp); \
- DEBUG(D_hints_lookup) debug_printf("returned from EXIM_DBOPEN: %p\n", *dbpp); \
+ debug_printf_indent("EXIM_DBOPEN: file <%s> dir <%s> flags=%s\n", \
+ (name), (dirname), \
+ (flags) == O_RDONLY ? "O_RDONLY" \
+ : (flags) == O_RDWR ? "O_RDWR" \
+ : (flags) == (O_RDWR|O_CREAT) ? "O_RDWR|O_CREAT" \
+ : "??"); \
+ if (is_tainted(name) || is_tainted(dirname)) \
+ { \
+ log_write(0, LOG_MAIN|LOG_PANIC, "Tainted name for DB file not permitted"); \
+ *dbpp = NULL; \
+ } \
+ else \
+ { EXIM_DBOPEN__(name, dirname, flags, mode, dbpp); } \
+ DEBUG(D_hints_lookup) debug_printf_indent("returned from EXIM_DBOPEN: %p\n", *dbpp); \