> +import logging
> +try:
> +  import ctypes as c # pylint: disable=F0401
> +except ImportError:
> +  c = None

This default implementation won't work, as you
unconditionally access attributes of c in this
module.

> +
> +from ganeti import constants
> +from ganeti.http import HttpInternalServerError, HttpForbidden, 
> HttpBadRequest
> +from ganeti.http.auth import HttpServerRequestAuthentication
> +from ganeti.rapi import auth
> +
> +
> +__all__ = ['PamAuthenticator']
> +
> +DEFAULT_SERVICE_NAME = 'ganeti-rapi'
> +MAX_STR_LENGTH = 100000
> +MAX_MSG_COUNT = 100
> +PAM_ENV_URI = 'GANETI_RAPI_URI'
> +PAM_ENV_BODY = 'GANETI_REQUEST_BODY'
> +PAM_ENV_METHOD = 'GANETI_REQUEST_METHOD'
> +PAM_ENV_ACCESS = 'GANETI_RESOURCE_ACCESS'
> +
> +LIBPAM = c.CDLL(c.util.find_library("pam"))

Do we want to do any form of error handling here?


-- 
Klaus Aehlig
Google Germany GmbH, Dienerstr. 12, 80331 Muenchen
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschaeftsfuehrer: Matthew Scott Sucherman, Paul Terence Manicle

Reply via email to