netatalk  4.4.0dev
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
uuid.c File Reference
#include <arpa/inet.h>
#include <errno.h>
#include <grp.h>
#include <inttypes.h>
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <atalk/afp.h>
#include <atalk/ldapconfig.h>
#include <atalk/logger.h>
#include <atalk/util.h>
#include <atalk/uuid.h>
#include "aclldap.h"
#include "cache.h"

Functions

void localuuid_from_id (unsigned char *buf, uuidtype_t type, unsigned int id)
void uuid_string2bin (const char *uuidstring, unsigned char *uuid)
const char * uuid_bin2string (const unsigned char *uuid)
int getuuidfromname (const char *name, uuidtype_t type, unsigned char *uuid)
int getnamefromuuid (const uuidp_t uuidp, char **name, uuidtype_t *type)

Variables

char * uuidtype [] = {"", "USER", "GROUP", "LOCAL"}
static unsigned char local_group_uuid []
static unsigned char local_user_uuid []

Function Documentation

◆ getnamefromuuid()

int getnamefromuuid ( const uuidp_t uuidp,
char ** name,
uuidtype_t * type )

◆ getuuidfromname()

int getuuidfromname ( const char * name,
uuidtype_t type,
unsigned char * uuid )

◆ localuuid_from_id()

void localuuid_from_id ( unsigned char * buf,
uuidtype_t type,
unsigned int id )

◆ uuid_bin2string()

const char * uuid_bin2string ( const unsigned char * uuid)

Convert 16 byte binary uuid to neat ascii represantation including dashes. Use defined or default ascii mask for dash placement Returns pointer to static buffer.

◆ uuid_string2bin()

void uuid_string2bin ( const char * uuidstring,
unsigned char * uuid )

Variable Documentation

◆ local_group_uuid

unsigned char local_group_uuid[]
static
Initial value:
= {0xab, 0xcd, 0xef,
0xab, 0xcd, 0xef,
0xab, 0xcd, 0xef,
0xab, 0xcd, 0xef
}

◆ local_user_uuid

unsigned char local_user_uuid[]
static
Initial value:
= {0xff, 0xff, 0xee, 0xee, 0xdd, 0xdd,
0xcc, 0xcc, 0xbb, 0xbb, 0xaa, 0xaa
}

◆ uuidtype

char* uuidtype[] = {"", "USER", "GROUP", "LOCAL"}