Skip to content

Fix switched serverName/domainName arguments in Netapi32Util#getDCName#1721

Open
dbwiddis wants to merge 1 commit intojava-native-access:masterfrom
dbwiddis:fix-netgetdcname-args
Open

Fix switched serverName/domainName arguments in Netapi32Util#getDCName#1721
dbwiddis wants to merge 1 commit intojava-native-access:masterfrom
dbwiddis:fix-netgetdcname-args

Conversation

@dbwiddis
Copy link
Copy Markdown
Contributor

Fix the argument order in Netapi32Util#getDCName which was passing (domainName, serverName, bufptr) to Netapi32#NetGetDCName instead of the correct (serverName, domainName, bufptr).

The NetGetDCName Windows API expects serverName first and domainName second. The bug was unnoticed because all existing callers pass (null, null).

Closes #1650

Closes java-native-access#1650

The arguments to NetGetDCName were passed in the wrong order
(domainName, serverName) instead of (serverName, domainName).
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.

Netapi32Util#getDCName(String, String) has switched arguments for NetGetDCName call

1 participant