Mercurial Hosting > luan
diff src/goodjava/lucene/backup/BackupServer.java @ 1673:1b9f9fdb3b41
remove backup password
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sat, 28 May 2022 21:00:30 -0600 |
parents | 8dd8c556c449 |
children | af18eacf187c |
line wrap: on
line diff
--- a/src/goodjava/lucene/backup/BackupServer.java Thu May 26 21:10:02 2022 -0600 +++ b/src/goodjava/lucene/backup/BackupServer.java Sat May 28 21:00:30 2022 -0600 @@ -89,7 +89,6 @@ return; } String name = (String)call.args[0]; - String password = (String)call.args[1]; synchronized(backups) { backup = backups.get(name); if( backup == null ) { @@ -97,23 +96,6 @@ backups.put(name,backup); } } - File pwd = new File(backupDir,name+".pwd"); - try { - if( !pwd.exists() ) { - Writer out = new FileWriter(pwd); - out.write(password); - out.close(); - } else { - Reader in = new FileReader(pwd); - if( !IoUtils.readAll(in).equals(password) ) { - rpc.write( new RpcException("wrong password") ); - rpc.close(); - return; - } - } - } catch(IOException e) { - throw new RuntimeException(e); - } rpc.write(Rpc.OK); } while( !rpc.isClosed() ) {