-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JDK-8259786: initialize last parameter of getpwuid_r #2098
Conversation
👋 Welcome back mbaesken! A progress list of the required criteria for merging this PR into |
Webrevs
|
Hi Matthias, |
Hi Harold, thanks for reviewing . I will wait until your change is in .
was pointing into the same direction but looks like you already started the effort ! |
@MBaesken this pull request can not be integrated into git checkout JDK-8259786
git fetch https://git.openjdk.java.net/jdk master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push |
@MBaesken This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 4 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
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.
Changes look good!
Thanks, Harold
/integrate |
@MBaesken Since your change was applied there have been 4 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 52ed2aa. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
We have a couple of calls to getpwuid_r in the codebase, like
g= getpwuid_r(getuid(), &resbuf, pwd_buf, sizeof(pwd_buf), &pwd);
Usually we NULL-check pwd after the call because we do not fully trust the return code of the function (it is documented in the codebase why we do not fully trust the return code) . However we miss to initialize pwd at some places before the call, which might we a little problematic and should be improved (at other places we already initialize it).
This triggers also Sonar warnings like :
https://sonarcloud.io/project/issues?id=jdk&open=AXaE0dsA8L9hkQskGEbA&resolved=false&types=BUG
Aside from this issue , should we in other issue , unify the OS versions of static char* get_user_name(uid_t uid) in posix code (currently we have it for bsd, linux, aix but the functions look very similar ?
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/2098/head:pull/2098
$ git checkout pull/2098