beber desklock patches.

SVN revision: 35022
This commit is contained in:
Carsten Haitzler 2008-07-07 21:28:22 +00:00
parent 4ac01dbba6
commit bca780d0b5
1 changed files with 12 additions and 4 deletions

View File

@ -72,6 +72,7 @@ static int _e_desklock_cb_mouse_move(void *data, int type, void *event);
static int _e_desklock_cb_custom_desklock_exit(void *data, int type, void *event); static int _e_desklock_cb_custom_desklock_exit(void *data, int type, void *event);
static int _e_desklock_cb_idle_poller(void *data); static int _e_desklock_cb_idle_poller(void *data);
static void _e_desklock_null(void);
static void _e_desklock_passwd_update(void); static void _e_desklock_passwd_update(void);
static void _e_desklock_backspace(void); static void _e_desklock_backspace(void);
static void _e_desklock_delete(void); static void _e_desklock_delete(void);
@ -423,6 +424,8 @@ _e_desklock_cb_key_down(void *data, int type, void *event)
_e_desklock_backspace(); _e_desklock_backspace();
else if (!strcmp(ev->keysymbol, "Delete")) else if (!strcmp(ev->keysymbol, "Delete"))
_e_desklock_delete(); _e_desklock_delete();
else if (!strcmp(ev->keysymbol, "u") && (ev->modifiers & ECORE_X_MODIFIER_CTRL))
_e_desklock_null();
else else
{ {
/* here we have to grab a password */ /* here we have to grab a password */
@ -505,6 +508,13 @@ _e_desklock_passwd_update(void)
} }
} }
static void
_e_desklock_null(void)
{
memset(edd->passwd, 0, sizeof(char) * PASSWD_LEN);
_e_desklock_passwd_update();
}
static void static void
_e_desklock_backspace(void) _e_desklock_backspace(void)
{ {
@ -578,8 +588,7 @@ _e_desklock_check_auth(void)
#endif #endif
/* password is definitely wrong */ /* password is definitely wrong */
_e_desklock_state_set(E_DESKLOCK_STATE_INVALID); _e_desklock_state_set(E_DESKLOCK_STATE_INVALID);
memset(edd->passwd, 0, sizeof(char) * PASSWD_LEN); _e_desklock_null();
_e_desklock_passwd_update();
return 0; return 0;
} }
@ -647,8 +656,7 @@ _e_desklock_cb_exit(void *data, int type, void *event)
{ {
_e_desklock_state_set(E_DESKLOCK_STATE_INVALID); _e_desklock_state_set(E_DESKLOCK_STATE_INVALID);
/* security - null out passwd string once we are done with it */ /* security - null out passwd string once we are done with it */
memset(edd->passwd, 0, sizeof(char) * PASSWD_LEN); _e_desklock_null();
_e_desklock_passwd_update();
} }
ecore_event_handler_del(_e_desklock_exit_handler); ecore_event_handler_del(_e_desklock_exit_handler);
_e_desklock_exit_handler = NULL; _e_desklock_exit_handler = NULL;