2 * This software has been released under the terms of the IBM Public
3 * License. For details, see the LICENSE file in the top-level source
4 * directory or online at http://www.openafs.org/dl/license10.html
10 #include <afsconfig.h>
11 #include "../afs/param.h"
15 /* Ugly Ugly Ugly but precludes conflicting XDR macros; We want kernel xdr */
16 #define __XDR_INCLUDE__
17 #include "../afs/stds.h"
18 #include "../afs/sysincludes.h" /* Standard vendor system headers */
19 #if defined(AFS_SUN55_ENV) && !defined(AFS_NONFSTRANS)
20 #include "../rpc/types.h"
21 #include "../rpc/auth.h"
22 #include "../rpc/auth_unix.h"
23 #include "../rpc/auth_des.h"
24 #if !defined(AFS_SUN58_ENV)
25 #include "../rpc/auth_kerb.h"
27 #include "../sys/tiuser.h"
28 #include "../rpc/xdr.h"
29 #include "../rpc/svc.h"
30 #include "../nfs/nfs.h"
31 #include "../nfs/export.h"
32 #include "../nfs/nfs_clnt.h"
33 #include "../nfs/nfs_acl.h"
34 #include "../afs/afsincludes.h"
35 #include "../afs/afs_stats.h"
36 #include "../afs/exporter.h"
38 static int xlatorinit_v2_done=0;
39 static int xlatorinit_v3_done=0;
41 extern int afs_nobody;
42 extern int afs_NFSRootOnly;
44 /* It's bigger than this, but we don't care about anything else */
49 struct afs_nfs_disp_tbl {
54 struct afs_nfs2_resp {
62 struct afs_nfs_disp_tbl afs_rfs_disp_tbl[RFS_NPROC];
63 struct afs_nfs_disp_tbl afs_acl_disp_tbl[ACL2_NPROC];
66 is_afs_fh(fhandle_t *fhp) {
67 if ((fhp->fh_fsid.val[0] == AFS_VFSMAGIC) &&
68 (fhp->fh_fsid.val[1] == AFS_VFSFSID))
74 nfs2_to_afs_call(int which, caddr_t *args, fhandle_t **fhpp, fhandle_t **fh2pp)
81 *fh2pp = (fhandle_t *)0;
86 fhp1 = (fhandle_t *)args;
90 struct nfssaargs *sargs = (struct nfssaargs *)args;
91 fhp1 = (fhandle_t *)&sargs->saa_fh;
96 struct nfsdiropargs *sargs = (struct nfsdiropargs *)args;
97 fhp1 = (fhandle_t *)&sargs->da_fhandle;
102 struct nfsreadargs *sargs = (struct nfsreadargs *)args;
103 fhp1 = (fhandle_t *)&sargs->ra_fhandle;
108 struct nfswriteargs *sargs = (struct nfswriteargs *)args;
109 fhp1 = (fhandle_t *)&sargs->wa_fhandle;
114 struct nfscreatargs *sargs = (struct nfscreatargs *)args;
115 fhp1 = (fhandle_t *)&sargs->ca_da.da_fhandle;
120 struct nfsdiropargs *sargs = (struct nfsdiropargs *)args;
121 fhp1 = (fhandle_t *)&sargs->da_fhandle;
126 struct nfsrnmargs *sargs = (struct nfsrnmargs *)args;
127 fhp1 = (fhandle_t *)&sargs->rna_from.da_fhandle;
128 fhp2 = (fhandle_t *)&sargs->rna_to.da_fhandle;
133 struct nfslinkargs *sargs = (struct nfslinkargs *)args;
134 fhp1 = (fhandle_t *)&sargs->la_from;
135 fhp2 = (fhandle_t *)&sargs->la_to.da_fhandle;
140 struct nfsslargs *sargs = (struct nfsslargs *)args;
141 fhp1 = (fhandle_t *)&sargs->sla_from.da_fhandle;
146 struct nfscreatargs *sargs = (struct nfscreatargs *)args;
147 fhp1 = (fhandle_t *)&sargs->ca_da.da_fhandle;
152 struct nfsdiropargs *sargs = (struct nfsdiropargs *)args;
153 fhp1 = (fhandle_t *)&sargs->da_fhandle;
158 struct nfsrddirargs *sargs = (struct nfsrddirargs *)args;
159 fhp1 = (fhandle_t *)&sargs->rda_fh;
166 /* Ok if arg 1 is in AFS or if 2 args and arg 2 is in AFS */
167 if (is_afs_fh(fhp1)) {
173 if (is_afs_fh(fhp2)) {
182 acl2_to_afs_call(int which, caddr_t *args, fhandle_t **fhpp)
191 case ACLPROC2_GETACL:
193 struct GETACL2args *sargs = (struct GETACL2args *) args;
197 case ACLPROC2_SETACL:
199 struct SETACL2args *sargs = (struct SETACL2args *) args;
203 case ACLPROC2_GETATTR:
205 struct GETATTR2args *sargs = (struct GETATTR2args *) args;
209 case ACLPROC2_ACCESS:
211 struct ACCESS2args *sargs = (struct ACCESS2args *) args;
219 if (is_afs_fh(fhp)) {
228 afs_nfs2_dispatcher(int type, afs_int32 which, char *argp,
229 struct exportinfo **expp,
230 struct svc_req *rp, struct AFS_UCRED *crp)
234 afs_int32 client = 0;
236 fhandle_t *fh = (fhandle_t *)argp;
237 fhandle_t *fh2 = (fhandle_t *)0;
239 if (!xlatorinit_v2_done)
242 sa = (struct sockaddr *)svc_getrpccaller(rp->rq_xprt)->buf;
243 client = ((struct sockaddr_in *)sa)->sin_addr.s_addr;
249 code = nfs2_to_afs_call(which, argp, &fh, &fh2);
252 code = acl2_to_afs_call(which, argp, &fh);
259 struct afs_exporter *out = 0;
262 struct SmallFid Sfid;
264 memcpy((char *)&Sfid, fh->fh_data, SIZEOF_SMALLFID);
268 if (!once && *expp) {
269 afs_nobody = (*expp)->exi_export.ex_anon;
272 code = afs_nfsclient_reqhandler((struct afs_exporter *)0, &crp,
273 client, &dummy, &out);
274 /* Be careful to release this */
278 /* We ran and failed */
288 afs_nfs2_smallfidder(struct nfsdiropres *dr)
290 register fhandle_t *fhp = (fhandle_t *)&dr->dr_fhandle;
294 #if defined(AFS_SUN57_64BIT_ENV)
295 /* See also afs_fid() */
296 memcpy((char *)addr, fhp->fh_data, 10);
297 addr[1] = (addr[1] >> 48) & 0xffff;
299 memcpy((char *)addr, fhp->fh_data, 2 * sizeof(long));
303 vcp = VTOAFS((struct vnode*)addr[0]);
305 /* See also afs_osi_vget */
306 if (addr[1] == AFS_XLATOR_MAGIC)
308 if (dr->dr_status == NFS_OK) {
309 struct SmallFid Sfid;
312 /* Make up and copy out a SmallFid */
313 tcell = afs_GetCell(vcp->fid.Cell, READ_LOCK);
314 Sfid.Volume = vcp->fid.Fid.Volume;
315 Sfid.CellAndUnique = ((tcell->cellIndex << 24) |
316 (vcp->fid.Fid.Unique & 0xffffff));
317 afs_PutCell(tcell, READ_LOCK);
318 Sfid.Vnode = (u_short)(vcp->fid.Fid.Vnode & 0xffff);
319 fhp->fh_len = SIZEOF_SMALLFID;
320 memcpy(dr->dr_fhandle.fh_data, (char*)&Sfid, fhp->fh_len);
323 /* If we have a ref, release it */
324 if (vcp->vrefCount >= 1)
325 AFS_RELE(AFSTOV(vcp));
331 afs_nfs2_noaccess(struct afs_nfs2_resp *resp)
333 resp->status = NFSERR_ACCES;
336 void afs_nfs2_null(char *args, char *xp, char *exp, char *rp, char *crp)
341 afs_nfs2_root(char *args, char *xp, char *exp, char *rp, char *crp)
346 afs_nfs2_writecache(char *args, char *xp, char *exp, char *rp, char *crp)
350 #define NFS_V2_REQ(FUNCNAME, RFSOP, POST) \
351 void FUNCNAME(char *args, char *xp, char *exp, char *rp, char *crp) { \
353 struct cred *svcred = curthread->t_cred; \
354 curthread->t_cred = (struct cred*)crp; \
355 call=afs_nfs2_dispatcher(0, RFSOP, (char *)args, &exp, rp, crp); \
356 if (call>1) afs_nfs2_noaccess((struct afs_nfs2_resp *)xp); \
357 else { (*afs_rfs_disp_tbl[RFSOP].orig_proc)(args, xp, exp, rp, crp); \
358 if (POST && afs_NFSRootOnly && call) afs_nfs2_smallfidder(xp); } \
359 curthread->t_cred = svcred; \
363 NFS_V2_REQ(afs_nfs2_getattr, RFS_GETATTR, 0)
364 NFS_V2_REQ(afs_nfs2_setattr, RFS_SETATTR, 0)
365 NFS_V2_REQ(afs_nfs2_lookup, RFS_LOOKUP, 1)
366 NFS_V2_REQ(afs_nfs2_readlink, RFS_READLINK, 0)
367 NFS_V2_REQ(afs_nfs2_read, RFS_READ, 0)
368 NFS_V2_REQ(afs_nfs2_write, RFS_WRITE, 0)
369 NFS_V2_REQ(afs_nfs2_create, RFS_CREATE, 1)
370 NFS_V2_REQ(afs_nfs2_remove, RFS_REMOVE, 0)
371 NFS_V2_REQ(afs_nfs2_rename, RFS_RENAME, 0)
372 NFS_V2_REQ(afs_nfs2_link, RFS_LINK, 0)
373 NFS_V2_REQ(afs_nfs2_symlink, RFS_SYMLINK, 0)
374 NFS_V2_REQ(afs_nfs2_mkdir, RFS_MKDIR, 1)
375 NFS_V2_REQ(afs_nfs2_rmdir, RFS_RMDIR, 0)
376 NFS_V2_REQ(afs_nfs2_readdir, RFS_READDIR, 0)
377 NFS_V2_REQ(afs_nfs2_statfs, RFS_STATFS, 0)
379 struct afs_nfs_disp_tbl afs_rfs_disp_tbl[RFS_NPROC] = {
381 { afs_nfs2_getattr },
382 { afs_nfs2_setattr },
385 { afs_nfs2_readlink },
387 { afs_nfs2_writecache },
393 { afs_nfs2_symlink },
396 { afs_nfs2_readdir },
400 #define ACL_V2_REQ(FUNCNAME, ACLOP) \
401 void FUNCNAME(char *args, char *xp, char *exp, char *rp, char *crp) { \
403 struct cred *svcred = curthread->t_cred; \
404 curthread->t_cred = (struct cred*)crp; \
405 call=afs_nfs2_dispatcher(1, ACLOP, (char *)args, &exp, rp, crp); \
406 if (call>1) afs_nfs2_noaccess((struct afs_nfs2_resp *)xp); \
407 else (*afs_rfs_disp_tbl[ACLOP].orig_proc)(args, xp, exp, rp, crp); \
408 curthread->t_cred = svcred; \
412 ACL_V2_REQ(afs_acl2_getacl, ACLPROC2_GETACL)
413 ACL_V2_REQ(afs_acl2_setacl, ACLPROC2_SETACL)
414 ACL_V2_REQ(afs_acl2_getattr, ACLPROC2_GETATTR)
415 ACL_V2_REQ(afs_acl2_access, ACLPROC2_ACCESS)
417 struct afs_nfs_disp_tbl afs_acl_disp_tbl[ACL2_NPROC] = {
421 { afs_acl2_getattr },
425 /* Munge the dispatch tables to link us in first */
427 afs_xlatorinit_v2(struct rfs_disp_tbl *_rfs_tbl,
428 struct rfs_disp_tbl *_acl_tbl)
432 if (xlatorinit_v2_done++) return;
434 for (i=0; i < RFS_NPROC; i++) {
435 afs_rfs_disp_tbl[i].orig_proc = _rfs_tbl[i].dis_proc;
436 _rfs_tbl[i].dis_proc = afs_rfs_disp_tbl[i].afs_proc;
439 for (i=0; i < ACL2_NPROC; i++) {
440 afs_acl_disp_tbl[i].orig_proc = _acl_tbl[i].dis_proc;
441 _acl_tbl[i].dis_proc = afs_acl_disp_tbl[i].afs_proc;
446 #define RFS3_NPROC 22
453 struct afs_nfs_disp_tbl afs_rfs3_disp_tbl[RFS3_NPROC];
454 struct afs_nfs_disp_tbl afs_acl3_disp_tbl[ACL3_NPROC];
456 struct afs_nfs3_resp {
460 typedef struct afs_nfs3_resp afs_nfs3_resp;
463 is_afs_fh3(nfs_fh3 *fhp) {
464 if ((fhp->fh3_fsid.val[0] == AFS_VFSMAGIC) &&
465 (fhp->fh3_fsid.val[1] == AFS_VFSFSID))
471 afs_nfs3_noaccess(struct afs_nfs3_resp *resp)
473 resp->status = NFS3ERR_ACCES;
478 nfs3_to_afs_call(int which, caddr_t *args, nfs_fh3 **fhpp, nfs_fh3 **fh2pp)
485 *fh2pp = (nfs_fh3 *)0;
487 case NFSPROC3_GETATTR:
489 GETATTR3args *arg = (GETATTR3args *)args;
490 fhp1 = (nfs_fh3 *) &arg->object;
493 case NFSPROC3_SETATTR:
495 SETATTR3args *arg = (SETATTR3args *)args;
496 fhp1 = (nfs_fh3 *) &arg->object;
499 case NFSPROC3_LOOKUP:
501 LOOKUP3args *arg = (LOOKUP3args *)args;
502 fhp1 = (nfs_fh3 *) &arg->what.dirp;
505 case NFSPROC3_ACCESS:
507 ACCESS3args *arg = (ACCESS3args *)args;
508 fhp1 = (nfs_fh3 *) &arg->object;
511 case NFSPROC3_READLINK:
513 READLINK3args *arg = (READLINK3args *)args;
514 fhp1 = (nfs_fh3 *) &arg->symlink;
519 READ3args *arg = (READ3args *)args;
520 fhp1 = (nfs_fh3 *) &arg->file;
525 WRITE3args *arg = (WRITE3args *)args;
526 fhp1 = (nfs_fh3 *) &arg->file;
529 case NFSPROC3_CREATE:
531 CREATE3args *arg = (CREATE3args *)args;
532 fhp1 = (nfs_fh3 *) &arg->where.dir;
537 MKDIR3args *arg = (MKDIR3args *)args;
538 fhp1 = (nfs_fh3 *) &arg->where.dir;
541 case NFSPROC3_SYMLINK:
543 SYMLINK3args *arg = (SYMLINK3args *)args;
544 fhp1 = (nfs_fh3 *) &arg->where.dir;
549 MKNOD3args *arg = (MKNOD3args *)args;
550 fhp1 = (nfs_fh3 *) &arg->where.dir;
553 case NFSPROC3_REMOVE:
555 REMOVE3args *arg = (REMOVE3args *)args;
556 fhp1 = (nfs_fh3 *) &arg->object.dir;
561 RMDIR3args *arg = (RMDIR3args *)args;
562 fhp1 = (nfs_fh3 *) &arg->object.dir;
565 case NFSPROC3_RENAME:
567 RENAME3args *arg = (RENAME3args *)args;
568 fhp1 = (nfs_fh3 *) &arg->from.dir;
569 fhp2 = (nfs_fh3 *) &arg->to.dir;
574 LINK3args *arg = (LINK3args *)args;
575 fhp1 = (nfs_fh3 *) &arg->file;
576 fhp2 = (nfs_fh3 *) &arg->link.dir;
579 case NFSPROC3_READDIR:
581 READDIR3args *arg = (READDIR3args *)args;
582 fhp1 = (nfs_fh3 *) &arg->dir;
585 case NFSPROC3_READDIRPLUS:
587 READDIRPLUS3args *arg = (READDIRPLUS3args *)args;
588 fhp1 = (nfs_fh3 *) &arg->dir;
591 case NFSPROC3_FSSTAT:
593 FSSTAT3args *arg = (FSSTAT3args *)args;
594 fhp1 = (nfs_fh3 *) &arg->fsroot;
597 case NFSPROC3_FSINFO:
599 FSINFO3args *arg = (FSINFO3args *)args;
600 fhp1 = (nfs_fh3 *) &arg->fsroot;
603 case NFSPROC3_PATHCONF:
605 PATHCONF3args *arg = (PATHCONF3args *)args;
606 fhp1 = (nfs_fh3 *) &arg->object;
609 case NFSPROC3_COMMIT:
611 COMMIT3args *arg = (COMMIT3args *)args;
612 fhp1 = (nfs_fh3 *) &arg->file;
619 /* Ok if arg 1 is in AFS or if 2 args and arg 2 is in AFS */
620 if (is_afs_fh3(fhp1)) {
626 if (is_afs_fh3(fhp2)) {
635 acl3_to_afs_call(int which, caddr_t *args, nfs_fh3 **fhpp)
640 case ACLPROC3_GETACL:
642 struct GETACL3args *sargs = (struct GETACL3args *) args;
646 case ACLPROC3_SETACL:
648 struct SETACL3args *sargs = (struct SETACL3args *) args;
656 if (is_afs_fh3(fhp)) {
665 afs_nfs3_dispatcher(int type, afs_int32 which, char *argp,
666 struct exportinfo **expp,
667 struct svc_req *rp, struct AFS_UCRED *crp)
671 afs_int32 client = 0;
673 nfs_fh3 *fh = (nfs_fh3 *)argp;
674 nfs_fh3 *fh2 = (nfs_fh3 *)0;
676 if (!xlatorinit_v3_done)
679 sa = (struct sockaddr *)svc_getrpccaller(rp->rq_xprt)->buf;
680 client = ((struct sockaddr_in *)sa)->sin_addr.s_addr;
686 code = nfs3_to_afs_call(which, argp, &fh, &fh2);
689 code = acl3_to_afs_call(which, argp, &fh);
696 struct afs_exporter *out = 0;
699 struct SmallFid Sfid;
701 memcpy((char *)&Sfid, fh->fh3_data, SIZEOF_SMALLFID);
705 if (!once && *expp) {
706 afs_nobody = (*expp)->exi_export.ex_anon;
709 code = afs_nfsclient_reqhandler((struct afs_exporter *)0, &crp,
710 client, &dummy, &out);
711 /* Be careful to release this */
715 /* We ran and failed */
725 afs_nfs3_smallfidder(struct nfs_fh3 *fhp, int status)
730 #if defined(AFS_SUN57_64BIT_ENV)
731 /* See also afs_fid() */
732 memcpy((char *)addr, fhp->fh3_data, 10);
733 addr[1] = (addr[1] >> 48) & 0xffff;
735 memcpy((char *)addr, fhp->fh3_data, 2 * sizeof(long));
739 vcp = VTOAFS((struct vnode*)addr[0]);
741 /* See also afs_osi_vget */
742 if (addr[1] == AFS_XLATOR_MAGIC)
744 if (status == NFS_OK) {
745 struct SmallFid Sfid;
748 /* Make up and copy out a SmallFid */
749 tcell = afs_GetCell(vcp->fid.Cell, READ_LOCK);
750 Sfid.Volume = vcp->fid.Fid.Volume;
751 Sfid.CellAndUnique = ((tcell->cellIndex << 24) |
752 (vcp->fid.Fid.Unique & 0xffffff));
753 afs_PutCell(tcell, READ_LOCK);
754 Sfid.Vnode = (u_short)(vcp->fid.Fid.Vnode & 0xffff);
755 fhp->fh3_len = SIZEOF_SMALLFID;
756 memcpy(fhp->fh3_data, (char*)&Sfid, fhp->fh3_len);
759 /* If we have a ref, release it */
760 if (vcp->vrefCount >= 1)
761 AFS_RELE(AFSTOV(vcp));
766 #define NFS_V3_REQ(FUNCNAME, NFSOP, POST, RESP, RESPP) \
767 void FUNCNAME(char *args, char *xp, char *exp, char *rp, char *crp) { \
769 afs_nfs3_resp dummy; \
770 struct cred *svcred = curthread->t_cred; \
771 curthread->t_cred = (struct cred*)crp; \
772 call=afs_nfs3_dispatcher(0, NFSOP, (char *)args, &exp, rp, crp); \
773 if (call>1) afs_nfs3_noaccess((struct afs_nfs3_resp *)xp); \
774 else { (*afs_rfs3_disp_tbl[NFSOP].orig_proc)(args, xp, exp, rp, crp); \
775 if (POST && afs_NFSRootOnly && call) { \
776 RESP *resp = ( RESP *)xp; \
777 afs_nfs3_smallfidder( RESPP , resp->status); } } \
778 curthread->t_cred = svcred; \
782 NFS_V3_REQ(afs_nfs3_getattr, NFSPROC3_GETATTR, 0, afs_nfs3_resp, &dummy)
783 NFS_V3_REQ(afs_nfs3_setattr, NFSPROC3_SETATTR, 0, afs_nfs3_resp, &dummy)
784 NFS_V3_REQ(afs_nfs3_lookup, NFSPROC3_LOOKUP, 1, LOOKUP3res, &resp->resok.object)
785 NFS_V3_REQ(afs_nfs3_access, NFSPROC3_ACCESS, 0, afs_nfs3_resp, &dummy)
786 NFS_V3_REQ(afs_nfs3_readlink, NFSPROC3_READLINK, 0, afs_nfs3_resp, &dummy)
787 NFS_V3_REQ(afs_nfs3_read, NFSPROC3_READ, 0, afs_nfs3_resp, &dummy)
788 NFS_V3_REQ(afs_nfs3_write, NFSPROC3_WRITE, 0, afs_nfs3_resp, &dummy)
789 NFS_V3_REQ(afs_nfs3_create, NFSPROC3_CREATE, 1, CREATE3res, &resp->resok.obj.handle)
790 NFS_V3_REQ(afs_nfs3_mkdir, NFSPROC3_MKDIR, 1, MKDIR3res, &resp->resok.obj.handle)
791 NFS_V3_REQ(afs_nfs3_symlink, NFSPROC3_SYMLINK, 0, afs_nfs3_resp, &dummy)
792 NFS_V3_REQ(afs_nfs3_mknod, NFSPROC3_MKNOD, 0, afs_nfs3_resp, &dummy)
793 NFS_V3_REQ(afs_nfs3_remove, NFSPROC3_REMOVE, 0, afs_nfs3_resp, &dummy)
794 NFS_V3_REQ(afs_nfs3_rmdir, NFSPROC3_RMDIR, 0, afs_nfs3_resp, &dummy)
795 NFS_V3_REQ(afs_nfs3_rename, NFSPROC3_RENAME, 0, afs_nfs3_resp, &dummy)
796 NFS_V3_REQ(afs_nfs3_link, NFSPROC3_LINK, 0, afs_nfs3_resp, &dummy)
797 NFS_V3_REQ(afs_nfs3_readdir, NFSPROC3_READDIR, 0, afs_nfs3_resp, &dummy)
798 NFS_V3_REQ(afs_nfs3_readdirplus, NFSPROC3_READDIRPLUS, 0, afs_nfs3_resp, &dummy)
799 NFS_V3_REQ(afs_nfs3_fsstat, NFSPROC3_FSSTAT, 0, afs_nfs3_resp, &dummy)
800 NFS_V3_REQ(afs_nfs3_fsinfo, NFSPROC3_FSINFO, 0, afs_nfs3_resp, &dummy)
801 NFS_V3_REQ(afs_nfs3_pathconf, NFSPROC3_PATHCONF, 0, afs_nfs3_resp, &dummy)
802 NFS_V3_REQ(afs_nfs3_commit, NFSPROC3_COMMIT, 0, afs_nfs3_resp, &dummy)
804 struct afs_nfs_disp_tbl afs_rfs3_disp_tbl[RFS3_NPROC] = {
806 { afs_nfs3_getattr },
807 { afs_nfs3_setattr },
810 { afs_nfs3_readlink },
815 { afs_nfs3_symlink },
821 { afs_nfs3_readdir },
822 { afs_nfs3_readdirplus },
825 { afs_nfs3_pathconf },
829 #define ACL_V3_REQ(FUNCNAME, NFSOP) \
830 void FUNCNAME(char *args, char *xp, char *exp, char *rp, char *crp) { \
832 struct cred *svcred = curthread->t_cred; \
833 curthread->t_cred = (struct cred*)crp; \
834 call=afs_nfs3_dispatcher(1, NFSOP, (char *)args, &exp, rp, crp); \
835 if (call>1) afs_nfs3_noaccess((struct afs_nfs3_resp *)xp); \
836 else (*afs_rfs3_disp_tbl[NFSOP].orig_proc)(args, xp, exp, rp, crp); \
837 curthread->t_cred = svcred; \
841 ACL_V3_REQ(afs_acl3_getacl, ACLPROC3_GETACL)
842 ACL_V3_REQ(afs_acl3_setacl, ACLPROC3_SETACL)
844 struct afs_nfs_disp_tbl afs_acl3_disp_tbl[ACL3_NPROC] = {
850 /* Munge the dispatch tables to link us in first */
852 afs_xlatorinit_v3(struct rfs_disp_tbl *_rfs_tbl,
853 struct rfs_disp_tbl *_acl_tbl)
857 if (xlatorinit_v3_done++) return;
859 for (i=0; i < RFS3_NPROC; i++) {
860 afs_rfs3_disp_tbl[i].orig_proc = _rfs_tbl[i].dis_proc;
861 _rfs_tbl[i].dis_proc = afs_rfs3_disp_tbl[i].afs_proc;
864 for (i=0; i < ACL3_NPROC; i++) {
865 afs_acl3_disp_tbl[i].orig_proc = _acl_tbl[i].dis_proc;
866 _acl_tbl[i].dis_proc = afs_acl3_disp_tbl[i].afs_proc;
869 #endif /* !defined(AFS_NONFSTRANS) */