| 1 | # Copyright 1999-2013 Gentoo Foundation |
1 | # Copyright 1999-2013 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/eclass/fcaps.eclass,v 1.2 2013/01/27 17:47:10 vapier Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/fcaps.eclass,v 1.3 2013/01/30 07:15:49 vapier Exp $ |
| 4 | |
4 | |
| 5 | # @ECLASS: fcaps.eclass |
5 | # @ECLASS: fcaps.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # Constanze Hausner <constanze@gentoo.org> |
7 | # Constanze Hausner <constanze@gentoo.org> |
| 8 | # base-system@gentoo.org |
8 | # base-system@gentoo.org |
| … | |
… | |
| 131 | die "could not set caps" |
131 | die "could not set caps" |
| 132 | else |
132 | else |
| 133 | local fstype=$(stat -f -c %T "${file}") |
133 | local fstype=$(stat -f -c %T "${file}") |
| 134 | ewarn "Could not set caps on '${file}' due to missing filesystem support." |
134 | ewarn "Could not set caps on '${file}' due to missing filesystem support." |
| 135 | ewarn "Make sure you enable XATTR support for '${fstype}' in your kernel." |
135 | ewarn "Make sure you enable XATTR support for '${fstype}' in your kernel." |
|
|
136 | ewarn "You might also have to enable the relevant FS_SECURITY option." |
| 136 | fi |
137 | fi |
| 137 | else |
138 | else |
| 138 | # Sanity check that everything took. |
139 | # Sanity check that everything took. |
| 139 | setcap -v "${caps}" "${file}" >/dev/null \ |
140 | setcap -v "${caps}" "${file}" >/dev/null \ |
| 140 | || die "Checking caps '${caps}' on '${file}' failed" |
141 | || die "Checking caps '${caps}' on '${file}' failed" |