mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 15:00:12 +00:00
java-admin-interface-updates-20071214
LICENSE IPL10 pdate java admin interface including support for 1.5
This commit is contained in:
parent
77c86d6fd3
commit
f72145f79a
@ -143,6 +143,20 @@ public class Token implements Serializable, Comparable
|
||||
if (automaticallyLogin) login();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new <CODE>Token</CODE> object instance given the
|
||||
* name of the AFS cell it represents; the token for administrative
|
||||
* access will be extracted from the kernel cache manager if possible.
|
||||
*
|
||||
* @param cellName the name of the cell to Token into
|
||||
* @exception AFSException If an error occurs in the native code
|
||||
*/
|
||||
public Token(String cellName)
|
||||
throws AFSException
|
||||
{
|
||||
this(null, null, cellName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new <CODE>Token</CODE> object instance given
|
||||
* the name of the AFS cell it represents and the username and password
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include <kautils.h>
|
||||
#include <cellconfig.h>
|
||||
#include <afs_AdminClientErrors.h>
|
||||
#include <rx/rxkad.h>
|
||||
|
||||
/**
|
||||
* Static function used to initialize the client library and the
|
||||
@ -71,6 +72,7 @@ Java_org_openafs_jafs_Token_getToken
|
||||
const char *password;
|
||||
void *tokenHandle;
|
||||
int rc;
|
||||
int err;
|
||||
|
||||
// convert java strings
|
||||
if( jcellName != NULL ) {
|
||||
@ -101,8 +103,11 @@ Java_org_openafs_jafs_Token_getToken
|
||||
password = NULL;
|
||||
}
|
||||
|
||||
if ( !(afsclient_TokenGetNew( cellName, userName, password, &tokenHandle,
|
||||
&ast) ) ) {
|
||||
err = (password==NULL || userName==NULL)
|
||||
? afsclient_TokenGetExisting( cellName, &tokenHandle, &ast)
|
||||
: afsclient_TokenGetNew( cellName, userName, password, &tokenHandle, &ast);
|
||||
|
||||
if ( !err ) {
|
||||
// release converted strings
|
||||
if( cellName != NULL ) {
|
||||
(*env)->ReleaseStringUTFChars(env, jcellName, cellName);
|
||||
|
@ -13,7 +13,7 @@ TOP_SRCDIR=@TOP_SRCDIR@
|
||||
TOP_INCDIR=@TOP_INCDIR@
|
||||
TOP_LIBDIR=@TOP_LIBDIR@
|
||||
TOP_JLIBDIR=@TOP_SRCDIR@/JAVA/libjafs
|
||||
JNI_INC=${JAVA_HOME}/include
|
||||
JNI_INC=-I ${JAVA_HOME}/include -I `dirname ${JAVA_HOME}/include/*/jni_md.h`
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
datarootdir=@datarootdir@
|
||||
@ -36,10 +36,10 @@ SHARED_FLAGS = -shared -Xlinker -Bsymbolic
|
||||
OBJECT_FLAGS = -fPIC -c
|
||||
|
||||
ifeq "$(BUILD_TYPE)" "admin"
|
||||
INC := -I${TOP_INCDIR} -I${TOP_INCDIR}/afs/ -I${JAVA_HOME}/include -I ${JNI_INC}
|
||||
INC := -I${TOP_INCDIR} -I${TOP_INCDIR}/afs/ ${JNI_INC}
|
||||
CFLAGS := ${INC} ${DBG} ${OPTMZ} -I${TOP_SRCDIR}/config ${MT_CFLAGS}
|
||||
else
|
||||
INC := -I${TOP_SRCDIR}/libuafs -I${TOP_INCDIR} -I${JAVA_HOME}/include -I ${JNI_INC}
|
||||
INC := -I${TOP_SRCDIR}/libuafs -I${TOP_INCDIR} ${JNI_INC}
|
||||
CFLAGS := ${INC} ${DBG} ${OPTMZ} ${FSINCLUDES} -D_REENTRANT -DLIBJUAFS ${MT_CFLAGS}
|
||||
endif
|
||||
|
||||
@ -51,7 +51,7 @@ PACKAGEDIR = ${ROOTPACKAGEDIR}/${RELPACKAGEDIR}
|
||||
JAVADOCSDIR = javadocs/
|
||||
|
||||
JAVAH = ${JAVA_HOME}/bin/javah -classpath ${ROOTPACKAGEDIR} -jni -d ${LIBJAFSADMDIR}
|
||||
JAVAC = ${JAVA_HOME}/bin/javac -classpath ${ROOTPACKAGEDIR}
|
||||
JAVAC = ${JAVA_HOME}/bin/javac -source 1.4 -classpath ${ROOTPACKAGEDIR}
|
||||
|
||||
J_NATIVE_PREFIX = org.openafs.jafs.
|
||||
C_NATIVE_PREFIX = org_openafs_jafs_
|
||||
@ -154,6 +154,7 @@ CLIENTADMINLIB = ${TOP_LIBDIR}/libclientadmin.a
|
||||
|
||||
LIBJAFS_LIBS =\
|
||||
${TOP_LIBDIR}/libjuafs.a \
|
||||
${TOP_LIBDIR}/libafsutil.a \
|
||||
${TOP_LIBDIR}/libdes.a \
|
||||
-lresolv \
|
||||
-lpthread
|
||||
|
Loading…
Reference in New Issue
Block a user