common_path - Calls with invalid...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
/* * Calls with invalid pathnames */ #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <limits.h> #include <errno.h> #include <err.h> #include "config.h" #include "test.h" static int open_badpath(const char *path) { return open(path, O_RDONLY); } static int remove_badpath(const char *path) { return remove(path); } static int rename_badpath1(const char *path) { return rename(path, TESTFILE); } static int rename_badpath2(const char *path) { return rename(TESTFILE, path); } static int link_badpath1(const char *path) { return link(path, TESTFILE); } static int link_badpath2(const char *path) { return link(TESTFILE, path); }
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
static int mkdir_badpath(const char *path) { return mkdir(path, 0775); } static int rmdir_badpath(const char *path) { return rmdir(path); } static int chdir_badpath(const char *path) { return chdir(path); } static int symlink_badpath1(const char *path) { return symlink(path, TESTFILE); } static
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 4

common_path - Calls with invalid...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online