db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding PAM Responder
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding Copyright (C) Simo Sorce <ssorce@redhat.com> 2009
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding Copyright (C) Sumit Bose <sbose@redhat.com> 2009
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd This program is free software; you can redistribute it and/or modify
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd it under the terms of the GNU General Public License as published by
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd the Free Software Foundation; either version 3 of the License, or
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd (at your option) any later version.
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd This program is distributed in the hope that it will be useful,
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd but WITHOUT ANY WARRANTY; without even the implied warranty of
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd GNU General Public License for more details.
650b8deadd86f9326c0d4a1bcbbb61cb907722aacoar You should have received a copy of the GNU General Public License
650b8deadd86f9326c0d4a1bcbbb61cb907722aacoar along with this program. If not, see <http://www.gnu.org/licenses/>.
static errno_t
const char *username);
static errno_t
const char *name,
const char *user_error_message,
size_t p;
return ENOMEM;
if (p != *resp_len) {
return EOK;
size_t *c)
switch (auth_token_type) {
case SSS_AUTHTOK_TYPE_EMPTY:
if (auth_token_length == 0) {
case SSS_AUTHTOK_TYPE_2FA:
case SSS_AUTHTOK_TYPE_SC_PIN:
return EINVAL;
*c += auth_token_length;
return ret;
size_t *c) {
return EINVAL;
*c += size;
return EOK;
return EINVAL;
return EOK;
if (!name) {
return EIO;
return EOK;
size_t c;
return EINVAL;
return EINVAL;
c = sizeof(uint32_t);
return EINVAL;
switch(type) {
case SSS_PAM_ITEM_USER:
case SSS_PAM_ITEM_SERVICE:
case SSS_PAM_ITEM_TTY:
case SSS_PAM_ITEM_RUSER:
case SSS_PAM_ITEM_RHOST:
NULL);
return ret;
case SSS_PAM_ITEM_CLI_PID:
case SSS_PAM_ITEM_AUTHTOK:
case SSS_PAM_ITEM_NEWAUTHTOK:
c += size;
} while(c < blen);
return EOK;
return ret;
return EINVAL;
return EOK;
switch (auth_token_type) {
case SSS_AUTHTOK_TYPE_EMPTY:
return EINVAL;
*c += auth_token_length;
return ret;
end = 0;
if (ret) {
return ret;
if (ret) {
return ret;
return EOK;
if (!attrs) {
goto fail;
goto fail;
goto fail;
goto fail;
goto fail;
return EOK;
fail:
return ret;
char * const *pam_filter_opts)
size_t c;
return EOK;
var_name_len = 0;
service++;
if (var_name_len == 0) {
return EOK;
goto done;
switch (user_info_type) {
goto done;
sizeof(int64_t));
if ((expire_date == 0 &&
(expire_date > 0 &&
goto done;
done:
return ret;
const char **password)
case SSS_AUTHTOK_TYPE_2FA:
return ret;
return EOK;
case SSS_PAM_AUTHENTICATE:
goto done;
goto done;
case SSS_PAM_CHAUTHTOK_PRELIM:
case SSS_PAM_CHAUTHTOK:
goto done;
case SSS_PAM_SETCRED:
case SSS_PAM_ACCT_MGMT:
case SSS_PAM_OPEN_SESSION:
case SSS_PAM_CLOSE_SESSION:
goto done;
goto done;
goto done;
goto done;
goto done;
goto done;
goto done;
goto done;
resp_c = 0;
resp_size = 0;
resp_c++;
sizeof(int32_t) +
goto done;
p += sizeof(int32_t);
p += sizeof(int32_t);
p += sizeof(int32_t);
p += sizeof(int32_t);
done:
bool use_cached_auth)
case PAM_SUCCESS:
case PAM_PERM_DENIED:
if (delayed_until >= 0) {
case PAM_AUTH_ERR:
if (use_cached_auth) {
return ENOMEM;
return EOK;
return ENOENT;
NULL);
goto done;
goto done;
goto done;
done:
return ret;
if (trusted_uids_count == 0) {
char **public_dom_names,
size_t i;
for(i=0; i < public_dom_names_count; i++) {
return ret;
return ret;
return ENOMEM;
return EAGAIN;
if (!preq) {
return ENOMEM;
return ENOMEM;
goto done;
goto done;
goto done;
return ENOMEM;
goto done;
dom;
return ENOMEM;
if (!dom) {
goto done;
goto done;
goto done;
done:
struct pam_auth_req);
goto done;
goto done;
goto done;
done:
struct pam_auth_req);
goto done;
goto done;
goto done;
goto done;
goto done;
done:
struct pam_auth_req);
goto done;
goto done;
goto done;
goto done;
goto done;
goto done;
done:
while (dom) {
if (!dom) break;
return ENOMEM;
return EIO;
return EFAULT;
return EINVAL;
return EINVAL;
return ENOENT;
return EIO;
return ENOENT;
SYSDB_CACHE_EXPIRE, 0);
return ret;
return EOK;
if (!dom) {
if (!dpreq) {
return ENOMEM;
if(!cb_ctx) {
return ENOMEM;
return EAGAIN;
return ENOENT;
&err_msg);
switch (ret) {
case EOK:
case EAGAIN:
case ENOENT:
case ERR_NO_CREDS:
return EOK;
if (err_maj) {
if (ret) {
const char* user,
int cached_auth_timeout,
bool *_result)
goto done;
done:
return ret;
switch(cmd) {
case SSS_PAM_AUTHENTICATE:
is_cachable = true;
is_cachable = false;
return is_cachable;
cachable = true;
return cachable;
int pam_cmd,
const char* user,
bool cached_auth_failed)
&result);
return result;
NULL);
return pam_cli_protocol_version;
return sss_cmds;
const char *username,
goto done;
goto done;
value);
done:
return ret;
static errno_t
const char *username)
static errno_t
const char *name,
goto done;
goto done;
goto done;
goto done;
done:
return ret;