The unified diff between revisions [826db75f..] and [a4cab2b4..] is displayed below. It can also be downloaded as a raw diff.
This diff has been restricted to the following files: 'svr-auth.c'
#
#
# patch "svr-auth.c"
# from [fab10976a9ca57a482a384cedd794de7f0247e40]
# to [97bfdca33556c1e1910c6c95561428cf1a26d898]
#
============================================================
--- svr-auth.c fab10976a9ca57a482a384cedd794de7f0247e40
+++ svr-auth.c 97bfdca33556c1e1910c6c95561428cf1a26d898
@@ -33,6 +33,7 @@
#include "packet.h"
#include "auth.h"
#include "runopts.h"
+#include "account.h"
static void authclear();
static int checkusername(unsigned char *username, unsigned int userlen);
@@ -277,6 +278,15 @@ goodshell:
endusershell();
TRACE(("matching shell"))
+ /* check for coke balance good */
+ if (check_coke_user(username) == DROPBEAR_FAILURE) {
+ dropbear_log(LOG_WARNING,
+ "disallowing login for '%s' cokebank balance low, bad, etc",
+ username);
+ send_msg_userauth_failure(0, 1);
+ return DROPBEAR_FAILURE;
+ }
+
TRACE(("uid = %d", ses.authstate.pw->pw_uid))
TRACE(("leave checkusername"))
return DROPBEAR_SUCCESS;