sss_sudo.c revision ea155efa0408f84171d28c1f733ea08888dfbe51
/*
Authors:
Pavel Březina <pbrezina@redhat.com>
Copyright (C) 2011 Red Hat
it under the terms of the GNU 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include "sss_client/sss_cli.h"
#include "sss_client/sudo/sss_sudo.h"
#include "sss_client/sudo/sss_sudo_private.h"
static int sss_sudo_create_query(const char *username,
char **_query,
int *_query_len);
static void sss_sudo_free_rules(unsigned int num_rules,
struct sss_sudo_rule *rules);
static void sss_sudo_free_attrs(unsigned int num_attrs,
struct sss_sudo_attr *attrs);
struct sss_cli_req_data *request,
struct sss_sudo_result **_result)
{
int errnop = 0;
int ret = 0;
/* send query and receive response */
errnop = 0;
return errnop;
}
/* parse structure */
return ret;
}
int sss_sudo_send_recv(const char *username,
struct sss_sudo_result **_result)
{
struct sss_cli_req_data request;
int query_len = 0;
int ret = 0;
/* create query */
goto done;
}
/* send query and recieve response */
done:
return ret;
}
struct sss_sudo_result **_result)
{
struct sss_cli_req_data request;
}
{
if (data_len <= 1) {
return EINVAL;
}
return ENOMEM;
}
*_query_len = data_len;
return EOK;
}
int sss_sudo_get_values(struct sss_sudo_rule *e,
{
int i, j;
for (i = 0; i < e->num_attrs; i++) {
return ENOMEM;
}
for (j = 0; j < attr->num_values; j++) {
return ENOMEM;
}
}
break;
}
}
return ENOENT;
}
return EOK;
}
void sss_sudo_free_values(char **values)
{
return;
}
}
}
{
return;
}
}
{
int i;
return;
}
for (i = 0; i < num_rules; i++) {
continue;
}
}
}
{
int i, j;
return;
}
for (i = 0; i < num_attrs; i++) {
continue;
}
for (j = 0; j < attr->num_values; j++) {
}
}
}