#! /bin/sh /usr/share/dpatch/dpatch-run
## 08_bcap_mask_fix.dpatch by Micah Anderson <Micah Anderson <micah@debian.org>>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: This fixes vattribute --set --xid ... --ccap ... not resetting bcaps

@DPATCH@
diff -urNad trunk~/lib/syscall_setccaps-v13.hc trunk/lib/syscall_setccaps-v13.hc
--- trunk~/lib/syscall_setccaps-v13.hc	2006-03-20 08:16:47.000000000 -0500
+++ trunk/lib/syscall_setccaps-v13.hc	2006-04-02 13:11:29.000000000 -0400
@@ -25,7 +25,7 @@
 {
   struct vcmd_ctx_caps_v0	k_caps;
 
-  k_caps.bcaps = caps->bcaps & caps->bmask;
+  k_caps.bcaps = (caps->bcaps & caps->bmask) | ~caps->bmask;
   k_caps.ccaps = caps->ccaps;
   k_caps.cmask = caps->cmask;
   
