Ignore:
Timestamp:
Nov 4, 2007, 3:16:40 AM (16 years ago)
Author:
Bruno Cornec
Message:

Update to busybox 1.7.2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.5/mindi-busybox/libbb/restricted_shell.c

    r821 r1765  
    2929 */
    3030
    31 #include <stdio.h>
    32 #include <errno.h>
    33 #include <unistd.h>
    34 #include <string.h>
    35 #include <stdlib.h>
    36 #include <syslog.h>
    37 #include <ctype.h>
    3831#include "libbb.h"
    39 
    40 
    4132
    4233/* Return 1 if SHELL is a restricted shell (one not returned by
    4334   getusershell), else 0, meaning it is a standard shell.  */
    44 
    45 int restricted_shell ( const char *shell )
     35int restricted_shell(const char *shell)
    4636{
    4737    char *line;
    4838
    49     setusershell ( );
    50     while (( line = getusershell ( ))) {
    51         if (( *line != '#' ) && ( strcmp ( line, shell ) == 0 ))
    52             break;
     39    setusershell();
     40    while ((line = getusershell())) {
     41        if (*line != '#' && strcmp(line, shell) == 0)
     42            return 0;
    5343    }
    54     endusershell ( );
    55     return line ? 0 : 1;
     44    endusershell();
     45    return 1;
    5646}
    57 
Note: See TracChangeset for help on using the changeset viewer.