Пример #1
0
 def __try_auth_pam(self, auth_string):
     """
     Try to authenticate user based on the PAM configuration.
     """
     if self.__is_method_enabled("pam"):
         username, password = auth_string.split(":")
         return cc_pam.auth_user(self.__auth_config["method_pam"], username,
                                 password)
     return False
Пример #2
0
    def __try_auth_pam(self, auth_string):
        """
        Try to authenticate user based on the PAM configuration.
        """
        if self.__is_method_enabled("pam"):
            username, password = auth_string.split(":")
            if cc_pam.auth_user(self.__auth_config["method_pam"],
                                username, password):
                # PAM does not hold a group membership list we can reliably
                # query.
                return {'username': username}

        return False