|
From: James T. <ja...@fl...> - 2023-06-07 09:20:35
|
> On 6 Jun 2023, at 12:37, merspieler <mer...@al...> wrote:
>
> If I say, I also want Liveries/<aircraft-id> to be included in the
> search (and added a matching directory) like this:
> var m = { parents: [canvas_livery, gui.OverlaySelector.new("Select Livery", [dir, getprop("/sim/fg-home") ~ "/Export/Liveries/" ~ getprop("/sim/aircraft-id"), "Liveries/" ~ getprop("/sim/aircraft-id")], nameprop, sortprop, "sim/model/livery/file")] };
>
> I get this error upon starting the sim, breaking the aircraft:
> 38.07 [ALRT]:nasal directory(): listing '/games/flightgear/flightgear-nix-working/install/flightgear/bin' denied (unauthorized directory - authorization no longer follows symlinks; to authorize reading additional directories, pass them to --allow-nasal-read)
> 38.07 [ALRT]:nasal Nasal runtime error: object has no size()
> 38.07 [ALRT]:nasal at /games/flightgear/fgdata/Nasal/gui.nas, line 388
> 38.07 [ALRT]:nasal called from: /games/flightgear/fgdata/Nasal/gui.nas, line 371
> 38.07 [ALRT]:nasal called from: /games/flightgear/fgdata/Nasal/gui.nas, line 361
> 38.07 [ALRT]:nasal called from: /games/.fgfs/Aircraft/A320-family/Nasal/Libraries/canvasLiv.nas, line 71
> 38.07 [ALRT]:nasal called from: /games/.fgfs/Aircraft/A320-family/Nasal/Libraries/libraries.nas, line 36
>
> Yes, we've got symlinks in our stuff, but not to that Livery dir.
> (Unless you account for the fact that ~/.fgfs is symlinked but that
> has never been an issue anywhere else)
I\m pretty confused now. Adding a named sub-dir into a path (whether it’s called “liveries’ or ‘tomatoes’) shouldn’t make any difference to Nasal permission checks, as far as I know. Since permissions are set on particular base paths, and assuming a location is allowed, subdirectories of that location are also allowed.
If you’re really saying that the gui.OverlaySelector works without a named subdir and breaks if you add it, then that’s a bug and we need to debug it, I think.
Kind regards,
James
|