mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
keyboxd: Fix user id based queries
* kbx/backend-sqlite.c (run_select_statement): Add the missing join for user id bases queries. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
2042f5a464
commit
4d839f5a80
@ -696,7 +696,7 @@ run_select_statement (be_sqlite_local_t ctx,
|
||||
if (!ctx->select_stmt)
|
||||
err = run_sql_prepare ("SELECT p.ubid, p.type, p.keyblob"
|
||||
" FROM pubkey as p, userid as u"
|
||||
" WHERE u.uid = ?1",
|
||||
" WHERE p.ubid = u.ubid AND u.uid = ?1",
|
||||
&ctx->select_stmt);
|
||||
if (!err)
|
||||
err = run_sql_bind_text (ctx->select_stmt, 1, desc[descidx].u.name);
|
||||
@ -706,7 +706,7 @@ run_select_statement (be_sqlite_local_t ctx,
|
||||
if (!ctx->select_stmt)
|
||||
err = run_sql_prepare ("SELECT p.ubid, p.type, p.keyblob"
|
||||
" FROM pubkey as p, userid as u"
|
||||
" WHERE u.addrspec = ?1",
|
||||
" WHERE p.ubid = u.ubid AND u.addrspec = ?1",
|
||||
&ctx->select_stmt);
|
||||
if (!err)
|
||||
err = run_sql_bind_text (ctx->select_stmt, 1, desc[descidx].u.name);
|
||||
@ -716,7 +716,7 @@ run_select_statement (be_sqlite_local_t ctx,
|
||||
if (!ctx->select_stmt)
|
||||
err = run_sql_prepare ("SELECT p.ubid, p.type, p.keyblob"
|
||||
" FROM pubkey as p, userid as u"
|
||||
" WHERE u.addrspec LIKE ?1",
|
||||
" WHERE p.ubid = u.ubid AND u.addrspec LIKE ?1",
|
||||
&ctx->select_stmt);
|
||||
if (!err)
|
||||
err = run_sql_bind_text_like (ctx->select_stmt, 1,
|
||||
@ -727,7 +727,7 @@ run_select_statement (be_sqlite_local_t ctx,
|
||||
if (!ctx->select_stmt)
|
||||
err = run_sql_prepare ("SELECT p.ubid, p.type, p.keyblob"
|
||||
" FROM pubkey as p, userid as u"
|
||||
" WHERE u.uid LIKE ?1",
|
||||
" WHERE p.ubid = u.ubid AND u.uid LIKE ?1",
|
||||
&ctx->select_stmt);
|
||||
if (!err)
|
||||
err = run_sql_bind_text_like (ctx->select_stmt, 1,
|
||||
|
Loading…
x
Reference in New Issue
Block a user