|
OpenVPN
|


Go to the source code of this file.
Functions | |
| WCHAR * | wide_string (const char *utf8, struct gc_arena *gc) |
| char * | utf16to8 (const wchar_t *utf16, struct gc_arena *gc) |
| bool | win_safe_filename (const char *fn) |
| const char * | win_get_tempdir (void) |
| bool | win_path_in_dir (const WCHAR *path, const WCHAR *dir) |
Check whether path resides within directory dir. | |
| char * utf16to8 | ( | const wchar_t * | utf16, |
| struct gc_arena * | gc | ||
| ) |
Definition at line 49 of file win32-util.c.
References gc, and gc_malloc().
Referenced by strerror_win32().
| WCHAR * wide_string | ( | const char * | utf8, |
| struct gc_arena * | gc | ||
| ) |
Definition at line 40 of file win32-util.c.
References gc, and gc_malloc().
Referenced by openvpn_execve(), platform_access(), platform_chdir(), platform_fopen(), platform_open(), platform_stat(), platform_unlink(), plugin_init_item(), redirect_stdout_stderr(), route_ipv6_ipapi(), wide_cmd_line(), and win32_signal_open().
| const char * win_get_tempdir | ( | void | ) |
Definition at line 150 of file win32-util.c.
References M_ERRNO, M_WARN, and msg.
Referenced by get_tmp_dir(), and init_options().
| bool win_path_in_dir | ( | const WCHAR * | path, |
| const WCHAR * | dir | ||
| ) |
Check whether path resides within directory dir.
Unlike a plain string prefix match, this requires the match to end on a path-component boundary, so that "C:\\foo_evil\\bar" is not considered to be inside "C:\\foo". Both arguments are expected to be normalized absolute paths. The comparison is case-insensitive.
path is inside dir, false otherwise. Definition at line 179 of file win32-util.c.
Referenced by plugin_in_trusted_dir(), and test_win_path_in_dir().
| bool win_safe_filename | ( | const char * | fn | ) |
Definition at line 116 of file win32-util.c.
References cmp_prefix().
Referenced by platform_gen_path().