Skip to content

mxgrub: Restrict access to submenu #107

Merged
merged 1 commit into from
Jan 9, 2020
Merged

Conversation

pmenzel
Copy link
Contributor

@pmenzel pmenzel commented Nov 29, 2019

Entering the submenu, a user could edit menu entries, and enter the command-line interface. Fix this by restricting the access to the submenu. As a result, users can now only manually start the default Linux kernel.

@donald
Copy link
Collaborator

donald commented Dec 3, 2019

Hmmm. Now the user can switch from the previous kernel to the default kernel but not back, is that correct? User might break his workstation that way, if the default kernel doesn't support the gpu. Do we want that?

@david
Copy link
Contributor

david commented Dec 3, 2019

When you copy set superusers in the submenu part, it will ask you 'username' and 'password'

submenu "all-other-kernel" --unrestricted {

        set superusers="root"
        password_pbkdf2 root grub.pbkdf2.sha512.10000.A1168F03CC3CD47F79848E949584EA624FF531B53611F61218DC5BAD760E767063A96E6A5CE6B350$

        menuentry "mariux-4.19.57-286" --unrestricted { save_env chosen ; linux /boot/bzImage-4.19.57.mx64.286 root=LABEL=root ro cras$
        menuentry "mariux-4.19.57-282" --unrestricted { save_env chosen ; linux /boot/bzImage-4.19.57.mx64.282 root=LABEL=root ro cras$
    ....

@pmenzel
Copy link
Contributor Author

pmenzel commented Dec 3, 2019

David’s workaround worked, but the GRUB developers replied to export security variable instead. Please review and accept.

@david
Copy link
Contributor

david commented Dec 3, 2019

looks good

@donald
Copy link
Collaborator

donald commented Dec 16, 2019

Tested. Okay with me. But I'd remove the obsolete and the revert commits.

Currently, it’s possible, after entering the submenu, to enter the CLI
by pressing the key *c*, or to edit entries by pressing *e*.

According to Vladimir, [variables related to security have to be
exported][1].

[1]: https://lists.gnu.org/archive/html/grub-devel/2019-11/msg00128.html
@pmenzel
Copy link
Contributor Author

pmenzel commented Jan 9, 2020

@donald, done.

@pmenzel pmenzel merged commit 1f2f8e6 into master Jan 9, 2020
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants