summaryrefslogtreecommitdiff
path: root/package/dnsmasq/patches/200-backports.patch
blob: 19c52d93953a2b20c2acc73564ccca3184614d2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Index: dnsmasq-2.42/src/dnsmasq.c
===================================================================
--- dnsmasq-2.42.orig/src/dnsmasq.c	2008-06-28 23:37:18.000000000 +0200
+++ dnsmasq-2.42/src/dnsmasq.c	2008-06-28 23:37:20.000000000 +0200
@@ -297,8 +297,11 @@
 	  capget(hdr, NULL);
 	  if (hdr->version != LINUX_CAPABILITY_VERSION_1)
 	    {
-	      /* if not version 1, use version 2 */
-	      hdr->version = LINUX_CAPABILITY_VERSION_2;
+	      /* if unknown version, use largest supported version (3) 
+		   * backported fix from 2.43 to suppress kernel warning
+		   */
+		  if (hdr->version != LINUX_CAPABILITY_VERSION_2)
+			hdr->version = LINUX_CAPABILITY_VERSION_3;
 	      capsize = 2;
 	    }
 	  hdr->pid = 0; /* this process */
Index: dnsmasq-2.42/src/dnsmasq.h
===================================================================
--- dnsmasq-2.42.orig/src/dnsmasq.h	2008-06-28 23:37:48.000000000 +0200
+++ dnsmasq-2.42/src/dnsmasq.h	2008-06-28 23:37:55.000000000 +0200
@@ -100,6 +100,7 @@
 extern int capget(cap_user_header_t header, cap_user_data_t data);
 #define LINUX_CAPABILITY_VERSION_1  0x19980330
 #define LINUX_CAPABILITY_VERSION_2  0x20071026
+#define LINUX_CAPABILITY_VERSION_3  0x20080522
 
 #include <sys/prctl.h>
 #elif defined(HAVE_SOLARIS_PRIVS)