• Yossi Gottlieb's avatar
    CONFIG REWRITE should honor umask settings. (#8371) · 1237cce6
    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
    
    (cherry picked from commit b548ffab)
    1237cce6
server.c 199 KB