SCCS-vsn: sys/ufs/ffs/ufs_lookup.c 7.29
SCCS-vsn: sys/ufs/ufs/ufs_lookup.c 7.29
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)ufs_lookup.c 7.28 (Berkeley) %G%
+ * @(#)ufs_lookup.c 7.29 (Berkeley) %G%
*
* NOTE: (LOOKUP | LOCKPARENT) currently returns the parent inode unlocked.
*/
*
* NOTE: (LOOKUP | LOCKPARENT) currently returns the parent inode unlocked.
*/
register struct vnode *vdp;
register struct nameidata *ndp;
register struct vnode *vdp;
register struct nameidata *ndp;
{
register struct inode *dp; /* the directory we are searching */
register struct fs *fs; /* file system that directory is in */
{
register struct inode *dp; /* the directory we are searching */
register struct fs *fs; /* file system that directory is in */
*/
if ((dp->i_mode&IFMT) != IFDIR)
return (ENOTDIR);
*/
if ((dp->i_mode&IFMT) != IFDIR)
return (ENOTDIR);
- if (error = ufs_access(vdp, VEXEC, ndp->ni_cred))
+ if (error = ufs_access(vdp, VEXEC, ndp->ni_cred, p))
* Access for write is interpreted as allowing
* creation of files in the directory.
*/
* Access for write is interpreted as allowing
* creation of files in the directory.
*/
- if (error = ufs_access(vdp, VWRITE, ndp->ni_cred))
+ if (error = ufs_access(vdp, VWRITE, ndp->ni_cred, p))
return (error);
/*
* Return an indication of where the new directory
return (error);
/*
* Return an indication of where the new directory
/*
* Write access to directory required to delete files.
*/
/*
* Write access to directory required to delete files.
*/
- if (error = ufs_access(vdp, VWRITE, ndp->ni_cred))
+ if (error = ufs_access(vdp, VWRITE, ndp->ni_cred, p))
return (error);
/*
* Return pointer to current entry in ndp->ni_offset,
return (error);
/*
* Return pointer to current entry in ndp->ni_offset,
* regular file, or empty directory.
*/
if (flag == RENAME && wantparent && *ndp->ni_next == 0) {
* regular file, or empty directory.
*/
if (flag == RENAME && wantparent && *ndp->ni_next == 0) {
- if (error = ufs_access(vdp, VWRITE, ndp->ni_cred))
+ if (error = ufs_access(vdp, VWRITE, ndp->ni_cred, p))
return (error);
/*
* Careful about locking second inode.
return (error);
/*
* Careful about locking second inode.
#define MINDIRSIZ (sizeof (struct dirtemplate) / 2)
for (off = 0; off < ip->i_size; off += dp->d_reclen) {
#define MINDIRSIZ (sizeof (struct dirtemplate) / 2)
for (off = 0; off < ip->i_size; off += dp->d_reclen) {
- error = vn_rdwr(UIO_READ, ITOV(ip), (caddr_t)dp, MINDIRSIZ,
- off, UIO_SYSSPACE, IO_NODELOCKED, cred, &count);
+ error = vn_rdwr(UIO_READ, ITOV(ip), (caddr_t)dp, MINDIRSIZ, off,
+ UIO_SYSSPACE, IO_NODELOCKED, cred, &count, (struct proc *)0);
/*
* Since we read MINDIRSIZ, residual must
* be 0 unless we're at end of file.
/*
* Since we read MINDIRSIZ, residual must
* be 0 unless we're at end of file.
}
error = vn_rdwr(UIO_READ, ITOV(ip), (caddr_t)&dirbuf,
sizeof (struct dirtemplate), (off_t)0, UIO_SYSSPACE,
}
error = vn_rdwr(UIO_READ, ITOV(ip), (caddr_t)&dirbuf,
sizeof (struct dirtemplate), (off_t)0, UIO_SYSSPACE,
- IO_NODELOCKED, cred, (int *)0);
+ IO_NODELOCKED, cred, (int *)0, (struct proc *)0);
if (error != 0)
break;
if (dirbuf.dotdot_namlen != 2 ||
if (error != 0)
break;
if (dirbuf.dotdot_namlen != 2 ||
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)ufs_lookup.c 7.28 (Berkeley) %G%
+ * @(#)ufs_lookup.c 7.29 (Berkeley) %G%
*
* NOTE: (LOOKUP | LOCKPARENT) currently returns the parent inode unlocked.
*/
*
* NOTE: (LOOKUP | LOCKPARENT) currently returns the parent inode unlocked.
*/
register struct vnode *vdp;
register struct nameidata *ndp;
register struct vnode *vdp;
register struct nameidata *ndp;
{
register struct inode *dp; /* the directory we are searching */
register struct fs *fs; /* file system that directory is in */
{
register struct inode *dp; /* the directory we are searching */
register struct fs *fs; /* file system that directory is in */
*/
if ((dp->i_mode&IFMT) != IFDIR)
return (ENOTDIR);
*/
if ((dp->i_mode&IFMT) != IFDIR)
return (ENOTDIR);
- if (error = ufs_access(vdp, VEXEC, ndp->ni_cred))
+ if (error = ufs_access(vdp, VEXEC, ndp->ni_cred, p))
* Access for write is interpreted as allowing
* creation of files in the directory.
*/
* Access for write is interpreted as allowing
* creation of files in the directory.
*/
- if (error = ufs_access(vdp, VWRITE, ndp->ni_cred))
+ if (error = ufs_access(vdp, VWRITE, ndp->ni_cred, p))
return (error);
/*
* Return an indication of where the new directory
return (error);
/*
* Return an indication of where the new directory
/*
* Write access to directory required to delete files.
*/
/*
* Write access to directory required to delete files.
*/
- if (error = ufs_access(vdp, VWRITE, ndp->ni_cred))
+ if (error = ufs_access(vdp, VWRITE, ndp->ni_cred, p))
return (error);
/*
* Return pointer to current entry in ndp->ni_offset,
return (error);
/*
* Return pointer to current entry in ndp->ni_offset,
* regular file, or empty directory.
*/
if (flag == RENAME && wantparent && *ndp->ni_next == 0) {
* regular file, or empty directory.
*/
if (flag == RENAME && wantparent && *ndp->ni_next == 0) {
- if (error = ufs_access(vdp, VWRITE, ndp->ni_cred))
+ if (error = ufs_access(vdp, VWRITE, ndp->ni_cred, p))
return (error);
/*
* Careful about locking second inode.
return (error);
/*
* Careful about locking second inode.
#define MINDIRSIZ (sizeof (struct dirtemplate) / 2)
for (off = 0; off < ip->i_size; off += dp->d_reclen) {
#define MINDIRSIZ (sizeof (struct dirtemplate) / 2)
for (off = 0; off < ip->i_size; off += dp->d_reclen) {
- error = vn_rdwr(UIO_READ, ITOV(ip), (caddr_t)dp, MINDIRSIZ,
- off, UIO_SYSSPACE, IO_NODELOCKED, cred, &count);
+ error = vn_rdwr(UIO_READ, ITOV(ip), (caddr_t)dp, MINDIRSIZ, off,
+ UIO_SYSSPACE, IO_NODELOCKED, cred, &count, (struct proc *)0);
/*
* Since we read MINDIRSIZ, residual must
* be 0 unless we're at end of file.
/*
* Since we read MINDIRSIZ, residual must
* be 0 unless we're at end of file.
}
error = vn_rdwr(UIO_READ, ITOV(ip), (caddr_t)&dirbuf,
sizeof (struct dirtemplate), (off_t)0, UIO_SYSSPACE,
}
error = vn_rdwr(UIO_READ, ITOV(ip), (caddr_t)&dirbuf,
sizeof (struct dirtemplate), (off_t)0, UIO_SYSSPACE,
- IO_NODELOCKED, cred, (int *)0);
+ IO_NODELOCKED, cred, (int *)0, (struct proc *)0);
if (error != 0)
break;
if (dirbuf.dotdot_namlen != 2 ||
if (error != 0)
break;
if (dirbuf.dotdot_namlen != 2 ||