/*
Authors:
Sumit Bose <sbose@redhat.com>
Copyright (C) 2009 Red Hat
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <dlfcn.h>
#include <pwd.h>
#include <nss.h>
#include <errno.h>
#include <inttypes.h>
#include <security/pam_appl.h>
#include "lib/sifp/sss_sifp.h"
#include "tools/common/sss_tools.h"
#ifdef HAVE_SECURITY_PAM_MISC_H
# include <security/pam_misc.h>
#elif defined(HAVE_SECURITY_OPENPAM_H)
#endif
#ifdef HAVE_SECURITY_PAM_MISC_H
};
#elif defined(HAVE_SECURITY_OPENPAM_H)
};
#else
# error "Missing text based pam conversation function"
#endif
{
const char *tmp_str;
size_t c;
struct ifp_user_attr {
const char *name;
bool is_string;
} ifp_user_attr[] = {
{ "name", true },
{ "uidNumber", false },
{ "gidNumber", false },
{ "gecos", true },
{ "homeDirectory", true },
{ "loginShell", true },
{ NULL, false }
};
if (error != SSS_SIFP_OK) {
return EFAULT;
}
if (error != SSS_SIFP_OK) {
return EIO;
}
if (ifp_user_attr[c].is_string) {
ifp_user_attr[c].name,
&tmp_str);
} else {
ifp_user_attr[c].name,
&tmp_uint32);
}
if (error != SSS_SIFP_OK) {
return EIO;
}
if (ifp_user_attr[c].is_string) {
} else {
}
}
return 0;
}
{
int *errnop);
int nss_errno;
int ret;
goto done;
}
if (sss_getpwnam_r == NULL) {
goto done;
}
goto done;
}
if (status != NSS_STATUS_SUCCESS) {
goto done;
}
ret = 0;
done:
}
return ret;
}
struct sss_tool_ctx *tool_ctx,
void *pvt)
{
int ret;
int pret;
size_t c;
char **pam_env;
/* Parse command line. */
_("PAM action [auth|acct|setc|chau|open|clos], default: "
DEFAULT_ACTION), NULL },
};
return ret;
}
if (*user != '\0') {
if (ret != 0) {
}
if (ret != 0) {
user);
}
}
if (ret != PAM_SUCCESS) {
return 1;
}
if (pret != PAM_SUCCESS) {
pret));
pam_user = "- not available -";
}
} else {
}
}
} else {
}
return 0;
}