Tue May 26 22:05:52 2020 UTC ()
Catch up after recent ACL changes


(ad)
diff -r1.55 -r1.56 src/sys/sys/namei.src

cvs diff -r1.55 -r1.56 src/sys/sys/namei.src (expand / switch to unified diff)

--- src/sys/sys/namei.src 2020/05/16 18:31:53 1.55
+++ src/sys/sys/namei.src 2020/05/26 22:05:52 1.56
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: namei.src,v 1.55 2020/05/16 18:31:53 christos Exp $ */ 1/* $NetBSD: namei.src,v 1.56 2020/05/26 22:05:52 ad Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1985, 1989, 1991, 1993 4 * Copyright (c) 1985, 1989, 1991, 1993
5 * The Regents of the University of California. All rights reserved. 5 * The Regents of the University of California. All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -153,31 +153,32 @@ NAMEIFL NOFOLLOW 0x00000000 /* do not fo @@ -153,31 +153,32 @@ NAMEIFL NOFOLLOW 0x00000000 /* do not fo
153NAMEIFL EMULROOTSET 0x00000080 /* emulation root already 153NAMEIFL EMULROOTSET 0x00000080 /* emulation root already
154 in ni_erootdir */ 154 in ni_erootdir */
155NAMEIFL LOCKSHARED 0x00000100 /* want shared locks if possible */ 155NAMEIFL LOCKSHARED 0x00000100 /* want shared locks if possible */
156NAMEIFL NOCHROOT 0x01000000 /* no chroot on abs path lookups */ 156NAMEIFL NOCHROOT 0x01000000 /* no chroot on abs path lookups */
157NAMEIFL MODMASK 0x010001fc /* mask of operational modifiers */ 157NAMEIFL MODMASK 0x010001fc /* mask of operational modifiers */
158/* 158/*
159 * Namei parameter descriptors. 159 * Namei parameter descriptors.
160 */ 160 */
161NAMEIFL NOCROSSMOUNT 0x0000800 /* do not cross mount points */ 161NAMEIFL NOCROSSMOUNT 0x0000800 /* do not cross mount points */
162NAMEIFL RDONLY 0x0001000 /* lookup with read-only semantics */ 162NAMEIFL RDONLY 0x0001000 /* lookup with read-only semantics */
163NAMEIFL ISDOTDOT 0x0002000 /* current component name is .. */ 163NAMEIFL ISDOTDOT 0x0002000 /* current component name is .. */
164NAMEIFL MAKEENTRY 0x0004000 /* entry is to be added to name cache */ 164NAMEIFL MAKEENTRY 0x0004000 /* entry is to be added to name cache */
165NAMEIFL ISLASTCN 0x0008000 /* this is last component of pathname */ 165NAMEIFL ISLASTCN 0x0008000 /* this is last component of pathname */
 166NAMIEFL WILLBEDIR 0x0010000 /* new files will be dirs */
