mirror of
https://github.com/znc/znc.git
synced 2026-08-06 08:52:57 +02:00
Don't make backup of znc.conf readable by everyone.
It doesn't really matter, since the whole ~/.znc/ is not readable, but it's better to be safe.
This commit is contained in:
@@ -249,6 +249,10 @@ bool CFile::Copy(const CString& sOldFileName, const CString& sNewFileName, bool
|
||||
OldFile.Close();
|
||||
NewFile.Close();
|
||||
|
||||
struct stat st;
|
||||
GetInfo(sOldFileName, st);
|
||||
Chmod(sNewFileName, st.st_mode);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user