#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#include <string.h>
#include "lcas_vo_data.h"
#include "lcas_log.h"
Include dependency graph for lcas_vo_data.c:
Go to the source code of this file.
Functions | |
lcas_vo_data_t* | lcas_createVoData (const char *vo, const char *group, const char *subgroup, const char *role, const char *capability) |
Create a VoData structure. More... | |
int | lcas_deleteVoData (lcas_vo_data_t **vo_data) |
Delete a VoData structure. More... | |
int | lcas_cleanVoData (lcas_vo_data_t *vo_data) |
Clean a VoData structure. More... | |
int | lcas_copyVoData (lcas_vo_data_t *dst_vo_data, const lcas_vo_data_t *src_vo_data) |
Copy a VoData structure into an empty VoData structure. More... | |
int | lcas_printVoData (int debug_level, const lcas_vo_data_t *vo_data) |
Print the contents of a VoData structure. More... | |
int | lcas_stringVoData (const lcas_vo_data_t *vo_data, char *buffer, int nchars) |
Cast a VoData structure into a string. More... | |
char* | lcas_parseVostring (char *vo_string) |
Strip leading whitespace and check if string != "NULL". More... |
Definition in file lcas_vo_data.c.
|
Clean a VoData structure.
Clean a VoData structure that was previously filled with lcas_copyVoData(). The contents are freed and set to zero.
Definition at line 192 of file lcas_vo_data.c. |
|
Copy a VoData structure into an empty VoData structure.
Copy a VoData structure into an empty VoData structure which has to exist.
Definition at line 260 of file lcas_vo_data.c. |
|
Create a VoData structure.
Create a VoData structure (store a VO, group, (subgroup,) role, capability combination). Allocate the memory. To be freed with lcas_deleteVoData().
Definition at line 78 of file lcas_vo_data.c. |
|
Delete a VoData structure.
Delete a VoData structure that was previously created with lcas_createVoData(). The pointer to the VoData structure is finally set to NULL;
Definition at line 138 of file lcas_vo_data.c. |
|
Strip leading whitespace and check if string != "NULL".
This function is needed because VOMS server fills user credential sometimes with strings like " NULL", which is a valid string, but the intention is that the data is empty. A string like this is translated into a NULL pointer by this function.
Definition at line 548 of file lcas_vo_data.c. |
|
Print the contents of a VoData structure.
Definition at line 321 of file lcas_vo_data.c. |
|
Cast a VoData structure into a string.
The user of this function should create the buffer of size nchars beforehand. In buffer a string like the following will be written: "/VO=fred/GROUP=fred/flintstone/ROLE=director/CAPABILITY=destroy" Currently the SUBGROUP entry is ignored. Only if the information is present in the VoData structure, it is added to the string. Both data for VO and GROUP are required (might change).
Definition at line 389 of file lcas_vo_data.c. |