[Debian-ha-maintainers] Bug#551479: drbd8: dies over CAP_SYS_ADMIN check

Uli Martens uli at youam.net
Wed Nov 4 08:29:56 UTC 2009


tag 551470 + patch
thanks

Hello,

this mail is just to provide a dpatch patch file for Piotr's fix as dpatch dies
over tabs-vs-spaces if you just copy his patch directly. Adding this file into
debian/patches and adding it into 00list did fix the problem for me.

greetings,
	Uli / youam
-------------- next part --------------
#! /bin/sh /usr/share/dpatch/dpatch-run
## 20_no-caps.dpatch by Piotr Wadas <pwadas at dtpw.pl>
##
## All lines beginning with `## DP:' are a description of the patch
## DP: remove check for CAP_SYS_ADMIN (see #551479)

@DPATCH@
--- old/drbd/connector.c       2009-10-06 13:32:41.000000000 +0200
+++ new/drbd/connector.c        2009-10-18 16:58:42.000000000 +0200
@@ -211,8 +211,5 @@
 	msg = NLMSG_DATA(nlh);

-	/* DRBD specific change: Only allow packets from ROOT */
-	if (!capable(CAP_SYS_ADMIN))
-		return -EPERM;

 	return cn_call_callback(msg, (void (*)(void *))kfree_skb, skb);
 }
--- old/drbd/drbd_nl.c 2009-10-05 14:52:03.000000000 +0200
+++ new/drbd/drbd_nl.c  2009-10-18 16:58:59.000000000 +0200
@@ -2063,13 +2063,6 @@
 		return;
 	}

-#ifdef KERNEL_HAS_CN_SKB_PARMS
-	if (!cap_raised(nsp->eff_cap, CAP_SYS_ADMIN)) {
-		retcode = ERR_PERM;
-		goto fail;
-	}
-#endif
-
 	mdev = ensure_mdev(nlp);
 	if (!mdev) {
 		retcode = ERR_MINOR_INVALID;


More information about the Debian-ha-maintainers mailing list