xfstests: include NIS databases

If NIS is active on a test target system, additional password and
group file information is available via their respective databases
in NIS.  Currently, some tests assume that /etc/passwd and /etc/group
are the only places to find this information.

This patch causes both the local database and the NIS database (if
one is likely to be present) to be consulted for needed information.

Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
Alex Elder
2010-07-30 21:52:39 +00:00
parent b05ae2d653
commit cda0cb20ac
4 changed files with 36 additions and 10 deletions
+2 -2
View File
@@ -25,7 +25,7 @@
#
_acl_setup_ids()
{
eval `cat /etc/passwd /etc/group | awk -F: '
eval `(_cat_passwd; _cat_group) | awk -F: '
{ ids[$3]=1 }
END {
j=1
@@ -93,7 +93,7 @@ _filter_aces()
$AWK_PROG '
BEGIN {
FS=":"
while ( getline <"/etc/passwd" > 0 ) {
while ( "_cat_passwd" | getline > 0 ) {
idlist[$1] = $3
}
}