mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-11-27 16:21:14 +03:00
new module with runtime security checks, it will also check and do
* libxslt/security.[ch] libxslt/Makefile.am: new module with runtime security checks, it will also check and do directory creation when allowed * libxslt/documents.c libxslt/imports.c libxslt/transform.c libxslt/xslt.c libxslt/xsltInternals.h: plug-in the new security infrastructure probes at file reading or file creation * xsltproc/xsltproc.c: plugged the security module there too, added the new options --nowrite and --nomkdir * doc/*: updated the man page and regenerated. Daniel
This commit is contained in:
@@ -1087,6 +1087,85 @@ void
|
||||
<NAME>LIBXSLT_PUBLIC</NAME>
|
||||
#define LIBXSLT_PUBLIC
|
||||
</MACRO>
|
||||
<STRUCT>
|
||||
<NAME>xsltSecurityPrefs</NAME>
|
||||
</STRUCT>
|
||||
<TYPEDEF>
|
||||
<NAME>xsltSecurityPrefsPtr</NAME>
|
||||
typedef xsltSecurityPrefs *xsltSecurityPrefsPtr;
|
||||
</TYPEDEF>
|
||||
<ENUM>
|
||||
<NAME>xsltSecurityOption</NAME>
|
||||
typedef enum {
|
||||
XSLT_SECPREF_READ_FILE = 1,
|
||||
XSLT_SECPREF_WRITE_FILE,
|
||||
XSLT_SECPREF_CREATE_DIRECTORY,
|
||||
XSLT_SECPREF_READ_NETWORK,
|
||||
XSLT_SECPREF_WRITE_NETWORK
|
||||
} xsltSecurityOption;
|
||||
</ENUM>
|
||||
<USER_FUNCTION>
|
||||
<NAME>xsltSecurityCheck</NAME>
|
||||
<RETURNS>int </RETURNS>
|
||||
xsltSecurityPrefsPtr sec,
|
||||
xsltTransformContextPtr ctxt,
|
||||
const char *value
|
||||
</USER_FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>xsltNewSecurityPrefs</NAME>
|
||||
<RETURNS>xsltSecurityPrefsPtr </RETURNS>
|
||||
void
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>xsltFreeSecurityPrefs</NAME>
|
||||
<RETURNS>void </RETURNS>
|
||||
xsltSecurityPrefsPtr sec
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>xsltSetSecurityPrefs</NAME>
|
||||
<RETURNS>int </RETURNS>
|
||||
xsltSecurityPrefsPtr sec,xsltSecurityOption option,xsltSecurityCheck func
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>xsltGetSecurityPrefs</NAME>
|
||||
<RETURNS>xsltSecurityCheck </RETURNS>
|
||||
xsltSecurityPrefsPtr sec,xsltSecurityOption option
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>xsltSetDefaultSecurityPrefs</NAME>
|
||||
<RETURNS>void </RETURNS>
|
||||
xsltSecurityPrefsPtr sec
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>xsltGetDefaultSecurityPrefs</NAME>
|
||||
<RETURNS>xsltSecurityPrefsPtr </RETURNS>
|
||||
void
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>xsltSetCtxtSecurityPrefs</NAME>
|
||||
<RETURNS>int </RETURNS>
|
||||
xsltSecurityPrefsPtr sec,xsltTransformContextPtr ctxt
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>xsltSecurityAllow</NAME>
|
||||
<RETURNS>int </RETURNS>
|
||||
xsltSecurityPrefsPtr sec,xsltTransformContextPtr ctxt,const char *value
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>xsltSecurityForbid</NAME>
|
||||
<RETURNS>int </RETURNS>
|
||||
xsltSecurityPrefsPtr sec,xsltTransformContextPtr ctxt,const char *value
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>xsltCheckWrite</NAME>
|
||||
<RETURNS>int </RETURNS>
|
||||
xsltSecurityPrefsPtr sec,xsltTransformContextPtr ctxt,const xmlChar *URL
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<NAME>xsltCheckRead</NAME>
|
||||
<RETURNS>int </RETURNS>
|
||||
xsltSecurityPrefsPtr sec,xsltTransformContextPtr ctxt,const xmlChar *URL
|
||||
</FUNCTION>
|
||||
<MACRO>
|
||||
<NAME>XSLT_MAX_SORT</NAME>
|
||||
#define XSLT_MAX_SORT 5
|
||||
@@ -1525,6 +1604,7 @@ struct xsltTransformContext {
|
||||
xsltRuntimeExtraPtr extras; /* extra per runtime informations */
|
||||
|
||||
xsltDocumentPtr styleList; /* the stylesheet docs list */
|
||||
void * sec; /* the security preferences if any */
|
||||
};
|
||||
</STRUCT>
|
||||
<MACRO>
|
||||
|
||||
Reference in New Issue
Block a user