diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2004-04-25 19:00:30 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2004-04-25 19:00:30 +0000 |
commit | 94a091e9d3493d307af62faea774a2a1d49909c7 (patch) | |
tree | afae9bcbd4be0ec8c569333317f1833c73c876a0 /sys/miscfs/union | |
parent | 0b27bb008f65a38091f9eb995b97a275dd4f169b (diff) |
only use um_cred for lookups, fixes pr 745.
from pedro martelletto
Diffstat (limited to 'sys/miscfs/union')
-rw-r--r-- | sys/miscfs/union/union_subr.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/miscfs/union/union_subr.c b/sys/miscfs/union/union_subr.c index d3e38bbd977..a003d09c3ef 100644 --- a/sys/miscfs/union/union_subr.c +++ b/sys/miscfs/union/union_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: union_subr.c,v 1.14 2003/06/02 23:28:11 millert Exp $ */ +/* $OpenBSD: union_subr.c,v 1.15 2004/04/25 19:00:29 tedu Exp $ */ /* $NetBSD: union_subr.c,v 1.41 2001/11/10 13:33:45 lukem Exp $ */ /* @@ -806,10 +806,11 @@ union_relookup(um, dvp, vpp, cnp, cn, path, pathlen) cn->cn_nameiop = CREATE; cn->cn_flags = (LOCKPARENT|HASBUF|SAVENAME|SAVESTART|ISLASTCN); cn->cn_proc = cnp->cn_proc; - if (um->um_op == UNMNT_ABOVE) - cn->cn_cred = cnp->cn_cred; + if (um->um_op == UNMNT_BELOW && cnp->cn_nameiop == LOOKUP) + cn->cn_cred = um->um_cred; /* XXX */ else - cn->cn_cred = um->um_cred; + cn->cn_cred = cnp->cn_cred; + cn->cn_nameptr = cn->cn_pnbuf; cn->cn_hash = cnp->cn_hash; cn->cn_consume = cnp->cn_consume; |