Project

General

Profile

Bug #2851

mod_auth fails its test suite on PowerPC (big-endian?)

Added by awilfox 20 days ago. Updated 13 days ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
mod_auth
Target version:
Start date:
2017-12-31
Due date:
% Done:

0%

Estimated time:
Missing in 1.5.x:

Description

While building lighttpd for our distribution, Adélie Linux, I have seen the following output in the test suite on PowerPC 32-bit (MPC7440) and 64-bit (970FX):

awilcox on glen [pts/1 Sat 30 17:44] tests: RUNTESTS=mod-auth make check-TESTS
preparing infrastructure                PASS: prepare.sh
./mod-auth.t .. 1/20 # 
# status failed: expected '200', got '401'

#   Failed test 'Basic-Auth: Valid Auth-token - plain'
#   at ./mod-auth.t line 48.
# 
# status failed: expected '200', got '401'

#   Failed test 'Basic-Auth: Valid Auth-token - htpasswd (des)'
#   at ./mod-auth.t line 57.
# 
# status failed: expected '200', got '401'

#   Failed test 'Basic-Auth: Valid Auth-token - htpasswd (des) (lowercase)'
#   at ./mod-auth.t line 66.
# 
# status failed: expected '200', got '401'

#   Failed test 'Basic-Auth: Valid Auth-token - htpasswd (sha)'
#   at ./mod-auth.t line 75.
# 
# status failed: expected '200', got '401'

#   Failed test 'Basic-Auth: Valid Auth-token - htpasswd (crypt-md5)'
#   at ./mod-auth.t line 114.
# Looks like you failed 5 tests of 20.
./mod-auth.t .. Dubious, test returned 5 (wstat 1280, 0x500)
Failed 5/20 subtests 

Test Summary Report
-------------------
./mod-auth.t (Wstat: 1280 Tests: 20 Failed: 5)
  Failed tests:  5-8, 12
  Non-zero exit status: 5
Files=1, Tests=20,  2 wallclock secs ( 0.31 usr  0.05 sys +  1.17 cusr  0.25 csys =  1.78 CPU)
Result: FAIL
Failed 1/1 test programs. 5/20 subtests failed.
FAIL: run-tests.pl
cleaning up                             PASS: cleanup.sh
=====================================
1 of 3 tests failed
Please report to contact@lighttpd.net
=====================================
make: *** [Makefile:677: check-TESTS] Error 1

Looking at the lighttpd.error.log in the tmp directory, I see:

awilcox on glen [pts/1 Sun 31 1:33] logs: grep mod_auth lighttpd.error.log
2017-12-30 17:44:36: (mod_auth.c.156) warning parsing auth.require 'require' field: 'host' not implemented; field value: group=www|user=jan|host=192.168.2.10 
2017-12-30 17:44:37: (mod_auth.c.498) decoding base64-string failed  
2017-12-30 17:44:37: (mod_auth.c.525) password doesn't match for /server-config username: not, IP: 127.0.0.1
2017-12-30 17:44:37: (mod_auth.c.525) password doesn't match for /server-config username: jan, IP: 127.0.0.1
2017-12-30 17:44:37: (mod_auth.c.525) password doesn't match for /server-config username: des, IP: 127.0.0.1
2017-12-30 17:44:37: (mod_auth.c.525) password doesn't match for /server-config username: des, IP: 127.0.0.1
2017-12-30 17:44:37: (mod_auth.c.525) password doesn't match for /server-config username: sha, IP: 127.0.0.1
2017-12-30 17:44:37: (mod_auth.c.525) password doesn't match for /server-config username: sha, IP: 127.0.0.1
2017-12-30 17:44:37: (mod_auth.c.525) password doesn't match for /server-config username: apr-md5, IP: 127.0.0.1
2017-12-30 17:44:37: (mod_auth.c.525) password doesn't match for /server-config username: md5, IP: 127.0.0.1
2017-12-30 17:44:37: (mod_auth.c.525) password doesn't match for /server-config username: md5, IP: 127.0.0.1
2017-12-30 17:44:37: (mod_auth.c.791) digest: auth failed for  jan : wrong password, IP: 127.0.0.1
2017-12-30 17:44:37: (mod_auth.c.674) digest: missing field 
2017-12-30 17:44:37: (mod_auth.c.498) decoding base64-string failed  
2017-12-30 17:44:37: (mod_auth.c.674) digest: missing field 

Of course, some of these are expected, but some should succeed.

I additionally had one of our developers test on his PowerPC FreeBSD computer, and the same result was found there. Since the tests pass on x86 and x86_64, it seems to be an endianness issue, but I have not yet had the chance to test on SPARC yet to confirm my suspicion.

Relevant information from the PowerPC 64-bit builder follows.

gcc (Adelie 6.4.0) 6.4.0
GNU ld (GNU Binutils) 2.29
musl libc (powerpc64) Version 1.1.18

flex-2.6.4-r1
pcre-8.41-r1
openssl-1.0.2m-r0
zlib-1.2.11-r1
bzip2-1.0.6-r6
lua5.2-5.2.4-r4
automake-1.15.1-r0
autoconf-2.69-r1
openldap-2.4.45-r2
libxml2-2.9.7-r1
sqlite-3.21.0-r0
libev-4.24-r0
gamin-0.1.10-r11
attr-2.4.47-r7

        ./configure \
                --build=powerpc64-foxkit-linux-musl --host=powerpc64-foxkit-linux-musl \
                --prefix=/usr --disable-dependency-tracking --enable-lfs --libdir=/usr/lib/lighttpd \
                --without-mysql --with-attr --without-kerberos5 --with-fam --with-webdav-props --with-webdav-locks \
                --without-gdbm --with-bzip2 --with-ldap --with-openssl --with-libev --with-lua

Related issues

Is duplicate of Bug #2848: buffer_append_base64_decode() broken on compilers where char is assumed unsignedFixed2017-12-20

History

#1

Updated by gstrauss 19 days ago

Might be related to https://redmine.lighttpd.net/issues/2848
Would you please test with that patch? Also, I presume you're building lighttpd 1.4.48, but you did not specify. Please include that information in all bug reports.

#2

Updated by gstrauss 13 days ago

  • Status changed from New to Need Feedback
#3

Updated by awilfox 13 days ago

I'm so sorry, it was 1.4.48. I can confirm the patch attached to #2848 fixes this; you can close it now. Thank you so much!

#4

Updated by gstrauss 13 days ago

  • Status changed from Need Feedback to Duplicate
#5

Updated by gstrauss 13 days ago

  • Is duplicate of Bug #2848: buffer_append_base64_decode() broken on compilers where char is assumed unsigned added

Also available in: Atom