aboutsummaryrefslogtreecommitdiff
path: root/sys/gnu/fs/ext2fs/ext2_vnops.c
diff options
context:
space:
mode:
authorEivind Eklund <eivind@FreeBSD.org>1998-02-04 01:16:03 +0000
committerEivind Eklund <eivind@FreeBSD.org>1998-02-04 01:16:03 +0000
commita30e742145a08fcbe7e323b8aa6608b0fe922688 (patch)
treea1bb7a1f2305bdd3168a5d2d8813a0f4cf776271 /sys/gnu/fs/ext2fs/ext2_vnops.c
parentb3796ed6396a848351e7b9af8a03faf4b25467be (diff)
downloadsrc-a30e742145a08fcbe7e323b8aa6608b0fe922688.tar.gz
src-a30e742145a08fcbe7e323b8aa6608b0fe922688.zip
Make LINT at least compile. This faithfully duplicate the changes
done to ufs/ufs/ufs_vnops.c for the same problem, but I don't know if that will actually make SUIDDIR work for ext2fs.
Notes
Notes: svn path=/head/; revision=33064
Diffstat (limited to 'sys/gnu/fs/ext2fs/ext2_vnops.c')
-rw-r--r--sys/gnu/fs/ext2fs/ext2_vnops.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/gnu/fs/ext2fs/ext2_vnops.c b/sys/gnu/fs/ext2fs/ext2_vnops.c
index 38a8460ca882..91a89c903885 100644
--- a/sys/gnu/fs/ext2fs/ext2_vnops.c
+++ b/sys/gnu/fs/ext2fs/ext2_vnops.c
@@ -836,7 +836,7 @@ ext2_mkdir(ap)
* and we are not giving it TOO root, (would subvert quotas)
* then go ahead and give it to the other user.
* The new directory also inherits the SUID bit.
- * If user's UID an ddir UID are the same,
+ * If user's UID and dir UID are the same,
* 'give it away' so that the SUID is still forced on.
*/
if ( (dvp->v_mount->mnt_flag & MNT_SUIDDIR) &&
@@ -844,7 +844,7 @@ ext2_mkdir(ap)
dmode |= ISUID;
ip->i_uid = dp->i_uid;
#ifdef QUOTA
- if (pdir->i_uid != cnp->cn_cred->cr_uid) {
+ if (dp->i_uid != cnp->cn_cred->cr_uid) {
/*
* make sure the correct user gets charged
* for the space.
@@ -856,7 +856,7 @@ ext2_mkdir(ap)
ucred.cr_uid = ip->i_uid;
ucred.cr_ngroups = 1;
ucred.cr_groups[0] = dp->i_gid;
- ucp = *ucred;
+ ucp = &ucred;
}
#endif I
} else {
@@ -865,8 +865,8 @@ ext2_mkdir(ap)
#ifdef QUOTA
if ((error = getinoquota(ip)) ||
(error = chkiq(ip, 1, ucp, 0))) {
- free(cnp->cn_pnbuf, M_NAMEI);
- VOP_VFREE(tvp, ip->i_number, dmode);
+ zfree(namei_zone, cnp->cn_pnbuf);
+ UFS_VFREE(tvp, ip->i_number, dmode);
vput(tvp);
vput(dvp);
return (error);
@@ -1129,7 +1129,7 @@ ext2_makeinode(mode, dvp, vpp, cnp)
ucred.cr_uid = ip->i_uid;
ucred.cr_ngroups = 1;
ucred.cr_groups[0] = pdir->i_gid;
- ucp = *ucred;
+ ucp = &ucred;
#endif I
} else {
ip->i_uid = cnp->cn_cred->cr_uid;
@@ -1138,8 +1138,8 @@ ext2_makeinode(mode, dvp, vpp, cnp)
#ifdef QUOTA
if ((error = getinoquota(ip)) ||
(error = chkiq(ip, 1, ucp, 0))) {
- free(cnp->cn_pnbuf, M_NAMEI);
- VOP_VFREE(tvp, ip->i_number, mode);
+ zfree(namei_zone, cnp->cn_pnbuf);
+ UFS_VFREE(tvp, ip->i_number, mode);
vput(tvp);
vput(dvp);
return (error);