Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permission denied when trying to only allow access to a certain ffi path #115

Open
prescientmoon opened this issue Jan 1, 2024 · 1 comment

Comments

@prescientmoon
Copy link

Hi!

I am trying to use this library by passing --allow-ffi=THING where THING is the value I am passing to DENO_SQLITE_PATH. The script fails with the following error

error: Uncaught (in promise) PermissionDenied: Requires ffi access, run again with the --allow-ffi flag
export const SQLITE_VERSION = readCstr(sqlite3_libversion()!);
                              ^
    at getCString (ext:deno_ffi/00_ffi.js:159:16)
    at https://deno.land/x/[email protected]/src/database.ts:103:31

I am running on nixos, and deno --version shows

deno 1.39.1 (release, x86_64-unknown-linux-gnu)
v8 12.0.267.8
typescript 5.3.3
@DjDeveloperr
Copy link
Member

I think we're not allowed to use the UnsafePointer and related APIs when you pass a specific path for --allow-ffi - possibly something that needs fixing in Deno itself than deno_sqlite3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants