diff options
author | Jim Rees <rees@cvs.openbsd.org> | 2002-03-14 20:28:05 +0000 |
---|---|---|
committer | Jim Rees <rees@cvs.openbsd.org> | 2002-03-14 20:28:05 +0000 |
commit | dd6c0779d28df94bc01c6d5174487a1d65ec0a75 (patch) | |
tree | 490a00109ac6ba1f6d76dd29656f6dcc3de2714c /usr.bin/sectok | |
parent | 67d6dde740ff2853f335523eff531319a44ab2d0 (diff) |
0000 is not a reserved fid
Diffstat (limited to 'usr.bin/sectok')
-rw-r--r-- | usr.bin/sectok/cyberflex.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/usr.bin/sectok/cyberflex.c b/usr.bin/sectok/cyberflex.c index 23071ab5d75..064d4e72653 100644 --- a/usr.bin/sectok/cyberflex.c +++ b/usr.bin/sectok/cyberflex.c @@ -1,4 +1,4 @@ -/* $Id: cyberflex.c,v 1.20 2001/08/24 17:27:57 rees Exp $ */ +/* $Id: cyberflex.c,v 1.21 2002/03/14 20:28:04 rees Exp $ */ /* copyright 1999, 2000 @@ -380,7 +380,7 @@ sectok_fmt_aidname(char *aidname, int aidlen, unsigned char *aid) int ls(int ac, char *av[]) { - int i, p2, f0, f1, lflag = 0, buflen, sw; + int i, p2, fid, lflag = 0, buflen, sw; int isdir, fsize; char ftype[32], fname[6], aidname[34]; unsigned char buf[JDIRSIZE]; @@ -402,9 +402,10 @@ int ls(int ac, char *av[]) buflen = sectok_apdu(fd, cla, 0xa8, 0, p2, 0, NULL, JDIRSIZE, buf, &sw); if (!sectok_swOK(sw)) break; - f0 = buf[4]; - f1 = buf[5]; - if (f0 == 0xff || f0 + f1 == 0) + + /* Don't show reserved fids */ + fid = sectok_mksw(buf[4], buf[5]); + if (fid == 0x3f11 || fid == 0x3fff || fid == 0xffff) continue; /* Format name */ |