PERFORCE change 36506 for review
Robert Watson
rwatson at FreeBSD.org
Wed Aug 20 18:37:46 GMT 2003
http://perforce.freebsd.org/chv.cgi?CH=36506
Change 36506 by rwatson at rwatson_paprika on 2003/08/20 11:36:57
Just a tiny bit more whitespace synchronization. The two trees
are now fairly whitespace consistent.
Affected files ...
.. //depot/projects/trustedbsd/mac/sys/security/sebsd/sebsd.c#71 edit
Differences ...
==== //depot/projects/trustedbsd/mac/sys/security/sebsd/sebsd.c#71 (text+ko) ====
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2002 Networks Associates Technology, Inc.
+ * Copyright (c) 2002, 2003 Networks Associates Technology, Inc.
* All rights reserved.
*
* This software was developed for the FreeBSD Project by NAI Labs, the
@@ -1169,35 +1169,39 @@
static int
sebsd_check_vnode_poll(struct ucred *cred, struct ucred *file_cred,
- struct vnode *vp, struct label *label)
+ struct vnode *vp, struct label *label)
{
+
return vnode_has_perm(cred, vp, FILE__POLL, NULL);
}
static int
sebsd_check_vnode_read(struct ucred *cred, struct ucred *file_cred,
- struct vnode *vp, struct label *label)
+ struct vnode *vp, struct label *label)
{
+
return vnode_has_perm(cred, vp, FILE__READ, NULL);
}
static int
sebsd_check_vnode_readdir(struct ucred *cred, struct vnode *dvp,
- struct label *dlabel)
+ struct label *dlabel)
{
+
return vnode_has_perm(cred, dvp, DIR__READ, NULL);
}
static int
sebsd_check_vnode_readlink(struct ucred *cred, struct vnode *vp,
- struct label *label)
+ struct label *label)
{
+
return vnode_has_perm(cred, vp, FILE__READ, NULL);
}
static int
sebsd_check_vnode_relabel(struct ucred *cred, struct vnode *vp,
- struct label *oldlabel, struct label *newlabel)
+ struct label *oldlabel, struct label *newlabel)
{
struct task_security_struct *task;
struct vnode_security_struct *old, *new;
@@ -1237,8 +1241,8 @@
static int
sebsd_check_vnode_rename_from(struct ucred *cred, struct vnode *dvp,
- struct label *dlabel, struct vnode *vp,
- struct label *label, struct componentname *cnp)
+ struct label *dlabel, struct vnode *vp, struct label *label,
+ struct componentname *cnp)
{
struct task_security_struct *task;
struct vnode_security_struct *old_dir, *old_file;
@@ -1273,9 +1277,8 @@
static int
sebsd_check_vnode_rename_to(struct ucred *cred, struct vnode *dvp,
- struct label *dlabel, struct vnode *vp,
- struct label *label, int samedir,
- struct componentname *cnp)
+ struct label *dlabel, struct vnode *vp, struct label *label, int samedir,
+ struct componentname *cnp)
{
struct task_security_struct *task;
struct vnode_security_struct *new_dir, *new_file;
@@ -1337,74 +1340,82 @@
static int
sebsd_check_vnode_revoke(struct ucred *cred, struct vnode *vp,
- struct label *label)
+ struct label *label)
{
+
/* TBD: Not Implemented */
return 0;
}
static int
sebsd_check_vnode_setacl(struct ucred *cred, struct vnode *vp,
- struct label *label, acl_type_t type, struct acl *acl)
+ struct label *label, acl_type_t type, struct acl *acl)
{
+
return vnode_has_perm(cred, vp, FILE__SETATTR, NULL);
}
static int
sebsd_check_vnode_setextattr(struct ucred *cred, struct vnode *vp,
- struct label *label, int attrnamespace,
- const char *name, struct uio *uio)
+ struct label *label, int attrnamespace, const char *name, struct uio *uio)
{
+
return vnode_has_perm(cred, vp, FILE__SETATTR, NULL);
}
static int
sebsd_check_vnode_setflags(struct ucred *cred, struct vnode *vp,
- struct label *label, u_long flags)
+ struct label *label, u_long flags)
{
+
return vnode_has_perm(cred, vp, FILE__SETATTR, NULL);
}
static int
sebsd_check_vnode_setmode(struct ucred *cred, struct vnode *vp,
- struct label *label, mode_t mode)
+ struct label *label, mode_t mode)
{
+
return vnode_has_perm(cred, vp, FILE__SETATTR, NULL);
}
static int
sebsd_check_vnode_setowner(struct ucred *cred, struct vnode *vp,
- struct label *label, uid_t uid, gid_t gid)
+ struct label *label, uid_t uid, gid_t gid)
{
+
return vnode_has_perm(cred, vp, FILE__SETATTR, NULL);
}
static int
sebsd_check_vnode_setutimes(struct ucred *cred, struct vnode *vp,
- struct label *label, struct timespec atime,
- struct timespec mtime)
+ struct label *label, struct timespec atime, struct timespec mtime)
{
+
return vnode_has_perm(cred, vp, FILE__SETATTR, NULL);
}
static int
sebsd_check_vnode_stat(struct ucred *cred, struct ucred *file_cred,
- struct vnode *vp, struct label *vnodelabel)
+ struct vnode *vp, struct label *vnodelabel)
{
+
return vnode_has_perm(cred, vp, FILE__GETATTR, NULL);
}
static int
sebsd_check_system_swapon(struct ucred *cred, struct vnode *vp,
- struct label *vnodelabel)
+ struct label *vnodelabel)
{
+
return vnode_has_perm(cred, vp, FILE__SWAPON, NULL);
}
static int
sebsd_check_vnode_write(struct ucred *cred, struct ucred *file_cred,
- struct vnode *vp, struct label *label)
+ struct vnode *vp, struct label *label)
{
+
return vnode_has_perm(cred, vp, FILE__WRITE, NULL);
}
@@ -1413,9 +1424,8 @@
*/
static int
sebsd_check_vnode_mmap(struct ucred *cred, struct vnode *vp,
- struct label *label, int newmapping)
+ struct label *label, int newmapping)
{
-
access_vector_t av;
/*
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message
More information about the trustedbsd-cvs
mailing list