-
-
Notifications
You must be signed in to change notification settings - Fork 566
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
Should an exec wrapper be used? #396
Comments
It sounds really, really useful considering application security. I can imagine scenarios where a malicious application tries to call system binaries (e.g. accidentally with a But I strongly recommend to not advertise this as a security feature! We must make sure that desktop environments like KDE won't stop developing features like that independently! This is caused by the fact that AppImageKit is just the reference implementation of the AppImage standard, and any AppImage vendor might fork it and remove this or even use something completely different. If KDE etc. provide an implementation though, they're independent and will work anyway. Though, if an attacker really wanted to, they could easily break this feature I guess. But sure, providing it as an additional security feature, why not implement it upstream, too? If you implement it, I'll support your feature proposal. |
With @darealshinji what exactly do you mean by "implement your upstream binaries"? Make |
He asks if it's worth porting this to AppImageKit, too. |
Sure, but how? I mean, what runs inside the AppImage is a matter of the application, right? The AppImage is, after all, just a self-mounting filesystem... |
What do you mean, how? Just do it the way KDE do it: I guess you just have to preload the same libraries. |
Yes, but that's something the person who makes the AppImage does. I don't know how to "put that into AppImageKit"... |
So you say if @darealshinji came up with a concept you would consider it? @darealshinji: please elaborate. |
Sure! |
The easiest solution I could think of would be to check if |
I am very much interested in this feature, as this is currently one of the limitations in the GIMP AppImage I am providing: some GIMP plug-ins, like file-darktable, invoke external executables, and those executables run into library conflicts in some systems. Libraries that are not bundled because not required by GIMP get mixed with bundled ones, with potential symbol conflicts. The best would be to store somehow the environment at the beginning of the AppImage execution, and use this environment to run external programs. |
In your specific case, you can just add the library @darealshinji mentioned to the AppImage, and use a little shell script to launch gimp with More information on Beware that if you copy paste code from KDE or GIMP project, the code is copyrighted, you need to check their license and probably include a copy of the license and a copyright notice. (Source code should be enough, but this is not legal advice, consult the license about how to do it properly.) |
@darealshinji I have started to look into the
I guess that ORIGINAL here means outside of the appimage environment and STARTUP means inside the appimage environment, right? But then, which piece of code should take care of setting those variables? Is it AppRun.c or something else? Because those variables need to be set before the environment is modified, as far as I understand... |
Please have a look at the AppRun script used at https://www.kdevelop.org/download as this is what the |
Does anyone have an idea if/how I can include a modified version of The exec wrapper code is released under the "GNU Library General Public License". I need to modify it in order to also include g_spawn_async in the list of supported functions... |
@aferrero2707 Adding a copy of it's source to the AppImage should be fine guess. |
@aferrero2707 I could imagine that its author Sven Brauch would also discuss other licensing options if required; best contact him directly in case you have special needs or questions. |
@aferrero2707 please be aware that @darealshinji did NOT give you legal advice here (at least I think so). For legal advice like this, you should consult a lawyer if in doubt. The Free Software Foundation are likely willing to help you with that kind of problem, too. In fact they published an FAQ for people in your situation: https://www.gnu.org/licenses/gpl-faq.html My opinion (disclaimer: this is not legal advice, and there is no warranty, you can not make me liable for any legal consequences): As you would modify the application, you have to publish the sources (either by embedding them, or adding a link to it in the README or something like that, see the GPL FAQ linked to above). The distribution of the binary doesn't violate the GPL, and since you don't link to the program but create child processes, it won't violate the GPL either. This is why we may redistribute quite some GPL binaries in AppImages, same goes for Linux distributions etc. |
Hi @probono, subprocess.call(["xdg-open", fnameDemo]) Vshould I use a different code? |
|
hi @probonopd
Should I restore the |
What @probonopd posted is highly risky, as it alters the entire process's environment. You can't simply store and then restore the value as FreeCAD likely uses threading. You're opening pandora's box there. What if some other thread needs access to the environment, but you changed something and it tries to read that? Python 101: copy your environment, alter it with I don't know what Python version you use, but |
Thx @TheAssassin |
Oopsie! |
So KDE AppImages are using these exec wrappers which are preloaded as libraries, right?
It took me a while to find the source code of it:
There's an interesting comment in the source code about what this is actually meant for:
This sounds reasonable to me. Do you think this is something worth to implement your upstream binaries?
The text was updated successfully, but these errors were encountered: