| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: namei.src,v 1.21 2011/01/02 05:12:33 dholland Exp $ */ | | 1 | /* $NetBSD: namei.src,v 1.22 2011/01/07 11:25:10 pooka 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. |
| @@ -151,27 +151,27 @@ NAMEIFL MODMASK 0x010000fc /* mask of o | | | @@ -151,27 +151,27 @@ NAMEIFL MODMASK 0x010000fc /* mask of o |
151 | */ | | 151 | */ |
152 | NAMEIFL NOCROSSMOUNT 0x0000100 /* do not cross mount points */ | | 152 | NAMEIFL NOCROSSMOUNT 0x0000100 /* do not cross mount points */ |
153 | NAMEIFL RDONLY 0x0000200 /* lookup with read-only semantics */ | | 153 | NAMEIFL RDONLY 0x0000200 /* lookup with read-only semantics */ |
154 | NAMEIFL ISDOTDOT 0x0002000 /* current component name is .. */ | | 154 | NAMEIFL ISDOTDOT 0x0002000 /* current component name is .. */ |
155 | NAMEIFL MAKEENTRY 0x0004000 /* entry is to be added to name cache */ | | 155 | NAMEIFL MAKEENTRY 0x0004000 /* entry is to be added to name cache */ |
156 | NAMEIFL ISLASTCN 0x0008000 /* this is last component of pathname */ | | 156 | NAMEIFL ISLASTCN 0x0008000 /* this is last component of pathname */ |
157 | NAMEIFL ISSYMLINK 0x0010000 /* symlink needs interpretation */ | | 157 | NAMEIFL ISSYMLINK 0x0010000 /* symlink needs interpretation */ |
158 | NAMEIFL ISWHITEOUT 0x0020000 /* found whiteout */ | | 158 | NAMEIFL ISWHITEOUT 0x0020000 /* found whiteout */ |
159 | NAMEIFL DOWHITEOUT 0x0040000 /* do whiteouts */ | | 159 | NAMEIFL DOWHITEOUT 0x0040000 /* do whiteouts */ |
160 | NAMEIFL REQUIREDIR 0x0080000 /* must be a directory */ | | 160 | NAMEIFL REQUIREDIR 0x0080000 /* must be a directory */ |
161 | NAMEIFL CREATEDIR 0x0200000 /* trailing slashes are ok */ | | 161 | NAMEIFL CREATEDIR 0x0200000 /* trailing slashes are ok */ |
162 | NAMEIFL INRENAME 0x0400000 /* operation is a part of ``rename'' */ | | 162 | NAMEIFL INRENAME 0x0400000 /* operation is a part of ``rename'' */ |
163 | NAMEIFL INRELOOKUP 0x0800000 /* set while inside relookup() */ | | 163 | NAMEIFL INRELOOKUP 0x0800000 /* set while inside relookup() */ |
164 | NAMEIFL PARAMASK 0x0efef00 /* mask of parameter descriptors */ | | 164 | NAMEIFL PARAMASK 0x0efe300 /* mask of parameter descriptors */ |
165 | | | 165 | |
166 | /* | | 166 | /* |
167 | * Initialization of an nameidata structure. | | 167 | * Initialization of an nameidata structure. |
168 | */ | | 168 | */ |
169 | #define NDINIT(ndp, op, flags, pathbuf) { \ | | 169 | #define NDINIT(ndp, op, flags, pathbuf) { \ |
170 | (ndp)->ni_cnd.cn_nameiop = op; \ | | 170 | (ndp)->ni_cnd.cn_nameiop = op; \ |
171 | (ndp)->ni_cnd.cn_flags = flags; \ | | 171 | (ndp)->ni_cnd.cn_flags = flags; \ |
172 | (ndp)->ni_pathbuf = pathbuf; \ | | 172 | (ndp)->ni_pathbuf = pathbuf; \ |
173 | (ndp)->ni_cnd.cn_cred = kauth_cred_get(); \ | | 173 | (ndp)->ni_cnd.cn_cred = kauth_cred_get(); \ |
174 | } | | 174 | } |
175 | #endif | | 175 | #endif |
176 | | | 176 | |
177 | /* | | 177 | /* |