Eneboo - Documentación para desarrolladores
Clases | 'defines' | Funciones
Referencia del Archivo src/libxslt/libxslt/security.c
#include "libxslt.h"
#include <string.h>
#include <libxml/xmlmemory.h>
#include <libxml/tree.h>
#include <libxml/uri.h>
#include "xslt.h"
#include "xsltInternals.h"
#include "xsltutils.h"
#include "extensions.h"
#include "security.h"

Clases

struct  _xsltSecurityPrefs

'defines'

#define IN_LIBXSLT

Funciones

xsltSecurityPrefsPtr xsltNewSecurityPrefs (void)
void xsltFreeSecurityPrefs (xsltSecurityPrefsPtr sec)
int xsltSetSecurityPrefs (xsltSecurityPrefsPtr sec, xsltSecurityOption option, xsltSecurityCheck func)
xsltSecurityCheck xsltGetSecurityPrefs (xsltSecurityPrefsPtr sec, xsltSecurityOption option)
void xsltSetDefaultSecurityPrefs (xsltSecurityPrefsPtr sec)
xsltSecurityPrefsPtr xsltGetDefaultSecurityPrefs (void)
int xsltSetCtxtSecurityPrefs (xsltSecurityPrefsPtr sec, xsltTransformContextPtr ctxt)
int xsltSecurityAllow (xsltSecurityPrefsPtr sec ATTRIBUTE_UNUSED, xsltTransformContextPtr ctxt ATTRIBUTE_UNUSED, const char *value ATTRIBUTE_UNUSED)
int xsltSecurityForbid (xsltSecurityPrefsPtr sec ATTRIBUTE_UNUSED, xsltTransformContextPtr ctxt ATTRIBUTE_UNUSED, const char *value ATTRIBUTE_UNUSED)
int xsltCheckWrite (xsltSecurityPrefsPtr sec, xsltTransformContextPtr ctxt, const xmlChar *URL)
int xsltCheckRead (xsltSecurityPrefsPtr sec, xsltTransformContextPtr ctxt, const xmlChar *URL)

Documentación de los 'defines'

#define IN_LIBXSLT

Documentación de las funciones

int xsltCheckRead ( xsltSecurityPrefsPtr  sec,
xsltTransformContextPtr  ctxt,
const xmlChar URL 
)

xsltCheckRead: : the security options : an XSLT transformation context : the resource to be read

Check if the resource is allowed to be read

Return 1 if read is allowed, 0 if not and -1 in case or error.

int xsltCheckWrite ( xsltSecurityPrefsPtr  sec,
xsltTransformContextPtr  ctxt,
const xmlChar URL 
)

xsltCheckWrite: : the security options : an XSLT transformation context : the resource to be written

Check if the resource is allowed to be written, if necessary makes some preliminary work like creating directories

Return 1 if write is allowed, 0 if not and -1 in case or error.

void xsltFreeSecurityPrefs ( xsltSecurityPrefsPtr  sec)

xsltFreeSecurityPrefs: : the security block to free

Free up a security preference block

xsltSecurityPrefsPtr xsltGetDefaultSecurityPrefs ( void  )

xsltGetDefaultSecurityPrefs:

Get the default security preference application-wide

Returns the current xsltSecurityPrefsPtr in use or NULL if none

xsltSecurityCheck xsltGetSecurityPrefs ( xsltSecurityPrefsPtr  sec,
xsltSecurityOption  option 
)

xsltGetSecurityPrefs: : the security block to update : the option to lookup

Lookup the security option to get the callback checking function

Returns NULL if not found, the function otherwise

xsltSecurityPrefsPtr xsltNewSecurityPrefs ( void  )

xsltNewSecurityPrefs:

Create a new security preference block

Returns a pointer to the new block or NULL in case of error

int xsltSecurityAllow ( xsltSecurityPrefsPtr sec  ATTRIBUTE_UNUSED,
xsltTransformContextPtr ctxt  ATTRIBUTE_UNUSED,
const char *value  ATTRIBUTE_UNUSED 
)

xsltSecurityAllow: : the security block to use : an XSLT transformation context : unused

Function used to always allow an operation

Returns 1 always

int xsltSecurityForbid ( xsltSecurityPrefsPtr sec  ATTRIBUTE_UNUSED,
xsltTransformContextPtr ctxt  ATTRIBUTE_UNUSED,
const char *value  ATTRIBUTE_UNUSED 
)

xsltSecurityForbid: : the security block to use : an XSLT transformation context : unused

Function used to always forbid an operation

Returns 0 always

int xsltSetCtxtSecurityPrefs ( xsltSecurityPrefsPtr  sec,
xsltTransformContextPtr  ctxt 
)

xsltSetCtxtSecurityPrefs: : the security block to use : an XSLT transformation context

Set the security preference for a specific transformation

Returns -1 in case of error, 0 otherwise

void xsltSetDefaultSecurityPrefs ( xsltSecurityPrefsPtr  sec)

xsltSetDefaultSecurityPrefs: : the security block to use

Set the default security preference application-wide

int xsltSetSecurityPrefs ( xsltSecurityPrefsPtr  sec,
xsltSecurityOption  option,
xsltSecurityCheck  func 
)

xsltSetSecurityPrefs: : the security block to update : the option to update : the user callback to use for this option

Update the security option to use the new callback checking function

Returns -1 in case of error, 0 otherwise

 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'