Subject: bin/2315: ypmatch does signal success even if it doesn't find the key
To: None <gnats-bugs@NetBSD.ORG>
From: None <leo@marco.de>
List: netbsd-bugs
Date: 04/10/1996 11:05:00
>Number: 2315
>Category: bin
>Synopsis: ypmatch does signal success even if it doesn't find the key
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Apr 10 05:35:07 1996
>Last-Modified:
>Originator: Matthias Pfaller
>Organization:
leo@dachau.marco.de in real life: Matthias Pfaller
marco GmbH, 85221 Dachau, Germany tel: +49 8131 516142
>Release: 960403
>Environment:
System: NetBSD tabatha 1.1_ALPHA NetBSD 1.1_ALPHA (ROBIN) #0: Mon Nov 6 16:27:59 MET 1995 leo@robin:/usr/src/sys/arch/i386/compile/ROBIN i386
>Description:
ypmatch exits with code 0 even if it doesn't find the key in the
specified map.
>How-To-Repeat:
$ ypmatch unknownhost hosts
$ echo $?
0
>Fix:
*** usr.bin/ypmatch/ypmatch.c.bak Sat Oct 14 04:45:14 1995
--- usr.bin/ypmatch/ypmatch.c Wed Apr 10 11:00:12 1996
***************
*** 133,139 ****
default:
fprintf(stderr, "Can't match key %s in map %s. Reason: %s\n",
inkey, inmap, yperr_string(r));
! break;
}
}
exit(0);
--- 133,139 ----
default:
fprintf(stderr, "Can't match key %s in map %s. Reason: %s\n",
inkey, inmap, yperr_string(r));
! exit(1);
}
}
exit(0);
>Audit-Trail:
>Unformatted: