Use Windows private namespace for kernel objects used in server-to-server IPC.#7213
Merged
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.
asfernandes
reviewed
Jun 18, 2022
| if (!CreateWellKnownSid(WinWorldSid, NULL, &sid, &cbSid)) | ||
| raiseError("CreateWellKnownSid"); | ||
|
|
||
| // Create security desctriptor which allows generic access to the just created SID |
Member
There was a problem hiding this comment.
typo here: desctriptor -> descriptor
|
|
||
| void init() | ||
| { | ||
| char sid[SECURITY_MAX_SID_SIZE]; |
Member
There was a problem hiding this comment.
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.
Member
Author
There was a problem hiding this comment.
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.
hvlad
added a commit
that referenced
this pull request
Apr 7, 2023
… 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.
hvlad
added a commit
that referenced
this pull request
Apr 10, 2023
Backport improvement #7213 : Use Windows private namespace for kernel…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It allows to synchronize processes across different windows sessions.