Date: Wed, 26 Jan 2005 01:25:20 GMT From: Wayne Salamon <wsalamon@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 69741 for review Message-ID: <200501260125.j0Q1PK5K097143@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=69741 Change 69741 by wsalamon@rickenbacker on 2005/01/26 01:24:47 Update for include paths; remove Darwin-specific code. Affected files ... .. //depot/projects/trustedbsd/audit3/tools/regression/audit/test/filesystem/tfilesys.c#2 edit Differences ... ==== //depot/projects/trustedbsd/audit3/tools/regression/audit/test/filesystem/tfilesys.c#2 (text+ko) ==== @@ -25,14 +25,13 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ +#include <audittest.h> #include <fcntl.h> +#include <bsm/audit.h> +#include <sys/mount.h> +#include <sys/stat.h> #include <sys/syscall.h> #include <sys/types.h> -#include <sys/stat.h> -#include <sys/attr.h> -#include <sys/mount.h> -#include <sys/audit.h> -#include <audittest.h> /* * Test the auditing of some of the filesystem-related system calls. @@ -47,13 +46,10 @@ int temp_fd; char tempname[32]; struct statfs stat; - struct attrlist alist; u_long count; u_long basep; u_long newstate; u_long nmatches; - struct fssearchblock searchbl; - struct searchstate state; char buf[128]; AUT_INIT(); @@ -106,30 +102,6 @@ exit (-1); } - bzero((void *)&alist, sizeof(alist)); - alist.bitmapcount = ATTR_BIT_MAP_COUNT; - alist.dirattr = 1; - count = 1; - /* Generate a success AUE_GETDIRENTRIESATTR audit record */ - if (getdirentriesattr(temp_fd, &alist, buf, 128, &count, - &basep, &newstate, FSOPT_NOFOLLOW)) - AUT_PERROR("getdirentriesattr()"); - aut_assert(AUE_GETDIRENTRIESATTR); - - /* Generate a failure AUE_SEARCHFS audit record, but we'll still - * get the path and vnode attr tokens */ - searchbl.returnattrs=(struct attrlist *)malloc(sizeof(struct attrlist)); - searchbl.returnbuffer = (void *)malloc(128); - searchbl.returnbuffersize = 128; - searchbl.maxmatches = 1; - searchbl.searchparams1 = (void *)malloc(16); - searchbl.sizeofsearchparams1 = 16; - searchbl.searchparams2 = (void *)malloc(16); - searchbl.sizeofsearchparams2 = 16; - if (searchfs("/", &searchbl, &nmatches, 0, FSOPT_NOFOLLOW, &state)) - AUT_PERROR("searchfs()"); - aut_assert(AUE_SEARCHFS); - aut_shutdown(); exit(0); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200501260125.j0Q1PK5K097143>