1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:37:35 +00:00

keymap: Add back a tiny utility for setting the system keyboard layout

This patch removes the setuid-root flag from the KeyboardSettings GUI
application and adds back the old "keymap" program.

It doesn't feel very safe and sound to have a GUI program runnable
as setuid-root, so in the next patch I'll be making KeyboardSettings
call out to the "keymap" program to do its bidding.
This commit is contained in:
Andreas Kling 2020-06-18 22:19:57 +02:00
parent 0609eefd57
commit 6e78279614
4 changed files with 40 additions and 20 deletions

View file

@ -43,21 +43,6 @@
int main(int argc, char** argv)
{
const char* path = nullptr;
Core::ArgsParser args_parser;
args_parser.add_positional_argument(path, "The mapping file to be used", "file", Core::ArgsParser::Required::No);
args_parser.parse(argc, argv);
if (path != nullptr) {
Keyboard::CharacterMap character_map(path);
int rc = character_map.set_system_map();
if (rc != 0) {
fprintf(stderr, "%s\n", strerror(-rc));
}
return rc;
}
// If there is no command line parameter go for GUI.
GUI::Application app(argc, argv);