#include <afsconfig.h>
#include "afs/param.h"
-RCSID
- ("$Header$");
/* Ugly Ugly Ugly but precludes conflicting XDR macros; We want kernel xdr */
#define __XDR_INCLUDE__
#include "afs/stds.h"
#include "afs/sysincludes.h" /* Standard vendor system headers */
-#if defined(AFS_SUN55_ENV) && !defined(AFS_NONFSTRANS)
+#if defined(AFS_SUN5_ENV) && !defined(AFS_NONFSTRANS)
#include "rpc/types.h"
#include "rpc/auth.h"
#include "rpc/auth_unix.h"
#include "rpc/auth_des.h"
-#if !defined(AFS_SUN58_ENV)
-#include "rpc/auth_kerb.h"
-#endif
#include "sys/tiuser.h"
#include "rpc/xdr.h"
#include "rpc/svc.h"
};
#ifndef ACL2_NPROC
+#if defined(AFS_SUN510_ENV)
+#define ACL2_NPROC 6
+#else
#define ACL2_NPROC 5
#endif
+#endif
struct afs_nfs_disp_tbl afs_rfs_disp_tbl[RFS_NPROC];
struct afs_nfs_disp_tbl afs_acl_disp_tbl[ACL2_NPROC];
}
/* Ok if arg 1 is in AFS or if 2 args and arg 2 is in AFS */
- if (is_afs_fh(fhp1)) {
+ if (fhp1 && is_afs_fh(fhp1)) {
*fhpp = fhp1;
if (fhp2)
*fh2pp = fhp2;
fhp = &sargs->fh;
break;
}
+#if defined(AFS_SUN510_ENV)
+ case ACLPROC2_GETXATTRDIR:
+ {
+ struct GETXATTRDIR2args *sargs = (struct GETXATTRDIR2args *)args;
+ fhp = &sargs->fh;
+ break;
+ }
+#endif
default:
return NULL;
}
- if (is_afs_fh(fhp)) {
+ if (fhp && is_afs_fh(fhp)) {
*fhpp = fhp;
return 1;
}
int
afs_nfs2_dispatcher(int type, afs_int32 which, char *argp,
struct exportinfo **expp, struct svc_req *rp,
- struct AFS_UCRED *crp)
+ afs_ucred_t *crp)
{
afs_int32 call = 0;
afs_int32 code = 0;
void
afs_nfs2_smallfidder(struct nfsdiropres *dr)
{
- register fhandle_t *fhp = (fhandle_t *) & dr->dr_fhandle;
+ fhandle_t *fhp = (fhandle_t *) & dr->dr_fhandle;
afs_int32 addr[2];
struct vcache *vcp;
-#if defined(AFS_SUN57_64BIT_ENV)
+#if defined(AFS_SUN5_64BIT_ENV)
/* See also afs_fid() */
memcpy((char *)addr, fhp->fh_data, SIZEOF_SMALLFID);
addr[1] = (addr[1] >> 48) & 0xffff;
struct cell *tcell;
/* Make up and copy out a SmallFid */
- tcell = afs_GetCell(vcp->fid.Cell, READ_LOCK);
- Sfid.Volume = vcp->fid.Fid.Volume;
+ tcell = afs_GetCell(vcp->f.fid.Cell, READ_LOCK);
+ Sfid.Volume = vcp->f.fid.Fid.Volume;
Sfid.CellAndUnique =
- ((tcell->cellIndex << 24) | (vcp->fid.Fid.Unique & 0xffffff));
+ ((tcell->cellIndex << 24) | (vcp->f.fid.Fid.Unique & 0xffffff));
afs_PutCell(tcell, READ_LOCK);
- Sfid.Vnode = (u_short) (vcp->fid.Fid.Vnode & 0xffff);
+ Sfid.Vnode = (u_short) (vcp->f.fid.Fid.Vnode & 0xffff);
fhp->fh_len = SIZEOF_SMALLFID;
memcpy(dr->dr_fhandle.fh_data, (char *)&Sfid, fhp->fh_len);
afs_nfs2_getattr(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call = afs_nfs2_dispatcher(0, RFS_GETATTR, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_setattr(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call = afs_nfs2_dispatcher(0, RFS_SETATTR, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_lookup(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call = afs_nfs2_dispatcher(0, RFS_LOOKUP, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_readlink(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call = afs_nfs2_dispatcher(0, RFS_READLINK, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_read(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call = afs_nfs2_dispatcher(0, RFS_READ, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_write(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call = afs_nfs2_dispatcher(0, RFS_WRITE, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_create(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call = afs_nfs2_dispatcher(0, RFS_CREATE, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_remove(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call = afs_nfs2_dispatcher(0, RFS_REMOVE, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_rename(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call = afs_nfs2_dispatcher(0, RFS_RENAME, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_link(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call = afs_nfs2_dispatcher(0, RFS_LINK, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_symlink(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call = afs_nfs2_dispatcher(0, RFS_SYMLINK, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_mkdir(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call = afs_nfs2_dispatcher(0, RFS_MKDIR, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_rmdir(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call = afs_nfs2_dispatcher(0, RFS_RMDIR, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_readdir(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call = afs_nfs2_dispatcher(0, RFS_READDIR, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_nfs2_statfs(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call = afs_nfs2_dispatcher(0, RFS_STATFS, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
afs_acl2_getacl(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs2_dispatcher(1, ACLPROC2_GETACL, (char *)args, &exp, rp, crp);
if (call > 1)
afs_acl2_setacl(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs2_dispatcher(1, ACLPROC2_SETACL, (char *)args, &exp, rp, crp);
if (call > 1)
afs_acl2_getattr(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs2_dispatcher(1, ACLPROC2_GETATTR, (char *)args, &exp, rp, crp);
if (call > 1)
afs_acl2_access(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs2_dispatcher(1, ACLPROC2_ACCESS, (char *)args, &exp, rp, crp);
if (call > 1)
return;
}
-struct afs_nfs_disp_tbl afs_acl_disp_tbl[5] = {
+#if defined(AFS_SUN510_ENV)
+void
+afs_acl2_getxattrdir(char *args, char *xp, char *exp, char *rp, char *crp)
+{
+ u_int call;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
+ call =
+ afs_nfs2_dispatcher(1, ACLPROC2_GETXATTRDIR, (char *)args, &exp, rp, crp);
+ if (call > 1)
+ afs_nfs2_noaccess((struct afs_nfs2_resp *)xp);
+ else
+ (*afs_acl_disp_tbl[ACLPROC2_GETXATTRDIR].orig_proc) (args, xp, exp, rp,
+ crp);
+ curthread->t_cred = svcred;
+ return;
+}
+#endif
+
+struct afs_nfs_disp_tbl afs_acl_disp_tbl[ACL2_NPROC] = {
{afs_nfs2_null},
{afs_acl2_getacl},
{afs_acl2_setacl},
{afs_acl2_getattr},
- {afs_acl2_access}
+ {afs_acl2_access},
+#if defined(AFS_SUN510_ENV)
+ {afs_acl2_getxattrdir}
+#endif
};
/* Munge the dispatch tables to link us in first */
#endif
#ifndef ACL3_NPROC
+#if defined(AFS_SUN510_ENV)
+#define ACL3_NPROC 4
+#else
#define ACL3_NPROC 3
#endif
+#endif
struct afs_nfs_disp_tbl afs_rfs3_disp_tbl[RFS3_NPROC];
struct afs_nfs_disp_tbl afs_acl3_disp_tbl[ACL3_NPROC];
resp->flags = FALSE;
}
+void
+afs_nfs3_notsupp(struct afs_nfs3_resp *resp)
+{
+ resp->status = NFS3ERR_NOTSUPP;
+ resp->flags = FALSE;
+}
+
afs_int32
nfs3_to_afs_call(int which, caddr_t * args, nfs_fh3 ** fhpp, nfs_fh3 ** fh2pp)
{
case NFSPROC3_LOOKUP:
{
LOOKUP3args *arg = (LOOKUP3args *) args;
-#ifdef AFS_SUN58_ENV
fhp1 = (nfs_fh3 *) arg->what.dirp;
-#else
- fhp1 = (nfs_fh3 *) & arg->what.dir;
-#endif
break;
}
case NFSPROC3_ACCESS:
case NFSPROC3_CREATE:
{
CREATE3args *arg = (CREATE3args *) args;
- fhp1 = (nfs_fh3 *) & arg->where.dir;
+ fhp1 = (nfs_fh3 *) arg->where.dirp;
break;
}
case NFSPROC3_MKDIR:
{
MKDIR3args *arg = (MKDIR3args *) args;
- fhp1 = (nfs_fh3 *) & arg->where.dir;
+ fhp1 = (nfs_fh3 *) arg->where.dirp;
break;
}
case NFSPROC3_SYMLINK:
{
SYMLINK3args *arg = (SYMLINK3args *) args;
- fhp1 = (nfs_fh3 *) & arg->where.dir;
+ fhp1 = (nfs_fh3 *) arg->where.dirp;
break;
}
case NFSPROC3_MKNOD:
{
MKNOD3args *arg = (MKNOD3args *) args;
- fhp1 = (nfs_fh3 *) & arg->where.dir;
+ fhp1 = (nfs_fh3 *) arg->where.dirp;
break;
}
case NFSPROC3_REMOVE:
{
REMOVE3args *arg = (REMOVE3args *) args;
- fhp1 = (nfs_fh3 *) & arg->object.dir;
+ fhp1 = (nfs_fh3 *) arg->object.dirp;
break;
}
case NFSPROC3_RMDIR:
{
RMDIR3args *arg = (RMDIR3args *) args;
- fhp1 = (nfs_fh3 *) & arg->object.dir;
+ fhp1 = (nfs_fh3 *) arg->object.dirp;
break;
}
case NFSPROC3_RENAME:
{
RENAME3args *arg = (RENAME3args *) args;
- fhp1 = (nfs_fh3 *) & arg->from.dir;
- fhp2 = (nfs_fh3 *) & arg->to.dir;
+ fhp1 = (nfs_fh3 *) arg->from.dirp;
+ fhp2 = (nfs_fh3 *) arg->to.dirp;
break;
}
case NFSPROC3_LINK:
{
LINK3args *arg = (LINK3args *) args;
fhp1 = (nfs_fh3 *) & arg->file;
- fhp2 = (nfs_fh3 *) & arg->link.dir;
+ fhp2 = (nfs_fh3 *) arg->link.dirp;
break;
}
case NFSPROC3_READDIR:
return NULL;
}
- if (is_afs_fh3(fhp1)) {
+ if (fhp1 && is_afs_fh3(fhp1)) {
*fhpp = fhp1;
if (fhp2)
*fh2pp = fhp2;
fhp = &sargs->fh;
break;
}
+#if defined(AFS_SUN510_ENV)
+ case ACLPROC3_GETXATTRDIR:
+ {
+ struct GETXATTRDIR3args *sargs = (struct GETXATTRDIR3args *)args;
+ fhp = &sargs->fh;
+ break;
+ }
+#endif
default:
return NULL;
}
- if (is_afs_fh3(fhp)) {
+ if (fhp && is_afs_fh3(fhp)) {
*fhpp = fhp;
return 1;
}
int
afs_nfs3_dispatcher(int type, afs_int32 which, char *argp,
struct exportinfo **expp, struct svc_req *rp,
- struct AFS_UCRED *crp)
+ afs_ucred_t *crp)
{
afs_int32 call = 0;
afs_int32 code = 0;
return 2;
sa = (struct sockaddr *)svc_getrpccaller(rp->rq_xprt)->buf;
+ if (sa == NULL)
+ return;
+
if (sa->sa_family == AF_INET)
client = ((struct sockaddr_in *)sa)->sin_addr.s_addr;
afs_int32 addr[2];
struct vcache *vcp;
-#if defined(AFS_SUN57_64BIT_ENV)
+#if defined(AFS_SUN5_64BIT_ENV)
/* See also afs_fid() */
memcpy((char *)addr, fhp->fh3_data, 10);
addr[1] = (addr[1] >> 48) & 0xffff;
struct cell *tcell;
/* Make up and copy out a SmallFid */
- tcell = afs_GetCell(vcp->fid.Cell, READ_LOCK);
- Sfid.Volume = vcp->fid.Fid.Volume;
+ tcell = afs_GetCell(vcp->f.fid.Cell, READ_LOCK);
+ Sfid.Volume = vcp->f.fid.Fid.Volume;
Sfid.CellAndUnique =
- ((tcell->cellIndex << 24) | (vcp->fid.Fid.Unique & 0xffffff));
+ ((tcell->cellIndex << 24) | (vcp->f.fid.Fid.Unique & 0xffffff));
afs_PutCell(tcell, READ_LOCK);
- Sfid.Vnode = (u_short) (vcp->fid.Fid.Vnode & 0xffff);
+ Sfid.Vnode = (u_short) (vcp->f.fid.Fid.Vnode & 0xffff);
fhp->fh3_len = SIZEOF_SMALLFID;
memcpy(fhp->fh3_data, (char *)&Sfid, fhp->fh3_len);
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_GETATTR, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_SETATTR, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_LOOKUP, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_ACCESS, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_READLINK, (char *)args, &exp, rp,
crp);
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call = afs_nfs3_dispatcher(0, NFSPROC3_READ, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs3_noaccess((struct afs_nfs3_resp *)xp);
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_WRITE, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_CREATE, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_MKDIR, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_SYMLINK, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_MKNOD, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_REMOVE, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_RMDIR, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_RENAME, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call = afs_nfs3_dispatcher(0, NFSPROC3_LINK, (char *)args, &exp, rp, crp);
if (call > 1)
afs_nfs3_noaccess((struct afs_nfs3_resp *)xp);
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_READDIR, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_READDIRPLUS, (char *)args, &exp, rp,
crp);
if (call > 1)
afs_nfs3_noaccess((struct afs_nfs3_resp *)xp);
+ else if (call == 1)
+ afs_nfs3_notsupp((struct afs_nfs3_resp *)xp);
else
(*afs_rfs3_disp_tbl[NFSPROC3_READDIRPLUS].orig_proc) (args, xp, exp,
rp, crp);
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_FSSTAT, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_FSINFO, (char *)args, &exp, rp, crp);
if (call > 1)
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_PATHCONF, (char *)args, &exp, rp,
crp);
{
u_int call;
afs_nfs3_resp dummy;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(0, NFSPROC3_COMMIT, (char *)args, &exp, rp, crp);
if (call > 1)
afs_acl3_getacl(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(1, ACLPROC3_GETACL, (char *)args, &exp, rp, crp);
if (call > 1)
afs_acl3_setacl(char *args, char *xp, char *exp, char *rp, char *crp)
{
u_int call;
- struct cred *svcred = curthread->t_cred;
- curthread->t_cred = (struct cred *)crp;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
call =
afs_nfs3_dispatcher(1, ACLPROC3_SETACL, (char *)args, &exp, rp, crp);
if (call > 1)
return;
}
-struct afs_nfs_disp_tbl afs_acl3_disp_tbl[3] = {
+#if defined(AFS_SUN510_ENV)
+void
+afs_acl3_getxattrdir(char *args, char *xp, char *exp, char *rp, char *crp)
+{
+ u_int call;
+ afs_ucred_t *svcred = curthread->t_cred;
+ curthread->t_cred = (afs_ucred_t *)crp;
+ call =
+ afs_nfs3_dispatcher(1, ACLPROC3_GETXATTRDIR, (char *)args, &exp, rp, crp);
+ if (call > 1)
+ afs_nfs3_noaccess((struct afs_nfs3_resp *)xp);
+ else
+ (*afs_acl3_disp_tbl[ACLPROC3_GETXATTRDIR].orig_proc) (args, xp, exp, rp,
+ crp);
+ curthread->t_cred = svcred;
+ return;
+}
+#endif
+
+struct afs_nfs_disp_tbl afs_acl3_disp_tbl[ACL3_NPROC] = {
{afs_nfs2_null},
{afs_acl3_getacl},
{afs_acl3_setacl},
+#if defined(AFS_SUN510_ENV)
+ {afs_acl3_getxattrdir},
+#endif
};
/* Munge the dispatch tables to link us in first */