PERFORCE change 69741 for review
Wayne Salamon
wsalamon at FreeBSD.org
Wed Jan 26 01:25:20 GMT 2005
http://perforce.freebsd.org/chv.cgi?CH=69741
Change 69741 by wsalamon at 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);
}
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message
More information about the trustedbsd-cvs
mailing list