Commit graph

13 commits

Author SHA1 Message Date
Vladimir 'phcoder' Serbinenko
2e71383172 Core changes hopefully finished 2009-12-24 15:34:33 +01:00
Vladimir 'phcoder' Serbinenko
ba136b293a merge mainline into crypto 2009-12-22 14:28:39 +01:00
carles
7f39d92f8d 2009-12-20 Carles Pina i Estany <carles@pina.cat>
* include/grub/auth.h: Include `<grub/i18n.h>'.
	(GRUB_GET_PASSWORD): Gettextizze string.
	* include/grub/normal.h (STANDARD_MARGIN): New macro, moved from
	menu_text.c.
	(grub_utf8_to_ucs4_alloc): Fix indentation.
	(grub_print_ucs4): Likewise.
	(grub_getstringwidth): Likewise.
	(print_message_indented): New declaration.
	* normal/auth.c: Include `<grub/i18n.h>'.
	(grub_auth_check_authentication): Gettexttize string.
	* normal/cmdline.c: Include `<grub/i18n.h>'.
	(grub_cmdline_get): Gettextizze.
	* normal/color.c: Include `<grub/i18n.h>'.
	(grub_parse_color_name_pair): Gettexttize strings.
	* normal/main.c (grub_normal_reader_init): Cleanup gettexttized
	string (use `print_message_indented').
	* normal/menu_text.c (STANDARD_MARGIN): Moved from here to
	`include/grub/normal.h'.
	(print_message_indented): Renamed to ...
	(grub_print_message_indented): ... this. Remove `static' qualifer (now
	used in normal/main.c).
	(print_message): Use `grub_print_message_indented' instead of
	`print_message_indented'.
	(print_timeout): Likewise.
	* normal/misc.c: Include `<grub/term.h>' and `<grub/i18n.h>'.
	(grub_normal_print_device_info): Gettexttize strings.
	* po/POTFILES: Add `auth.c', `color.c' and `misc.c'.
2009-12-20 23:32:15 +00:00
Vladimir 'phcoder' Serbinenko
b391bdb2f2 Use dedicated simple password retriever for size of future crypto disks modules and simplify entering passwords routines 2009-12-06 20:11:50 +01:00
Vladimir 'phcoder' Serbinenko
53eb42a6fa Compilation error fixed 2009-11-15 23:42:11 +01:00
Vladimir 'phcoder' Serbinenko
228734ab02 MAX_PASSLEN based authentication 2009-11-15 23:36:42 +01:00
Robert Millan
4089b167cd 2009-11-09 Robert Millan <rmh.grub@aybabtu.com>
* normal/auth.c (punishment_delay): Moved from here ...
        (grub_auth_strcmp): ... to here (inside function).
2009-11-09 14:30:47 +00:00
Robert Millan
7aea29a388 2009-11-09 Robert Millan <rmh.grub@aybabtu.com>
* normal/auth.c: Include `<grub/time.h>'.
        (grub_auth_strcmp): Replace `strcmp' with `grub_strcmp'.
2009-11-09 08:05:27 +00:00
Robert Millan
3fd6f044f1 2009-11-09 Robert Millan <rmh.grub@aybabtu.com>
* normal/auth.c (punishment_delay): New variable.
        (grub_auth_strcmp): Rewrite using grub_get_time_ms ().
        (grub_auth_check_authentication): Punish failed login attempts with  
        an incremental (2^N) delay.
2009-11-09 00:37:56 +00:00
Vladimir 'phcoder' Serbinenko
7ad12f433d 2009-11-09 Vladimir Serbinenko <phcoder@gmail.com>
* normal/auth.c (grub_auth_strcmp): Fixed incorrect variable usage.
2009-11-09 00:28:10 +01:00
Vladimir 'phcoder' Serbinenko
ec8bb77de9 2009-11-09 Vladimir Serbinenko <phcoder@gmail.com>
* normal/auth.c (grub_auth_strcmp): Fix bug which resulted in function
	being insecure.
2009-11-09 00:16:17 +01:00
phcoder
ff747d50c1 2009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
Fix breakage in normal/auth.c.

	* normal/auth.c (grub_iswordseparator): New function.
2009-08-25 08:11:50 +00:00
phcoder
e7e1f93ff6 2009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
Authentication support.

	* commands/password.c: New file.
	* conf/common.rmk (pkglib_MODULES): Add password.mod.
	(password_mod_SOURCES): New variable.
	(password_mod_CFLAGS): Likewise.
	(password_mod_LDFLAGS): Likewise.
	(normal_mod_SOURCES): Add normal/auth.c.
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): Add commands/password.c and
	normal/auth.c.
	* conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
	* include/grub/auth.h: New file.
	* include/grub/err.h (grub_err_t): New enum value
	GRUB_ERR_ACCESS_DENIED.
	* include/grub/menu.h (grub_menu_entry): New fields 'restricted' and
	'users'.
	* include/grub/normal.h (grub_cmdline_get): New argument 'history'.
	* normal/cmdline.c (grub_cmdline_get): New argument 'history'. All
	users updated.
	* normal/auth.c: New file.
	* normal/main.c (grub_normal_add_menu_entry): Handle --users option.
	(grub_cmdline_run): Don't allow to go to command line without
	authentication.
	* normal/menu.c (grub_menu_execute_entry): Handle restricted entries.
	* normal/menu_entry.c (grub_menu_entry_run): Don't allow editing
	menuentry without superuser rights.
	* normal/menu_viewer.c (grub_menu_viewer_show_menu): Don't exit if
	user isn't a superuser.
2009-08-24 23:55:06 +00:00