diff options
| author | David Sommerseth <dazo@users.sourceforge.net> | 2008-11-29 00:55:32 +0100 |
|---|---|---|
| committer | David Sommerseth <dazo@users.sourceforge.net> | 2008-11-29 00:55:32 +0100 |
| commit | 8e0ce79999351889c5df8fc4641c0d7011657f2d (patch) | |
| tree | 665d18c433ae2315cd6532219edbfc9cc2feff8e /database/sqlite | |
| parent | 6c8d27e54fbf16b452b080fa76363568bd1f0ea9 (diff) | |
| download | eurephia-8e0ce79999351889c5df8fc4641c0d7011657f2d.tar.gz eurephia-8e0ce79999351889c5df8fc4641c0d7011657f2d.tar.xz eurephia-8e0ce79999351889c5df8fc4641c0d7011657f2d.zip | |
Added context_type into eurephiaCTX struct. Database queries limited due to context type.
Diffstat (limited to 'database/sqlite')
| -rw-r--r-- | database/sqlite/sqlite.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/database/sqlite/sqlite.c b/database/sqlite/sqlite.c index 85b41de..dda59ba 100644 --- a/database/sqlite/sqlite.c +++ b/database/sqlite/sqlite.c @@ -205,6 +205,10 @@ dbresult *sqlite_query(eurephiaCTX *ctx, char *fmt, ... ) { return NULL; } + if( ctx->context_type == ECTX_NO_PRIVILEGES ) { + eurephia_log(ctx, LOG_ERROR, 0, "Database query attempted from wrong context"); + return NULL; + } // prepare a new (global) result set ... // do not delete the old ones, since we return this "global" |
