From: Ian Jackson Date: Sun, 3 Jun 2012 00:53:16 +0000 (+0100) Subject: do not shift by 32 X-Git-Tag: debian/2.0.1^0 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=authbind.git;a=commitdiff_plain;h=e599c81173d7d2c8cee7da67e5b925ebc83c08ba;hp=139797935f924047dffbbdb9584c078ecef1d698 do not shift by 32 --- diff --git a/debian/changelog b/debian/changelog index dc958fa..c9fa8bc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +authbind (2.0.1) unstable; urgency=low + + Bugfix: + * 0-length ipv4 address masks (ie, 0.0.0.0/0) in byuid files wouldn't + work because they would attempt a 32-bit shift. This was reported + against Ubuntu in Launchpad but the but is here too. LP: #514278. + + -- Ian Jackson Sun, 03 Jun 2012 01:50:13 +0100 + authbind (2.0.0) unstable; urgency=medium Important new functionality: diff --git a/helper.c b/helper.c index 0841cd2..db815c1 100644 --- a/helper.c +++ b/helper.c @@ -187,7 +187,7 @@ int main(int argc, const char *const *argv) { unsigned long thaddr, thmask; thaddr= (a1<<24)|(a2<<16)|(a3<<8)|(a4); - thmask= 0x0ffffffffUL<<(32-alen); + thmask= alen ? 0x0ffffffffUL<<(32-alen) : 0; if ((haddr4&thmask) != thaddr) continue; } else {