SCCS-vsn: sys/ufs/ffs/ufs_extern.h 7.5
SCCS-vsn: sys/ufs/ufs/ufs_extern.h 7.5
SCCS-vsn: sys/ufs/ffs/ufs_vnops.c 7.84
SCCS-vsn: sys/ufs/ufs/ufs_vnops.c 7.84
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)ufs_extern.h 7.4 (Berkeley) %G%
+ * @(#)ufs_extern.h 7.5 (Berkeley) %G%
int ufs_advlock __P((struct vnode *, caddr_t, int, struct flock *, int));
void ufs_bufstats __P((void));
int ufs_checkpath __P((struct inode *, struct inode *, struct ucred *));
int ufs_advlock __P((struct vnode *, caddr_t, int, struct flock *, int));
void ufs_bufstats __P((void));
int ufs_checkpath __P((struct inode *, struct inode *, struct ucred *));
-int ufs_chmod __P((struct vnode *, int, struct proc *));
-int ufs_chown __P((struct vnode *, u_int, u_int, struct proc *));
+int ufs_chmod __P((struct vnode *, int, struct ucred *, struct proc *));
+int ufs_chown
+ __P((struct vnode *, u_int, u_int, struct ucred *, struct proc *));
int ufs_close __P((struct vnode *, int, struct ucred *, struct proc *));
int ufs_create __P((struct vnode *, struct vnode **,
struct componentname *, struct vattr *));
int ufs_close __P((struct vnode *, int, struct ucred *, struct proc *));
int ufs_create __P((struct vnode *, struct vnode **,
struct componentname *, struct vattr *));
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)ufs_vnops.c 7.83 (Berkeley) %G%
+ * @(#)ufs_vnops.c 7.84 (Berkeley) %G%
*/
#include <sys/param.h>
*/
#include <sys/param.h>
#include <ufs/ufs/ufsmount.h>
#include <ufs/ufs/ufs_extern.h>
#include <ufs/ufs/ufsmount.h>
#include <ufs/ufs/ufs_extern.h>
-int ufs_chmod __P((struct vnode *, int, struct proc *));
-int ufs_chown __P((struct vnode *, u_int, u_int, struct proc *));
+int ufs_chmod __P((struct vnode *, int, struct ucred *, struct proc *));
+int ufs_chown
+ __P((struct vnode *, u_int, u_int, struct ucred *, struct proc *));
#ifdef _NOQUAD
#define SETHIGH(q, h) (q).val[_QUAD_HIGHWORD] = (h)
#ifdef _NOQUAD
#define SETHIGH(q, h) (q).val[_QUAD_HIGHWORD] = (h)
* Go through the fields and update iff not VNOVAL.
*/
if (vap->va_uid != (u_short)VNOVAL || vap->va_gid != (u_short)VNOVAL)
* Go through the fields and update iff not VNOVAL.
*/
if (vap->va_uid != (u_short)VNOVAL || vap->va_gid != (u_short)VNOVAL)
- if (error = ufs_chown(vp, vap->va_uid, vap->va_gid, p))
+ if (error = ufs_chown(vp, vap->va_uid, vap->va_gid, cred, p))
return (error);
if (vap->va_size != VNOVAL) {
if (vp->v_type == VDIR)
return (error);
if (vap->va_size != VNOVAL) {
if (vp->v_type == VDIR)
}
error = 0;
if (vap->va_mode != (u_short)VNOVAL)
}
error = 0;
if (vap->va_mode != (u_short)VNOVAL)
- error = ufs_chmod(vp, (int)vap->va_mode, p);
+ error = ufs_chmod(vp, (int)vap->va_mode, cred, p);
if (vap->va_flags != VNOVAL) {
if (cred->cr_uid != ip->i_uid &&
(error = suser(cred, &p->p_acflag)))
if (vap->va_flags != VNOVAL) {
if (cred->cr_uid != ip->i_uid &&
(error = suser(cred, &p->p_acflag)))
* Inode must be locked before calling.
*/
static int
* Inode must be locked before calling.
*/
static int
+ufs_chmod(vp, mode, cred, p)
register struct vnode *vp;
register int mode;
register struct vnode *vp;
register int mode;
+ register struct ucred *cred;
- register struct ucred *cred = p->p_ucred;
register struct inode *ip = VTOI(vp);
int error;
register struct inode *ip = VTOI(vp);
int error;
* inode must be locked prior to call.
*/
static int
* inode must be locked prior to call.
*/
static int
-ufs_chown(vp, uid, gid, p)
+ufs_chown(vp, uid, gid, cred, p)
register struct vnode *vp;
u_int uid;
u_int gid;
register struct vnode *vp;
u_int uid;
u_int gid;
struct proc *p;
{
register struct inode *ip = VTOI(vp);
struct proc *p;
{
register struct inode *ip = VTOI(vp);
- register struct ucred *cred = p->p_ucred;
uid_t ouid;
gid_t ogid;
int error = 0;
uid_t ouid;
gid_t ogid;
int error = 0;
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)ufs_extern.h 7.4 (Berkeley) %G%
+ * @(#)ufs_extern.h 7.5 (Berkeley) %G%
int ufs_advlock __P((struct vnode *, caddr_t, int, struct flock *, int));
void ufs_bufstats __P((void));
int ufs_checkpath __P((struct inode *, struct inode *, struct ucred *));
int ufs_advlock __P((struct vnode *, caddr_t, int, struct flock *, int));
void ufs_bufstats __P((void));
int ufs_checkpath __P((struct inode *, struct inode *, struct ucred *));
-int ufs_chmod __P((struct vnode *, int, struct proc *));
-int ufs_chown __P((struct vnode *, u_int, u_int, struct proc *));
+int ufs_chmod __P((struct vnode *, int, struct ucred *, struct proc *));
+int ufs_chown
+ __P((struct vnode *, u_int, u_int, struct ucred *, struct proc *));
int ufs_close __P((struct vnode *, int, struct ucred *, struct proc *));
int ufs_create __P((struct vnode *, struct vnode **,
struct componentname *, struct vattr *));
int ufs_close __P((struct vnode *, int, struct ucred *, struct proc *));
int ufs_create __P((struct vnode *, struct vnode **,
struct componentname *, struct vattr *));
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)ufs_vnops.c 7.83 (Berkeley) %G%
+ * @(#)ufs_vnops.c 7.84 (Berkeley) %G%
*/
#include <sys/param.h>
*/
#include <sys/param.h>
#include <ufs/ufs/ufsmount.h>
#include <ufs/ufs/ufs_extern.h>
#include <ufs/ufs/ufsmount.h>
#include <ufs/ufs/ufs_extern.h>
-int ufs_chmod __P((struct vnode *, int, struct proc *));
-int ufs_chown __P((struct vnode *, u_int, u_int, struct proc *));
+int ufs_chmod __P((struct vnode *, int, struct ucred *, struct proc *));
+int ufs_chown
+ __P((struct vnode *, u_int, u_int, struct ucred *, struct proc *));
#ifdef _NOQUAD
#define SETHIGH(q, h) (q).val[_QUAD_HIGHWORD] = (h)
#ifdef _NOQUAD
#define SETHIGH(q, h) (q).val[_QUAD_HIGHWORD] = (h)
* Go through the fields and update iff not VNOVAL.
*/
if (vap->va_uid != (u_short)VNOVAL || vap->va_gid != (u_short)VNOVAL)
* Go through the fields and update iff not VNOVAL.
*/
if (vap->va_uid != (u_short)VNOVAL || vap->va_gid != (u_short)VNOVAL)
- if (error = ufs_chown(vp, vap->va_uid, vap->va_gid, p))
+ if (error = ufs_chown(vp, vap->va_uid, vap->va_gid, cred, p))
return (error);
if (vap->va_size != VNOVAL) {
if (vp->v_type == VDIR)
return (error);
if (vap->va_size != VNOVAL) {
if (vp->v_type == VDIR)
}
error = 0;
if (vap->va_mode != (u_short)VNOVAL)
}
error = 0;
if (vap->va_mode != (u_short)VNOVAL)
- error = ufs_chmod(vp, (int)vap->va_mode, p);
+ error = ufs_chmod(vp, (int)vap->va_mode, cred, p);
if (vap->va_flags != VNOVAL) {
if (cred->cr_uid != ip->i_uid &&
(error = suser(cred, &p->p_acflag)))
if (vap->va_flags != VNOVAL) {
if (cred->cr_uid != ip->i_uid &&
(error = suser(cred, &p->p_acflag)))
* Inode must be locked before calling.
*/
static int
* Inode must be locked before calling.
*/
static int
+ufs_chmod(vp, mode, cred, p)
register struct vnode *vp;
register int mode;
register struct vnode *vp;
register int mode;
+ register struct ucred *cred;
- register struct ucred *cred = p->p_ucred;
register struct inode *ip = VTOI(vp);
int error;
register struct inode *ip = VTOI(vp);
int error;
* inode must be locked prior to call.
*/
static int
* inode must be locked prior to call.
*/
static int
-ufs_chown(vp, uid, gid, p)
+ufs_chown(vp, uid, gid, cred, p)
register struct vnode *vp;
u_int uid;
u_int gid;
register struct vnode *vp;
u_int uid;
u_int gid;
struct proc *p;
{
register struct inode *ip = VTOI(vp);
struct proc *p;
{
register struct inode *ip = VTOI(vp);
- register struct ucred *cred = p->p_ucred;
uid_t ouid;
gid_t ogid;
int error = 0;
uid_t ouid;
gid_t ogid;
int error = 0;