From e599c81173d7d2c8cee7da67e5b925ebc83c08ba Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 3 Jun 2012 01:53:16 +0100 Subject: [PATCH] do not shift by 32 --- debian/changelog | 9 +++++++++ helper.c | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) 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 { -- 2.30.2