sss_sudo_response.c revision f643754db81eeade60485bbe3d80324d889cc4f3
/*
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 <errno.h>
#include <string.h>
#include <stdint.h>
#include "sss_client/sudo/sss_sudo.h"
#include "sss_client/sudo/sss_sudo_private.h"
static int sss_sudo_parse_rule(const char *message,
static int sss_sudo_parse_attr(const char *message,
static int sss_sudo_parse_uint32(const char *message,
static int sss_sudo_parse_string(const char *message,
char **_str);
int sss_sudo_parse_response(const char *message,
struct sss_result **_result,
{
int i = 0;
/* error code */
return ret;
}
/* result */
return ENOMEM;
}
/* rules_num */
goto fail;
}
/* rules */
goto fail;
}
goto fail;
}
}
return EOK;
fail:
return ret;
}
int sss_sudo_parse_rule(const char *message,
{
int i = 0;
/* attrs_num */
return ret;
}
/* attrs */
return ENOMEM;
}
return ret;
}
}
return EOK;
}
int sss_sudo_parse_attr(const char *message,
{
int i = 0;
/* name */
return ret;
}
/* values_num */
return ret;
}
/* values */
return ENOMEM;
}
for (i = 0; i < _attr->num_values; i++) {
return ret;
}
}
return EOK;
}
int sss_sudo_parse_uint32(const char *message,
{
return EINVAL;
}
return EINVAL;
}
/* expanded SAFEALIGN_COPY_UINT32 macro from util.h */
return EOK;
}
int sss_sudo_parse_string(const char *message,
char **_str)
{
return EINVAL;
}
if (start_pos >= message_len ) {
return EINVAL;
}
/* the string exceeds message length */
return EINVAL;
}
return ENOMEM;
}
/* go after \0 */
return EOK;
}