Date: Tue, 1 Jun 2010 17:28:18 GMT From: Efstratios Karatzas <gpf@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 179052 for review Message-ID: <201006011728.o51HSI4W012814@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@179052?ac=10 Change 179052 by gpf@gpf_desktop on 2010/06/01 17:28:11 The new nfs implementation gave me some trouble but I managed to make it work as both server and client. This is a minor change, now we're just keeping track of what rpcs are actually getting serviced and where they come from. This is for non-compound rpcs. Should probably check and see what happens when the reply is returned from the cache and we are actually executing the rpc. Affected files ... .. //depot/projects/soc2010/gpf_audit/freebsd/src/sys/fs/nfsserver/nfs_nfsdsocket.c#2 edit Differences ... ==== //depot/projects/soc2010/gpf_audit/freebsd/src/sys/fs/nfsserver/nfs_nfsdsocket.c#2 (text+ko) ==== @@ -268,6 +268,8 @@ }; #endif /* !APPLEKEXT */ +#include <security/audit/audit.h> + /* * Static array that defines which nfs rpc's are nonidempotent */ @@ -428,8 +430,14 @@ * The group is indicated by the value in nfs_retfh[]. */ if (nd->nd_flag & ND_NFSV4) { + printf("compound rpc enter\n"); nfsrvd_compound(nd, isdgram, p); + printf("compound rpc exit\n"); } else { + printf("non compound rpc %d\n", nd->nd_procnum); + AUDIT_NFS_ENTER(nd->nd_procnum, nd->nd_cred, curthread); + if (nd->nd_nam != NULL) + AUDIT_ARG_SOCKADDR_IN((struct sockaddr_in *)nd->nd_nam); if (nfs_retfh[nd->nd_procnum] == 1) { if (vp) NFSVOPUNLOCK(vp, 0, p); @@ -442,6 +450,7 @@ error = (*(nfsrv3_procs0[nd->nd_procnum]))(nd, isdgram, vp, p, &nes); } + AUDIT_NFS_EXIT(error, curthread); if (mp) { if (nfs_writerpc[nd->nd_procnum]) NFS_ENDWRITE(mp); @@ -699,6 +708,8 @@ nd->nd_flag |= ND_SAVEREPLY; NFSINCRGLOBAL(newnfsstats.srvrpccnt[nd->nd_procnum]); switch (op) { + /* xxx gpf */ + printf("op = %d\n", op); case NFSV4OP_PUTFH: error = nfsrv_mtofh(nd, &fh); if (error)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006011728.o51HSI4W012814>