lock support (not tested)

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-09-12 16:11:41 +02:00
parent 6492c85a42
commit df8957929d
4 changed files with 31 additions and 7 deletions

View file

@ -248,3 +248,27 @@ grub_auth_check_authentication (const char *userlist)
return GRUB_ACCESS_DENIED;
}
static grub_err_t
grub_cmd_authenticate (struct grub_command *cmd __attribute__ ((unused)),
int argc, char **args)
{
return grub_auth_check_authentication ((argc >= 1) ? args[0] : "");
}
static grub_command_t cmd;
void
grub_normal_auth_init (void)
{
cmd = grub_register_command ("authenticate",
grub_cmd_authenticate,
N_("[USERLIST]"), N_("Authenticate users"));
}
void
grub_normal_auth_fini (void)
{
grub_unregister_command (cmd);
}

View file

@ -477,6 +477,7 @@ GRUB_MOD_INIT(normal)
/* Previously many modules depended on gzio. Be nice to user and load it. */
grub_dl_load ("gzio");
grub_normal_auth_init ();
grub_context_init ();
grub_script_init ();
grub_menu_init ();
@ -520,6 +521,7 @@ GRUB_MOD_FINI(normal)
grub_context_fini ();
grub_script_fini ();
grub_menu_fini ();
grub_normal_auth_fini ();
grub_xputs = grub_xputs_saved;