The unified diff between revisions [2a6c9eb6..] and [743743c4..] 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 [dbd28ab1fff172ca3f2e4cb756ec53b74b48b6b3]
# to [68e708141e7525f929427ddd9751a90dd5370c8d]
#
============================================================
--- svr-auth.c dbd28ab1fff172ca3f2e4cb756ec53b74b48b6b3
+++ svr-auth.c 68e708141e7525f929427ddd9751a90dd5370c8d
@@ -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;