From c920768ad02b7d3238865afa7d67a5e2a6ee5fdc Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 22 Oct 2012 20:54:48 +0000 Subject: Refuse login to disabled accounts. --- lib/backupstore/BackupCommands.cpp | 7 +++++++ lib/backupstore/backupprotocol.txt | 1 + 2 files changed, 8 insertions(+) (limited to 'lib/backupstore') diff --git a/lib/backupstore/BackupCommands.cpp b/lib/backupstore/BackupCommands.cpp index 66764a3b..aa4d3823 100644 --- a/lib/backupstore/BackupCommands.cpp +++ b/lib/backupstore/BackupCommands.cpp @@ -120,6 +120,13 @@ std::auto_ptr BackupProtocolLogin::DoCommand(BackupProtoc // Load the store info rContext.LoadStoreInfo(); + if(!rContext.GetBackupStoreInfo().IsAccountEnabled()) + { + BOX_WARNING("Refused login from disabled client ID " << + BOX_FORMAT_ACCOUNT(mClientID)); + return PROTOCOL_ERROR(Err_DisabledAccount); + } + // Get the last client store marker int64_t clientStoreMarker = rContext.GetClientStoreMarker(); diff --git a/lib/backupstore/backupprotocol.txt b/lib/backupstore/backupprotocol.txt index 9df62459..aa987e70 100644 --- a/lib/backupstore/backupprotocol.txt +++ b/lib/backupstore/backupprotocol.txt @@ -39,6 +39,7 @@ Error 0 IsError(Type,SubType) Reply CONSTANT Err_DoesNotExistInDirectory 13 CONSTANT Err_PatchConsistencyError 14 CONSTANT Err_MultiplyReferencedObject 15 + CONSTANT Err_DisabledAccount 16 Version 1 Command(Version) Reply int32 Version -- cgit v1.2.3