Skip to content

Commit

Permalink
sepinf-inc#1846: use setenv call in Linux to avoid problems reading A…
Browse files Browse the repository at this point in the history
…PFS passwords in TSK
  • Loading branch information
aberenguel committed Aug 29, 2023
1 parent c27e0e2 commit 2785db6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion iped-engine/src/main/java/iped/engine/util/CLibrary.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
public interface CLibrary extends Library {

int _putenv(String value);

int putenv(String value);

void setenv(String name, String value, boolean overwrite);

}
2 changes: 1 addition & 1 deletion iped-engine/src/main/java/iped/engine/util/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ public static void setEnvVar(String key, String value) {
if (C_Library == null) {
C_Library = (CLibrary) Native.loadLibrary("c", CLibrary.class);
}
C_Library.putenv(key + "=" + value);
C_Library.setenv(key, value, true);
}
}

Expand Down

0 comments on commit 2785db6

Please sign in to comment.