aboutsummaryrefslogtreecommitdiff
path: root/sys/gnu
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2011-08-11 12:30:23 +0000
committerRobert Watson <rwatson@FreeBSD.org>2011-08-11 12:30:23 +0000
commita9d2f8d84f69e98100b5746816b35666bcf992ac (patch)
tree4b691c0e209134040c3cf5ce75660b61282933d0 /sys/gnu
parent2ffd5fdcc433626b1adb061119cd412f9b3020e9 (diff)
Notes
Diffstat (limited to 'sys/gnu')
-rw-r--r--sys/gnu/fs/xfs/xfs_dfrag.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/gnu/fs/xfs/xfs_dfrag.c b/sys/gnu/fs/xfs/xfs_dfrag.c
index 77a71dfe143c..7b6b04ebcda7 100644
--- a/sys/gnu/fs/xfs/xfs_dfrag.c
+++ b/sys/gnu/fs/xfs/xfs_dfrag.c
@@ -46,6 +46,7 @@
#include "xfs_mac.h"
#include "xfs_rw.h"
+#include <sys/capability.h>
#include <sys/file.h>
/*
@@ -79,7 +80,8 @@ xfs_swapext(
}
/* Pull information for the target fd */
- if (fgetvp(td, (int)sxp->sx_fdtarget, &bvp) != 0) {
+ if (fgetvp(td, (int)sxp->sx_fdtarget, CAP_READ | CAP_WRITE, &bvp)
+ != 0) {
error = XFS_ERROR(EINVAL);
goto error0;
}
@@ -91,7 +93,7 @@ xfs_swapext(
goto error0;
}
- if (fgetvp(td, (int)sxp->sx_fdtmp, &btvp) != 0) {
+ if (fgetvp(td, (int)sxp->sx_fdtmp, CAP_READ | CAP_WRITE, &btvp) != 0) {
error = XFS_ERROR(EINVAL);
goto error0;
}