Ticket #1828: 0001-PR1828-Parameter-forever-is-ignored-with-login-funct.patch

File 0001-PR1828-Parameter-forever-is-ignored-with-login-funct.patch, 1.1 KB (added by Gedare Bloom, on 04/11/14 at 19:02:09)

patch fix?

  • cpukit/libmisc/shell/shell.c

    From 478b025c43f62c0736ad05fde38d9936d62fb17a Mon Sep 17 00:00:00 2001
    From: Gedare Bloom <gedare@rtems.org>
    Date: Fri, 11 Apr 2014 15:59:04 -0400
    Subject: [PATCH] PR1828: Parameter 'forever' is ignored with login function
    
    When selected login function in the shell, after repeated incorrect passwords,
    shell will out, even when the 'forever' flag is set.
    
    See cpukit/libmisc/shell/shell.c function rtems_shell_main_loop. After
    incorrect login, variable 'result' has false value, and while loop is exited.
    
    Changing the condition to boolean-OR the result with the forever flag
    permits invalid login attempts to be repeated.
    ---
     cpukit/libmisc/shell/shell.c |    2 +-
     1 files changed, 1 insertions(+), 1 deletions(-)
    
    diff --git a/cpukit/libmisc/shell/shell.c b/cpukit/libmisc/shell/shell.c
    index 8666299..3126b1f 100644
    a b bool rtems_shell_main_loop( 
    912912        fflush( stdout );
    913913        fflush( stderr );
    914914      }
    915     } while (result && shell_env->forever);
     915    } while (result || shell_env->forever);
    916916
    917917  }
    918918