fh_copy(&resp->fh, &argp->fh);
resp->access = argp->access;
- nfserr = nfsd_access(rqstp, &resp->fh, &resp->access);
+ nfserr = nfsd_access(rqstp, &resp->fh, &resp->access, NULL);
RETURN_STATUS(nfserr);
}
};
int
-nfsd_access(struct svc_rqst *rqstp, struct svc_fh *fhp, u32 *access)
+nfsd_access(struct svc_rqst *rqstp, struct svc_fh *fhp, u32 *access, u32 *supported)
{
struct accessmap *map;
struct svc_export *export;
struct dentry *dentry;
- u32 query, result = 0;
+ u32 query, result = 0, sresult = 0;
unsigned int error;
error = fh_verify(rqstp, fhp, 0, MAY_NOP);
for (; map->access; map++) {
if (map->access & query) {
unsigned int err2;
+
+ sresult |= map->access;
+
err2 = nfsd_permission(export, dentry, map->how);
switch (err2) {
case nfs_ok:
}
}
*access = result;
+ if (supported)
+ *supported = sresult;
out:
return error;
char *name, int len, struct iattr *attrs,
int type, dev_t rdev, struct svc_fh *res);
#ifdef CONFIG_NFSD_V3
-int nfsd_access(struct svc_rqst *, struct svc_fh *, u32 *);
+int nfsd_access(struct svc_rqst *, struct svc_fh *, u32 *, u32 *);
int nfsd_create_v3(struct svc_rqst *, struct svc_fh *,
char *name, int len, struct iattr *attrs,
struct svc_fh *res, int createmode,