Changeset acf9a8d in rtems for testsuites/samples


Ignore:
Timestamp:
Nov 14, 2014, 1:31:54 PM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
395e5d4
Parents:
002f351
git-author:
Sebastian Huber <sebastian.huber@…> (11/14/14 13:31:54)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/20/14 09:30:22)
Message:

shell: Use crypt_r() in rtems_shell_login_check()

Use '*" to disable shell login instead of '!' according to the Linux man
page. Use getpwnam_r() instead of getpwnam(). Do not access the user
environment directly. Update the user environment only after a
successful login check.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/samples/fileio/init.c

    r002f351 racf9a8d  
    1414#define CONFIGURE_INIT
    1515#include "system.h"
     16#include <crypt.h>
    1617#include <stdio.h>
    1718#include <string.h>
     
    642643    "/etc/passwd",
    643644    0644,
    644     "root:7QR4o148UPtb.:0:0:root::/:/bin/sh\n"
    645     "rtems:*:1:1:RTEMS Application::/:/bin/sh\n"
    646     "test:8Yy.AaxynxbLI:2:2:test account::/:/bin/sh\n"
    647     "tty:!:3:3:tty owner::/:/bin/false\n"
     645    "root:$6$$FuPOhnllx6lhW2qqlnmWvZQLJ8Thr/09I7ESTdb9VbnTOn5.65"
     646      "/Vh2Mqa6FoKXwT0nHS/O7F0KfrDc6Svb/sH.:0:0:root::/:/bin/sh\n"
     647    "rtems::1:1:RTEMS Application::/:/bin/sh\n"
     648    "test:$1$$oPu1Xt2Pw0ngIc7LyDHqu1:2:2:test account::/:/bin/sh\n"
     649    "tty:*:3:3:tty owner::/:/bin/false\n"
    648650  );
    649651  writeFile(
     
    12261228  TEST_BEGIN();
    12271229
     1230  crypt_add_format(&crypt_md5_format);
     1231  crypt_add_format(&crypt_sha512_format);
     1232
    12281233  status = rtems_shell_wait_for_input(
    12291234    STDIN_FILENO,
Note: See TracChangeset for help on using the changeset viewer.