summaryrefslogtreecommitdiff
path: root/lib/backupstore/BackupCommands.cpp
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2012-10-22 20:54:48 +0000
committerChris Wilson <chris+github@qwirx.com>2012-10-22 20:54:48 +0000
commitc920768ad02b7d3238865afa7d67a5e2a6ee5fdc (patch)
tree5daa25fdc2cc38d10f0156b85a2d0401c4ba1597 /lib/backupstore/BackupCommands.cpp
parent09fe7a13377f9f4fb0550ad50e2976d661bd23eb (diff)
Refuse login to disabled accounts.
Diffstat (limited to 'lib/backupstore/BackupCommands.cpp')
-rw-r--r--lib/backupstore/BackupCommands.cpp7
1 files changed, 7 insertions, 0 deletions
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<BackupProtocolMessage> 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();