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