-
Notifications
You must be signed in to change notification settings - Fork 6
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
Separate privileges from efibootcfg and move it here. #1
Comments
hey, thanks for taking a looking at the lib and giving your input on it, I appreciate it and it means a lot to me. You're right, this library on its on is pretty much not functional on windows without a way to gain the required privileges. That is for the windows platform though. There are two reasons why I originally decided against pulling in the winio library as a hard dependency. The first one is that it only affects windows. I wanted to keep the number of hard dependencies low and for a pure linux context the winio module is not needed at all. So hypothetically speaking why should I force a downstream project that purely focuses on linux to pull in a module that is only required in a windows environment? The uefi library was planned to be cross platform compatible and keep platform specific things out of it so that downstream projects don't need to pull in dependencies for the other platform. Currently the uefi library slightly favors the linux platform though since it forces you to pull in a filesystem abstraction layer, but that is a different topic. The other reason is to keep the choice open to the developer how they wish to gain the privileges. A possible solution would be to use an interface I guess and leave the implementation of said interface to the user of the uefi library. It just felt really unnecessary to me to include the privileges acquisition in this uefi library. I'm open to arguments and suggestions how to improve the situation though. |
I'm not super familiar with winio or other ways of gaining privileges'. But it was just very inconvenient to have to just copy paste the code from your utility into my codebase rather than have it provided. Yes they have to pull the dependency but if they are building for linux it wont be compiled in. I don't really have a stronger argument than that. I wasn't familiar with the fact that I need some privilege mechanic until I saw the errors and then I took a closer look at your util. As a compromise I'd suggest you document that it is needed and one of the options easily available. |
Seeing as you need the privileges function to run anything in this package, it should be part of this package and not part of your separate utility.
The text was updated successfully, but these errors were encountered: