Changeset 7eada71 in rtems for cpukit/libmisc/shell/cmds.c


Ignore:
Timestamp:
Nov 18, 2014, 6:35:30 AM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 5, master
Children:
478455e0
Parents:
ffd5285
git-author:
Sebastian Huber <sebastian.huber@…> (11/18/14 06:35:30)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/20/14 09:30:26)
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libmisc/shell/cmds.c

    rffd5285 r7eada71  
    5151  if (strcmp("exit", e->command) != 0) {
    5252    rtems_shell_cmd_t *shell_cmd =
    53       (rtems_shell_cmd_t *) malloc(sizeof(rtems_shell_cmd_t));
     53      (rtems_shell_cmd_t *) calloc(1, sizeof(*shell_cmd));
    5454
    5555    if (shell_cmd != NULL) {
     
    5858      shell_cmd->usage   = e->usage;
    5959      shell_cmd->command = rtems_shell_main_monitor;
    60       shell_cmd->alias   = NULL;
    61       shell_cmd->next    = NULL;
    6260
    6361      if (rtems_shell_add_cmd_struct(shell_cmd) == NULL) {
Note: See TracChangeset for help on using the changeset viewer.