/usr/share/doc/libxslt-devel/html
NameSizeModeActions
book1.html68210644editdlrm
home.png6540644editdlrm
index.html68210644editdlrm
left.png4590644editdlrm
libxslt-attributes.html93560644editdlrm
libxslt-documents.html164470644editdlrm
libxslt-extensions.html496180644editdlrm
libxslt-extra.html101790644editdlrm
libxslt-functions.html140300644editdlrm
libxslt-imports.html128460644editdlrm
libxslt-keys.html112610644editdlrm
libxslt-lib.html68210644editdlrm
libxslt-namespaces.html156210644editdlrm
libxslt-numbersInternals.html77120644editdlrm
libxslt-pattern.html167060644editdlrm
libxslt-preproc.html87310644editdlrm
libxslt-security.html201510644editdlrm
libxslt-templates.html208950644editdlrm
libxslt-transform.html513230644editdlrm
libxslt-variables.html231580644editdlrm
libxslt-xslt.html77900644editdlrm
libxslt-xsltexports.html67350644editdlrm
libxslt-xsltInternals.html1097310644editdlrm
libxslt-xsltlocale.html114310644editdlrm
libxslt-xsltutils.html507800644editdlrm
right.png4720644editdlrm
up.png4060644editdlrm
Edit: /usr/share/doc/libxslt-devel/html/libxslt-security.html (20151B)
Module security from libxslt
Action against software patentsGNOME2 LogoW3C logoRed Hat Logo
Made with Libxslt Logo

The XSLT C library for GNOME

Module security from libxslt

API Menu
Related links
API Indexes

the libxslt security framework allow to restrict the access to new resources (file or URL) from the stylesheet at runtime.

Table of Contents

Enum xsltSecurityOption
Structure xsltSecurityPrefs
struct _xsltSecurityPrefs The content of this structure is not made public by the API.
Typedef xsltSecurityPrefs * xsltSecurityPrefsPtr
int	xsltCheckRead			(xsltSecurityPrefsPtr sec, 
xsltTransformContextPtr ctxt,
const xmlChar * URL)
int	xsltCheckWrite			(xsltSecurityPrefsPtr sec, 
xsltTransformContextPtr ctxt,
const xmlChar * URL)
void	xsltFreeSecurityPrefs		(xsltSecurityPrefsPtr sec)
xsltSecurityPrefsPtr	xsltGetDefaultSecurityPrefs	(void)
xsltSecurityCheck	xsltGetSecurityPrefs	(xsltSecurityPrefsPtr sec, 
xsltSecurityOption option)
xsltSecurityPrefsPtr	xsltNewSecurityPrefs	(void)
int	xsltSecurityAllow		(xsltSecurityPrefsPtr sec, 
xsltTransformContextPtr ctxt,
const char * value)
Function type: xsltSecurityCheck
int	xsltSecurityCheck		(xsltSecurityPrefsPtr sec, 
xsltTransformContextPtr ctxt,
const char * value)
int	xsltSecurityForbid		(xsltSecurityPrefsPtr sec, 
xsltTransformContextPtr ctxt,
const char * value)
int	xsltSetCtxtSecurityPrefs	(xsltSecurityPrefsPtr sec, 
xsltTransformContextPtr ctxt)
void	xsltSetDefaultSecurityPrefs	(xsltSecurityPrefsPtr sec)
int	xsltSetSecurityPrefs		(xsltSecurityPrefsPtr sec, 
xsltSecurityOption option,
xsltSecurityCheck func)

Description

Enum xsltSecurityOption

Enum xsltSecurityOption {
    XSLT_SECPREF_READ_FILE = 1
    XSLT_SECPREF_WRITE_FILE = 2
    XSLT_SECPREF_CREATE_DIRECTORY = 3
    XSLT_SECPREF_READ_NETWORK = 4
    XSLT_SECPREF_WRITE_NETWORK = 5
}

Structure xsltSecurityPrefs

Structure xsltSecurityPrefs
struct _xsltSecurityPrefs { The content of this structure is not made public by the API. }

Function: xsltCheckRead

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

Check if the resource is allowed to be read

sec:the security options
ctxt:an XSLT transformation context
URL:the resource to be read
Returns:1 if read is allowed, 0 if not and -1 in case or error.

Function: xsltCheckWrite

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

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

sec:the security options
ctxt:an XSLT transformation context
URL:the resource to be written
Returns:1 if write is allowed, 0 if not and -1 in case or error.

Function: xsltFreeSecurityPrefs

void	xsltFreeSecurityPrefs		(xsltSecurityPrefsPtr sec)

Free up a security preference block

sec:the security block to free

Function: xsltGetDefaultSecurityPrefs

xsltSecurityPrefsPtr	xsltGetDefaultSecurityPrefs	(void)

Get the default security preference application-wide

Returns:the current xsltSecurityPrefsPtr in use or NULL if none

Function: xsltGetSecurityPrefs

xsltSecurityCheck	xsltGetSecurityPrefs	(xsltSecurityPrefsPtr sec, 
xsltSecurityOption option)

Lookup the security option to get the callback checking function

sec:the security block to update
option:the option to lookup
Returns:NULL if not found, the function otherwise

Function: xsltNewSecurityPrefs

xsltSecurityPrefsPtr	xsltNewSecurityPrefs	(void)

Create a new security preference block

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

Function: xsltSecurityAllow

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

Function used to always allow an operation

sec:the security block to use
ctxt:an XSLT transformation context
value:unused
Returns:1 always

Function type: xsltSecurityCheck

Function type: xsltSecurityCheck
int	xsltSecurityCheck		(xsltSecurityPrefsPtr sec, 
xsltTransformContextPtr ctxt,
const char * value)

User provided function to check the value of a string like a file path or an URL ...

sec:
ctxt:
value:
Returns:

Function: xsltSecurityForbid

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

Function used to always forbid an operation

sec:the security block to use
ctxt:an XSLT transformation context
value:unused
Returns:0 always

Function: xsltSetCtxtSecurityPrefs

int	xsltSetCtxtSecurityPrefs	(xsltSecurityPrefsPtr sec, 
xsltTransformContextPtr ctxt)

Set the security preference for a specific transformation

sec:the security block to use
ctxt:an XSLT transformation context
Returns:-1 in case of error, 0 otherwise

Function: xsltSetDefaultSecurityPrefs

void	xsltSetDefaultSecurityPrefs	(xsltSecurityPrefsPtr sec)

Set the default security preference application-wide

sec:the security block to use

Function: xsltSetSecurityPrefs

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

Update the security option to use the new callback checking function

sec:the security block to update
option:the option to update
func:the user callback to use for this option
Returns:-1 in case of error, 0 otherwise

Daniel Veillard