Bug 963 - using UID in CoG
: using UID in CoG
Status: RESOLVED FIXED
: CoG jglobus
utils
: unspecified
: RS/6000 AIX
: P2 normal
: ---
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2003-05-23 15:33 by
Modified: 2005-12-05 23:34 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2003-05-23 15:33:46
CoG uses system property UID to compose proxy name, see following comments in 
org/globus/common/CoGProperties.java:

 /**
     * Retrieves the location of the proxy file.
     * It first checks the X509_USER_PROXY system property. If the property
     * is not set, it checks next the 'proxy' property in the current
     * configuration. If that property is not set, then it defaults to a
     * value based on the following rules: <BR>
     * If a UID system property is set, and running on a Unix machine it
     * returns /tmp/x509up_u${UID}. If any other machine then Unix, it returns
     * ${tempdir}/x509up_u${UID}, where tempdir is a platform-specific
     * temporary directory as indicated by the java.io.tmpdir system property.
     * If a UID system property is not set, the username will be used instead
     * of the UID. That is, it returns ${tempdir}/x509up_u_${username}
     * <BR>
     * This is done this way because Java is not able to obtain the current
     * uid.
     *
     * @return <code>String</code> the location of the proxy file
     */
    public String getProxyFile() {
        String location;
        location = System.getProperty("X509_USER_PROXY");
        if (location != null) {
            return location;
        }
        location = getProperty("proxy");
        if (location != null) {
            return location;
        }
        return ConfigUtil.discoverProxyLocation();
    }



BUT, on AIX it doesn't have UID environment variable by default. It would- be
nice CoG can get uid in other way, like from output of "id -u" which can work
both on Linux and AIX.
------- Comment #1 From 2003-05-25 00:27:46 -------
Actually, ConfigUtil.discoverProxyLocation() does execute "id -u" on Unix 
machines. But I see that "aix" is not defined in the unix OS list in ConfigUtil 
class. Does the "os.name" system property contain the word "aix" on AIX? If so 
I will update the list which should fix this problem.

    
------- Comment #2 From 2003-05-25 23:56:14 -------
The list of unix os was updated.
------- Comment #3 From 2003-05-27 10:34:40 -------
*** Bug 966 has been marked as a duplicate of this bug. ***
------- Comment #4 From 2003-05-28 11:40:31 -------
Jarek,

Can I have your updated cog-jglobus.jar for testing ?


Thanks
Jianhua