libalpm
Arch Linux Package Manager Library
sandbox.c File Reference
#include <errno.h>
#include <grp.h>
#include <pwd.h>
#include <sys/types.h>
#include <unistd.h>
#include "alpm.h"
#include "log.h"
#include "sandbox.h"
#include "sandbox_fs.h"
#include "util.h"
Include dependency graph for sandbox.c:

Functions

int alpm_sandbox_setup_child (alpm_handle_t *handle, const char *sandboxuser, const char *sandbox_path)
 Drop privileges by switching to a different user.
 
static int should_retry (int errnum)
 
static int read_from_pipe (int fd, void *buf, size_t count)
 
static int write_to_pipe (int fd, const void *buf, size_t count)
 

Function Documentation

◆ read_from_pipe()

static int read_from_pipe ( int fd,
void * buf,
size_t count )
static

References ASSERT, and should_retry().

◆ should_retry()

static int should_retry ( int errnum)
static

Referenced by read_from_pipe(), and write_to_pipe().

◆ write_to_pipe()

static int write_to_pipe ( int fd,
const void * buf,
size_t count )
static

References ASSERT, and should_retry().