diff options
author | phk <phk@FreeBSD.org> | 2002-09-27 20:00:03 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-09-27 20:00:03 +0000 |
commit | 5f5d8287e53c2f4390e259a997dfd721493098d7 (patch) | |
tree | 4eac321c76333209122fe4f6b9ce6e2256310223 /sys/ufs | |
parent | 8820cea14673c4deaeb1a81ab7782eedced1ffd8 (diff) | |
download | FreeBSD-src-5f5d8287e53c2f4390e259a997dfd721493098d7.zip FreeBSD-src-5f5d8287e53c2f4390e259a997dfd721493098d7.tar.gz |
Use our mount-credential if we get a NOCRED when we try to write out EA
space back to disk.
This is wrong in many ways, but not as wrong as a panic.
Pancied on: rwatson & jmallet
Sponsored by: DARPA & NAI Labs.
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ffs/ffs_vnops.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index 8aa0baf..7e4e3bf 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -1436,6 +1436,8 @@ ffs_close_ea(struct vnode *vp, int commit, struct ucred *cred, struct thread *td dp = ip->i_din2; error = ip->i_ea_error; if (commit && error == 0) { + if (cred == NOCRED) + cred = vp->v_mount->mnt_cred; liovec.iov_base = ip->i_ea_area; liovec.iov_len = ip->i_ea_len; luio.uio_iov = &liovec; |