• Home
  • History
  • Annotate
  • Raw
  • Download

Lines Matching refs:name

200 static void print_new_rule(const char *name, mode_t mode, uid_t uid, gid_t gid)  in print_new_rule()  argument
206 printf("%s %4o %4o %s %d %s %d\n", name, mode, mode, pw->pw_name, uid, in print_new_rule()
223 static int validate_file(const char *name, mode_t mode, uid_t uid, gid_t gid) in validate_file() argument
231 if (strcmp(name, pr->spec) == 0) { in validate_file()
241 printf("# WARNING # Multiple exact rules for file: %s\n", name); in validate_file()
245 print_new_rule(name, mode, uid, gid); in validate_file()
253 if ((strstr(name, pr->spec) == name) && in validate_file()
254 (!strchr(name + strlen(pr->spec), '/'))) { in validate_file()
265 if (strstr(name, pr->spec) == name) { in validate_file()
278 print_new_rule(name, mode, uid, gid); in validate_file()
284 static int validate_link(const char *name, mode_t mode, uid_t uid, gid_t gid) in validate_link() argument
293 if (strcmp(name, pr->spec) == 0) { in validate_link()
303 printf("# WARNING # Multiple exact rules for link: %s\n", name); in validate_link()
305 print_new_rule(name, mode, uid, gid); in validate_link()
312 static int validate_dir(const char *name, mode_t mode, uid_t uid, gid_t gid) in validate_dir() argument
320 if (strcmp(name, pr->spec) == 0) { in validate_dir()
330 printf("# WARNING # Multiple exact rules for directory: %s\n", name); in validate_dir()
334 print_new_rule(name, mode, uid, gid); in validate_dir()
340 if (strstr(name, pr->spec) == name) { in validate_dir()
353 print_new_rule(name, mode, uid, gid); in validate_dir()
359 static int check_path(const char *name) in check_path() argument
369 err = lstat(name, &s); in check_path()
373 perror(name); in check_path()
380 if (name[strlen(name) - 1] != '/') in check_path()
381 snprintf(namebuf, sizeof(namebuf), "%s/", name); in check_path()
383 snprintf(namebuf, sizeof(namebuf), "%s", name); in check_path()
401 return validate_link(name, PERMS(s.st_mode), s.st_uid, s.st_gid); in check_path()
403 return validate_file(name, PERMS(s.st_mode), s.st_uid, s.st_gid); in check_path()