• Yossi Gottlieb's avatar
    CONFIG REWRITE should honor umask settings. (#8371) · b548ffab
    Yossi Gottlieb authored
    Fixes a regression introduced due to a new (safer) way of rewriting configuration files. In the past the file was simply overwritten (same inode), but now Redis creates a new temporary file and later renames it over the old one.
    
    The temp file typically gets created with 0600 permissions so we later fchmod it to fix that. Unlike open with O_CREAT, fchmod doesn't consider umask so we have to do that explicitly.
    
    Fixes #8369
    b548ffab
config.c 107 KB