96979899100101102103
LOG.info("LDAP user manager opened."); } catch(Exception ex) { LOG.error("LdapUserManager.configure()", ex); throw new FtpException("LdapUserManager.configure()", ex); } }
139140141142143144145146
Collections.sort(allUsers); return allUsers.toArray(new String[0]); } catch(NamingException ex) { LOG.error("LdapUserManager.getAllUserNames()", ex); throw new FtpException("LdapUserManager.getAllUserNames()", ex); } }
234235236237238239240241
LOG.info("Rebinding user " + dn); adminContext.rebind(dn, newUser, attrs); } catch(NamingException ex) { LOG.error("LdapUserManager.save()", ex); throw new FtpException("LdapUserManager.save()", ex); } }
256257258259260261262263
LOG.info("Unbinding " + dn); adminContext.unbind(dn); } catch(NamingException ex) { LOG.error("LdapUserManager.delete()", ex); throw new FtpException("LdapUserManager.delete()", ex); } }
232233234235236237238239240241242
fos = new FileOutputStream(userDataFile); userDataProp.store(fos, "Generated file - don't edit (please)"); } catch(IOException ex) { LOG.error("Failed saving user data", ex); throw new FtpException("Failed saving user data", ex); } finally { IoUtils.close(fos); } }
249250251252253254255256257258259
if(!passive) { int localPort = dataConfig.getActiveLocalPort(); if(secure) { SslConfiguration ssl = dataConfig.getSslConfiguration(); if(ssl == null) { throw new FtpException("Data connection SSL not configured"); } if(localPort == 0) { dataSoc = createSocket(ssl, address, port, null, localPort, false); } else {
272273274275276277278279280281282
rs = stmt.executeQuery(sql); return rs.next(); } catch(SQLException ex) { LOG.error("DbUserManager.isAdmin()", ex); throw new FtpException("DbUserManager.isAdmin()", ex); } finally { if(rs != null) { try { rs.close();
356357358359360361362363364365366
stmt = createConnection().createStatement(); stmt.executeUpdate(sql); } catch(SQLException ex) { LOG.error("DbUserManager.delete()", ex); throw new FtpException("DbUserManager.delete()", ex); } finally { if(stmt != null) { try { stmt.close();
442443444445446447448449450451452
stmt = createConnection().createStatement(); stmt.executeUpdate(sql); } catch(SQLException ex) { LOG.error("DbUserManager.save()", ex); throw new FtpException("DbUserManager.save()", ex); } finally { if(stmt != null) { try { stmt.close();
500501502503504505506507508509510
} return thisUser; } catch(SQLException ex) { LOG.error("DbUserManager.getUserByName()", ex); throw new FtpException("DbUserManager.getUserByName()", ex); } finally { if(rs != null) { try { rs.close();