Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 9db459b4 authored by Ahmed Ibrahim's avatar Ahmed Ibrahim
Browse files

Add API support for sqlite3_set_authorizer().

Authorizers can be consulted during compilation of a SQL statement
to determine if each action requested by the SQL statement is allowed.

This can be useful to dynamically block interaction with private,
internal, or otherwise sensitive columns or tables inside a database,
such as when compiling an untrusted SQL statement.

This change adds the ability for developers to provide a custom
authorizer on a per-statement basis.  Since statements using a custom
authorizer are typically untrusted SQL, they're likely to have low
cache hit ratios, so we don't attempt to cache compiled statements.

Upstream SQLite is likely to continue adding new actions over
time, so our API design is a simple mirror of the underlying
callback.  Mapping of this underlying callback into higher-level
concepts is left to a Jetpack library.

Bug: 231636192
Test: atest CtsDatabaseTestCases
Change-Id: I06fa30e30c58961c9b05628e576a6f5f80fdf550
parent 1c450b40
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment