-
-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Use Windows private namespace for kernel objects used in server-to-server IPC. #7213
Conversation
…rver IPC. It allows to synchronize processes across different windows sessions.
src/common/utils.cpp
Outdated
if (!CreateWellKnownSid(WinWorldSid, NULL, &sid, &cbSid)) | ||
raiseError("CreateWellKnownSid"); | ||
|
||
// Create security desctriptor which allows generic access to the just created SID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo here: desctriptor -> descriptor
src/common/utils.cpp
Outdated
|
||
void init() | ||
{ | ||
char sid[SECURITY_MAX_SID_SIZE]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be in the stack in unaligned location? Maybe some alignas should be used?
Here https://docs.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-sid I understand that AllocateAndInitializeSid would be needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here used CreateWellKnownSid() and I see no requirements for sid alignment.
Also, looking for usage samples one can see that its uses either LocalAlloc() or stack allocation.
Also, I see no notes about alignment of allocated by LocalAlloc() memory.
Anyway, I'll add alignas(SID)
to be sure.
… objects used in server-to-server IPC. Backport fix for bug #7535 : High CPU usage connect to Firebird 3 database using Firebird 4 Classic and SuperClassic service. Implement new setting UseLegacyKernelObjectsNames for backward compatibility. Preserve Win32 build compatibility with WinXP.
Backport improvement #7213 : Use Windows private namespace for kernel…
It allows to synchronize processes across different windows sessions.