use of net.sourceforge.myvd.types.Int in project OpenUnison by TremoloSecurity.
the class AccessLog method bind.
public void bind(BindInterceptorChain chain, DistinguishedName dn, Password pwd, LDAPConstraints constraints) throws LDAPException {
long start = System.currentTimeMillis();
long end = 0;
int result = -1;
Int op = new Int(0);
Int con = new Int(0);
this.getOpNum(chain.getSession(), con, op);
StringBuffer buf = new StringBuffer("BIND op=").append(op.getValue()).append(" con=").append(con.getValue()).append(" dn='").append(dn.getDN()).append("'");
logger.info(buf.toString());
try {
chain.nextBind(dn, pwd, constraints);
result = 0;
} catch (LDAPException le) {
result = le.getResultCode();
throw le;
} finally {
end = System.currentTimeMillis();
if (result == -1) {
result = LDAPException.OPERATIONS_ERROR;
}
buf.setLength(0);
buf.append("RESULT op=").append(op.getValue()).append(" con=").append(con.getValue()).append(" result=").append(result).append(" time=").append(end - start);
logger.info(buf.toString());
}
}
use of net.sourceforge.myvd.types.Int in project OpenUnison by TremoloSecurity.
the class AccessLog method compare.
public void compare(CompareInterceptorChain chain, DistinguishedName dn, Attribute attrib, LDAPConstraints constraints) throws LDAPException {
long start = System.currentTimeMillis();
long end = 0;
int result = -1;
Int op = new Int(0);
Int con = new Int(0);
this.getOpNum(chain.getSession(), con, op);
StringBuffer buf = new StringBuffer("COMPARE op=").append(op.getValue()).append(" con=").append(con.getValue()).append(" dn='").append(dn.getDN()).append("' attribute='").append(attrib.getAttribute().getName()).append("' value='").append(attrib.getAttribute().getName()).append("'");
logger.info(buf.toString());
try {
chain.nextCompare(dn, attrib, constraints);
result = 0;
} catch (LDAPException le) {
result = le.getResultCode();
throw le;
} finally {
end = System.currentTimeMillis();
if (result == -1) {
result = LDAPException.OPERATIONS_ERROR;
}
buf.setLength(0);
buf.append("RESULT op=").append(op.getValue()).append(" con=").append(con.getValue()).append(" result=").append(result).append(" time=").append(end - start);
logger.info(buf.toString());
}
}
use of net.sourceforge.myvd.types.Int in project OpenUnison by TremoloSecurity.
the class AccessLog method rename.
public void rename(RenameInterceptorChain chain, DistinguishedName dn, DistinguishedName newRdn, Bool deleteOldRdn, LDAPConstraints constraints) throws LDAPException {
long start = System.currentTimeMillis();
long end = 0;
int result = -1;
Int op = new Int(0);
Int con = new Int(0);
this.getOpNum(chain.getSession(), con, op);
StringBuffer buf = new StringBuffer("RENAME op=").append(op.getValue()).append(" con=").append(con.getValue()).append(" dn='").append(dn.getDN()).append("'");
logger.info(buf.toString());
try {
chain.nextRename(dn, newRdn, deleteOldRdn, constraints);
result = 0;
} catch (LDAPException le) {
result = le.getResultCode();
throw le;
} finally {
end = System.currentTimeMillis();
if (result == -1) {
result = LDAPException.OPERATIONS_ERROR;
}
buf.setLength(0);
buf.append("RESULT op=").append(op.getValue()).append(" con=").append(con.getValue()).append(" result=").append(result).append(" time=").append(end - start);
logger.info(buf.toString());
}
}
use of net.sourceforge.myvd.types.Int in project OpenUnison by TremoloSecurity.
the class AccessLog method postSearchComplete.
public void postSearchComplete(PostSearchCompleteInterceptorChain chain, DistinguishedName base, Int scope, Filter filter, ArrayList<Attribute> attributes, Bool typesOnly, LDAPSearchConstraints constraints) throws LDAPException {
chain.nextPostSearchComplete(base, scope, filter, attributes, typesOnly, constraints);
StringBuffer b = new StringBuffer();
b.append(AccessLog.ACCESS_LOG_SRCH_BEGIN).append(this.name);
long start = (Long) chain.getRequest().get(b.toString());
b.setLength(0);
b.append(AccessLog.ACCESS_LOG_SRCH_OP).append(this.name);
Int op = (Int) chain.getRequest().get(b.toString());
b.setLength(0);
b.append(AccessLog.ACCESS_LOG_SRCH_CON).append(this.name);
Int con = (Int) chain.getRequest().get(b.toString());
b.setLength(0);
b.append(AccessLog.ACCESS_LOG_SRCH_COUNT).append(this.name);
Int nentries = (Int) chain.getRequest().get(b.toString());
long end = System.currentTimeMillis();
StringBuffer buf = new StringBuffer();
buf.append("SRCH-RESULT op=").append(op.getValue()).append(" con=").append(con.getValue()).append(" entries=").append(nentries.getValue()).append(" time=").append(end - start);
logger.info(buf);
}
use of net.sourceforge.myvd.types.Int in project OpenUnison by TremoloSecurity.
the class AccessLog method delete.
public void delete(DeleteInterceptorChain chain, DistinguishedName dn, LDAPConstraints constraints) throws LDAPException {
long start = System.currentTimeMillis();
long end = 0;
int result = -1;
Int op = new Int(0);
Int con = new Int(0);
this.getOpNum(chain.getSession(), con, op);
StringBuffer buf = new StringBuffer("DELETE op=").append(op.getValue()).append(" con=").append(con.getValue()).append(" dn='").append(dn.getDN()).append("'");
logger.info(buf.toString());
try {
chain.nextDelete(dn, constraints);
result = 0;
} catch (LDAPException le) {
result = le.getResultCode();
throw le;
} finally {
end = System.currentTimeMillis();
if (result == -1) {
result = LDAPException.OPERATIONS_ERROR;
}
buf.setLength(0);
buf.append("RESULT op=").append(op.getValue()).append(" con=").append(con.getValue()).append(" result=").append(result).append(" time=").append(end - start);
logger.info(buf.toString());
}
}
Aggregations