Changeset View
Changeset View
Standalone View
Standalone View
tests/sys/audit/file-attribute-modify.c
Show All 27 Lines | |||||
#include <sys/types.h> | #include <sys/types.h> | ||||
#include <sys/extattr.h> | #include <sys/extattr.h> | ||||
#include <sys/file.h> | #include <sys/file.h> | ||||
#include <sys/mman.h> | #include <sys/mman.h> | ||||
#include <sys/stat.h> | #include <sys/stat.h> | ||||
#include <sys/time.h> | #include <sys/time.h> | ||||
#include <atf-c.h> | #include <atf-c.h> | ||||
#include <errno.h> | |||||
#include <fcntl.h> | #include <fcntl.h> | ||||
#include <stdint.h> | #include <stdint.h> | ||||
#include <unistd.h> | #include <unistd.h> | ||||
#include "utils.h" | #include "utils.h" | ||||
static pid_t pid; | static pid_t pid; | ||||
static uid_t uid = -1; | static uid_t uid = -1; | ||||
▲ Show 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | ATF_TC_HEAD(flock_failure, tc) | ||||
atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " | atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " | ||||
"flock(2) call"); | "flock(2) call"); | ||||
} | } | ||||
ATF_TC_BODY(flock_failure, tc) | ATF_TC_BODY(flock_failure, tc) | ||||
{ | { | ||||
const char *regex = "flock.*return,failure : Bad file descriptor"; | const char *regex = "flock.*return,failure : Bad file descriptor"; | ||||
FILE *pipefd = setup(fds, auclass); | FILE *pipefd = setup(fds, auclass); | ||||
ATF_REQUIRE_EQ(-1, flock(-1, LOCK_SH)); | ATF_REQUIRE_ERRNO(EBADF, flock(-1, LOCK_SH) == -1); | ||||
check_audit(fds, regex, pipefd); | check_audit(fds, regex, pipefd); | ||||
} | } | ||||
ATF_TC_CLEANUP(flock_failure, tc) | ATF_TC_CLEANUP(flock_failure, tc) | ||||
{ | { | ||||
cleanup(); | cleanup(); | ||||
} | } | ||||
Show All 32 Lines | ATF_TC_HEAD(fcntl_failure, tc) | ||||
atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " | atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " | ||||
"fcntl(2) call"); | "fcntl(2) call"); | ||||
} | } | ||||
ATF_TC_BODY(fcntl_failure, tc) | ATF_TC_BODY(fcntl_failure, tc) | ||||
{ | { | ||||
const char *regex = "fcntl.*return,failure : Bad file descriptor"; | const char *regex = "fcntl.*return,failure : Bad file descriptor"; | ||||
FILE *pipefd = setup(fds, auclass); | FILE *pipefd = setup(fds, auclass); | ||||
ATF_REQUIRE_EQ(-1, fcntl(-1, F_GETFL, 0)); | ATF_REQUIRE_ERRNO(EBADF, fcntl(-1, F_GETFL, 0) == -1); | ||||
check_audit(fds, regex, pipefd); | check_audit(fds, regex, pipefd); | ||||
} | } | ||||
ATF_TC_CLEANUP(fcntl_failure, tc) | ATF_TC_CLEANUP(fcntl_failure, tc) | ||||
{ | { | ||||
cleanup(); | cleanup(); | ||||
} | } | ||||
Show All 31 Lines | atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " | ||||
"fsync(2) call"); | "fsync(2) call"); | ||||
} | } | ||||
ATF_TC_BODY(fsync_failure, tc) | ATF_TC_BODY(fsync_failure, tc) | ||||
{ | { | ||||
const char *regex = "fsync.*return,failure : Bad file descriptor"; | const char *regex = "fsync.*return,failure : Bad file descriptor"; | ||||
FILE *pipefd = setup(fds, auclass); | FILE *pipefd = setup(fds, auclass); | ||||
/* Failure reason: Invalid file descriptor */ | /* Failure reason: Invalid file descriptor */ | ||||
ATF_REQUIRE_EQ(-1, fsync(-1)); | ATF_REQUIRE_ERRNO(EBADF, fsync(-1) == -1); | ||||
check_audit(fds, regex, pipefd); | check_audit(fds, regex, pipefd); | ||||
} | } | ||||
ATF_TC_CLEANUP(fsync_failure, tc) | ATF_TC_CLEANUP(fsync_failure, tc) | ||||
{ | { | ||||
cleanup(); | cleanup(); | ||||
} | } | ||||
Show All 27 Lines | ATF_TC_HEAD(chmod_failure, tc) | ||||
atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " | atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " | ||||
"chmod(2) call"); | "chmod(2) call"); | ||||
} | } | ||||
ATF_TC_BODY(chmod_failure, tc) | ATF_TC_BODY(chmod_failure, tc) | ||||
{ | { | ||||
FILE *pipefd = setup(fds, auclass); | FILE *pipefd = setup(fds, auclass); | ||||
/* Failure reason: file does not exist */ | /* Failure reason: file does not exist */ | ||||
ATF_REQUIRE_EQ(-1, chmod(errpath, mode)); | ATF_REQUIRE_ERRNO(ENOENT, chmod(errpath, mode) == -1); | ||||
check_audit(fds, failurereg, pipefd); | check_audit(fds, failurereg, pipefd); | ||||
} | } | ||||
ATF_TC_CLEANUP(chmod_failure, tc) | ATF_TC_CLEANUP(chmod_failure, tc) | ||||
{ | { | ||||
cleanup(); | cleanup(); | ||||
} | } | ||||
Show All 31 Lines | atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " | ||||
"fchmod(2) call"); | "fchmod(2) call"); | ||||
} | } | ||||
ATF_TC_BODY(fchmod_failure, tc) | ATF_TC_BODY(fchmod_failure, tc) | ||||
{ | { | ||||
const char *regex = "fchmod.*return,failure : Bad file descriptor"; | const char *regex = "fchmod.*return,failure : Bad file descriptor"; | ||||
FILE *pipefd = setup(fds, auclass); | FILE *pipefd = setup(fds, auclass); | ||||
/* Failure reason: Invalid file descriptor */ | /* Failure reason: Invalid file descriptor */ | ||||
ATF_REQUIRE_EQ(-1, fchmod(-1, mode)); | ATF_REQUIRE_ERRNO(EBADF, fchmod(-1, mode) == -1); | ||||
check_audit(fds, regex, pipefd); | check_audit(fds, regex, pipefd); | ||||
} | } | ||||
ATF_TC_CLEANUP(fchmod_failure, tc) | ATF_TC_CLEANUP(fchmod_failure, tc) | ||||
{ | { | ||||
cleanup(); | cleanup(); | ||||
} | } | ||||
Show All 26 Lines | ATF_TC_HEAD(lchmod_failure, tc) | ||||
atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " | atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " | ||||
"lchmod(2) call"); | "lchmod(2) call"); | ||||
} | } | ||||
ATF_TC_BODY(lchmod_failure, tc) | ATF_TC_BODY(lchmod_failure, tc) | ||||
{ | { | ||||
FILE *pipefd = setup(fds, auclass); | FILE *pipefd = setup(fds, auclass); | ||||
/* Failure reason: file does not exist */ | /* Failure reason: file does not exist */ | ||||
ATF_REQUIRE_EQ(-1, lchmod(errpath, mode)); | ATF_REQUIRE_ERRNO(ENOENT, lchmod(errpath, mode) == -1); | ||||
check_audit(fds, failurereg, pipefd); | check_audit(fds, failurereg, pipefd); | ||||
} | } | ||||
ATF_TC_CLEANUP(lchmod_failure, tc) | ATF_TC_CLEANUP(lchmod_failure, tc) | ||||
{ | { | ||||
cleanup(); | cleanup(); | ||||
} | } | ||||
Show All 27 Lines | ATF_TC_HEAD(fchmodat_failure, tc) | ||||
atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " | atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " | ||||
"fchmodat(2) call"); | "fchmodat(2) call"); | ||||
} | } | ||||
ATF_TC_BODY(fchmodat_failure, tc) | ATF_TC_BODY(fchmodat_failure, tc) | ||||
{ | { | ||||
FILE *pipefd = setup(fds, auclass); | FILE *pipefd = setup(fds, auclass); | ||||
/* Failure reason: file does not exist */ | /* Failure reason: file does not exist */ | ||||
ATF_REQUIRE_EQ(-1, fchmodat(AT_FDCWD, errpath, mode, 0)); | ATF_REQUIRE_ERRNO(ENOENT, fchmodat(AT_FDCWD, errpath, mode, 0) == -1); | ||||
check_audit(fds, failurereg, pipefd); | check_audit(fds, failurereg, pipefd); | ||||
} | } | ||||
ATF_TC_CLEANUP(fchmodat_failure, tc) | ATF_TC_CLEANUP(fchmodat_failure, tc) | ||||
{ | { | ||||
cleanup(); | cleanup(); | ||||
} | } | ||||
Show All 27 Lines | ATF_TC_HEAD(chown_failure, tc) | ||||
atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " | atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " | ||||
"chown(2) call"); | "chown(2) call"); | ||||
} | } | ||||
ATF_TC_BODY(chown_failure, tc) | ATF_TC_BODY(chown_failure, tc) | ||||
{ | { | ||||
FILE *pipefd = setup(fds, auclass); | FILE *pipefd = setup(fds, auclass); | ||||
/* Failure reason: file does not exist */ | /* Failure reason: file does not exist */ | ||||
ATF_REQUIRE_EQ(-1, chown(errpath, uid, gid)); | ATF_REQUIRE_ERRNO(ENOENT, chown(errpath, uid, gid) == -1); | ||||
check_audit(fds, failurereg, pipefd); | check_audit(fds, failurereg, pipefd); | ||||
} | } | ||||
ATF_TC_CLEANUP(chown_failure, tc) | ATF_TC_CLEANUP(chown_failure, tc) | ||||
{ | { | ||||
cleanup(); | cleanup(); | ||||
} | } | ||||
Show All 31 Lines | atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " | ||||
"fchown(2) call"); | "fchown(2) call"); | ||||
} | } | ||||
ATF_TC_BODY(fchown_failure, tc) | ATF_TC_BODY(fchown_failure, tc) | ||||
{ | { | ||||
const char *regex = "fchown.*return,failure : Bad file descriptor"; | const char *regex = "fchown.*return,failure : Bad file descriptor"; | ||||
FILE *pipefd = setup(fds, auclass); | FILE *pipefd = setup(fds, auclass); | ||||
/* Failure reason: Invalid file descriptor */ | /* Failure reason: Invalid file descriptor */ | ||||
ATF_REQUIRE_EQ(-1, fchown(-1, uid, gid)); | ATF_REQUIRE_ERRNO(EBADF, fchown(-1, uid, gid) == -1); | ||||
check_audit(fds, regex, pipefd); | check_audit(fds, regex, pipefd); | ||||
} | } | ||||
ATF_TC_CLEANUP(fchown_failure, tc) | ATF_TC_CLEANUP(fchown_failure, tc) | ||||
{ | { | ||||
cleanup(); | cleanup(); | ||||
} | } | ||||
Show All 26 Lines | ATF_TC_HEAD(lchown_failure, tc) | ||||
atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " | atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " | ||||
"lchown(2) call"); | "lchown(2) call"); | ||||
} | } | ||||
ATF_TC_BODY(lchown_failure, tc) | ATF_TC_BODY(lchown_failure, tc) | ||||
{ | { | ||||
FILE *pipefd = setup(fds, auclass); | FILE *pipefd = setup(fds, auclass); | ||||
/* Failure reason: Symbolic link does not exist */ | /* Failure reason: Symbolic link does not exist */ | ||||
ATF_REQUIRE_EQ(-1, lchown(errpath, uid, gid)); | ATF_REQUIRE_ERRNO(ENOENT, lchown(errpath, uid, gid) == -1); | ||||
check_audit(fds, failurereg, pipefd); | check_audit(fds, failurereg, pipefd); | ||||
} | } | ||||
ATF_TC_CLEANUP(lchown_failure, tc) | ATF_TC_CLEANUP(lchown_failure, tc) | ||||
{ | { | ||||
cleanup(); | cleanup(); | ||||
} | } | ||||
Show All 27 Lines | ATF_TC_HEAD(fchownat_failure, tc) | ||||
atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " | atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " | ||||
"fchownat(2) call"); | "fchownat(2) call"); | ||||
} | } | ||||
ATF_TC_BODY(fchownat_failure, tc) | ATF_TC_BODY(fchownat_failure, tc) | ||||
{ | { | ||||
FILE *pipefd = setup(fds, auclass); | FILE *pipefd = setup(fds, auclass); | ||||
/* Failure reason: file does not exist */ | /* Failure reason: file does not exist */ | ||||
ATF_REQUIRE_EQ(-1, fchownat(AT_FDCWD, errpath, uid, gid, 0)); | ATF_REQUIRE_ERRNO(ENOENT, | ||||
fchownat(AT_FDCWD, errpath, uid, gid, 0) == -1); | |||||
check_audit(fds, failurereg, pipefd); | check_audit(fds, failurereg, pipefd); | ||||
} | } | ||||
ATF_TC_CLEANUP(fchownat_failure, tc) | ATF_TC_CLEANUP(fchownat_failure, tc) | ||||
{ | { | ||||
cleanup(); | cleanup(); | ||||
} | } | ||||
Show All 27 Lines | ATF_TC_HEAD(chflags_failure, tc) | ||||
atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " | atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " | ||||
"chflags(2) call"); | "chflags(2) call"); | ||||
} | } | ||||
ATF_TC_BODY(chflags_failure, tc) | ATF_TC_BODY(chflags_failure, tc) | ||||
{ | { | ||||
FILE *pipefd = setup(fds, auclass); | FILE *pipefd = setup(fds, auclass); | ||||
/* Failure reason: file does not exist */ | /* Failure reason: file does not exist */ | ||||
ATF_REQUIRE_EQ(-1, chflags(errpath, UF_OFFLINE)); | ATF_REQUIRE_ERRNO(ENOENT, chflags(errpath, UF_OFFLINE) == -1); | ||||
check_audit(fds, failurereg, pipefd); | check_audit(fds, failurereg, pipefd); | ||||
} | } | ||||
ATF_TC_CLEANUP(chflags_failure, tc) | ATF_TC_CLEANUP(chflags_failure, tc) | ||||
{ | { | ||||
cleanup(); | cleanup(); | ||||
} | } | ||||
Show All 31 Lines | atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " | ||||
"fchflags(2) call"); | "fchflags(2) call"); | ||||
} | } | ||||
ATF_TC_BODY(fchflags_failure, tc) | ATF_TC_BODY(fchflags_failure, tc) | ||||
{ | { | ||||
const char *regex = "fchflags.*return,failure : Bad file descriptor"; | const char *regex = "fchflags.*return,failure : Bad file descriptor"; | ||||
FILE *pipefd = setup(fds, auclass); | FILE *pipefd = setup(fds, auclass); | ||||
/* Failure reason: Invalid file descriptor */ | /* Failure reason: Invalid file descriptor */ | ||||
ATF_REQUIRE_EQ(-1, fchflags(-1, UF_OFFLINE)); | ATF_REQUIRE_ERRNO(EBADF, fchflags(-1, UF_OFFLINE) == -1); | ||||
check_audit(fds, regex, pipefd); | check_audit(fds, regex, pipefd); | ||||
} | } | ||||
ATF_TC_CLEANUP(fchflags_failure, tc) | ATF_TC_CLEANUP(fchflags_failure, tc) | ||||
{ | { | ||||
cleanup(); | cleanup(); | ||||
} | } | ||||
Show All 26 Lines | ATF_TC_HEAD(lchflags_failure, tc) | ||||
atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " | atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " | ||||
"lchflags(2) call"); | "lchflags(2) call"); | ||||
} | } | ||||
ATF_TC_BODY(lchflags_failure, tc) | ATF_TC_BODY(lchflags_failure, tc) | ||||
{ | { | ||||
FILE *pipefd = setup(fds, auclass); | FILE *pipefd = setup(fds, auclass); | ||||
/* Failure reason: Symbolic link does not exist */ | /* Failure reason: Symbolic link does not exist */ | ||||
ATF_REQUIRE_EQ(-1, lchflags(errpath, UF_OFFLINE)); | ATF_REQUIRE_ERRNO(ENOENT, lchflags(errpath, UF_OFFLINE) == -1); | ||||
check_audit(fds, failurereg, pipefd); | check_audit(fds, failurereg, pipefd); | ||||
} | } | ||||
ATF_TC_CLEANUP(lchflags_failure, tc) | ATF_TC_CLEANUP(lchflags_failure, tc) | ||||
{ | { | ||||
cleanup(); | cleanup(); | ||||
} | } | ||||
Show All 27 Lines | ATF_TC_HEAD(chflagsat_failure, tc) | ||||
atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " | atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " | ||||
"chflagsat(2) call"); | "chflagsat(2) call"); | ||||
} | } | ||||
ATF_TC_BODY(chflagsat_failure, tc) | ATF_TC_BODY(chflagsat_failure, tc) | ||||
{ | { | ||||
FILE *pipefd = setup(fds, auclass); | FILE *pipefd = setup(fds, auclass); | ||||
/* Failure reason: file does not exist */ | /* Failure reason: file does not exist */ | ||||
ATF_REQUIRE_EQ(-1, chflagsat(AT_FDCWD, errpath, UF_OFFLINE, 0)); | ATF_REQUIRE_ERRNO(ENOENT, | ||||
chflagsat(AT_FDCWD, errpath, UF_OFFLINE, 0) == -1); | |||||
check_audit(fds, failurereg, pipefd); | check_audit(fds, failurereg, pipefd); | ||||
} | } | ||||
ATF_TC_CLEANUP(chflagsat_failure, tc) | ATF_TC_CLEANUP(chflagsat_failure, tc) | ||||
{ | { | ||||
cleanup(); | cleanup(); | ||||
} | } | ||||
Show All 27 Lines | ATF_TC_HEAD(utimes_failure, tc) | ||||
atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " | atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " | ||||
"utimes(2) call"); | "utimes(2) call"); | ||||
} | } | ||||
ATF_TC_BODY(utimes_failure, tc) | ATF_TC_BODY(utimes_failure, tc) | ||||
{ | { | ||||
FILE *pipefd = setup(fds, auclass); | FILE *pipefd = setup(fds, auclass); | ||||
/* Failure reason: file does not exist */ | /* Failure reason: file does not exist */ | ||||
ATF_REQUIRE_EQ(-1, utimes(errpath, NULL)); | ATF_REQUIRE_ERRNO(ENOENT, utimes(errpath, NULL) == -1); | ||||
check_audit(fds, failurereg, pipefd); | check_audit(fds, failurereg, pipefd); | ||||
} | } | ||||
ATF_TC_CLEANUP(utimes_failure, tc) | ATF_TC_CLEANUP(utimes_failure, tc) | ||||
{ | { | ||||
cleanup(); | cleanup(); | ||||
} | } | ||||
Show All 31 Lines | atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " | ||||
"futimes(2) call"); | "futimes(2) call"); | ||||
} | } | ||||
ATF_TC_BODY(futimes_failure, tc) | ATF_TC_BODY(futimes_failure, tc) | ||||
{ | { | ||||
const char *regex = "futimes.*return,failure : Bad file descriptor"; | const char *regex = "futimes.*return,failure : Bad file descriptor"; | ||||
FILE *pipefd = setup(fds, auclass); | FILE *pipefd = setup(fds, auclass); | ||||
/* Failure reason: Invalid file descriptor */ | /* Failure reason: Invalid file descriptor */ | ||||
ATF_REQUIRE_EQ(-1, futimes(-1, NULL)); | ATF_REQUIRE_ERRNO(EBADF, futimes(-1, NULL) == -1); | ||||
check_audit(fds, regex, pipefd); | check_audit(fds, regex, pipefd); | ||||
} | } | ||||
ATF_TC_CLEANUP(futimes_failure, tc) | ATF_TC_CLEANUP(futimes_failure, tc) | ||||
{ | { | ||||
cleanup(); | cleanup(); | ||||
} | } | ||||
Show All 26 Lines | ATF_TC_HEAD(lutimes_failure, tc) | ||||
atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " | atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " | ||||
"lutimes(2) call"); | "lutimes(2) call"); | ||||
} | } | ||||
ATF_TC_BODY(lutimes_failure, tc) | ATF_TC_BODY(lutimes_failure, tc) | ||||
{ | { | ||||
FILE *pipefd = setup(fds, auclass); | FILE *pipefd = setup(fds, auclass); | ||||
/* Failure reason: symbolic link does not exist */ | /* Failure reason: symbolic link does not exist */ | ||||
ATF_REQUIRE_EQ(-1, lutimes(errpath, NULL)); | ATF_REQUIRE_ERRNO(ENOENT, lutimes(errpath, NULL) == -1); | ||||
check_audit(fds, failurereg, pipefd); | check_audit(fds, failurereg, pipefd); | ||||
} | } | ||||
ATF_TC_CLEANUP(lutimes_failure, tc) | ATF_TC_CLEANUP(lutimes_failure, tc) | ||||
{ | { | ||||
cleanup(); | cleanup(); | ||||
} | } | ||||
Show All 27 Lines | ATF_TC_HEAD(futimesat_failure, tc) | ||||
atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " | atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " | ||||
"futimesat(2) call"); | "futimesat(2) call"); | ||||
} | } | ||||
ATF_TC_BODY(futimesat_failure, tc) | ATF_TC_BODY(futimesat_failure, tc) | ||||
{ | { | ||||
FILE *pipefd = setup(fds, auclass); | FILE *pipefd = setup(fds, auclass); | ||||
/* Failure reason: file does not exist */ | /* Failure reason: file does not exist */ | ||||
ATF_REQUIRE_EQ(-1, futimesat(AT_FDCWD, errpath, NULL)); | ATF_REQUIRE_ERRNO(ENOENT, futimesat(AT_FDCWD, errpath, NULL) == -1); | ||||
check_audit(fds, failurereg, pipefd); | check_audit(fds, failurereg, pipefd); | ||||
} | } | ||||
ATF_TC_CLEANUP(futimesat_failure, tc) | ATF_TC_CLEANUP(futimesat_failure, tc) | ||||
{ | { | ||||
cleanup(); | cleanup(); | ||||
} | } | ||||
Show All 27 Lines | ATF_TC_HEAD(mprotect_failure, tc) | ||||
atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " | atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " | ||||
"mprotect(2) call"); | "mprotect(2) call"); | ||||
} | } | ||||
ATF_TC_BODY(mprotect_failure, tc) | ATF_TC_BODY(mprotect_failure, tc) | ||||
{ | { | ||||
const char *regex = "mprotect.*return,failure : Invalid argument"; | const char *regex = "mprotect.*return,failure : Invalid argument"; | ||||
FILE *pipefd = setup(fds, auclass); | FILE *pipefd = setup(fds, auclass); | ||||
ATF_REQUIRE_EQ(-1, mprotect((void *)SIZE_MAX, -1, PROT_NONE)); | ATF_REQUIRE_ERRNO(EINVAL, | ||||
mprotect((void *)SIZE_MAX, -1, PROT_NONE) == -1); | |||||
check_audit(fds, regex, pipefd); | check_audit(fds, regex, pipefd); | ||||
} | } | ||||
ATF_TC_CLEANUP(mprotect_failure, tc) | ATF_TC_CLEANUP(mprotect_failure, tc) | ||||
{ | { | ||||
cleanup(); | cleanup(); | ||||
} | } | ||||
Show All 11 Lines | |||||
ATF_TC_BODY(undelete_failure, tc) | ATF_TC_BODY(undelete_failure, tc) | ||||
{ | { | ||||
pid = getpid(); | pid = getpid(); | ||||
snprintf(extregex, sizeof(extregex), "undelete.*%d.*ret.*failure", pid); | snprintf(extregex, sizeof(extregex), "undelete.*%d.*ret.*failure", pid); | ||||
FILE *pipefd = setup(fds, auclass); | FILE *pipefd = setup(fds, auclass); | ||||
/* Failure reason: File does not exist */ | /* Failure reason: File does not exist */ | ||||
ATF_REQUIRE_EQ(-1, undelete(errpath)); | ATF_REQUIRE_ERRNO(ENOENT, undelete(errpath) == -1); | ||||
check_audit(fds, extregex, pipefd); | check_audit(fds, extregex, pipefd); | ||||
} | } | ||||
ATF_TC_CLEANUP(undelete_failure, tc) | ATF_TC_CLEANUP(undelete_failure, tc) | ||||
{ | { | ||||
cleanup(); | cleanup(); | ||||
} | } | ||||
ATF_TC_WITH_CLEANUP(extattr_set_file_success); | ATF_TC_WITH_CLEANUP(extattr_set_file_success); | ||||
ATF_TC_HEAD(extattr_set_file_success, tc) | ATF_TC_HEAD(extattr_set_file_success, tc) | ||||
{ | { | ||||
atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " | atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " | ||||
"extattr_set_file(2) call"); | "extattr_set_file(2) call"); | ||||
} | } | ||||
ATF_TC_BODY(extattr_set_file_success, tc) | ATF_TC_BODY(extattr_set_file_success, tc) | ||||
{ | { | ||||
/* File needs to exist to call extattr_set_file(2) */ | /* File needs to exist to call extattr_set_file(2) */ | ||||
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1); | ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1); | ||||
skip_if_extattr_not_supported(path); | |||||
/* Prepare the regex to be checked in the audit record */ | /* Prepare the regex to be checked in the audit record */ | ||||
snprintf(extregex, sizeof(extregex), | snprintf(extregex, sizeof(extregex), | ||||
"extattr_set_file.*%s.*%s.*return,success", path, name); | "extattr_set_file.*%s.*%s.*return,success", path, name); | ||||
FILE *pipefd = setup(fds, auclass); | FILE *pipefd = setup(fds, auclass); | ||||
ATF_REQUIRE_EQ(sizeof(buff), extattr_set_file(path, | REQUIRE_EXTATTR_RESULT(sizeof(buff), extattr_set_file(path, | ||||
EXTATTR_NAMESPACE_USER, name, buff, sizeof(buff))); | EXTATTR_NAMESPACE_USER, name, buff, sizeof(buff))); | ||||
check_audit(fds, extregex, pipefd); | check_audit(fds, extregex, pipefd); | ||||
close(filedesc); | close(filedesc); | ||||
} | } | ||||
ATF_TC_CLEANUP(extattr_set_file_success, tc) | ATF_TC_CLEANUP(extattr_set_file_success, tc) | ||||
{ | { | ||||
cleanup(); | cleanup(); | ||||
Show All 10 Lines | |||||
ATF_TC_BODY(extattr_set_file_failure, tc) | ATF_TC_BODY(extattr_set_file_failure, tc) | ||||
{ | { | ||||
/* Prepare the regex to be checked in the audit record */ | /* Prepare the regex to be checked in the audit record */ | ||||
snprintf(extregex, sizeof(extregex), | snprintf(extregex, sizeof(extregex), | ||||
"extattr_set_file.*%s.*%s.*failure", path, name); | "extattr_set_file.*%s.*%s.*failure", path, name); | ||||
FILE *pipefd = setup(fds, auclass); | FILE *pipefd = setup(fds, auclass); | ||||
/* Failure reason: file does not exist */ | /* Failure reason: file does not exist */ | ||||
ATF_REQUIRE_EQ(-1, extattr_set_file(path, | ATF_REQUIRE_ERRNO(ENOENT, | ||||
EXTATTR_NAMESPACE_USER, name, NULL, 0)); | extattr_set_file(path, EXTATTR_NAMESPACE_USER, name, NULL, 0) == | ||||
-1); | |||||
check_audit(fds, extregex, pipefd); | check_audit(fds, extregex, pipefd); | ||||
} | } | ||||
ATF_TC_CLEANUP(extattr_set_file_failure, tc) | ATF_TC_CLEANUP(extattr_set_file_failure, tc) | ||||
{ | { | ||||
cleanup(); | cleanup(); | ||||
} | } | ||||
ATF_TC_WITH_CLEANUP(extattr_set_fd_success); | ATF_TC_WITH_CLEANUP(extattr_set_fd_success); | ||||
ATF_TC_HEAD(extattr_set_fd_success, tc) | ATF_TC_HEAD(extattr_set_fd_success, tc) | ||||
{ | { | ||||
atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " | atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " | ||||
"extattr_set_fd(2) call"); | "extattr_set_fd(2) call"); | ||||
} | } | ||||
ATF_TC_BODY(extattr_set_fd_success, tc) | ATF_TC_BODY(extattr_set_fd_success, tc) | ||||
{ | { | ||||
/* File needs to exist to call extattr_set_fd(2) */ | /* File needs to exist to call extattr_set_fd(2) */ | ||||
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1); | ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1); | ||||
skip_if_extattr_not_supported(path); | |||||
/* Prepare the regex to be checked in the audit record */ | /* Prepare the regex to be checked in the audit record */ | ||||
snprintf(extregex, sizeof(extregex), | snprintf(extregex, sizeof(extregex), | ||||
"extattr_set_fd.*%s.*return,success", name); | "extattr_set_fd.*%s.*return,success", name); | ||||
FILE *pipefd = setup(fds, auclass); | FILE *pipefd = setup(fds, auclass); | ||||
ATF_REQUIRE_EQ(sizeof(buff), extattr_set_fd(filedesc, | REQUIRE_EXTATTR_RESULT(sizeof(buff), extattr_set_fd(filedesc, | ||||
EXTATTR_NAMESPACE_USER, name, buff, sizeof(buff))); | EXTATTR_NAMESPACE_USER, name, buff, sizeof(buff))); | ||||
check_audit(fds, extregex, pipefd); | check_audit(fds, extregex, pipefd); | ||||
close(filedesc); | close(filedesc); | ||||
} | } | ||||
ATF_TC_CLEANUP(extattr_set_fd_success, tc) | ATF_TC_CLEANUP(extattr_set_fd_success, tc) | ||||
{ | { | ||||
cleanup(); | cleanup(); | ||||
Show All 10 Lines | |||||
ATF_TC_BODY(extattr_set_fd_failure, tc) | ATF_TC_BODY(extattr_set_fd_failure, tc) | ||||
{ | { | ||||
/* Prepare the regex to be checked in the audit record */ | /* Prepare the regex to be checked in the audit record */ | ||||
snprintf(extregex, sizeof(extregex), | snprintf(extregex, sizeof(extregex), | ||||
"extattr_set_fd.*%s.*return,failure : Bad file descriptor", name); | "extattr_set_fd.*%s.*return,failure : Bad file descriptor", name); | ||||
FILE *pipefd = setup(fds, auclass); | FILE *pipefd = setup(fds, auclass); | ||||
/* Failure reason: Invalid file descriptor */ | /* Failure reason: Invalid file descriptor */ | ||||
ATF_REQUIRE_EQ(-1, extattr_set_fd(-1, | ATF_REQUIRE_ERRNO(EBADF, | ||||
EXTATTR_NAMESPACE_USER, name, NULL, 0)); | extattr_set_fd(-1, EXTATTR_NAMESPACE_USER, name, NULL, 0) == -1); | ||||
check_audit(fds, extregex, pipefd); | check_audit(fds, extregex, pipefd); | ||||
} | } | ||||
ATF_TC_CLEANUP(extattr_set_fd_failure, tc) | ATF_TC_CLEANUP(extattr_set_fd_failure, tc) | ||||
{ | { | ||||
cleanup(); | cleanup(); | ||||
} | } | ||||
ATF_TC_WITH_CLEANUP(extattr_set_link_success); | ATF_TC_WITH_CLEANUP(extattr_set_link_success); | ||||
ATF_TC_HEAD(extattr_set_link_success, tc) | ATF_TC_HEAD(extattr_set_link_success, tc) | ||||
{ | { | ||||
atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " | atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " | ||||
"extattr_set_link(2) call"); | "extattr_set_link(2) call"); | ||||
} | } | ||||
ATF_TC_BODY(extattr_set_link_success, tc) | ATF_TC_BODY(extattr_set_link_success, tc) | ||||
{ | { | ||||
/* Symbolic link needs to exist to call extattr_set_link(2) */ | /* Symbolic link needs to exist to call extattr_set_link(2) */ | ||||
ATF_REQUIRE_EQ(0, symlink("symlink", path)); | ATF_REQUIRE_EQ(0, symlink("symlink", path)); | ||||
skip_if_extattr_not_supported("."); | |||||
/* Prepare the regex to be checked in the audit record */ | /* Prepare the regex to be checked in the audit record */ | ||||
snprintf(extregex, sizeof(extregex), | snprintf(extregex, sizeof(extregex), | ||||
"extattr_set_link.*%s.*%s.*return,success", path, name); | "extattr_set_link.*%s.*%s.*return,success", path, name); | ||||
FILE *pipefd = setup(fds, auclass); | FILE *pipefd = setup(fds, auclass); | ||||
ATF_REQUIRE_EQ(sizeof(buff), extattr_set_link(path, | REQUIRE_EXTATTR_RESULT(sizeof(buff), extattr_set_link(path, | ||||
EXTATTR_NAMESPACE_USER, name, buff, sizeof(buff))); | EXTATTR_NAMESPACE_USER, name, buff, sizeof(buff))); | ||||
check_audit(fds, extregex, pipefd); | check_audit(fds, extregex, pipefd); | ||||
} | } | ||||
ATF_TC_CLEANUP(extattr_set_link_success, tc) | ATF_TC_CLEANUP(extattr_set_link_success, tc) | ||||
{ | { | ||||
cleanup(); | cleanup(); | ||||
Show All 9 Lines | |||||
ATF_TC_BODY(extattr_set_link_failure, tc) | ATF_TC_BODY(extattr_set_link_failure, tc) | ||||
{ | { | ||||
/* Prepare the regex to be checked in the audit record */ | /* Prepare the regex to be checked in the audit record */ | ||||
snprintf(extregex, sizeof(extregex), | snprintf(extregex, sizeof(extregex), | ||||
"extattr_set_link.*%s.*%s.*failure", path, name); | "extattr_set_link.*%s.*%s.*failure", path, name); | ||||
FILE *pipefd = setup(fds, auclass); | FILE *pipefd = setup(fds, auclass); | ||||
/* Failure reason: symbolic link does not exist */ | /* Failure reason: symbolic link does not exist */ | ||||
ATF_REQUIRE_EQ(-1, extattr_set_link(path, | ATF_REQUIRE_ERRNO(ENOENT, | ||||
EXTATTR_NAMESPACE_USER, name, NULL, 0)); | extattr_set_link(path, EXTATTR_NAMESPACE_USER, name, NULL, 0) == | ||||
-1); | |||||
check_audit(fds, extregex, pipefd); | check_audit(fds, extregex, pipefd); | ||||
} | } | ||||
ATF_TC_CLEANUP(extattr_set_link_failure, tc) | ATF_TC_CLEANUP(extattr_set_link_failure, tc) | ||||
{ | { | ||||
cleanup(); | cleanup(); | ||||
} | } | ||||
ATF_TC_WITH_CLEANUP(extattr_delete_file_success); | ATF_TC_WITH_CLEANUP(extattr_delete_file_success); | ||||
ATF_TC_HEAD(extattr_delete_file_success, tc) | ATF_TC_HEAD(extattr_delete_file_success, tc) | ||||
{ | { | ||||
atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " | atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " | ||||
"extattr_delete_file(2) call"); | "extattr_delete_file(2) call"); | ||||
} | } | ||||
ATF_TC_BODY(extattr_delete_file_success, tc) | ATF_TC_BODY(extattr_delete_file_success, tc) | ||||
{ | { | ||||
/* File needs to exist to call extattr_delete_file(2) */ | /* File needs to exist to call extattr_delete_file(2) */ | ||||
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1); | ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1); | ||||
ATF_REQUIRE_EQ(sizeof(buff), extattr_set_file(path, | skip_if_extattr_not_supported(path); | ||||
REQUIRE_EXTATTR_RESULT(sizeof(buff), extattr_set_file(path, | |||||
EXTATTR_NAMESPACE_USER, name, buff, sizeof(buff))); | EXTATTR_NAMESPACE_USER, name, buff, sizeof(buff))); | ||||
FILE *pipefd = setup(fds, auclass); | FILE *pipefd = setup(fds, auclass); | ||||
ATF_REQUIRE((retval = extattr_delete_file(path, | retval = REQUIRE_EXTATTR_SUCCESS( | ||||
EXTATTR_NAMESPACE_USER, name)) != -1); | extattr_delete_file(path, EXTATTR_NAMESPACE_USER, name)); | ||||
/* Prepare the regex to be checked in the audit record */ | /* Prepare the regex to be checked in the audit record */ | ||||
snprintf(extregex, sizeof(extregex), | snprintf(extregex, sizeof(extregex), | ||||
"extattr_delete_file.*%s.*return,success,%d", path, retval); | "extattr_delete_file.*%s.*return,success,%d", path, retval); | ||||
check_audit(fds, extregex, pipefd); | check_audit(fds, extregex, pipefd); | ||||
close(filedesc); | close(filedesc); | ||||
} | } | ||||
ATF_TC_CLEANUP(extattr_delete_file_success, tc) | ATF_TC_CLEANUP(extattr_delete_file_success, tc) | ||||
Show All 12 Lines | |||||
ATF_TC_BODY(extattr_delete_file_failure, tc) | ATF_TC_BODY(extattr_delete_file_failure, tc) | ||||
{ | { | ||||
/* Prepare the regex to be checked in the audit record */ | /* Prepare the regex to be checked in the audit record */ | ||||
snprintf(extregex, sizeof(extregex), | snprintf(extregex, sizeof(extregex), | ||||
"extattr_delete_file.*%s.*return,failure", path); | "extattr_delete_file.*%s.*return,failure", path); | ||||
FILE *pipefd = setup(fds, auclass); | FILE *pipefd = setup(fds, auclass); | ||||
/* Failure reason: file does not exist */ | /* Failure reason: file does not exist */ | ||||
ATF_REQUIRE_EQ(-1, extattr_delete_file(path, | ATF_REQUIRE_ERRNO(ENOENT, | ||||
EXTATTR_NAMESPACE_USER, name)); | extattr_delete_file(path, EXTATTR_NAMESPACE_USER, name) == -1); | ||||
check_audit(fds, extregex, pipefd); | check_audit(fds, extregex, pipefd); | ||||
} | } | ||||
ATF_TC_CLEANUP(extattr_delete_file_failure, tc) | ATF_TC_CLEANUP(extattr_delete_file_failure, tc) | ||||
{ | { | ||||
cleanup(); | cleanup(); | ||||
} | } | ||||
ATF_TC_WITH_CLEANUP(extattr_delete_fd_success); | ATF_TC_WITH_CLEANUP(extattr_delete_fd_success); | ||||
ATF_TC_HEAD(extattr_delete_fd_success, tc) | ATF_TC_HEAD(extattr_delete_fd_success, tc) | ||||
{ | { | ||||
atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " | atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " | ||||
"extattr_delete_fd(2) call"); | "extattr_delete_fd(2) call"); | ||||
} | } | ||||
ATF_TC_BODY(extattr_delete_fd_success, tc) | ATF_TC_BODY(extattr_delete_fd_success, tc) | ||||
{ | { | ||||
/* File needs to exist to call extattr_delete_fd(2) */ | /* File needs to exist to call extattr_delete_fd(2) */ | ||||
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1); | ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1); | ||||
ATF_REQUIRE_EQ(sizeof(buff), extattr_set_file(path, | skip_if_extattr_not_supported(path); | ||||
REQUIRE_EXTATTR_RESULT(sizeof(buff), extattr_set_file(path, | |||||
EXTATTR_NAMESPACE_USER, name, buff, sizeof(buff))); | EXTATTR_NAMESPACE_USER, name, buff, sizeof(buff))); | ||||
FILE *pipefd = setup(fds, auclass); | FILE *pipefd = setup(fds, auclass); | ||||
ATF_REQUIRE((retval = extattr_delete_fd(filedesc, | retval = REQUIRE_EXTATTR_SUCCESS(extattr_delete_fd(filedesc, | ||||
EXTATTR_NAMESPACE_USER, name)) != -1); | EXTATTR_NAMESPACE_USER, name)); | ||||
/* Prepare the regex to be checked in the audit record */ | /* Prepare the regex to be checked in the audit record */ | ||||
snprintf(extregex, sizeof(extregex), | snprintf(extregex, sizeof(extregex), | ||||
"extattr_delete_fd.*return,success,%d", retval); | "extattr_delete_fd.*return,success,%d", retval); | ||||
check_audit(fds, extregex, pipefd); | check_audit(fds, extregex, pipefd); | ||||
close(filedesc); | close(filedesc); | ||||
} | } | ||||
ATF_TC_CLEANUP(extattr_delete_fd_success, tc) | ATF_TC_CLEANUP(extattr_delete_fd_success, tc) | ||||
Show All 12 Lines | |||||
ATF_TC_BODY(extattr_delete_fd_failure, tc) | ATF_TC_BODY(extattr_delete_fd_failure, tc) | ||||
{ | { | ||||
/* Prepare the regex to be checked in the audit record */ | /* Prepare the regex to be checked in the audit record */ | ||||
snprintf(extregex, sizeof(extregex), | snprintf(extregex, sizeof(extregex), | ||||
"extattr_delete_fd.*return,failure : Bad file descriptor"); | "extattr_delete_fd.*return,failure : Bad file descriptor"); | ||||
FILE *pipefd = setup(fds, auclass); | FILE *pipefd = setup(fds, auclass); | ||||
/* Failure reason: Invalid file descriptor */ | /* Failure reason: Invalid file descriptor */ | ||||
ATF_REQUIRE_EQ(-1, extattr_delete_fd(-1, EXTATTR_NAMESPACE_USER, name)); | ATF_REQUIRE_ERRNO(EBADF, | ||||
extattr_delete_fd(-1, EXTATTR_NAMESPACE_USER, name) == -1); | |||||
check_audit(fds, extregex, pipefd); | check_audit(fds, extregex, pipefd); | ||||
} | } | ||||
ATF_TC_CLEANUP(extattr_delete_fd_failure, tc) | ATF_TC_CLEANUP(extattr_delete_fd_failure, tc) | ||||
{ | { | ||||
cleanup(); | cleanup(); | ||||
} | } | ||||
ATF_TC_WITH_CLEANUP(extattr_delete_link_success); | ATF_TC_WITH_CLEANUP(extattr_delete_link_success); | ||||
ATF_TC_HEAD(extattr_delete_link_success, tc) | ATF_TC_HEAD(extattr_delete_link_success, tc) | ||||
{ | { | ||||
atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " | atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " | ||||
"extattr_delete_link(2) call"); | "extattr_delete_link(2) call"); | ||||
} | } | ||||
ATF_TC_BODY(extattr_delete_link_success, tc) | ATF_TC_BODY(extattr_delete_link_success, tc) | ||||
{ | { | ||||
/* Symbolic link needs to exist to call extattr_delete_link(2) */ | /* Symbolic link needs to exist to call extattr_delete_link(2) */ | ||||
ATF_REQUIRE_EQ(0, symlink("symlink", path)); | ATF_REQUIRE_EQ(0, symlink("symlink", path)); | ||||
ATF_REQUIRE_EQ(sizeof(buff), extattr_set_link(path, | skip_if_extattr_not_supported("."); | ||||
REQUIRE_EXTATTR_RESULT(sizeof(buff), extattr_set_link(path, | |||||
EXTATTR_NAMESPACE_USER, name, buff, sizeof(buff))); | EXTATTR_NAMESPACE_USER, name, buff, sizeof(buff))); | ||||
FILE *pipefd = setup(fds, auclass); | FILE *pipefd = setup(fds, auclass); | ||||
ATF_REQUIRE((retval = extattr_delete_link(path, | retval = REQUIRE_EXTATTR_SUCCESS(extattr_delete_link(path, | ||||
EXTATTR_NAMESPACE_USER, name)) != -1); | EXTATTR_NAMESPACE_USER, name)); | ||||
/* Prepare the regex to be checked in the audit record */ | /* Prepare the regex to be checked in the audit record */ | ||||
snprintf(extregex, sizeof(extregex), | snprintf(extregex, sizeof(extregex), | ||||
"extattr_delete_link.*%s.*return,success,%d", path, retval); | "extattr_delete_link.*%s.*return,success,%d", path, retval); | ||||
check_audit(fds, extregex, pipefd); | check_audit(fds, extregex, pipefd); | ||||
} | } | ||||
ATF_TC_CLEANUP(extattr_delete_link_success, tc) | ATF_TC_CLEANUP(extattr_delete_link_success, tc) | ||||
{ | { | ||||
Show All 10 Lines | |||||
ATF_TC_BODY(extattr_delete_link_failure, tc) | ATF_TC_BODY(extattr_delete_link_failure, tc) | ||||
{ | { | ||||
/* Prepare the regex to be checked in the audit record */ | /* Prepare the regex to be checked in the audit record */ | ||||
snprintf(extregex, sizeof(extregex), | snprintf(extregex, sizeof(extregex), | ||||
"extattr_delete_link.*%s.*failure", path); | "extattr_delete_link.*%s.*failure", path); | ||||
FILE *pipefd = setup(fds, auclass); | FILE *pipefd = setup(fds, auclass); | ||||
/* Failure reason: symbolic link does not exist */ | /* Failure reason: symbolic link does not exist */ | ||||
ATF_REQUIRE_EQ(-1, extattr_delete_link(path, | ATF_REQUIRE_ERRNO(ENOENT, | ||||
EXTATTR_NAMESPACE_USER, name)); | extattr_delete_link(path, EXTATTR_NAMESPACE_USER, name) == -1); | ||||
check_audit(fds, extregex, pipefd); | check_audit(fds, extregex, pipefd); | ||||
} | } | ||||
ATF_TC_CLEANUP(extattr_delete_link_failure, tc) | ATF_TC_CLEANUP(extattr_delete_link_failure, tc) | ||||
{ | { | ||||
cleanup(); | cleanup(); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 66 Lines • Show Last 20 Lines |