Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
sandbox.h File Reference

Sandbox support. More...

Go to the source code of this file.

Functions

void sandbox_init (void)
 Enables early sandboxing that can always be enabled.
 
void sandbox_enable_read_only (void)
 Enable sandboxing that only allows opening files for reading.
 
void sandbox_allow_strict (void)
 Tell sandboxing code that strict sandboxing can be used.
 
void sandbox_enable_strict_if_allowed (int src_fd, int pipe_event_fd, int pipe_write_fd)
 Enable sandboxing that allows reading from one file.
 

Detailed Description

Sandbox support.

Function Documentation

◆ sandbox_allow_strict()

void sandbox_allow_strict ( void )
extern

Tell sandboxing code that strict sandboxing can be used.

This function only sets a flag which will be read by sandbox_enable_strict_if_allowed().

◆ sandbox_enable_read_only()

void sandbox_enable_read_only ( void )
extern

Enable sandboxing that only allows opening files for reading.

◆ sandbox_enable_strict_if_allowed()

void sandbox_enable_strict_if_allowed ( int src_fd,
int pipe_event_fd,
int pipe_write_fd )
extern

Enable sandboxing that allows reading from one file.

This does nothing if sandbox_allow_strict() hasn't been called.

Parameters
src_fdFile descriptor open for reading
pipe_event_fduser_abort_pipe[0] from file_io.c
pipe_write_fduser_abort_pipe[1] from file_io.c

◆ sandbox_init()

void sandbox_init ( void )
extern

Enables early sandboxing that can always be enabled.

This requires that tuklib_progname() and io_init() have been called.