aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/cap_mkdb/cap_mkdb.c
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@FreeBSD.org>2001-06-01 14:45:00 +0000
committerRuslan Ermilov <ru@FreeBSD.org>2001-06-01 14:45:00 +0000
commitf66c1ecf8fa9521745cf5d7516d43a63b4714ce8 (patch)
treecde81406d115b5e2157e0f988751b9a483f77de2 /usr.bin/cap_mkdb/cap_mkdb.c
parent2c5958aa51058242dc1430fb09b2242b70aabcac (diff)
downloadsrc-f66c1ecf8fa9521745cf5d7516d43a63b4714ce8.tar.gz
src-f66c1ecf8fa9521745cf5d7516d43a63b4714ce8.zip
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
Notes
Notes: svn path=/head/; revision=77586
Diffstat (limited to 'usr.bin/cap_mkdb/cap_mkdb.c')
-rw-r--r--usr.bin/cap_mkdb/cap_mkdb.c6
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 ccd5d3b11e90..44a29a1b5f20 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;