diff options
author | ru <ru@FreeBSD.org> | 2001-06-01 14:45:00 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2001-06-01 14:45:00 +0000 |
commit | 5143a6d9aafc7b5ce9fccc9449781955a196da2c (patch) | |
tree | db989f9a0328abf0d4637c9690f7ae7ee96c8ccc /usr.bin/cap_mkdb | |
parent | 8888e65159e8b4c46c487a1f7a3ed9a036f43f1e (diff) | |
download | FreeBSD-src-5143a6d9aafc7b5ce9fccc9449781955a196da2c.zip FreeBSD-src-5143a6d9aafc7b5ce9fccc9449781955a196da2c.tar.gz |
Don't treat the pipe symbol in capabilities as an alternate
record name indicator; this causes a spurious warning:
$ cat x
record:\
:capability=|value:
$ cap_mkdb x
cap_mkdb: ignored duplicate: record
Spotted by: dcs
Diffstat (limited to 'usr.bin/cap_mkdb')
-rw-r--r-- | usr.bin/cap_mkdb/cap_mkdb.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/cap_mkdb/cap_mkdb.c b/usr.bin/cap_mkdb/cap_mkdb.c index ccd5d3b..44a29a1b 100644 --- a/usr.bin/cap_mkdb/cap_mkdb.c +++ b/usr.bin/cap_mkdb/cap_mkdb.c @@ -136,7 +136,7 @@ dounlink() #define SHADOW (char)2 /* - * Db_build() builds the name and capabilty databases according to the + * Db_build() builds the name and capability databases according to the * details above. */ void @@ -201,8 +201,10 @@ db_build(ifiles) ++reccnt; /* If only one name, ignore the rest. */ - if ((p = strchr(bp, '|')) == NULL) + *p = '\0'; + if (strchr(bp, '|') == NULL) continue; + *p = ':'; /* The rest of the names reference the entire name. */ ((char *)(data.data))[0] = SHADOW; |