projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
move copyin() call so if uap->size pointer is null, still return size
[unix-history]
/
usr
/
src
/
sys
/
kern
/
vfs_lookup.c
diff --git
a/usr/src/sys/kern/vfs_lookup.c
b/usr/src/sys/kern/vfs_lookup.c
index
f3ecf77
..
9326fbc
100644
(file)
--- a/
usr/src/sys/kern/vfs_lookup.c
+++ b/
usr/src/sys/kern/vfs_lookup.c
@@
-4,7
+4,7
@@
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)vfs_lookup.c 7.3
1
(Berkeley) %G%
+ * @(#)vfs_lookup.c 7.3
2
(Berkeley) %G%
*/
#include "param.h"
*/
#include "param.h"
@@
-245,15
+245,8
@@
dirloop:
* responsibility for freeing the pathname buffer.
*/
ndp->ni_hash = 0;
* responsibility for freeing the pathname buffer.
*/
ndp->ni_hash = 0;
- for (cp = ndp->ni_ptr; *cp != 0 && *cp != '/'; cp++)
{
+ for (cp = ndp->ni_ptr; *cp != 0 && *cp != '/'; cp++)
ndp->ni_hash += (unsigned char)*cp;
ndp->ni_hash += (unsigned char)*cp;
- if ((*cp & 0200) == 0)
- continue;
- if ((*cp & 0377) == ('/' | 0200) || flag != DELETE) {
- error = EINVAL;
- goto bad;
- }
- }
ndp->ni_namelen = cp - ndp->ni_ptr;
if (ndp->ni_namelen >= NAME_MAX) {
error = ENAMETOOLONG;
ndp->ni_namelen = cp - ndp->ni_ptr;
if (ndp->ni_namelen >= NAME_MAX) {
error = ENAMETOOLONG;
@@
-353,6
+346,7
@@
dirloop:
if (ndp->ni_nameiop & SAVESTART) {
ndp->ni_startdir = ndp->ni_dvp;
VREF(ndp->ni_startdir);
if (ndp->ni_nameiop & SAVESTART) {
ndp->ni_startdir = ndp->ni_dvp;
VREF(ndp->ni_startdir);
+ p->p_spare[1]++;
}
return (0);
}
}
return (0);
}
@@
-418,6
+412,7
@@
nextname:
}
if (ndp->ni_nameiop & SAVESTART) {
ndp->ni_startdir = ndp->ni_dvp;
}
if (ndp->ni_nameiop & SAVESTART) {
ndp->ni_startdir = ndp->ni_dvp;
+ p->p_spare[1]++;
VREF(ndp->ni_startdir);
}
if (!wantparent)
VREF(ndp->ni_startdir);
}
if (!wantparent)