[BACK]Return to security CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / etc

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/etc/security between version 1.33 and 1.34

version 1.33, 1998/09/14 19:42:42 version 1.34, 1999/02/18 18:53:33
Line 30  if ! cd $SECUREDIR; then
Line 30  if ! cd $SECUREDIR; then
         exit 1          exit 1
 fi  fi
   
   if [ -z "$max_loginlen" ];then
       max_loginlen=8
   fi
   
 ERR=secure1.$$  ERR=secure1.$$
 TMP1=secure2.$$  TMP1=secure2.$$
 TMP2=secure3.$$  TMP2=secure3.$$
Line 44  trap '/bin/rm -rf $SECUREDIR ; exit 0' 0
Line 48  trap '/bin/rm -rf $SECUREDIR ; exit 0' 0
 MP=/etc/master.passwd  MP=/etc/master.passwd
   
 # these is used several times.  # these is used several times.
 awk -F: '{ print $1 " " $3 }' $MP | sort -k2n > $MPBYUID  awk -F: '!/^+/ { print $1 " " $3 }' $MP | sort -k2n > $MPBYUID
 awk -F: '{ print $1 " " $9 }' $MP | sort -k2 > $MPBYPATH  awk -F: '{ print $1 " " $9 }' $MP | sort -k2 > $MPBYPATH
   
 # Check the master password file syntax.  # Check the master password file syntax.
 #  #
 if checkyesno check_passwd; then  if checkyesno check_passwd; then
         awk '          awk -v "len=$max_loginlen" '
         BEGIN {          BEGIN {
                 while ( getline < "/etc/shells" > 0 ) {                  while ( getline < "/etc/shells" > 0 ) {
                         if ($LINE ~ /^\#/ || $LINE ~ /^$/ )                          if ($LINE ~ /^\#/ || $LINE ~ /^$/ )
Line 65  if checkyesno check_passwd; then
Line 69  if checkyesno check_passwd; then
                         printf "Line %d is a blank line.\n", NR;                          printf "Line %d is a blank line.\n", NR;
                         next;                          next;
                 }                  }
                 if (NF != 10)                  if (NF != 10 && ($1 != "+" || NF != 1))
                         printf "Line %d has the wrong number of fields.\n", NR;                          printf "Line %d has the wrong number of fields.\n", NR;
                   if ($1 == "+" )  {
                           if (NF != 1 && $3 == 0)
                               printf "Line %d includes entries with uid 0.\n", NR;
                           next;
                   }
                 if ($1 !~ /^[A-Za-z0-9]*$/)                  if ($1 !~ /^[A-Za-z0-9]*$/)
                         printf "Login %s has non-alphanumeric characters.\n",                          printf "Login %s has non-alphanumeric characters.\n",
                             $1;                              $1;
                 if (length($1) > 8)                  if (length($1) > len)
                         printf "Login %s has more than 8 characters.\n", $1;                          printf "Login %s has more than "len" characters.\n", $1;
                 if ($2 == "")                  if ($2 == "")
                         printf "Login %s has no password.\n", $1;                          printf "Login %s has no password.\n", $1;
                 if (length($2) != 13 && length($2) != 20 && $2 != "") {                  if (length($2) != 13 && length($2) != 20 && $2 != "") {
Line 136  if checkyesno check_group; then
Line 145  if checkyesno check_group; then
                         printf "Line %d is a blank line.\n", NR;                          printf "Line %d is a blank line.\n", NR;
                         next;                          next;
                 }                  }
                 if (NF != 4)                  if (NF != 4 && ($1 != "+" || NF != 1))
                         printf "Line %d has the wrong number of fields.\n", NR;                          printf "Line %d has the wrong number of fields.\n", NR;
                   if ($1 == "+" )  {
                           next;
                   }
                 if ($1 !~ /^[A-za-z0-9]*$/)                  if ($1 !~ /^[A-za-z0-9]*$/)
                         printf "Group %s has non-alphanumeric characters.\n",                          printf "Group %s has non-alphanumeric characters.\n",
                             $1;                              $1;

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.34

CVSweb <webmaster@jp.NetBSD.org>