Skip to content

Fix for deprecated RegEnumKey API usage#8751

Open
sinclairjw wants to merge 3 commits intoosquery:masterfrom
sinclairjw:fix-deprecated-registry-api
Open

Fix for deprecated RegEnumKey API usage#8751
sinclairjw wants to merge 3 commits intoosquery:masterfrom
sinclairjw:fix-deprecated-registry-api

Conversation

@sinclairjw
Copy link
Copy Markdown
Contributor

The getRoamingProfileSids method uses the deprecated Windows registry API RegEnumKey.

This PR updates the API to RegEnumKeyEx without changing any other logic or functionality.

The change has been tested and debugged locally, and no issues found,

@sinclairjw sinclairjw requested review from a team as code owners January 22, 2026 09:54
return std::nullopt;
}

if (max_name_length > 255) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why disallow this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is incorrect. Should be 16,383 as max value name limit not key name.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we are probably ready to proceed with this PR once this is updated. Thanks!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I attempted a fix. I pushed it into this PR

@directionless directionless force-pushed the fix-deprecated-registry-api branch from bc65102 to 4baba24 Compare March 8, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants