Skip to content
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

use SystemProperty "java.io.tmpdir" instead of "/tmp" #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -405,15 +405,16 @@ private void createProxy(ProxyInitParams params,

List<String> proxyCreationWarnings = new ArrayList<String>();

String proxyFilePath = VOMSProxyPathBuilder.buildProxyPath();

String envProxyPath = System.getenv(VOMSEnvironmentVariables.X509_USER_PROXY);

if (envProxyPath != null)
proxyFilePath = envProxyPath;

if (params.getGeneratedProxyFile() != null)
proxyFilePath = params.getGeneratedProxyFile();
String proxyFilePath = null;
if (params.getGeneratedProxyFile() != null) {
proxyFilePath = params.getGeneratedProxyFile();
} else {
String envProxyPath = System.getenv(VOMSEnvironmentVariables.X509_USER_PROXY);
if (envProxyPath != null)
proxyFilePath = envProxyPath;
else
proxyFilePath = VOMSProxyPathBuilder.buildProxyPath();
}

ProxyCertificateOptions proxyOptions = new ProxyCertificateOptions(credential.getCertificateChain());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@
package org.italiangrid.voms.clients.util;

import org.italiangrid.voms.credential.ProxyNamingPolicy;
import org.italiangrid.voms.credential.impl.DefaultLoadCredentialsStrategy;
import org.italiangrid.voms.credential.impl.DefaultProxyPathBuilder;

public class VOMSProxyPathBuilder {

private static final String TMP_PATH = "/tmp";
private static final String TMP_PATH = System.getProperty(DefaultLoadCredentialsStrategy.TMPDIR_PROPERTY);

public static String buildProxyPath(){

Expand Down