فهرست منبع

Shit happens: master.passwd is not allowed to be checked because it is not exactly in the format of passwd.

Ralf S. Engelschall 24 سال پیش
والد
کامیت
718bc6ad2b
2فایلهای تغییر یافته به همراه7 افزوده شده و 7 حذف شده
  1. 5 5
      openpkg/aux.usrgrp.sh
  2. 2 2
      openpkg/openpkg.spec

+ 5 - 5
openpkg/aux.usrgrp.sh

@@ -67,7 +67,7 @@ cusr=`(id -un) 2>/dev/null ||\
       (whoami) 2>/dev/null ||\
       (who am i | cut "-d " -f1) 2>/dev/null ||\
       echo $LOGNAME`
-cgid=`(cat /etc/passwd; cat /etc/master.passwd; ypcat passwd) 2>/dev/null |\
+cgid=`(cat /etc/passwd; ypcat passwd) 2>/dev/null |\
       grep "^${cusr}:" | awk -F: '{ print $4; }'`
 cgrp=`(cat /etc/group; ypcat group) 2>/dev/null |\
       grep ":${cgid}:" | awk -F: '{ print $1; }'`
@@ -78,7 +78,7 @@ if [ ".$susr" = . ]; then
     susr="root"
 fi
 if [ ".$sgrp" = . ]; then
-    sgid=`(cat /etc/passwd; cat /etc/master.passwd; ypcat passwd) 2>/dev/null |\
+    sgid=`(cat /etc/passwd; ypcat passwd) 2>/dev/null |\
           grep "^${susr}:" | awk -F: '{ print $4; }'`
     if [ ".$sgid" != . ]; then
         sgrp=`(cat /etc/group; ypcat group) 2>/dev/null |\
@@ -97,7 +97,7 @@ if [ ".$musr" = . ]; then
     musr="$cusr"
 fi
 if [ ".$mgrp" = . ]; then
-    mgid=`(cat /etc/passwd; cat /etc/master.passwd; ypcat passwd) 2>/dev/null |\
+    mgid=`(cat /etc/passwd; ypcat passwd) 2>/dev/null |\
           grep "^${musr}:" | awk -F: '{ print $4; }'`
     if [ ".$mgid" != . ]; then
         mgrp=`(cat /etc/group; ypcat group) 2>/dev/null |\
@@ -119,7 +119,7 @@ if [ ".$rusr" = ".-r" ]; then
     rusr="$cusr"
 fi
 if [ ".$rgrp" = . ]; then
-    rgid=`(cat /etc/passwd; cat /etc/master.passwd; ypcat passwd) 2>/dev/null |\
+    rgid=`(cat /etc/passwd; ypcat passwd) 2>/dev/null |\
           grep "^${rusr}:" | awk -F: '{ print $4; }'`
     if [ ".$rgid" != . ]; then
         rgrp=`(cat /etc/group; ypcat group) 2>/dev/null |\
@@ -141,7 +141,7 @@ if [ ".$nusr" = ".-n" ]; then
     nusr="$cusr"
 fi
 if [ ".$ngrp" = . ]; then
-    ngid=`(cat /etc/passwd; cat /etc/master.passwd; ypcat passwd) 2>/dev/null |\
+    ngid=`(cat /etc/passwd; ypcat passwd) 2>/dev/null |\
           grep "^${nusr}:" | awk -F: '{ print $4; }'`
     if [ ".$ngid" != . ]; then
         ngrp=`(cat /etc/group; ypcat group) 2>/dev/null |\

+ 2 - 2
openpkg/openpkg.spec

@@ -815,7 +815,7 @@ Provides:     OpenPKG
         class="$1"; usr="$2"; uid="$3"; grp="$4"; gid="$5"
 
         #    check whether user already exists
-        exists=`(cat /etc/passwd; cat /etc/master.passwd; ypcat passwd) 2>/dev/null | grep "^$usr:"`
+        exists=`(cat /etc/passwd; ypcat passwd) 2>/dev/null | grep "^$usr:"`
         if [ ".$exists" = . ]; then
             if [ ".$cusr" != ".root" ]; then
                 echo "openpkg:WARNING: skipping creation of OpenPKG $class user $usr" 1>&2
@@ -1164,7 +1164,7 @@ Provides:     OpenPKG
         class="$1"; usr="$2"; uid="$3"; grp="$4"; gid="$5"
 
         #    check whether user already exists
-        exists=`(cat /etc/passwd; cat /etc/master.passwd; ypcat passwd) 2>/dev/null | grep "^$usr:"`
+        exists=`(cat /etc/passwd; ypcat passwd) 2>/dev/null | grep "^$usr:"`
         if [ ".$exists" != . ]; then
             if [ ".$cusr" != ".root" ]; then
                 echo "openpkg:WARNING: skipping deletion of OpenPKG $class user $usr" 1>&2