166NAMEIFL ISWHITEOUT 0x0020000 /* found whiteout */ 167NAMEIFL ISWHITEOUT 0x0020000 /* found whiteout */
167NAMEIFL DOWHITEOUT 0x0040000 /* do whiteouts */ 168NAMEIFL DOWHITEOUT 0x0040000 /* do whiteouts */
168NAMEIFL REQUIREDIR 0x0080000 /* must be a directory */ 169NAMEIFL REQUIREDIR 0x0080000 /* must be a directory */
169NAMEIFL CREATEDIR 0x0200000 /* trailing slashes are ok */ 170NAMEIFL CREATEDIR 0x0200000 /* trailing slashes are ok */
170NAMEIFL PARAMASK 0x02ef800 /* mask of parameter descriptors */ 171NAMEIFL PARAMASK 0x02ff800 /* mask of parameter descriptors */
171 172
172/* 173/*
173 * Initialization of a nameidata structure. 174 * Initialization of a nameidata structure.
174 */ 175 */
175#define NDINIT(ndp, op, flags, pathbuf) { \ 176#define NDINIT(ndp, op, flags, pathbuf) { \
176 (ndp)->ni_cnd.cn_nameiop = op; \ 177 (ndp)->ni_cnd.cn_nameiop = op; \
177 (ndp)->ni_cnd.cn_flags = flags; \ 178 (ndp)->ni_cnd.cn_flags = flags; \
178 (ndp)->ni_atdir = NULL; \ 179 (ndp)->ni_atdir = NULL; \
179 (ndp)->ni_pathbuf = pathbuf; \ 180 (ndp)->ni_pathbuf = pathbuf; \
180 (ndp)->ni_cnd.cn_cred = kauth_cred_get(); \ 181 (ndp)->ni_cnd.cn_cred = kauth_cred_get(); \
181} 182}
182 183
183/* 184/*
@@ -280,27 +281,27 @@ int lookup_for_nfsd(struct nameidata *,  @@ -280,27 +281,27 @@ int lookup_for_nfsd(struct nameidata *,
280int lookup_for_nfsd_index(struct nameidata *, struct vnode *); 281int lookup_for_nfsd_index(struct nameidata *, struct vnode *);
281int relookup(struct vnode *, struct vnode **, struct componentname *, int); 282int relookup(struct vnode *, struct vnode **, struct componentname *, int);
282void cache_purge1(struct vnode *, const char *, size_t, int); 283void cache_purge1(struct vnode *, const char *, size_t, int);
283#define PURGE_PARENTS 1 284#define PURGE_PARENTS 1
284#define PURGE_CHILDREN 2 285#define PURGE_CHILDREN 2
285#define cache_purge(vp) cache_purge1((vp),NULL,0,PURGE_PARENTS|PURGE_CHILDREN) 286#define cache_purge(vp) cache_purge1((vp),NULL,0,PURGE_PARENTS|PURGE_CHILDREN)
286bool cache_lookup(struct vnode *, const char *, size_t, uint32_t, uint32_t, 287bool cache_lookup(struct vnode *, const char *, size_t, uint32_t, uint32_t,
287 int *, struct vnode **); 288 int *, struct vnode **);
288bool cache_lookup_raw(struct vnode *, const char *, size_t, uint32_t, 289bool cache_lookup_raw(struct vnode *, const char *, size_t, uint32_t,
289 int *, struct vnode **); 290 int *, struct vnode **);
290bool cache_lookup_linked(struct vnode *, const char *, size_t, 291bool cache_lookup_linked(struct vnode *, const char *, size_t,
291 struct vnode **, krwlock_t **, kauth_cred_t); 292 struct vnode **, krwlock_t **, kauth_cred_t);
292int cache_revlookup(struct vnode *, struct vnode **, char **, char *, 293int cache_revlookup(struct vnode *, struct vnode **, char **, char *,
293 bool, int); 294 bool, accmode_t);
294int cache_diraccess(struct vnode *, int); 295int cache_diraccess(struct vnode *, int);
295void cache_enter(struct vnode *, struct vnode *, 296void cache_enter(struct vnode *, struct vnode *,
296 const char *, size_t, uint32_t); 297 const char *, size_t, uint32_t);
297void cache_enter_id(struct vnode *, mode_t, uid_t, gid_t, bool); 298void cache_enter_id(struct vnode *, mode_t, uid_t, gid_t, bool);
298bool cache_have_id(struct vnode *); 299bool cache_have_id(struct vnode *);
299void cache_vnode_init(struct vnode * ); 300void cache_vnode_init(struct vnode * );
300void cache_vnode_fini(struct vnode * ); 301void cache_vnode_fini(struct vnode * );
301void cache_cpu_init(struct cpu_info *); 302void cache_cpu_init(struct cpu_info *);
302 303
303void nchinit(void); 304void nchinit(void);
304void namecache_count_pass2(void); 305void namecache_count_pass2(void);
305void namecache_count_2passes(void); 306void namecache_count_2passes(void);
306void cache_purgevfs(struct mount *); 307void cache_purgevfs(struct mount *);