You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Abhishek Kumar <ab...@gmail.com> on 2022/06/29 03:51:57 UTC
Review Request 74042: Fix ConcurrentModificationException in UnixUserGroupBuilder
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74042/
-----------------------------------------------------------
Review request for ranger, Abhay Kulkarni, Madhan Neethiraj, Ramesh Mani, and Sailaja Polavarapu.
Bugs: RANGER-3813
https://issues.apache.org/jira/browse/RANGER-3813
Repository: ranger
Description
-------
Line number 426 in ugsync/src/main/java/org/apache/ranger/unixusersync/process/UnixUserGroupBuilder.java updates the map while iteration which raises the exception ConcurrentModificationException.
Updates to the table groupUserTable in the call to the funciton buildUnixUserList will be revisited if required.
Diffs
-----
ugsync/src/main/java/org/apache/ranger/unixusersync/process/UnixUserGroupBuilder.java 7653dfdbe
Diff: https://reviews.apache.org/r/74042/diff/1/
Testing
-------
Pending.
Thanks,
Abhishek Kumar
Re: Review Request 74042: Fix ConcurrentModificationException in UnixUserGroupBuilder
Posted by Sailaja Polavarapu <sp...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74042/#review224539
-----------------------------------------------------------
ugsync/src/main/java/org/apache/ranger/unixusersync/process/UnixUserGroupBuilder.java
Line 246 (original), 240 (patched)
<https://reviews.apache.org/r/74042/#comment313272>
It is better to use Iterator for traversal. Please don't change this.
ugsync/src/main/java/org/apache/ranger/unixusersync/process/UnixUserGroupBuilder.java
Line 373 (original), 359 (patched)
<https://reviews.apache.org/r/74042/#comment313273>
I think it will be sufficient to use Iterator for traversal in order to fix the ConcurrentModificationException. Please check
ugsync/src/main/java/org/apache/ranger/unixusersync/process/UnixUserGroupBuilder.java
Line 382 (original)
<https://reviews.apache.org/r/74042/#comment313274>
I think we still need this block. This could be the case where getent groups (as part of parseMembers()) have returned some users that we don't want to process isn't it?
ugsync/src/main/java/org/apache/ranger/unixusersync/process/UnixUserGroupBuilder.java
Line 549 (original)
<https://reviews.apache.org/r/74042/#comment313275>
It doesn't harm to check for null?
ugsync/src/main/java/org/apache/ranger/unixusersync/process/UnixUserGroupBuilder.java
Line 583 (original)
<https://reviews.apache.org/r/74042/#comment313276>
Same as above. Please check
- Sailaja Polavarapu
On July 1, 2022, 7:40 p.m., Abhishek Kumar wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74042/
> -----------------------------------------------------------
>
> (Updated July 1, 2022, 7:40 p.m.)
>
>
> Review request for ranger, Abhay Kulkarni, Madhan Neethiraj, Ramesh Mani, and Sailaja Polavarapu.
>
>
> Bugs: RANGER-3813
> https://issues.apache.org/jira/browse/RANGER-3813
>
>
> Repository: ranger
>
>
> Description
> -------
>
> Line number 426 in ugsync/src/main/java/org/apache/ranger/unixusersync/process/UnixUserGroupBuilder.java updates the map while iteration which raises the exception ConcurrentModificationException.
>
>
> Steps to reproduce the issue:
> 1. Set nss and enumerateGroupMembers to true.
> 2. Create a user with userid < minimumUserId.
> 3. Add it to a group with groupId >= minimumGroupId.
> 4. Ensure the user is part of multiple groups and any one group that the user is part of does not show the user as its member on executing: getent group
>
>
> Diffs
> -----
>
> ugsync/src/main/java/org/apache/ranger/unixusersync/process/UnixUserGroupBuilder.java 7653dfdbe
>
>
> Diff: https://reviews.apache.org/r/74042/diff/2/
>
>
> Testing
> -------
>
> Pending.
>
>
> Thanks,
>
> Abhishek Kumar
>
>
Re: Review Request 74042: Fix ConcurrentModificationException in UnixUserGroupBuilder
Posted by Abhishek Kumar <ab...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74042/
-----------------------------------------------------------
(Updated July 1, 2022, 7:40 p.m.)
Review request for ranger, Abhay Kulkarni, Madhan Neethiraj, Ramesh Mani, and Sailaja Polavarapu.
Bugs: RANGER-3813
https://issues.apache.org/jira/browse/RANGER-3813
Repository: ranger
Description (updated)
-------
Line number 426 in ugsync/src/main/java/org/apache/ranger/unixusersync/process/UnixUserGroupBuilder.java updates the map while iteration which raises the exception ConcurrentModificationException.
Steps to reproduce the issue:
1. Set nss and enumerateGroupMembers to true.
2. Create a user with userid < minimumUserId.
3. Add it to a group with groupId >= minimumGroupId.
4. Ensure the user is part of multiple groups and any one group that the user is part of does not show the user as its member on executing: getent group
Diffs (updated)
-----
ugsync/src/main/java/org/apache/ranger/unixusersync/process/UnixUserGroupBuilder.java 7653dfdbe
Diff: https://reviews.apache.org/r/74042/diff/2/
Changes: https://reviews.apache.org/r/74042/diff/1-2/
Testing
-------
Pending.
Thanks,
Abhishek Kumar