PERFORCE change 37136 for review
Robert Watson
rwatson at FreeBSD.org
Fri Aug 29 02:16:29 GMT 2003
http://perforce.freebsd.org/chv.cgi?CH=37136
Change 37136 by rwatson at rwatson_tislabs on 2003/08/28 19:15:37
Whitespace cleanup to style(9).
Affected files ...
.. //depot/projects/trustedbsd/mac/sys/sys/mac.h#243 edit
.. //depot/projects/trustedbsd/mac/sys/sys/mac_policy.h#196 edit
Differences ...
==== //depot/projects/trustedbsd/mac/sys/sys/mac.h#243 (text+ko) ====
@@ -77,27 +77,26 @@
* Extended non-POSIX.1e interfaces that offer additional services
* available from the userland and kernel MAC frameworks.
*/
-int mac_execve(char *fname, char **argv, char **envv,
- mac_t _label);
-int mac_free(mac_t _label);
-int mac_from_text(mac_t *_label, const char *_text);
-int mac_get_fd(int _fd, mac_t _label);
-int mac_get_file(const char *_path, mac_t _label);
-int mac_get_link(const char *_path, mac_t _label);
-int mac_get_pid(pid_t _pid, mac_t _label);
-int mac_get_proc(mac_t _label);
-int mac_is_present(const char *_policyname);
-int mac_prepare(mac_t *_label, char *_elements);
-int mac_prepare_file_label(mac_t *_label);
-int mac_prepare_ifnet_label(mac_t *_label);
-int mac_prepare_process_label(mac_t *_label);
-int mac_prepare_type(mac_t *_label, const char *_type);
-int mac_set_fd(int _fildes, const mac_t _label);
-int mac_set_file(const char *_path, mac_t _label);
-int mac_set_link(const char *_path, mac_t _label);
-int mac_set_proc(const mac_t _label);
-int mac_syscall(const char *_policyname, int _call, void *_arg);
-int mac_to_text(mac_t mac, char **_text);
+int mac_execve(char *fname, char **argv, char **envv, mac_t _label);
+int mac_free(mac_t _label);
+int mac_from_text(mac_t *_label, const char *_text);
+int mac_get_fd(int _fd, mac_t _label);
+int mac_get_file(const char *_path, mac_t _label);
+int mac_get_link(const char *_path, mac_t _label);
+int mac_get_pid(pid_t _pid, mac_t _label);
+int mac_get_proc(mac_t _label);
+int mac_is_present(const char *_policyname);
+int mac_prepare(mac_t *_label, char *_elements);
+int mac_prepare_file_label(mac_t *_label);
+int mac_prepare_ifnet_label(mac_t *_label);
+int mac_prepare_process_label(mac_t *_label);
+int mac_prepare_type(mac_t *_label, const char *_type);
+int mac_set_fd(int _fildes, const mac_t _label);
+int mac_set_file(const char *_path, mac_t _label);
+int mac_set_link(const char *_path, mac_t _label);
+int mac_set_proc(const mac_t _label);
+int mac_syscall(const char *_policyname, int _call, void *_arg);
+int mac_to_text(mac_t mac, char **_text);
#else /* _KERNEL */
@@ -159,7 +158,7 @@
void mac_destroy_cred(struct ucred *);
void mac_destroy_devfsdirent(struct devfs_dirent *);
void mac_destroy_ifnet(struct ifnet *);
-void mac_destroy_ipc_msgmsg(struct msg *);
+void mac_destroy_ipc_msgmsg(struct msg *);
void mac_destroy_ipc_msgqueue(struct msqid_kernel *);
void mac_destroy_ipc_sema(struct semid_kernel *);
void mac_destroy_ipc_shm(struct shmid_kernel *);
@@ -212,10 +211,13 @@
/*
* Labeling event operations: System V IPC primitives
*/
-void mac_create_ipc_msgmsg(struct ucred *cred, struct msg *msgptr);
-void mac_create_ipc_msgqueue(struct ucred *cred, struct msqid_kernel *msqkptr);
-void mac_create_ipc_sema(struct ucred *cred, struct semid_kernel *semakptr);
-void mac_create_ipc_shm(struct ucred *cred, struct shmid_kernel *shmsegptr);
+void mac_create_ipc_msgmsg(struct ucred *cred, struct msg *msgptr);
+void mac_create_ipc_msgqueue(struct ucred *cred,
+ struct msqid_kernel *msqkptr);
+void mac_create_ipc_sema(struct ucred *cred,
+ struct semid_kernel *semakptr);
+void mac_create_ipc_shm(struct ucred *cred,
+ struct shmid_kernel *shmsegptr);
/*
@@ -256,43 +258,49 @@
void mac_thread_userret(struct thread *td);
/*
- * Label cleanup operation: This is the inverse complement for the mac_create
- * and associate type of hooks. This hook lets the policy module(s) perform a
- * cleanup/flushing operation on the label associated with the objects,
- * without freeing up the space allocated. This hook is useful in cases where it
- * is desirable to remove any labeling reference when recycling any object to a
- * pool. This hook does not replace the mac_destroy hooks.
+ * Label cleanup operation: This is the inverse complement for the
+ * mac_create and associate type of hooks. This hook lets the policy
+ * module(s) perform a cleanup/flushing operation on the label
+ * associated with the objects, without freeing up the space allocated.
+ * This hook is useful in cases where it is desirable to remove any
+ * labeling reference when recycling any object to a pool. This hook
+ * does not replace the mac_destroy hooks.
*/
-void mac_cleanup_ipc_msgmsg(struct msg *msgptr);
-void mac_cleanup_ipc_msgqueue(struct msqid_kernel *msqkptr);
-void mac_cleanup_ipc_sema(struct semid_kernel *semakptr);
-void mac_cleanup_ipc_shm(struct shmid_kernel *shmsegptr);
+void mac_cleanup_ipc_msgmsg(struct msg *msgptr);
+void mac_cleanup_ipc_msgqueue(struct msqid_kernel *msqkptr);
+void mac_cleanup_ipc_sema(struct semid_kernel *semakptr);
+void mac_cleanup_ipc_shm(struct shmid_kernel *shmsegptr);
/* Access control checks. */
int mac_check_bpfdesc_receive(struct bpf_d *bpf_d, struct ifnet *ifnet);
int mac_check_cred_visible(struct ucred *u1, struct ucred *u2);
int mac_check_ifnet_transmit(struct ifnet *ifnet, struct mbuf *m);
-int mac_check_ipc_msgmsq(struct ucred *cred, struct msg *msgptr,
- struct msqid_kernel *msqkptr);
-int mac_check_ipc_msgrcv(struct ucred *cred, struct msg *msgptr);
-int mac_check_ipc_msgrmid(struct ucred *cred, struct msg *msgptr);
-int mac_check_ipc_msqget(struct ucred *cred, struct msqid_kernel *msqkptr);
-int mac_check_ipc_msqsnd(struct ucred *cred, struct msqid_kernel *msqkptr);
-int mac_check_ipc_msqrcv(struct ucred *cred, struct msqid_kernel *msqkptr);
-int mac_check_ipc_msqctl(struct ucred *cred, struct msqid_kernel *msqkptr,
- int cmd);
-int mac_check_ipc_semctl(struct ucred *cred, struct semid_kernel *semakptr,
- int cmd);
-int mac_check_ipc_semget(struct ucred *cred, struct semid_kernel *semakptr);
-int mac_check_ipc_semop(struct ucred *cred, struct semid_kernel *semakptr,
- size_t accesstype);
-int mac_check_ipc_shmat(struct ucred *cred, struct shmid_kernel *shmsegptr,
- int shmflg);
-int mac_check_ipc_shmctl(struct ucred *cred, struct shmid_kernel *shmsegptr,
- int cmd);
-int mac_check_ipc_shmdt(struct ucred *cred, struct shmid_kernel *shmsegptr);
-int mac_check_ipc_shmget(struct ucred *cred, struct shmid_kernel *shmsegptr,
- int shmflg);
+int mac_check_ipc_msgmsq(struct ucred *cred, struct msg *msgptr,
+ struct msqid_kernel *msqkptr);
+int mac_check_ipc_msgrcv(struct ucred *cred, struct msg *msgptr);
+int mac_check_ipc_msgrmid(struct ucred *cred, struct msg *msgptr);
+int mac_check_ipc_msqget(struct ucred *cred,
+ struct msqid_kernel *msqkptr);
+int mac_check_ipc_msqsnd(struct ucred *cred,
+ struct msqid_kernel *msqkptr);
+int mac_check_ipc_msqrcv(struct ucred *cred,
+ struct msqid_kernel *msqkptr);
+int mac_check_ipc_msqctl(struct ucred *cred,
+ struct msqid_kernel *msqkptr, int cmd);
+int mac_check_ipc_semctl(struct ucred *cred,
+ struct semid_kernel *semakptr, int cmd);
+int mac_check_ipc_semget(struct ucred *cred,
+ struct semid_kernel *semakptr);
+int mac_check_ipc_semop(struct ucred *cred,struct semid_kernel *semakptr,
+ size_t accesstype);
+int mac_check_ipc_shmat(struct ucred *cred,
+ struct shmid_kernel *shmsegptr, int shmflg);
+int mac_check_ipc_shmctl(struct ucred *cred,
+ struct shmid_kernel *shmsegptr, int cmd);
+int mac_check_ipc_shmdt(struct ucred *cred,
+ struct shmid_kernel *shmsegptr);
+int mac_check_ipc_shmget(struct ucred *cred,
+ struct shmid_kernel *shmsegptr, int shmflg);
int mac_check_kenv_dump(struct ucred *cred);
int mac_check_kenv_get(struct ucred *cred, char *name);
int mac_check_kenv_set(struct ucred *cred, char *name, char *value);
==== //depot/projects/trustedbsd/mac/sys/sys/mac_policy.h#196 (text+ko) ====
@@ -88,8 +88,8 @@
void (*mpo_init_ifnet_label)(struct label *label);
void (*mpo_init_ipc_msgmsg_label)(struct label *label);
void (*mpo_init_ipc_msgqueue_label)(struct label* label);
- void (*mpo_init_ipc_sema_label)(struct label* label);
- void (*mpo_init_ipc_shm_label)(struct label* label);
+ void (*mpo_init_ipc_sema_label)(struct label* label);
+ void (*mpo_init_ipc_shm_label)(struct label* label);
int (*mpo_init_ipq_label)(struct label *label, int flag);
int (*mpo_init_mbuf_label)(struct label *label, int flag);
void (*mpo_init_mount_label)(struct label *label);
@@ -103,10 +103,10 @@
void (*mpo_destroy_cred_label)(struct label *label);
void (*mpo_destroy_devfsdirent_label)(struct label *label);
void (*mpo_destroy_ifnet_label)(struct label *label);
- void (*mpo_destroy_ipc_msgmsg_label)(struct label* label);
- void (*mpo_destroy_ipc_msgqueue_label)(struct label* label);
- void (*mpo_destroy_ipc_sema_label)(struct label* label);
- void (*mpo_destroy_ipc_shm_label)(struct label* label);
+ void (*mpo_destroy_ipc_msgmsg_label)(struct label* label);
+ void (*mpo_destroy_ipc_msgqueue_label)(struct label* label);
+ void (*mpo_destroy_ipc_sema_label)(struct label* label);
+ void (*mpo_destroy_ipc_shm_label)(struct label* label);
void (*mpo_destroy_ipq_label)(struct label *label);
void (*mpo_destroy_mbuf_label)(struct label *label);
void (*mpo_destroy_mount_label)(struct label *label);
@@ -215,14 +215,14 @@
/*
* Labeling event operations: System V IPC primitives
*/
- void (*mpo_create_ipc_msgmsg)(struct ucred *cred,
- struct msg *msgptr, struct label *msglabel);
+ void (*mpo_create_ipc_msgmsg)(struct ucred *cred, struct msg *msgptr,
+ struct label *msglabel);
void (*mpo_create_ipc_msgqueue)(struct ucred *cred,
- struct msqid_kernel *msqkptr, struct label *msqlabel);
+ struct msqid_kernel *msqkptr, struct label *msqlabel);
void (*mpo_create_ipc_sema)(struct ucred *cred,
- struct semid_kernel *semakptr, struct label *semalabel);
+ struct semid_kernel *semakptr, struct label *semalabel);
void (*mpo_create_ipc_shm)(struct ucred *cred,
- struct shmid_kernel *shmsegptr, struct label *shmlabel);
+ struct shmid_kernel *shmsegptr, struct label *shmlabel);
/*
* Labeling event operations: network objects.
@@ -302,10 +302,10 @@
* labeling reference when recycling any object to a pool.
* This hook does not replace the mac_destroy hooks.
*/
- void (*mpo_cleanup_ipc_msgmsg)(struct label *msglabel);
- void (*mpo_cleanup_ipc_msgqueue)(struct label *msqlabel);
- void (*mpo_cleanup_ipc_sema)(struct label *semalabel);
- void (*mpo_cleanup_ipc_shm)(struct label *shmlabel);
+ void (*mpo_cleanup_ipc_msgmsg)(struct label *msglabel);
+ void (*mpo_cleanup_ipc_msgqueue)(struct label *msqlabel);
+ void (*mpo_cleanup_ipc_sema)(struct label *semalabel);
+ void (*mpo_cleanup_ipc_shm)(struct label *shmlabel);
/*
* Access control checks.
@@ -322,29 +322,34 @@
int (*mpo_check_ifnet_transmit)(struct ifnet *ifnet,
struct label *ifnetlabel, struct mbuf *m,
struct label *mbuflabel);
- int (*mpo_check_ipc_msgmsq)(struct ucred *cred, struct msg *msgptr,
- struct msqid_kernel *msqkptr);
- int (*mpo_check_ipc_msgrcv)(struct ucred *cred, struct msg *msgptr);
- int (*mpo_check_ipc_msgrmid)(struct ucred *cred, struct msg *msgptr);
- int (*mpo_check_ipc_msqget)(struct ucred *cred, struct msqid_kernel *msqkptr);
- int (*mpo_check_ipc_msqsnd)(struct ucred *cred, struct msqid_kernel *msqkptr);
- int (*mpo_check_ipc_msqrcv)(struct ucred *cred, struct msqid_kernel *msqkptr);
- int (*mpo_check_ipc_msqctl)(struct ucred *cred, struct msqid_kernel *msqkptr,
- int cmd);
- int (*mpo_check_ipc_semctl)(struct ucred *cred, struct semid_kernel *semakptr,
- int cmd);
- int (*mpo_check_ipc_semget)(struct ucred *cred,
- struct semid_kernel *semakptr);
- int (*mpo_check_ipc_semop)(struct ucred *cred, struct semid_kernel *semakptr,
- size_t accesstype);
- int (*mpo_check_ipc_shmat)(struct ucred *cred,
- struct shmid_kernel *shmsegptr, int shmflg);
- int (*mpo_check_ipc_shmctl)(struct ucred *cred,
- struct shmid_kernel *shmsegptr, int cmd);
+ int (*mpo_check_ipc_msgmsq)(struct ucred *cred,
+ struct msg *msgptr, struct msqid_kernel *msqkptr);
+ int (*mpo_check_ipc_msgrcv)(struct ucred *cred,
+ struct msg *msgptr);
+ int (*mpo_check_ipc_msgrmid)(struct ucred *cred,
+ struct msg *msgptr);
+ int (*mpo_check_ipc_msqget)(struct ucred *cred,
+ struct msqid_kernel *msqkptr);
+ int (*mpo_check_ipc_msqsnd)(struct ucred *cred,
+ struct msqid_kernel *msqkptr);
+ int (*mpo_check_ipc_msqrcv)(struct ucred *cred,
+ struct msqid_kernel *msqkptr);
+ int (*mpo_check_ipc_msqctl)(struct ucred *cred,
+ struct msqid_kernel *msqkptr, int cmd);
+ int (*mpo_check_ipc_semctl)(struct ucred *cred,
+ struct semid_kernel *semakptr, int cmd);
+ int (*mpo_check_ipc_semget)(struct ucred *cred,
+ struct semid_kernel *semakptr);
+ int (*mpo_check_ipc_semop)(struct ucred *cred,
+ struct semid_kernel *semakptr, size_t accesstype);
+ int (*mpo_check_ipc_shmat)(struct ucred *cred,
+ struct shmid_kernel *shmsegptr, int shmflg);
+ int (*mpo_check_ipc_shmctl)(struct ucred *cred,
+ struct shmid_kernel *shmsegptr, int cmd);
int (*mpo_check_ipc_shmdt)(struct ucred *cred,
- struct shmid_kernel *shmsegptr);
- int (*mpo_check_ipc_shmget)(struct ucred *cred,
- struct shmid_kernel *shmsegptr, int shmflg);
+ struct shmid_kernel *shmsegptr);
+ int (*mpo_check_ipc_shmget)(struct ucred *cred,
+ struct shmid_kernel *shmsegptr, int shmflg);
int (*mpo_check_kenv_dump)(struct ucred *cred);
int (*mpo_check_kenv_get)(struct ucred *cred, char *name);
int (*mpo_check_kenv_set)(struct ucred *cred, char *name,
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