Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 231161
b: refs/heads/master
c: f6af99e
h: refs/heads/master
i:
  231159: 581bdf8
v: v3
  • Loading branch information
J. Bruce Fields committed Jan 4, 2011
1 parent 6b48b65 commit 2580476
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 255c7cf810e4776ae8f1023332060459f30d8a2a
refs/heads/master: f6af99ec1b261e21219d5eba99e3af48fc6c32d4
4 changes: 2 additions & 2 deletions trunk/fs/nfsd/nfs4idmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -524,13 +524,13 @@ idmap_name_to_id(struct svc_rqst *rqstp, int type, const char *name, u32 namelen
int ret;

if (namelen + 1 > sizeof(key.name))
return -EINVAL;
return -ESRCH; /* nfserr_badowner */
memcpy(key.name, name, namelen);
key.name[namelen] = '\0';
strlcpy(key.authname, rqst_authname(rqstp), sizeof(key.authname));
ret = idmap_lookup(rqstp, nametoid_lookup, &key, &nametoid_cache, &item);
if (ret == -ENOENT)
ret = -ESRCH; /* nfserr_badname */
ret = -ESRCH; /* nfserr_badowner */
if (ret)
return ret;
*id = item->id;
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/nfsd/nfsd.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ void nfsd_lockd_shutdown(void);
#define nfserr_attrnotsupp cpu_to_be32(NFSERR_ATTRNOTSUPP)
#define nfserr_bad_xdr cpu_to_be32(NFSERR_BAD_XDR)
#define nfserr_openmode cpu_to_be32(NFSERR_OPENMODE)
#define nfserr_badowner cpu_to_be32(NFSERR_BADOWNER)
#define nfserr_locks_held cpu_to_be32(NFSERR_LOCKS_HELD)
#define nfserr_op_illegal cpu_to_be32(NFSERR_OP_ILLEGAL)
#define nfserr_grace cpu_to_be32(NFSERR_GRACE)
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/nfsd/nfsproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ nfserrno (int errno)
{ nfserr_jukebox, -EAGAIN },
{ nfserr_jukebox, -EWOULDBLOCK },
{ nfserr_jukebox, -ENOMEM },
{ nfserr_badname, -ESRCH },
{ nfserr_badowner, -ESRCH },
{ nfserr_io, -ETXTBSY },
{ nfserr_notsupp, -EOPNOTSUPP },
{ nfserr_toosmall, -ETOOSMALL },
Expand Down

0 comments on commit 2580476

Please sign in to comment.