Simple module to provide a password protection for the shell. More...
Simple module to provide a password protection for the shell.
Files | |
file | shell_lock.h |
Shell interface definition. | |
Macros | |
#define | CONFIG_SHELL_LOCK_ATTEMPTS_BEFORE_TIME_LOCK 3 |
Lock the login process after given attempts of failed logins for a few seconds. | |
#define | CONFIG_SHELL_LOCK_AUTO_LOCK_TIMEOUT_MS (5 * 60 * 1000) |
Lock the shell after this time span without user input Defaults to 5 minutes but can be overwritten in the applications Makefile. | |
Functions | |
void | shell_lock_checkpoint (char *line_buf, int buf_size) |
Entry point for the lock mechanism. | |
bool | shell_lock_is_locked (void) |
Returns true, if the shell is in the locked state. | |
void | shell_lock_do_lock (void) |
Lock the shell. | |
#define CONFIG_SHELL_LOCK_ATTEMPTS_BEFORE_TIME_LOCK 3 |
Lock the login process after given attempts of failed logins for a few seconds.
Definition at line 43 of file shell_lock.h.
#define CONFIG_SHELL_LOCK_AUTO_LOCK_TIMEOUT_MS (5 * 60 * 1000) |
Lock the shell after this time span without user input Defaults to 5 minutes but can be overwritten in the applications Makefile.
Definition at line 51 of file shell_lock.h.
void shell_lock_checkpoint | ( | char * | line_buf, |
int | buf_size | ||
) |
Entry point for the lock mechanism.
If locked, the user will be asked for a password. This function won't return until the correct password has been entered.
[in] | line_buf | Buffer for reading in the password from stdin |
[in] | buf_size | Buffer size |
bool shell_lock_is_locked | ( | void | ) |
Returns true, if the shell is in the locked state.