Coda Distributed File System
Classes | Macros | Typedefs | Functions
pdb.h File Reference
#include <sys/types.h>
#include "pdbarray.h"
Include dependency graph for pdb.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  PDB_profile
 

Macros

#define PDB_ISUSER(x)   ((x) > 0)
 
#define PDB_ISGROUP(x)   ((x) < 0)
 
#define PDB_MAXID_SET   (0)
 
#define PDB_MAXID_FORCE   (1)
 

Typedefs

typedef struct PDB_HANDLE_SPDB_HANDLE
 

Functions

void PDB_addToGroup (int32_t id, int32_t groupId)
 
void PDB_removeFromGroup (int32_t id, int32_t groupId)
 
void PDB_changeName (int32_t id, char *name)
 
void PDB_createUser (char *name, int32_t *newId)
 
void PDB_cloneUser (char *name, int32_t cloneid, int32_t *newId)
 
void PDB_deleteUser (int32_t id)
 
void PDB_createGroup (char *name, int32_t owner, int32_t *newGroupId)
 
void PDB_deleteGroup (int32_t groupId)
 
void PDB_lookupByName (const char *name, int32_t *id)
 
void PDB_lookupById (int32_t id, char **name)
 
void PDB_changeId (int32_t oldid, int32_t newid)
 
void PDB_bugfixes (void)
 
void pdb_pack (PDB_profile *r, void **data, size_t *size)
 
void pdb_unpack (PDB_profile *r, void *data, size_t size)
 
void PDB_freeProfile (PDB_profile *r)
 
void PDB_writeProfile (PDB_HANDLE h, PDB_profile *r)
 
void PDB_readProfile (PDB_HANDLE h, int32_t id, PDB_profile *r)
 
void PDB_readProfile_byname (PDB_HANDLE h, const char *name, PDB_profile *r)
 
void PDB_deleteProfile (PDB_HANDLE h, PDB_profile *r)
 
void PDB_printProfile (FILE *out, PDB_profile *r)
 
void PDB_updateCps (PDB_HANDLE h, PDB_profile *r)
 
PDB_HANDLE PDB_db_open (int mode)
 
void PDB_db_reopen (PDB_HANDLE h)
 
void PDB_db_close (PDB_HANDLE h)
 
void PDB_db_release (void)
 
void PDB_db_maxids (PDB_HANDLE h, int32_t *uid, int32_t *gid)
 
void PDB_db_update_maxids (PDB_HANDLE h, int32_t uid, int32_t gid, int mode)
 
void PDB_db_write (PDB_HANDLE h, int32_t id, char *name, void *buf, size_t size)
 
void PDB_db_read (PDB_HANDLE h, int32_t id, const char *name, void **buf, size_t *size)
 
void PDB_db_delete (PDB_HANDLE h, int32_t id, char *name)
 
void PDB_db_delete_xfer (PDB_HANDLE h, char *name)
 
int PDB_db_exists (void)
 
void PDB_db_compact (PDB_HANDLE h)
 
int PDB_setupdb (void)
 
int PDB_db_nextkey (PDB_HANDLE h, int *id)
 

Macro Definition Documentation

◆ PDB_ISGROUP

#define PDB_ISGROUP (   x)    ((x) < 0)

◆ PDB_ISUSER

#define PDB_ISUSER (   x)    ((x) > 0)

◆ PDB_MAXID_FORCE

#define PDB_MAXID_FORCE   (1)

◆ PDB_MAXID_SET

#define PDB_MAXID_SET   (0)

Typedef Documentation

◆ PDB_HANDLE

typedef struct PDB_HANDLE_S* PDB_HANDLE

Function Documentation

◆ PDB_addToGroup()

void PDB_addToGroup ( int32_t  id,
int32_t  groupId 
)

◆ PDB_bugfixes()

void PDB_bugfixes ( void  )

◆ PDB_changeId()

void PDB_changeId ( int32_t  oldid,
int32_t  newid 
)

◆ PDB_changeName()

void PDB_changeName ( int32_t  id,
char *  name 
)

◆ PDB_cloneUser()

void PDB_cloneUser ( char *  name,
int32_t  cloneid,
int32_t newId 
)

◆ PDB_createGroup()

void PDB_createGroup ( char *  name,
int32_t  owner,
int32_t newGroupId 
)

◆ PDB_createUser()

void PDB_createUser ( char *  name,
int32_t newId 
)

◆ PDB_db_close()

void PDB_db_close ( PDB_HANDLE  h)

◆ PDB_db_compact()

void PDB_db_compact ( PDB_HANDLE  h)

◆ PDB_db_delete()

void PDB_db_delete ( PDB_HANDLE  h,
int32_t  id,
char *  name 
)

◆ PDB_db_delete_xfer()

void PDB_db_delete_xfer ( PDB_HANDLE  h,
char *  name 
)

◆ PDB_db_exists()

int PDB_db_exists ( void  )

◆ PDB_db_maxids()

void PDB_db_maxids ( PDB_HANDLE  h,
int32_t uid,
int32_t gid 
)

◆ PDB_db_nextkey()

int PDB_db_nextkey ( PDB_HANDLE  h,
int *  id 
)

◆ PDB_db_open()

PDB_HANDLE PDB_db_open ( int  mode)

◆ PDB_db_read()

void PDB_db_read ( PDB_HANDLE  h,
int32_t  id,
const char *  name,
void **  buf,
size_t *  size 
)

◆ PDB_db_release()

void PDB_db_release ( void  )

◆ PDB_db_reopen()

void PDB_db_reopen ( PDB_HANDLE  h)

◆ PDB_db_update_maxids()

void PDB_db_update_maxids ( PDB_HANDLE  h,
int32_t  uid,
int32_t  gid,
int  mode 
)

◆ PDB_db_write()

void PDB_db_write ( PDB_HANDLE  h,
int32_t  id,
char *  name,
void *  buf,
size_t  size 
)

◆ PDB_deleteGroup()

void PDB_deleteGroup ( int32_t  groupId)

◆ PDB_deleteProfile()

void PDB_deleteProfile ( PDB_HANDLE  h,
PDB_profile r 
)

◆ PDB_deleteUser()

void PDB_deleteUser ( int32_t  id)

◆ PDB_freeProfile()

void PDB_freeProfile ( PDB_profile r)

◆ PDB_lookupById()

void PDB_lookupById ( int32_t  id,
char **  name 
)

◆ PDB_lookupByName()

void PDB_lookupByName ( const char *  name,
int32_t id 
)

◆ pdb_pack()

void pdb_pack ( PDB_profile r,
void **  data,
size_t *  size 
)

◆ PDB_printProfile()

void PDB_printProfile ( FILE *  out,
PDB_profile r 
)

◆ PDB_readProfile()

void PDB_readProfile ( PDB_HANDLE  h,
int32_t  id,
PDB_profile r 
)

◆ PDB_readProfile_byname()

void PDB_readProfile_byname ( PDB_HANDLE  h,
const char *  name,
PDB_profile r 
)

◆ PDB_removeFromGroup()

void PDB_removeFromGroup ( int32_t  id,
int32_t  groupId 
)

◆ PDB_setupdb()

int PDB_setupdb ( void  )

◆ pdb_unpack()

void pdb_unpack ( PDB_profile r,
void *  data,
size_t  size 
)

◆ PDB_updateCps()

void PDB_updateCps ( PDB_HANDLE  h,
PDB_profile r 
)

◆ PDB_writeProfile()

void PDB_writeProfile ( PDB_HANDLE  h,
PDB_profile r 
)