findutils-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Findutils-patches] xattr and capability support


From: KillBoy PowerHed
Subject: [Findutils-patches] xattr and capability support
Date: Mon, 3 Nov 2014 21:42:26 +0000 (UTC)

Hi list,


I was recently reading up on 'capabilies' and noticed that find has no support for locating files based on extended attributes or capabilities, I thought this was a valid use case but maybe that's just me?


I wrote a couple of standalone utilities to get some functional code and then tried to follow the instructions in README-hacking but failed during 'sh import-gnulib.sh' with the following error:


autopoint: *** Missing version: please specify in configure.ac through a line 'AM_GNU_GETTEXT_VERSION(x.yy.zz)' the gettext version the package is using
autopoint: *** Stop.
FAILED


I wasn't able to resolve this so played with the findutils-4.5.11 tarball instead, the xattr code seems to work but I'm not confident that I understand the architecture or that I'm doing things the Right Way. I'm a sys admin and usually use python so any pointers (no pun intended) on my c coding would be appreciated. The xattr patch is attached here for your review, below is example output from a standalone utility and the patched version of find:


address@hidden find]$ cd ~/Documents/progs/c
address@hidden c]$ ./list_xattr filecap '.*'
security.capability
security.selinux

address@hidden c]$ ./get_cap_regex filecap '.*'
= cap_setgid,cap_setuid+ep
address@hidden c]$ ~/Downloads/findutils-4.5.11/find/find . -xattr '.*cap.*'
./filecap



I'd like to fix any issues with the xattr function before working on adding the capability function so any feedback will be greatly appreciated, even just to resolve the autopoint issue (I'm on Fedora 20)


thanks


Morgan

Attachment: findutils_xattr.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]