/*
SSSD
ID-mapping library - conversion utilities
Authors:
Sumit Bose <sbose@redhat.com>
Copyright (C) 2012 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 <string.h>
#include <stdio.h>
#include <errno.h>
#include <ctype.h>
#include "lib/idmap/sss_idmap.h"
#include "lib/idmap/sss_idmap_private.h"
#include "util/sss_endian.h"
struct sss_dom_sid {
};
struct sss_dom_sid **_dom_sid)
{
size_t i = 0;
size_t p = 0;
return IDMAP_OUT_OF_MEMORY;
}
/* Safely copy in the SID revision number */
p++;
/* Safely copy in the number of sub auth values */
p++;
/* Make sure we aren't being told to read more bin_sid
* than can fit in the structure
*/
goto done;
}
/* Safely copy in the id_auth values */
for (i = 0; i < SID_ID_AUTHS; i++) {
p++;
}
/* Safely copy in the sub_auths values */
/* SID sub auth values in Active Directory are stored little-endian,
* we store them in host order */
}
err = IDMAP_SUCCESS;
done:
if (err != IDMAP_SUCCESS) {
}
return err;
}
struct sss_dom_sid *dom_sid,
{
size_t i = 0;
size_t p = 0;
return IDMAP_SID_INVALID;
}
return IDMAP_OUT_OF_MEMORY;
}
p++;
p++;
for (i = 0; i < SID_ID_AUTHS; i++) {
p++;
}
goto done;
}
}
err = IDMAP_SUCCESS;
done:
if (err != IDMAP_SUCCESS) {
}
return err;
}
struct sss_dom_sid *dom_sid,
char **_sid)
{
char *sid_buf;
char *p;
int nc;
int8_t i;
return IDMAP_SID_INVALID;
}
return IDMAP_OUT_OF_MEMORY;
}
/* Only 32bits are used for the string representation */
(unsigned long) id_auth_val);
goto done;
}
/* Loop through the sub-auths, if any, prepending a hyphen
* for each one.
*/
p = sid_buf;
p += nc;
sid_buf_len -= nc;
goto done;
}
}
err = IDMAP_SUCCESS;
done:
if (err != IDMAP_SUCCESS) {
}
return err;
}
const char *sid,
struct sss_dom_sid **_dom_sid)
{
unsigned long ul;
char *r;
char *end;
return IDMAP_SID_INVALID;
}
return IDMAP_OUT_OF_MEMORY;
}
goto done;
}
errno = 0;
goto done;
}
r++;
if (!isdigit(*r)) {
goto done;
}
errno = 0;
goto done;
}
/* id_auth in the string should always be <2^32 in decimal */
/* store values in the same order as the binary representation */
if (*r == '\0') {
/* no sub auths given */
err = IDMAP_SUCCESS;
goto done;
}
if (*r != '-') {
goto done;
}
do {
goto done;
}
r++;
if (!isdigit(*r)) {
goto done;
}
errno = 0;
goto done;
}
r = end;
} while (*r != '\0');
err = IDMAP_SUCCESS;
done:
if (err != IDMAP_SUCCESS) {
} else {
}
return err;
}
const char *sid,
{
if (err != IDMAP_SUCCESS) {
goto done;
}
if (err != IDMAP_SUCCESS) {
goto done;
}
err = IDMAP_SUCCESS;
done:
if (err != IDMAP_SUCCESS) {
}
return err;
}
char **_sid)
{
if (err != IDMAP_SUCCESS) {
goto done;
}
if (err != IDMAP_SUCCESS) {
goto done;
}
err = IDMAP_SUCCESS;
done:
if (err != IDMAP_SUCCESS) {
}
return err;
}
const char *sid,
{
if (err != IDMAP_SUCCESS) {
goto done;
}
if (err != IDMAP_SUCCESS) {
goto done;
}
err = IDMAP_SUCCESS;
done:
if (err != IDMAP_SUCCESS) {
}
return err;
}
char **_sid)
{
if (err != IDMAP_SUCCESS) {
goto done;
}
if (err != IDMAP_SUCCESS) {
goto done;
}
err = IDMAP_SUCCESS;
done:
if (err != IDMAP_SUCCESS) {
}
return err;
}
struct sss_dom_sid *dom_sid,
{
size_t c;
return IDMAP_OUT_OF_MEMORY;
}
for (c = 0; c < SID_ID_AUTHS; c++) {
}
for (c = 0; c < SID_SUB_AUTHS; c++) {
}
return IDMAP_SUCCESS;
}
struct sss_dom_sid **_dom_sid)
{
size_t c;
return IDMAP_OUT_OF_MEMORY;
}
for (c = 0; c < SID_ID_AUTHS; c++) {
}
for (c = 0; c < SID_SUB_AUTHS; c++) {
}
return IDMAP_SUCCESS;
}
{
if (err != IDMAP_SUCCESS) {
goto done;
}
if (err != IDMAP_SUCCESS) {
goto done;
}
err = IDMAP_SUCCESS;
done:
if (err != IDMAP_SUCCESS) {
}
return err;
}
{
if (err != IDMAP_SUCCESS) {
goto done;
}
if (err != IDMAP_SUCCESS) {
goto done;
}
err = IDMAP_SUCCESS;
done:
if (err != IDMAP_SUCCESS) {
}
return err;
}