libexplain
1.4.D001
|
#include <libexplain/ac/assert.h>
#include <libexplain/ac/ctype.h>
#include <libexplain/ac/dirent.h>
#include <libexplain/ac/errno.h>
#include <libexplain/ac/fcntl.h>
#include <libexplain/ac/limits.h>
#include <libexplain/ac/stdlib.h>
#include <libexplain/ac/string.h>
#include <libexplain/ac/sys/param.h>
#include <libexplain/ac/sys/stat.h>
#include <libexplain/ac/unistd.h>
#include <libexplain/buffer/caption_name_type.h>
#include <libexplain/buffer/dac.h>
#include <libexplain/buffer/does_not_have_inode_modify_permission.h>
#include <libexplain/buffer/eexist.h>
#include <libexplain/buffer/errno/path_resolution.h>
#include <libexplain/buffer/file_type.h>
#include <libexplain/buffer/gettext.h>
#include <libexplain/buffer/mount_point.h>
#include <libexplain/buffer/uid.h>
#include <libexplain/buffer/wrong_file_type.h>
#include <libexplain/capability.h>
#include <libexplain/fstrcmp.h>
#include <libexplain/getppcwd.h>
#include <libexplain/have_permission.h>
#include <libexplain/name_max.h>
#include <libexplain/option.h>
#include <libexplain/symloopmax.h>
Go to the source code of this file.
Functions | |
static int | all_slash (const char *s) |
static void | look_for_similar (explain_string_buffer_t *sb, const char *lookup_directory, const char *component) |
static int | command_interpreter_broken (explain_string_buffer_t *sb, const char *pathname) |
static int | hash_bang (explain_string_buffer_t *sb, const char *pathname) |
static void | directory_does_not_exist (explain_string_buffer_t *sb, const char *caption, const char *dirname) |
static void | not_a_directory (explain_string_buffer_t *sb, const char *caption, const char *dir, const struct stat *st) |
static void | no_such_directory_entry (explain_string_buffer_t *sb, const char *comp, int comp_st_mode, const char *dir_caption, const char *dir, int dir_st_mode) |
static void | not_possible_to_execute (explain_string_buffer_t *sb, const char *caption, const char *name, int st_mode) |
static void | does_not_have_search_permission (explain_string_buffer_t *sb, const char *comp, const struct stat *comp_st, const char *caption, const char *dir, const struct stat *dir_st, const explain_have_identity_t *hip) |
static void | does_not_have_search_permission1 (explain_string_buffer_t *sb, const char *caption, const char *dir, const struct stat *dir_st, const explain_have_identity_t *hip) |
static void | does_not_have_execute_permission (explain_string_buffer_t *sb, const char *comp, const struct stat *comp_st, const char *caption, const char *dir, const struct stat *dir_st, const explain_have_identity_t *hip) |
static void | does_not_have_read_permission (explain_string_buffer_t *sb, const char *comp, const struct stat *comp_st, const char *caption, const char *dir, const struct stat *dir_st, const explain_have_identity_t *hip) |
static void | does_not_have_write_permission (explain_string_buffer_t *sb, const char *comp, const struct stat *comp_st, const char *caption, const char *dir, const struct stat *dir_st, const explain_have_identity_t *hip) |
static void | does_not_have_new_directory_entry_permission (explain_string_buffer_t *sb, const char *caption, const char *dir, const struct stat *dir_st, const char *comp, int comp_st_mode, const explain_have_identity_t *hip) |
static void | dangling_symbolic_link (explain_string_buffer_t *sb, const char *comp, int comp_st_mode, const char *caption, const char *dir, int dir_st_mode, const char *garbage) |
static void | name_too_long (explain_string_buffer_t *sb, const char *caption, const char *component, long comp_length, long name_max) |
static void | not_a_subdirectory (explain_string_buffer_t *sb, const char *comp, int comp_st_mode, const char *caption, const char *dir, int dir_st_mode) |
static void | wrong_file_type (explain_string_buffer_t *sb, const char *caption, const char *dir, int dir_st_mode, const char *comp, int comp_st_mode, int wanted_st_mode) |
static void | need_dir_write_for_remove_dir_entry (explain_string_buffer_t *sb, const char *dir_caption, const char *dir_name, int dir_type, const char *comp_name, int comp_type) |
static void | explain_sticky_bit_vs_unlink (explain_string_buffer_t *sb, const explain_have_identity_t *hip, const struct stat *dir_st, const struct stat *file_st) |
static int | current_directory_confusing (void) |
static int | is_ok_pathname_caption (const char *caption) |
int | explain_buffer_errno_path_resolution (explain_string_buffer_t *sb, int expected_errno, const char *initial_pathname, const char *caption, const explain_final_t *final_component) |
void | explain_final_init (explain_final_t *p) |
static int all_slash | ( | const char * | s | ) | [static] |
Definition at line 52 of file path_resolution.c.
static int command_interpreter_broken | ( | explain_string_buffer_t * | sb, |
const char * | pathname | ||
) | [static] |
Definition at line 149 of file path_resolution.c.
static int current_directory_confusing | ( | void | ) | [static] |
Definition at line 907 of file path_resolution.c.
static void dangling_symbolic_link | ( | explain_string_buffer_t * | sb, |
const char * | comp, | ||
int | comp_st_mode, | ||
const char * | caption, | ||
const char * | dir, | ||
int | dir_st_mode, | ||
const char * | garbage | ||
) | [static] |
Definition at line 636 of file path_resolution.c.
static void directory_does_not_exist | ( | explain_string_buffer_t * | sb, |
const char * | caption, | ||
const char * | dirname | ||
) | [static] |
Definition at line 254 of file path_resolution.c.
static void does_not_have_execute_permission | ( | explain_string_buffer_t * | sb, |
const char * | comp, | ||
const struct stat * | comp_st, | ||
const char * | caption, | ||
const char * | dir, | ||
const struct stat * | dir_st, | ||
const explain_have_identity_t * | hip | ||
) | [static] |
Definition at line 447 of file path_resolution.c.
static void does_not_have_new_directory_entry_permission | ( | explain_string_buffer_t * | sb, |
const char * | caption, | ||
const char * | dir, | ||
const struct stat * | dir_st, | ||
const char * | comp, | ||
int | comp_st_mode, | ||
const explain_have_identity_t * | hip | ||
) | [static] |
Definition at line 590 of file path_resolution.c.
static void does_not_have_read_permission | ( | explain_string_buffer_t * | sb, |
const char * | comp, | ||
const struct stat * | comp_st, | ||
const char * | caption, | ||
const char * | dir, | ||
const struct stat * | dir_st, | ||
const explain_have_identity_t * | hip | ||
) | [static] |
Definition at line 496 of file path_resolution.c.
static void does_not_have_search_permission | ( | explain_string_buffer_t * | sb, |
const char * | comp, | ||
const struct stat * | comp_st, | ||
const char * | caption, | ||
const char * | dir, | ||
const struct stat * | dir_st, | ||
const explain_have_identity_t * | hip | ||
) | [static] |
Definition at line 363 of file path_resolution.c.
static void does_not_have_search_permission1 | ( | explain_string_buffer_t * | sb, |
const char * | caption, | ||
const char * | dir, | ||
const struct stat * | dir_st, | ||
const explain_have_identity_t * | hip | ||
) | [static] |
Definition at line 410 of file path_resolution.c.
static void does_not_have_write_permission | ( | explain_string_buffer_t * | sb, |
const char * | comp, | ||
const struct stat * | comp_st, | ||
const char * | caption, | ||
const char * | dir, | ||
const struct stat * | dir_st, | ||
const explain_have_identity_t * | hip | ||
) | [static] |
Definition at line 543 of file path_resolution.c.
int explain_buffer_errno_path_resolution | ( | explain_string_buffer_t * | sb, |
int | errnum, | ||
const char * | pathname, | ||
const char * | pathname_caption, | ||
const explain_final_t * | final_component | ||
) |
The explain_buffer_errno_path_resolution function may be used to check a path for problems.
sb | The string buffer to write the error to, once it is found |
errnum | The error number expected. |
pathname | The path being checked. |
pathname_caption | The name of the argument being checked in the function arguments of the system call being deciphered. |
final_component | Flags controlling the final component |
Definition at line 952 of file path_resolution.c.
void explain_final_init | ( | explain_final_t * | final_component | ) |
The explain_final_init function is used to initialise all of the members of a explain_final_t struct to their defaults (usually 0).
final_component | Pointer to struct to be initialised. |
Definition at line 1992 of file path_resolution.c.
static void explain_sticky_bit_vs_unlink | ( | explain_string_buffer_t * | sb, |
const explain_have_identity_t * | hip, | ||
const struct stat * | dir_st, | ||
const struct stat * | file_st | ||
) | [static] |
Definition at line 853 of file path_resolution.c.
static int hash_bang | ( | explain_string_buffer_t * | sb, |
const char * | pathname | ||
) | [static] |
Definition at line 198 of file path_resolution.c.
static int is_ok_pathname_caption | ( | const char * | caption | ) | [static] |
Definition at line 927 of file path_resolution.c.
static void look_for_similar | ( | explain_string_buffer_t * | sb, |
const char * | lookup_directory, | ||
const char * | component | ||
) | [static] |
Definition at line 61 of file path_resolution.c.
static void name_too_long | ( | explain_string_buffer_t * | sb, |
const char * | caption, | ||
const char * | component, | ||
long | comp_length, | ||
long | name_max | ||
) | [static] |
Definition at line 697 of file path_resolution.c.
static void need_dir_write_for_remove_dir_entry | ( | explain_string_buffer_t * | sb, |
const char * | dir_caption, | ||
const char * | dir_name, | ||
int | dir_type, | ||
const char * | comp_name, | ||
int | comp_type | ||
) | [static] |
Definition at line 810 of file path_resolution.c.
static void no_such_directory_entry | ( | explain_string_buffer_t * | sb, |
const char * | comp, | ||
int | comp_st_mode, | ||
const char * | dir_caption, | ||
const char * | dir, | ||
int | dir_st_mode | ||
) | [static] |
Definition at line 292 of file path_resolution.c.
static void not_a_directory | ( | explain_string_buffer_t * | sb, |
const char * | caption, | ||
const char * | dir, | ||
const struct stat * | st | ||
) | [static] |
Definition at line 279 of file path_resolution.c.
static void not_a_subdirectory | ( | explain_string_buffer_t * | sb, |
const char * | comp, | ||
int | comp_st_mode, | ||
const char * | caption, | ||
const char * | dir, | ||
int | dir_st_mode | ||
) | [static] |
Definition at line 726 of file path_resolution.c.
static void not_possible_to_execute | ( | explain_string_buffer_t * | sb, |
const char * | caption, | ||
const char * | name, | ||
int | st_mode | ||
) | [static] |
Definition at line 335 of file path_resolution.c.
static void wrong_file_type | ( | explain_string_buffer_t * | sb, |
const char * | caption, | ||
const char * | dir, | ||
int | dir_st_mode, | ||
const char * | comp, | ||
int | comp_st_mode, | ||
int | wanted_st_mode | ||
) | [static] |
Definition at line 764 of file path_resolution.c.