Browse Source

ckdb - fail auth if users.status isn't empty

master
kanoi 10 years ago
parent
commit
5d522ddec8
  1. 2
      src/ckdb.h
  2. 4
      src/ckdb_dbio.c

2
src/ckdb.h

@ -52,7 +52,7 @@
#define DB_VLOCK "1"
#define DB_VERSION "0.9.4"
#define CKDB_VERSION DB_VERSION"-0.641"
#define CKDB_VERSION DB_VERSION"-0.642"
#define WHERE_FFL " - from %s %s() line %d"
#define WHERE_FFL_HERE __FILE__, __func__, __LINE__

4
src/ckdb_dbio.c

@ -4055,6 +4055,10 @@ bool auths_add(PGconn *conn, char *poolinstance, char *username,
}
DATA_USERS(*users, u_item);
// Any status content means disallow mining
if ((*users)->status[0])
goto unitem;
STRNCPY(row->poolinstance, poolinstance);
row->userid = (*users)->userid;
// since update=false, a dup will be ok and do nothing when igndup=true

Loading…
Cancel
Save