• Alex Elder's avatar
    ceph: ensure auth ops are defined before use · a255651d
    Alex Elder authored
    In the create_authorizer method for both the mds and osd clients,
    the auth_client->ops pointer is blindly dereferenced.  There is no
    obvious guarantee that this pointer has been assigned.  And
    furthermore, even if the ops pointer is non-null there is definitely
    no guarantee that the create_authorizer or destroy_authorizer
    methods are defined.
    
    Add checks in both routines to make sure they are defined (non-null)
    before use.  Add similar checks in a few other spots in these files
    while we're at it.
    Signed-off-by: default avatarAlex Elder <elder@inktank.com>
    Reviewed-by: default avatarSage Weil <sage@inktank.com>
    a255651d
osd_client.c 56.1 KB