fixed the download issue of the log files (#167)
https://github.com/PowerShell/Win32-OpenSSH/issues/531
This commit is contained in:
parent
98eca17c65
commit
067a352c81
|
@ -343,7 +343,8 @@ createFile_flags_setup(int flags, u_short mode, struct createFile_flags* cf_flag
|
|||
switch (rwflags) {
|
||||
case O_RDONLY:
|
||||
cf_flags->dwDesiredAccess = GENERIC_READ;
|
||||
cf_flags->dwShareMode = FILE_SHARE_READ;
|
||||
/* refer to https://msdn.microsoft.com/en-us/library/windows/desktop/aa363874(v=vs.85).aspx */
|
||||
cf_flags->dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE;
|
||||
break;
|
||||
case O_WRONLY:
|
||||
cf_flags->dwDesiredAccess = GENERIC_WRITE;
|
||||
|
|
|
@ -98,7 +98,7 @@ syslog(int priority, const char *format, const char *formatBuffer)
|
|||
return;
|
||||
|
||||
GetLocalTime(&st);
|
||||
r = snprintf(msgbufTimestamp, sizeof(msgbufTimestamp), "%d %02d:%02d:%02d %03d %s\n",
|
||||
r = snprintf(msgbufTimestamp, sizeof(msgbufTimestamp), "%d %02d:%02d:%02d:%03d %s\n",
|
||||
GetCurrentProcessId(), st.wHour, st.wMinute, st.wSecond,
|
||||
st.wMilliseconds, formatBuffer);
|
||||
msgbufTimestamp[sizeof(msgbufTimestamp) - 1] = '\0';
|
||||
|
|
Loading…
Reference in New Issue