Bug 1678872 - mod_auth_gssapi: test failure due to wrong int sizing
Summary: mod_auth_gssapi: test failure due to wrong int sizing
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: mod_auth_gssapi
Version: rawhide
Hardware: s390x
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Simo Sorce
QA Contact: Fedora Extras Quality Assurance
URL: https://github.com/modauthgssapi/mod_...
Whiteboard:
Depends On:
Blocks: 1674501 1678873
TreeView+ depends on / blocked
 
Reported: 2019-02-19 19:00 UTC by Robbie Harwood
Modified: 2019-02-27 19:05 UTC (History)
6 users (show)

Fixed In Version: mod_auth_gssapi-1.6.1-5
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1674501
Environment:
Last Closed: 2019-02-27 19:05:33 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Robbie Harwood 2019-02-19 19:00:27 UTC
Description of problem:
Upstream test suite, namely "BASIC Fail Second User" test is failing on s390x. No failures appear on x86_64, aarch64 or ppc64le.

--- Additional comment from Joe Orton on 2019-02-19 03:56:48 EST ---

mod_auth_gssapi is using:

    AP_INIT_FLAG("GssapiPublishErrors", ap_set_flag_slot,
                 (void *)APR_OFFSETOF(struct mag_config, enverrs), OR_AUTHCFG,
                 "Publish GSSAPI Errors in Envionment Variables"),

but enverrs is a bool:

    bool enverrs;

ap_set_flag_slot() requires a variable with sizeof(int) whereas it looks like sizeof(bool) is not fixed by C99, only "big enough to store one bit".  On x86_64 sizeof(bool) is sizeof(char) anyway, so it's broken everywhere.

The simplest fix would be to change envvers to type int.

--- Additional comment from Joe Orton on 2019-02-19 04:04:39 EST ---

The other use of ap_set_flag_slot in this module:

    AP_INIT_FLAG("GssapiImpersonate", ap_set_flag_slot,
          (void *)APR_OFFSETOF(struct mag_config, s4u2self), OR_AUTHCFG,
               "Do impersonation call (S4U2Self) "
               "based on already authentication username"),

also has the same problem; using either these directives may be splatting over other config fields in nasty ways depending on the struct padding.

--- Additional comment from Robbie Harwood on 2019-02-19 13:59:07 EST ---

Thanks Joe.  Posted fix upstream.


Note You need to log in before you can comment on or make changes to this bug.