Deleted Added
full compact
union_subr.c (24131) union_subr.c (24856)
1/*
2 * Copyright (c) 1994 Jan-Simon Pendry
3 * Copyright (c) 1994
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * Jan-Simon Pendry.
8 *

--- 21 unchanged lines hidden (view full) ---

30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * SUCH DAMAGE.
36 *
37 * @(#)union_subr.c 8.20 (Berkeley) 5/20/95
1/*
2 * Copyright (c) 1994 Jan-Simon Pendry
3 * Copyright (c) 1994
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * Jan-Simon Pendry.
8 *

--- 21 unchanged lines hidden (view full) ---

30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * SUCH DAMAGE.
36 *
37 * @(#)union_subr.c 8.20 (Berkeley) 5/20/95
38 * $Id: union_subr.c,v 1.14 1997/02/22 09:40:40 peter Exp $
38 * $Id: union_subr.c,v 1.15 1997/03/23 03:36:59 bde Exp $
39 */
40
41#include <sys/param.h>
42#include <sys/systm.h>
43#include <sys/time.h>
44#include <sys/kernel.h>
45#include <sys/vnode.h>
46#include <sys/namei.h>

--- 843 unchanged lines hidden (view full) ---

890 * reasons outlines in union_mkshadow).
891 * The difference here is that the file is owned by
892 * the current user, rather than by the person who
893 * did the mount, since the current user needs to be
894 * able to write the file (that's why it is being
895 * copied in the first place).
896 */
897 cn.cn_namelen = strlen(un->un_path);
39 */
40
41#include <sys/param.h>
42#include <sys/systm.h>
43#include <sys/time.h>
44#include <sys/kernel.h>
45#include <sys/vnode.h>
46#include <sys/namei.h>

--- 843 unchanged lines hidden (view full) ---

890 * reasons outlines in union_mkshadow).
891 * The difference here is that the file is owned by
892 * the current user, rather than by the person who
893 * did the mount, since the current user needs to be
894 * able to write the file (that's why it is being
895 * copied in the first place).
896 */
897 cn.cn_namelen = strlen(un->un_path);
898 cn.cn_pnbuf = (caddr_t) malloc(cn.cn_namelen, M_NAMEI, M_WAITOK);
898 cn.cn_pnbuf = (caddr_t) malloc(cn.cn_namelen+1, M_NAMEI, M_WAITOK);
899 bcopy(un->un_path, cn.cn_pnbuf, cn.cn_namelen+1);
900 cn.cn_nameiop = CREATE;
901 cn.cn_flags = (LOCKPARENT|HASBUF|SAVENAME|SAVESTART|ISLASTCN);
902 cn.cn_proc = p;
903 cn.cn_cred = p->p_ucred;
904 cn.cn_nameptr = cn.cn_pnbuf;
905 cn.cn_hash = un->un_hash;
906 cn.cn_consume = 0;

--- 196 unchanged lines hidden ---
899 bcopy(un->un_path, cn.cn_pnbuf, cn.cn_namelen+1);
900 cn.cn_nameiop = CREATE;
901 cn.cn_flags = (LOCKPARENT|HASBUF|SAVENAME|SAVESTART|ISLASTCN);
902 cn.cn_proc = p;
903 cn.cn_cred = p->p_ucred;
904 cn.cn_nameptr = cn.cn_pnbuf;
905 cn.cn_hash = un->un_hash;
906 cn.cn_consume = 0;

--- 196 unchanged lines hidden ---