diff -u libcap-ng-0.6.6/debian/changelog libcap-ng-0.6.6/debian/changelog --- libcap-ng-0.6.6/debian/changelog +++ libcap-ng-0.6.6/debian/changelog @@ -1,3 +1,11 @@ +libcap-ng (0.6.6-1+rpi1) unstable; urgency=low + + * Non-maintainer upload. + * segfault in libcap-ng0 is back on armel - filecap , bluetoothd etc + * http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=631807 + + -- Mike Thompson Fri, 08 Jun 2012 13:26:18 -0700 + libcap-ng (0.6.6-1) unstable; urgency=low * Imported Upstream version 0.6.6 only in patch2: unchanged: --- libcap-ng-0.6.6.orig/src/cap-ng.c +++ libcap-ng-0.6.6/src/cap-ng.c @@ -136,6 +136,10 @@ __u32 bounds[2]; }; +static struct __user_cap_header_struct hdrzz = {0, 0}; +static cap_data_t datazz = { {0, 0, 0} }; +static __u32 boundzz = {0}; + // Global variables with per thread uniqueness static __thread struct cap_ng m = { 1, {0, 0}, @@ -149,7 +153,7 @@ if (m.state != CAPNG_NEW) return; - memset(&m.hdr, 0, sizeof(m.hdr)); + m.hdr = hdrzz; (void)capget(&m.hdr, NULL); // Returns -EINVAL if (m.hdr.version == _LINUX_CAPABILITY_VERSION_3 || m.hdr.version == _LINUX_CAPABILITY_VERSION_2) { @@ -161,7 +165,7 @@ return; } - memset(&m.data, 0, sizeof(cap_data_t)); + m.data = datazz; #ifdef HAVE_SYSCALL_H m.hdr.pid = (unsigned)syscall(__NR_gettid); #else @@ -178,10 +182,13 @@ return; if (set & CAPNG_SELECT_CAPS) - memset(&m.data, 0, sizeof(cap_data_t)); + m.data = datazz; #ifdef PR_CAPBSET_DROP - if (set & CAPNG_SELECT_BOUNDS) - memset(m.bounds, 0, sizeof(m.bounds)); + if (set & CAPNG_SELECT_BOUNDS) { + unsigned i; + for (i=0; i