Bug 237954

Summary: /usr/bin/hexdump fails with capabilities error when used with -s option
Product: Base System Reporter: Alex Kozlov <ak>
Component: binAssignee: Kyle Evans <kevans>
Status: Closed Works As Intended    
Severity: Affects Only Me    
Priority: ---    
Version: 12.0-STABLE   
Hardware: Any   
OS: Any   

Description Alex Kozlov freebsd_committer freebsd_triage 2019-05-17 19:01:37 UTC
Not sure if you're the right person, but you're the last who
touched hexdump -s option's logic, so it's worth a shot.

The hexdump on FreeBSD 12.0 fails with capabilities error when used with -s option:
$hexdump -s 1 -n 1 -e '"%c""\n"' /etc/rc
hexdump: /etc/rc: Capabilities insufficient

It seems that it misses CAP_SEEK_TELL right.
Comment 1 Alex Kozlov freebsd_committer freebsd_triage 2019-05-18 17:50:13 UTC
Well, after some more research it seems to be a local configuration issue.

$ident /usr/bin/hexdump
 $FreeBSD: head/usr.bin/hexdump/display.c 319887 2017-06-13 01:05:55Z emaste $

The r319887 revision is before r327567 by kevans and in fact before FreeBSD 12.0R
It appears that this installation has a few dozen files that were not updated.
I'm not sure how it happened, perhaps it's connected to my use of install -SC
and slow media (SD card). Anyway, I reinstalled 12.0R and hexdump works as expected. I'm also checked 11.2R and it seems hexdump works there too.
So I'm closing this bug. Sorry for the noise.
Comment 2 Kyle Evans freebsd_committer freebsd_triage 2019-05-18 17:54:54 UTC
(In reply to Alex Kozlov from comment #1)

Hiya,

Good to hear! =-) Thanks for reporting back