diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-11-18 07:35:30 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-11-20 10:30:26 +0100 |
commit | 7eada71e1b8e707d5b97d4d0cf7d2ca73013e403 (patch) | |
tree | 0595921de0173366d2bfb5331be1fb89ab1001ca /cpukit/libmisc/shell/cmds.c | |
parent | shell: Inherit UID and GID if no login check (diff) | |
download | rtems-7eada71e1b8e707d5b97d4d0cf7d2ca73013e403.tar.bz2 |
shell: Add mode, UID and GID to shell commands
Use this information to determine if a command is visible to the current
user and if the current user is allowed to execute this command.
Diffstat (limited to 'cpukit/libmisc/shell/cmds.c')
-rw-r--r-- | cpukit/libmisc/shell/cmds.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/cpukit/libmisc/shell/cmds.c b/cpukit/libmisc/shell/cmds.c index 7c9e21dcfc..6e3e0c1ec2 100644 --- a/cpukit/libmisc/shell/cmds.c +++ b/cpukit/libmisc/shell/cmds.c @@ -50,15 +50,13 @@ static bool rtems_shell_register_command(const rtems_monitor_command_entry_t *e, /* Exclude EXIT (alias quit)*/ if (strcmp("exit", e->command) != 0) { rtems_shell_cmd_t *shell_cmd = - (rtems_shell_cmd_t *) malloc(sizeof(rtems_shell_cmd_t)); + (rtems_shell_cmd_t *) calloc(1, sizeof(*shell_cmd)); if (shell_cmd != NULL) { shell_cmd->name = e->command; shell_cmd->topic = "monitor"; shell_cmd->usage = e->usage; shell_cmd->command = rtems_shell_main_monitor; - shell_cmd->alias = NULL; - shell_cmd->next = NULL; if (rtems_shell_add_cmd_struct(shell_cmd) == NULL) { free(shell_cmd); |