OpenVPN
Functions
check_file_access.h File Reference
#include "options.h"
Include dependency graph for check_file_access.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool check_cmd_access (const char *command, const char *opt, const char *chroot)
 Verifies that the path in the "command" that comes after certain script options (e.g., –up) is a valid file with appropriate permissions.
 
void options_postprocess_filechecks (struct options *options)
 Sanity check of all file/dir options.
 

Function Documentation

◆ check_cmd_access()

bool check_cmd_access ( const char *  command,
const char *  opt,
const char *  chroot 
)

Verifies that the path in the "command" that comes after certain script options (e.g., –up) is a valid file with appropriate permissions.

"command" consists of a path, optionally followed by a space, which may be followed by arbitrary arguments. It is NOT a full shell command line – shell expansion is not performed.

The path and arguments in "command" may be single- or double-quoted or escaped.

The path is extracted from "command", then check_file_access() is called to check it. The arguments, if any, are ignored.

Note that the type, mode, and opt arguments to this routine are the same as the corresponding check_file_access() arguments.

Definition at line 214 of file check_file_access.c.

References argv::argv, argv_free(), argv_new(), argv_parse_cmd(), check_file_access_chroot(), CHKACC_FILE, M_NOPREFIX, M_OPTERR, and msg.

Referenced by set_user_script().

◆ options_postprocess_filechecks()

void options_postprocess_filechecks ( struct options *  options)