Closed pritambaral closed 7 years ago
Which is why I'd like to move all of the version choosing logic into config_pepperflash.c.
I think that option would be the best one. There is also no need of returning a list, one path is good enough.
@i-rinat What do I do about the usage of fpp_plugin_get_plugin_paths
in config_nacl.c
, config_libpdf_backend.c
, and config_libpdf_frontend.c
? Do I also refactor the three of them to return a single path?
Also, what is the current status of those three plugins? Are they even enabled/used?
Do I also refactor the three of them to return a single path?
That would be great. I think, it would be fine if they return just single "/opt/google/chrome", without and searing logic involved.
Also, what is the current status of those three plugins? Are they even enabled/used?
They are both disabled by default. NaCl isn't working at all, it's not finished. Libpdf backend part is kind of working, but it's useless without frontend part, which is not implemented. Latter requires porting Javascript code from Chrome PDF extension.
@i-rinat I have initiated a PR (which is a Work-In-Progress right now). The first (and only, right now) commit in it moves version choosing logic into each plugin. Do have a look.
Implemented in da0120a018d634f8825f15988f3b8fcec11ce6c6. Code searches in all paths, then selects one with newest version. Chrome beta and unstable paths were removed, since they almost always have some beta-versions with higher numbers in version strings.
Prologue
On systems where Chrome cannot update itself, it downloads updates to flash to a user-writable directory and runs it from there. This is obviously a nice thing, because, in the event of a flash vuln., the entire browser doesn't have to be redownloaded, or even the user notified and bothered to initiate a browser update.
The way it works is Google downloads each version of PepperFlash to a folder:
and keeps a note of the latest version at
which is a json file with the following sample contents:
Proposal
I propose to implement support for detecting presence and freshness (no pun intended) of such
libpepflashplayer.so
s. I intend to go about it in the following manner:latest-component-updated-flash
json file, given an$XDG_CONFIG_DIR
path. How to distinguish between the absolute paths that are hardcoded inpepperflash_path_list
insideconfig_pepperflash.c
right now and the new$XDG_CONFIG_DIR
paths is also something I'm seeking comments on. Right now I'm thinking of checking the first character of each path to see if it's a/
or a$
. Other ideas I can think of are:libpepflashplayer.so
(as is done right now) andlatest-component-updated-flash
in each expanded path, andpepperflash_path_list
will be renamed topepperflash_absolute_path_list
or something like that) and xdg paths.libpepflashplayer.so
.I was thinking of implementing #1 in
config_pepperflash.c
, but found that the version choosing logic is innp_entry.c
. I could simply do the scanning and choosing amongst xdg paths inconfig_pepperflash.c
and return fromfpp_config_get_plugin_path_list
with just that one path added, but that would still require maintaining two copies of the version choosing logic. Which is why I'd like to move all of the version choosing logic intoconfig_pepperflash.c
.Waiting for comments