Skip to content

Commit a4904ab

Browse files
authored
RANGER-5508: fix Runtime.exec parameters (#868)
1 parent eb5bd61 commit a4904ab

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ugsync/src/main/java/org/apache/ranger/unixusersync/process/UnixUserGroupBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ private void buildUnixUserList(String command) throws Throwable {
389389

390390
// "id" is same across Linux / BSD / MacOSX
391391
// gids are used as id might return groups with spaces, ie "domain users"
392-
Process process = Runtime.getRuntime().exec(new String[] {"bash", "-c", "id -G " + userName});
392+
Process process = Runtime.getRuntime().exec(new String[] {"id", "-G", userName});
393393

394394
try {
395395
reader = new BufferedReader(new InputStreamReader(process.getInputStream()));

0 commit comments

Comments
 (0)