2009-11-09 Robert Millan <rmh.grub@aybabtu.com>
* normal/auth.c: Include `<grub/time.h>'.
        (grub_auth_strcmp): Replace `strcmp' with `grub_strcmp'.
			
			
This commit is contained in:
		
							parent
							
								
									3fd6f044f1
								
							
						
					
					
						commit
						7aea29a388
					
				
					 2 changed files with 7 additions and 1 deletions
				
			
		|  | @ -1,3 +1,8 @@ | ||||||
|  | 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  Robert Millan  <rmh.grub@aybabtu.com> | 2009-11-09  Robert Millan  <rmh.grub@aybabtu.com> | ||||||
| 
 | 
 | ||||||
| 	* normal/auth.c (punishment_delay): New variable. | 	* normal/auth.c (punishment_delay): New variable. | ||||||
|  |  | ||||||
|  | @ -22,6 +22,7 @@ | ||||||
| #include <grub/misc.h> | #include <grub/misc.h> | ||||||
| #include <grub/env.h> | #include <grub/env.h> | ||||||
| #include <grub/normal.h> | #include <grub/normal.h> | ||||||
|  | #include <grub/time.h> | ||||||
| 
 | 
 | ||||||
| struct grub_auth_user | struct grub_auth_user | ||||||
| { | { | ||||||
|  | @ -42,7 +43,7 @@ grub_auth_strcmp (const char *s1, const char *s2) | ||||||
|   grub_uint64_t end; |   grub_uint64_t end; | ||||||
| 
 | 
 | ||||||
|   end = grub_get_time_ms () + 100; |   end = grub_get_time_ms () + 100; | ||||||
|   ret = strcmp (s1, s2); |   ret = grub_strcmp (s1, s2); | ||||||
| 
 | 
 | ||||||
|   /* This prevents an attacker from deriving information about the
 |   /* This prevents an attacker from deriving information about the
 | ||||||
|      password from the time it took to execute this function.  */ |      password from the time it took to execute this function.  */ | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue