mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-11-25 17:53:15 +01:00
give read-only access to /dev for ffmpeg to access /dev/urandom (#3109)
This commit is contained in:
parent
de45c0be60
commit
401098191b
@ -119,7 +119,8 @@ func ffmpeg(ctx context.Context, dirpath string, args ...string) error {
|
||||
Stderr: &stderr,
|
||||
Args: args,
|
||||
Config: func(modcfg wazero.ModuleConfig) wazero.ModuleConfig {
|
||||
fscfg := wazero.NewFSConfig()
|
||||
fscfg := wazero.NewFSConfig() // needs /dev/urandom
|
||||
fscfg = fscfg.WithReadOnlyDirMount("/dev", "/dev")
|
||||
fscfg = fscfg.WithDirMount(dirpath, dirpath)
|
||||
modcfg = modcfg.WithFSConfig(fscfg)
|
||||
return modcfg
|
||||
|
Loading…
Reference in New Issue
Block a user