2012-09-20 07:51:34 +04:00
|
|
|
/**
|
|
|
|
* xrdp: A Remote Desktop Protocol server.
|
|
|
|
*
|
2013-06-08 21:51:53 +04:00
|
|
|
* Copyright (C) Jay Sorg 2004-2013
|
2012-09-20 07:51:34 +04:00
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
2005-07-07 07:08:03 +04:00
|
|
|
|
2006-05-26 00:34:32 +04:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @file verify_user_pam.c
|
|
|
|
* @brief Authenticate user using pam
|
|
|
|
* @author Jay Sorg
|
2012-09-20 07:51:34 +04:00
|
|
|
*
|
2006-05-26 00:34:32 +04:00
|
|
|
*/
|
|
|
|
|
2017-03-03 07:33:23 +03:00
|
|
|
#if defined(HAVE_CONFIG_H)
|
|
|
|
#include <config_ac.h>
|
|
|
|
#endif
|
|
|
|
|
2005-07-07 07:08:03 +04:00
|
|
|
#include "arch.h"
|
|
|
|
#include "os_calls.h"
|
2021-05-11 17:12:30 +03:00
|
|
|
#include "log.h"
|
2020-12-21 15:36:00 +03:00
|
|
|
#include "string_calls.h"
|
2005-07-07 07:08:03 +04:00
|
|
|
|
2006-05-31 21:47:43 +04:00
|
|
|
#include <stdio.h>
|
2005-07-07 07:08:03 +04:00
|
|
|
#include <security/pam_appl.h>
|
|
|
|
|
2022-11-28 13:20:58 +03:00
|
|
|
/* Allows the conversation function to find the username and password */
|
2005-07-07 07:08:03 +04:00
|
|
|
struct t_user_pass
|
|
|
|
{
|
2022-11-28 13:20:58 +03:00
|
|
|
const char *user;
|
|
|
|
const char *pass;
|
2005-07-19 06:22:33 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct t_auth_info
|
|
|
|
{
|
2012-09-20 07:51:34 +04:00
|
|
|
int session_opened;
|
|
|
|
int did_setcred;
|
|
|
|
pam_handle_t *ph;
|
2005-07-07 07:08:03 +04:00
|
|
|
};
|
|
|
|
|
2021-05-11 17:12:30 +03:00
|
|
|
/***************************************************************************//**
|
|
|
|
* Returns a string representing a pam_conv message style
|
|
|
|
*
|
|
|
|
* @param msg_style PAM msg_style (pam_conv(3))
|
|
|
|
* @param buff Buffer for conversion of unrecognised values
|
|
|
|
* @param bufflen Total length of above
|
|
|
|
*
|
|
|
|
* The buffer described by buff is only written to if required.
|
|
|
|
*/
|
|
|
|
static const char *
|
|
|
|
msg_style_to_str(int msg_style, char *buff, unsigned int bufflen)
|
|
|
|
{
|
|
|
|
const char *result;
|
|
|
|
switch (msg_style)
|
|
|
|
{
|
|
|
|
case PAM_PROMPT_ECHO_OFF:
|
|
|
|
result = "PAM_PROMPT_ECHO_OFF";
|
|
|
|
break;
|
|
|
|
|
|
|
|
case PAM_PROMPT_ECHO_ON:
|
|
|
|
result = "PAM_PROMPT_ECHO_ON";
|
|
|
|
break;
|
|
|
|
|
|
|
|
case PAM_ERROR_MSG:
|
|
|
|
result = "PAM_ERROR_MSG";
|
|
|
|
break;
|
|
|
|
|
|
|
|
case PAM_TEXT_INFO:
|
|
|
|
result = "PAM_TEXT_INFO";
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
2021-06-17 17:15:59 +03:00
|
|
|
g_snprintf(buff, bufflen, "UNKNOWN_0x%x", msg_style);
|
2021-05-11 17:12:30 +03:00
|
|
|
result = buff;
|
|
|
|
}
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2021-06-10 17:45:09 +03:00
|
|
|
/***************************************************************************//**
|
|
|
|
* Provides the PAM conversation callback function
|
|
|
|
*
|
|
|
|
* At present, the main purpose of this function is to supply the
|
|
|
|
* user's password to the PAM stack, although some module logging is
|
|
|
|
* implemented here.
|
|
|
|
*
|
|
|
|
* @param[in] num_msg Count of messages in the msg array
|
|
|
|
* @param[in] msg Messages from the PAM stack to the application
|
|
|
|
* @param[out] resp Message replies from the application to the PAM stack
|
|
|
|
* @param[in] appdata_ptr Used to pass in a struct t_user_pass pointer
|
|
|
|
*
|
|
|
|
* @result PAM_SUCCESS if the messages were all processed successfully.
|
|
|
|
*
|
|
|
|
* @post If PAM_SUCCESS is returned, resp and its contents are allocated here
|
|
|
|
* and must be freed by the caller
|
|
|
|
* @post If PAM_SUCCESS is not returned, resp is not allocated and must not
|
|
|
|
* be not freed by the caller
|
|
|
|
*
|
|
|
|
* @note See pam_conv(3) for more information
|
|
|
|
* @note A basic example conversation function can be found in OSF RFC
|
|
|
|
86.0 (1995)
|
|
|
|
*/
|
|
|
|
|
2017-03-12 19:35:00 +03:00
|
|
|
static int
|
2012-09-20 07:51:34 +04:00
|
|
|
verify_pam_conv(int num_msg, const struct pam_message **msg,
|
|
|
|
struct pam_response **resp, void *appdata_ptr)
|
2005-07-07 07:08:03 +04:00
|
|
|
{
|
2012-09-20 07:51:34 +04:00
|
|
|
int i;
|
2021-05-11 17:12:30 +03:00
|
|
|
struct pam_response *reply = NULL;
|
2012-09-20 07:51:34 +04:00
|
|
|
struct t_user_pass *user_pass;
|
2021-05-11 17:12:30 +03:00
|
|
|
char sb[64];
|
|
|
|
int rv = PAM_SUCCESS;
|
2012-09-20 07:51:34 +04:00
|
|
|
|
2021-05-11 17:12:30 +03:00
|
|
|
if (num_msg <= 0 || num_msg > PAM_MAX_NUM_MSG)
|
|
|
|
{
|
|
|
|
rv = PAM_CONV_ERR;
|
|
|
|
}
|
|
|
|
else if ((reply = g_new0(struct pam_response, num_msg)) == NULL)
|
|
|
|
{
|
|
|
|
rv = PAM_BUF_ERR;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
for (i = 0; i < num_msg && rv == PAM_SUCCESS; i++)
|
|
|
|
{
|
|
|
|
LOG_DEVEL(LOG_LEVEL_INFO, "Handling struct pam_message"
|
|
|
|
" { style = %s, msg = \"%s\" }",
|
|
|
|
msg_style_to_str(msg[i]->msg_style, sb, sizeof (sb)),
|
|
|
|
msg[i]->msg == NULL ? "<null>" : msg[i]->msg);
|
|
|
|
|
|
|
|
switch (msg[i]->msg_style)
|
|
|
|
{
|
|
|
|
case PAM_PROMPT_ECHO_OFF: /* password */
|
|
|
|
user_pass = (struct t_user_pass *) appdata_ptr;
|
2022-11-28 13:20:58 +03:00
|
|
|
/* Check this function isn't being called
|
|
|
|
* later than we expected */
|
|
|
|
if (user_pass == NULL)
|
|
|
|
{
|
|
|
|
LOG(LOG_LEVEL_ERROR,
|
|
|
|
"verify_pam_conv: Password unavailable");
|
|
|
|
reply[i].resp = g_strdup("????");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
reply[i].resp = g_strdup(user_pass->pass);
|
|
|
|
}
|
2021-05-11 17:12:30 +03:00
|
|
|
break;
|
|
|
|
|
|
|
|
case PAM_ERROR_MSG:
|
|
|
|
LOG(LOG_LEVEL_ERROR, "PAM: %s", msg[i]->msg);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case PAM_TEXT_INFO:
|
|
|
|
LOG(LOG_LEVEL_INFO, "PAM: %s", msg[i]->msg);
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
{
|
|
|
|
LOG(LOG_LEVEL_ERROR, "Unhandled message in verify_pam_conv"
|
|
|
|
" { style = %s, msg = \"%s\" }",
|
|
|
|
msg_style_to_str(msg[i]->msg_style, sb, sizeof (sb)),
|
|
|
|
msg[i]->msg == NULL ? "<null>" : msg[i]->msg);
|
|
|
|
rv = PAM_CONV_ERR;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2012-09-20 07:51:34 +04:00
|
|
|
|
2021-05-11 17:12:30 +03:00
|
|
|
if (rv == PAM_SUCCESS)
|
2005-07-07 07:08:03 +04:00
|
|
|
{
|
2021-05-11 17:12:30 +03:00
|
|
|
*resp = reply;
|
|
|
|
}
|
|
|
|
else if (reply != NULL)
|
|
|
|
{
|
|
|
|
for (i = 0; i < num_msg; i++)
|
2012-09-20 07:51:34 +04:00
|
|
|
{
|
2021-05-11 17:12:30 +03:00
|
|
|
if (reply[i].resp != NULL)
|
|
|
|
{
|
|
|
|
g_free(reply[i].resp);
|
|
|
|
}
|
2012-09-20 07:51:34 +04:00
|
|
|
}
|
2021-05-11 17:12:30 +03:00
|
|
|
g_free(reply);
|
2005-07-07 07:08:03 +04:00
|
|
|
}
|
2012-09-20 07:51:34 +04:00
|
|
|
|
2021-05-11 17:12:30 +03:00
|
|
|
return rv;
|
2005-07-07 07:08:03 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************/
|
2017-03-12 19:35:00 +03:00
|
|
|
static void
|
2012-09-20 07:51:34 +04:00
|
|
|
get_service_name(char *service_name)
|
2005-07-19 06:22:33 +04:00
|
|
|
{
|
2012-09-20 07:51:34 +04:00
|
|
|
service_name[0] = 0;
|
|
|
|
|
2017-07-19 09:41:32 +03:00
|
|
|
if (g_file_exist("/etc/pam.d/xrdp-sesman") ||
|
2020-11-30 03:36:20 +03:00
|
|
|
g_file_exist(XRDP_SYSCONF_PATH "/pam.d/xrdp-sesman"))
|
2012-09-20 07:51:34 +04:00
|
|
|
{
|
|
|
|
g_strncpy(service_name, "xrdp-sesman", 255);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
g_strncpy(service_name, "gdm", 255);
|
|
|
|
}
|
2005-07-19 06:22:33 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************/
|
2013-06-08 21:51:53 +04:00
|
|
|
/* returns long, zero is no go
|
2013-01-16 13:28:35 +04:00
|
|
|
Stores the detailed error code in the errorcode variable*/
|
|
|
|
|
2017-03-12 19:35:00 +03:00
|
|
|
long
|
2016-10-17 09:14:06 +03:00
|
|
|
auth_userpass(const char *user, const char *pass, int *errorcode)
|
2005-07-07 07:08:03 +04:00
|
|
|
{
|
2012-09-20 07:51:34 +04:00
|
|
|
int error;
|
|
|
|
struct t_auth_info *auth_info;
|
|
|
|
char service_name[256];
|
2022-11-28 13:20:58 +03:00
|
|
|
struct t_user_pass user_pass = {user, pass};
|
|
|
|
struct pam_conv pamc = {verify_pam_conv, (void *) &user_pass};
|
2012-09-20 07:51:34 +04:00
|
|
|
|
2016-06-22 02:30:18 +03:00
|
|
|
auth_info = g_new0(struct t_auth_info, 1);
|
2022-11-28 13:20:58 +03:00
|
|
|
if (auth_info == NULL)
|
|
|
|
{
|
|
|
|
LOG(LOG_LEVEL_ERROR, "auth_userpass: No memory");
|
|
|
|
error = PAM_BUF_ERR;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
get_service_name(service_name);
|
|
|
|
error = pam_start(service_name, user, &pamc, &(auth_info->ph));
|
2012-09-20 07:51:34 +04:00
|
|
|
|
|
|
|
if (error != PAM_SUCCESS)
|
|
|
|
{
|
2014-10-21 00:39:38 +04:00
|
|
|
if (errorcode != NULL)
|
|
|
|
{
|
|
|
|
*errorcode = error;
|
|
|
|
}
|
2021-05-11 17:12:30 +03:00
|
|
|
LOG(LOG_LEVEL_ERROR, "pam_start failed: %s",
|
|
|
|
pam_strerror(auth_info->ph, error));
|
2014-09-20 11:08:41 +04:00
|
|
|
pam_end(auth_info->ph, error);
|
2012-09-20 07:51:34 +04:00
|
|
|
g_free(auth_info);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2014-10-21 00:39:38 +04:00
|
|
|
error = pam_set_item(auth_info->ph, PAM_TTY, service_name);
|
|
|
|
if (error != PAM_SUCCESS)
|
|
|
|
{
|
2021-05-11 17:12:30 +03:00
|
|
|
LOG(LOG_LEVEL_ERROR, "pam_set_item failed: %s",
|
|
|
|
pam_strerror(auth_info->ph, error));
|
2014-10-21 00:39:38 +04:00
|
|
|
}
|
|
|
|
|
2012-09-20 07:51:34 +04:00
|
|
|
error = pam_authenticate(auth_info->ph, 0);
|
|
|
|
|
|
|
|
if (error != PAM_SUCCESS)
|
|
|
|
{
|
2014-10-21 00:39:38 +04:00
|
|
|
if (errorcode != NULL)
|
|
|
|
{
|
|
|
|
*errorcode = error;
|
|
|
|
}
|
2021-05-11 17:12:30 +03:00
|
|
|
LOG(LOG_LEVEL_ERROR, "pam_authenticate failed: %s",
|
|
|
|
pam_strerror(auth_info->ph, error));
|
2014-09-20 11:08:41 +04:00
|
|
|
pam_end(auth_info->ph, error);
|
2012-09-20 07:51:34 +04:00
|
|
|
g_free(auth_info);
|
|
|
|
return 0;
|
|
|
|
}
|
2013-06-08 21:51:53 +04:00
|
|
|
/* From man page:
|
2013-01-16 13:28:35 +04:00
|
|
|
The pam_acct_mgmt function is used to determine if the users account is
|
|
|
|
valid. It checks for authentication token and account expiration and
|
|
|
|
verifies access restrictions. It is typically called after the user has
|
|
|
|
been authenticated.
|
|
|
|
*/
|
2012-09-20 07:51:34 +04:00
|
|
|
error = pam_acct_mgmt(auth_info->ph, 0);
|
|
|
|
|
|
|
|
if (error != PAM_SUCCESS)
|
|
|
|
{
|
2014-10-21 00:39:38 +04:00
|
|
|
if (errorcode != NULL)
|
|
|
|
{
|
|
|
|
*errorcode = error;
|
|
|
|
}
|
2021-05-11 17:12:30 +03:00
|
|
|
LOG(LOG_LEVEL_ERROR, "pam_acct_mgmt failed: %s",
|
|
|
|
pam_strerror(auth_info->ph, error));
|
2014-09-20 11:08:41 +04:00
|
|
|
pam_end(auth_info->ph, error);
|
2012-09-20 07:51:34 +04:00
|
|
|
g_free(auth_info);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2022-11-28 13:20:58 +03:00
|
|
|
/* Set the appdata_ptr passed to the conversation function to
|
|
|
|
* NULL, as the existing value is going out of scope */
|
|
|
|
pamc.appdata_ptr = NULL;
|
|
|
|
error = pam_set_item(auth_info->ph, PAM_CONV, &pamc);
|
|
|
|
if (error != PAM_SUCCESS)
|
|
|
|
{
|
|
|
|
LOG(LOG_LEVEL_ERROR, "pam_set_item(PAM_CONV) failed: %s",
|
|
|
|
pam_strerror(auth_info->ph, error));
|
|
|
|
}
|
|
|
|
|
2012-09-20 07:51:34 +04:00
|
|
|
return (long)auth_info;
|
2005-07-19 06:22:33 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
/* returns error */
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2005-08-14 06:22:11 +04:00
|
|
|
auth_start_session(long in_val, int in_display)
|
2005-07-19 06:22:33 +04:00
|
|
|
{
|
2012-09-20 07:51:34 +04:00
|
|
|
struct t_auth_info *auth_info;
|
|
|
|
int error;
|
|
|
|
char display[256];
|
|
|
|
|
|
|
|
g_sprintf(display, ":%d", in_display);
|
|
|
|
auth_info = (struct t_auth_info *)in_val;
|
|
|
|
error = pam_set_item(auth_info->ph, PAM_TTY, display);
|
|
|
|
|
|
|
|
if (error != PAM_SUCCESS)
|
|
|
|
{
|
2021-05-11 17:12:30 +03:00
|
|
|
LOG(LOG_LEVEL_ERROR, "pam_set_item failed: %s",
|
|
|
|
pam_strerror(auth_info->ph, error));
|
2012-09-20 07:51:34 +04:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
error = pam_setcred(auth_info->ph, PAM_ESTABLISH_CRED);
|
|
|
|
|
|
|
|
if (error != PAM_SUCCESS)
|
|
|
|
{
|
2021-05-11 17:12:30 +03:00
|
|
|
LOG(LOG_LEVEL_ERROR, "pam_setcred failed: %s",
|
|
|
|
pam_strerror(auth_info->ph, error));
|
2012-09-20 07:51:34 +04:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
auth_info->did_setcred = 1;
|
|
|
|
error = pam_open_session(auth_info->ph, 0);
|
|
|
|
|
|
|
|
if (error != PAM_SUCCESS)
|
|
|
|
{
|
2021-05-11 17:12:30 +03:00
|
|
|
LOG(LOG_LEVEL_ERROR, "pam_open_session failed: %s",
|
|
|
|
pam_strerror(auth_info->ph, error));
|
2012-09-20 07:51:34 +04:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
auth_info->session_opened = 1;
|
|
|
|
return 0;
|
2005-07-19 06:22:33 +04:00
|
|
|
}
|
|
|
|
|
2013-10-01 21:42:00 +04:00
|
|
|
/******************************************************************************/
|
|
|
|
/* returns error */
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2013-10-01 21:42:00 +04:00
|
|
|
auth_stop_session(long in_val)
|
|
|
|
{
|
|
|
|
struct t_auth_info *auth_info;
|
|
|
|
int error;
|
|
|
|
|
|
|
|
auth_info = (struct t_auth_info *)in_val;
|
|
|
|
error = pam_close_session(auth_info->ph, 0);
|
|
|
|
if (error != PAM_SUCCESS)
|
|
|
|
{
|
2021-05-11 17:12:30 +03:00
|
|
|
LOG(LOG_LEVEL_ERROR, "pam_close_session failed: %s",
|
|
|
|
pam_strerror(auth_info->ph, error));
|
2013-10-01 21:42:00 +04:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
auth_info->session_opened = 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2005-07-19 06:22:33 +04:00
|
|
|
/******************************************************************************/
|
|
|
|
/* returns error */
|
|
|
|
/* cleanup */
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2005-07-19 06:22:33 +04:00
|
|
|
auth_end(long in_val)
|
|
|
|
{
|
2012-09-20 07:51:34 +04:00
|
|
|
struct t_auth_info *auth_info;
|
|
|
|
|
|
|
|
auth_info = (struct t_auth_info *)in_val;
|
2005-07-19 06:22:33 +04:00
|
|
|
|
2012-09-20 07:51:34 +04:00
|
|
|
if (auth_info != 0)
|
2005-07-19 06:22:33 +04:00
|
|
|
{
|
2012-09-20 07:51:34 +04:00
|
|
|
if (auth_info->ph != 0)
|
|
|
|
{
|
|
|
|
if (auth_info->session_opened)
|
|
|
|
{
|
|
|
|
pam_close_session(auth_info->ph, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (auth_info->did_setcred)
|
|
|
|
{
|
|
|
|
pam_setcred(auth_info->ph, PAM_DELETE_CRED);
|
|
|
|
}
|
|
|
|
|
|
|
|
pam_end(auth_info->ph, PAM_SUCCESS);
|
|
|
|
auth_info->ph = 0;
|
|
|
|
}
|
2005-07-19 06:22:33 +04:00
|
|
|
}
|
2012-09-20 07:51:34 +04:00
|
|
|
|
|
|
|
g_free(auth_info);
|
|
|
|
return 0;
|
2005-07-07 07:08:03 +04:00
|
|
|
}
|
2005-08-14 06:22:11 +04:00
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
/* returns error */
|
|
|
|
/* set any pam env vars */
|
2017-03-12 19:35:00 +03:00
|
|
|
int
|
2005-08-14 06:22:11 +04:00
|
|
|
auth_set_env(long in_val)
|
|
|
|
{
|
2012-09-20 07:51:34 +04:00
|
|
|
struct t_auth_info *auth_info;
|
|
|
|
char **pam_envlist;
|
|
|
|
char **pam_env;
|
|
|
|
char item[256];
|
|
|
|
char value[256];
|
|
|
|
int eq_pos;
|
|
|
|
|
|
|
|
auth_info = (struct t_auth_info *)in_val;
|
|
|
|
|
|
|
|
if (auth_info != 0)
|
2005-08-14 06:22:11 +04:00
|
|
|
{
|
2012-09-20 07:51:34 +04:00
|
|
|
/* export PAM environment */
|
|
|
|
pam_envlist = pam_getenvlist(auth_info->ph);
|
|
|
|
|
|
|
|
if (pam_envlist != NULL)
|
2005-08-14 06:22:11 +04:00
|
|
|
{
|
2012-09-20 07:51:34 +04:00
|
|
|
for (pam_env = pam_envlist; *pam_env != NULL; ++pam_env)
|
|
|
|
{
|
|
|
|
eq_pos = g_pos(*pam_env, "=");
|
|
|
|
|
|
|
|
if (eq_pos >= 0 && eq_pos < 250)
|
|
|
|
{
|
|
|
|
g_strncpy(item, *pam_env, eq_pos);
|
|
|
|
g_strncpy(value, (*pam_env) + eq_pos + 1, 255);
|
|
|
|
g_setenv(item, value, 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
g_free(*pam_env);
|
|
|
|
}
|
|
|
|
|
|
|
|
g_free(pam_envlist);
|
2005-08-14 06:22:11 +04:00
|
|
|
}
|
|
|
|
}
|
2012-09-20 07:51:34 +04:00
|
|
|
|
|
|
|
return 0;
|
2005-08-14 06:22:11 +04:00
|
|
|
}
|