summaryrefslogtreecommitdiffstats
path: root/sys/security
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>2003-01-12 01:37:13 +0000
committerdillon <dillon@FreeBSD.org>2003-01-12 01:37:13 +0000
commitddf9ef103e0a611c9a01425a28baf8a612b0d114 (patch)
tree19da0d56c468b8e0f6d0361d7d39157f561aa69f /sys/security
parent07cbccc353d7afbe8948b6025965ca36739d7373 (diff)
downloadFreeBSD-src-ddf9ef103e0a611c9a01425a28baf8a612b0d114.zip
FreeBSD-src-ddf9ef103e0a611c9a01425a28baf8a612b0d114.tar.gz
Change struct file f_data to un_data, a union of the correct struct
pointer types, and remove a huge number of casts from code using it. Change struct xfile xf_data to xun_data (ABI is still compatible). If we need to add a #define for f_data and xf_data we can, but I don't think it will be necessary. There are no operational changes in this commit.
Diffstat (limited to 'sys/security')
-rw-r--r--sys/security/mac/mac_framework.c8
-rw-r--r--sys/security/mac/mac_internal.h8
-rw-r--r--sys/security/mac/mac_net.c8
-rw-r--r--sys/security/mac/mac_pipe.c8
-rw-r--r--sys/security/mac/mac_process.c8
-rw-r--r--sys/security/mac/mac_syscalls.c8
-rw-r--r--sys/security/mac/mac_system.c8
-rw-r--r--sys/security/mac/mac_vfs.c8
8 files changed, 32 insertions, 32 deletions
diff --git a/sys/security/mac/mac_framework.c b/sys/security/mac/mac_framework.c
index 6542a73..299ad50 100644
--- a/sys/security/mac/mac_framework.c
+++ b/sys/security/mac/mac_framework.c
@@ -3211,7 +3211,7 @@ __mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap)
switch (fp->f_type) {
case DTYPE_FIFO:
case DTYPE_VNODE:
- vp = (struct vnode *)fp->f_data;
+ vp = fp->un_data.vnode;
mac_init_vnode_label(&intlabel);
@@ -3221,7 +3221,7 @@ __mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap)
break;
case DTYPE_PIPE:
- pipe = (struct pipe *)fp->f_data;
+ pipe = fp->un_data.pipe;
mac_init_pipe_label(&intlabel);
@@ -3419,7 +3419,7 @@ __mac_set_fd(struct thread *td, struct __mac_set_fd_args *uap)
break;
}
- vp = (struct vnode *)fp->f_data;
+ vp = fp->un_data.vnode;
error = vn_start_write(vp, &mp, V_WAIT | PCATCH);
if (error != 0) {
mac_destroy_vnode_label(&intlabel);
@@ -3438,7 +3438,7 @@ __mac_set_fd(struct thread *td, struct __mac_set_fd_args *uap)
mac_init_pipe_label(&intlabel);
error = mac_internalize_pipe_label(&intlabel, buffer);
if (error == 0) {
- pipe = (struct pipe *)fp->f_data;
+ pipe = fp->un_data.pipe;
PIPE_LOCK(pipe);
error = mac_pipe_label_set(td->td_ucred, pipe,
&intlabel);
diff --git a/sys/security/mac/mac_internal.h b/sys/security/mac/mac_internal.h
index 6542a73..299ad50 100644
--- a/sys/security/mac/mac_internal.h
+++ b/sys/security/mac/mac_internal.h
@@ -3211,7 +3211,7 @@ __mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap)
switch (fp->f_type) {
case DTYPE_FIFO:
case DTYPE_VNODE:
- vp = (struct vnode *)fp->f_data;
+ vp = fp->un_data.vnode;
mac_init_vnode_label(&intlabel);
@@ -3221,7 +3221,7 @@ __mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap)
break;
case DTYPE_PIPE:
- pipe = (struct pipe *)fp->f_data;
+ pipe = fp->un_data.pipe;
mac_init_pipe_label(&intlabel);
@@ -3419,7 +3419,7 @@ __mac_set_fd(struct thread *td, struct __mac_set_fd_args *uap)
break;
}
- vp = (struct vnode *)fp->f_data;
+ vp = fp->un_data.vnode;
error = vn_start_write(vp, &mp, V_WAIT | PCATCH);
if (error != 0) {
mac_destroy_vnode_label(&intlabel);
@@ -3438,7 +3438,7 @@ __mac_set_fd(struct thread *td, struct __mac_set_fd_args *uap)
mac_init_pipe_label(&intlabel);
error = mac_internalize_pipe_label(&intlabel, buffer);
if (error == 0) {
- pipe = (struct pipe *)fp->f_data;
+ pipe = fp->un_data.pipe;
PIPE_LOCK(pipe);
error = mac_pipe_label_set(td->td_ucred, pipe,
&intlabel);
diff --git a/sys/security/mac/mac_net.c b/sys/security/mac/mac_net.c
index 6542a73..299ad50 100644
--- a/sys/security/mac/mac_net.c
+++ b/sys/security/mac/mac_net.c
@@ -3211,7 +3211,7 @@ __mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap)
switch (fp->f_type) {
case DTYPE_FIFO:
case DTYPE_VNODE:
- vp = (struct vnode *)fp->f_data;
+ vp = fp->un_data.vnode;
mac_init_vnode_label(&intlabel);
@@ -3221,7 +3221,7 @@ __mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap)
break;
case DTYPE_PIPE:
- pipe = (struct pipe *)fp->f_data;
+ pipe = fp->un_data.pipe;
mac_init_pipe_label(&intlabel);
@@ -3419,7 +3419,7 @@ __mac_set_fd(struct thread *td, struct __mac_set_fd_args *uap)
break;
}
- vp = (struct vnode *)fp->f_data;
+ vp = fp->un_data.vnode;
error = vn_start_write(vp, &mp, V_WAIT | PCATCH);
if (error != 0) {
mac_destroy_vnode_label(&intlabel);
@@ -3438,7 +3438,7 @@ __mac_set_fd(struct thread *td, struct __mac_set_fd_args *uap)
mac_init_pipe_label(&intlabel);
error = mac_internalize_pipe_label(&intlabel, buffer);
if (error == 0) {
- pipe = (struct pipe *)fp->f_data;
+ pipe = fp->un_data.pipe;
PIPE_LOCK(pipe);
error = mac_pipe_label_set(td->td_ucred, pipe,
&intlabel);
diff --git a/sys/security/mac/mac_pipe.c b/sys/security/mac/mac_pipe.c
index 6542a73..299ad50 100644
--- a/sys/security/mac/mac_pipe.c
+++ b/sys/security/mac/mac_pipe.c
@@ -3211,7 +3211,7 @@ __mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap)
switch (fp->f_type) {
case DTYPE_FIFO:
case DTYPE_VNODE:
- vp = (struct vnode *)fp->f_data;
+ vp = fp->un_data.vnode;
mac_init_vnode_label(&intlabel);
@@ -3221,7 +3221,7 @@ __mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap)
break;
case DTYPE_PIPE:
- pipe = (struct pipe *)fp->f_data;
+ pipe = fp->un_data.pipe;
mac_init_pipe_label(&intlabel);
@@ -3419,7 +3419,7 @@ __mac_set_fd(struct thread *td, struct __mac_set_fd_args *uap)
break;
}
- vp = (struct vnode *)fp->f_data;
+ vp = fp->un_data.vnode;
error = vn_start_write(vp, &mp, V_WAIT | PCATCH);
if (error != 0) {
mac_destroy_vnode_label(&intlabel);
@@ -3438,7 +3438,7 @@ __mac_set_fd(struct thread *td, struct __mac_set_fd_args *uap)
mac_init_pipe_label(&intlabel);
error = mac_internalize_pipe_label(&intlabel, buffer);
if (error == 0) {
- pipe = (struct pipe *)fp->f_data;
+ pipe = fp->un_data.pipe;
PIPE_LOCK(pipe);
error = mac_pipe_label_set(td->td_ucred, pipe,
&intlabel);
diff --git a/sys/security/mac/mac_process.c b/sys/security/mac/mac_process.c
index 6542a73..299ad50 100644
--- a/sys/security/mac/mac_process.c
+++ b/sys/security/mac/mac_process.c
@@ -3211,7 +3211,7 @@ __mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap)
switch (fp->f_type) {
case DTYPE_FIFO:
case DTYPE_VNODE:
- vp = (struct vnode *)fp->f_data;
+ vp = fp->un_data.vnode;
mac_init_vnode_label(&intlabel);
@@ -3221,7 +3221,7 @@ __mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap)
break;
case DTYPE_PIPE:
- pipe = (struct pipe *)fp->f_data;
+ pipe = fp->un_data.pipe;
mac_init_pipe_label(&intlabel);
@@ -3419,7 +3419,7 @@ __mac_set_fd(struct thread *td, struct __mac_set_fd_args *uap)
break;
}
- vp = (struct vnode *)fp->f_data;
+ vp = fp->un_data.vnode;
error = vn_start_write(vp, &mp, V_WAIT | PCATCH);
if (error != 0) {
mac_destroy_vnode_label(&intlabel);
@@ -3438,7 +3438,7 @@ __mac_set_fd(struct thread *td, struct __mac_set_fd_args *uap)
mac_init_pipe_label(&intlabel);
error = mac_internalize_pipe_label(&intlabel, buffer);
if (error == 0) {
- pipe = (struct pipe *)fp->f_data;
+ pipe = fp->un_data.pipe;
PIPE_LOCK(pipe);
error = mac_pipe_label_set(td->td_ucred, pipe,
&intlabel);
diff --git a/sys/security/mac/mac_syscalls.c b/sys/security/mac/mac_syscalls.c
index 6542a73..299ad50 100644
--- a/sys/security/mac/mac_syscalls.c
+++ b/sys/security/mac/mac_syscalls.c
@@ -3211,7 +3211,7 @@ __mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap)
switch (fp->f_type) {
case DTYPE_FIFO:
case DTYPE_VNODE:
- vp = (struct vnode *)fp->f_data;
+ vp = fp->un_data.vnode;
mac_init_vnode_label(&intlabel);
@@ -3221,7 +3221,7 @@ __mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap)
break;
case DTYPE_PIPE:
- pipe = (struct pipe *)fp->f_data;
+ pipe = fp->un_data.pipe;
mac_init_pipe_label(&intlabel);
@@ -3419,7 +3419,7 @@ __mac_set_fd(struct thread *td, struct __mac_set_fd_args *uap)
break;
}
- vp = (struct vnode *)fp->f_data;
+ vp = fp->un_data.vnode;
error = vn_start_write(vp, &mp, V_WAIT | PCATCH);
if (error != 0) {
mac_destroy_vnode_label(&intlabel);
@@ -3438,7 +3438,7 @@ __mac_set_fd(struct thread *td, struct __mac_set_fd_args *uap)
mac_init_pipe_label(&intlabel);
error = mac_internalize_pipe_label(&intlabel, buffer);
if (error == 0) {
- pipe = (struct pipe *)fp->f_data;
+ pipe = fp->un_data.pipe;
PIPE_LOCK(pipe);
error = mac_pipe_label_set(td->td_ucred, pipe,
&intlabel);
diff --git a/sys/security/mac/mac_system.c b/sys/security/mac/mac_system.c
index 6542a73..299ad50 100644
--- a/sys/security/mac/mac_system.c
+++ b/sys/security/mac/mac_system.c
@@ -3211,7 +3211,7 @@ __mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap)
switch (fp->f_type) {
case DTYPE_FIFO:
case DTYPE_VNODE:
- vp = (struct vnode *)fp->f_data;
+ vp = fp->un_data.vnode;
mac_init_vnode_label(&intlabel);
@@ -3221,7 +3221,7 @@ __mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap)
break;
case DTYPE_PIPE:
- pipe = (struct pipe *)fp->f_data;
+ pipe = fp->un_data.pipe;
mac_init_pipe_label(&intlabel);
@@ -3419,7 +3419,7 @@ __mac_set_fd(struct thread *td, struct __mac_set_fd_args *uap)
break;
}
- vp = (struct vnode *)fp->f_data;
+ vp = fp->un_data.vnode;
error = vn_start_write(vp, &mp, V_WAIT | PCATCH);
if (error != 0) {
mac_destroy_vnode_label(&intlabel);
@@ -3438,7 +3438,7 @@ __mac_set_fd(struct thread *td, struct __mac_set_fd_args *uap)
mac_init_pipe_label(&intlabel);
error = mac_internalize_pipe_label(&intlabel, buffer);
if (error == 0) {
- pipe = (struct pipe *)fp->f_data;
+ pipe = fp->un_data.pipe;
PIPE_LOCK(pipe);
error = mac_pipe_label_set(td->td_ucred, pipe,
&intlabel);
diff --git a/sys/security/mac/mac_vfs.c b/sys/security/mac/mac_vfs.c
index 6542a73..299ad50 100644
--- a/sys/security/mac/mac_vfs.c
+++ b/sys/security/mac/mac_vfs.c
@@ -3211,7 +3211,7 @@ __mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap)
switch (fp->f_type) {
case DTYPE_FIFO:
case DTYPE_VNODE:
- vp = (struct vnode *)fp->f_data;
+ vp = fp->un_data.vnode;
mac_init_vnode_label(&intlabel);
@@ -3221,7 +3221,7 @@ __mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap)
break;
case DTYPE_PIPE:
- pipe = (struct pipe *)fp->f_data;
+ pipe = fp->un_data.pipe;
mac_init_pipe_label(&intlabel);
@@ -3419,7 +3419,7 @@ __mac_set_fd(struct thread *td, struct __mac_set_fd_args *uap)
break;
}
- vp = (struct vnode *)fp->f_data;
+ vp = fp->un_data.vnode;
error = vn_start_write(vp, &mp, V_WAIT | PCATCH);
if (error != 0) {
mac_destroy_vnode_label(&intlabel);
@@ -3438,7 +3438,7 @@ __mac_set_fd(struct thread *td, struct __mac_set_fd_args *uap)
mac_init_pipe_label(&intlabel);
error = mac_internalize_pipe_label(&intlabel, buffer);
if (error == 0) {
- pipe = (struct pipe *)fp->f_data;
+ pipe = fp->un_data.pipe;
PIPE_LOCK(pipe);
error = mac_pipe_label_set(td->td_ucred, pipe,
&intlabel);
OpenPOWER on IntegriCloud