]> git.saurik.com Git - apple/xnu.git/blobdiff - security/mac_pipe.c
xnu-7195.50.7.100.1.tar.gz
[apple/xnu.git] / security / mac_pipe.c
index 78d733696ec3635918179dcb144dffb7d03dd808..a50c3b5bae39f9323ac07f787b1b1d1ea3815ac4 100644 (file)
@@ -105,33 +105,6 @@ mac_pipe_label_destroy(struct pipe *cpipe)
        cpipe->pipe_label = NULL;
 }
 
-void
-mac_pipe_label_copy(struct label *src, struct label *dest)
-{
-       MAC_PERFORM(pipe_label_copy, src, dest);
-}
-
-int
-mac_pipe_label_externalize(struct label *label, char *elements,
-    char *outbuf, size_t outbuflen)
-{
-       int error;
-
-       error = MAC_EXTERNALIZE(pipe, label, elements, outbuf, outbuflen);
-
-       return error;
-}
-
-int
-mac_pipe_label_internalize(struct label *label, char *string)
-{
-       int error;
-
-       error = MAC_INTERNALIZE(pipe, label, string);
-
-       return error;
-}
-
 void
 mac_pipe_label_associate(kauth_cred_t cred, struct pipe *cpipe)
 {
@@ -154,7 +127,7 @@ mac_pipe_check_kqfilter(kauth_cred_t cred, struct knote *kn,
        return error;
 }
 int
-mac_pipe_check_ioctl(kauth_cred_t cred, struct pipe *cpipe, u_int cmd)
+mac_pipe_check_ioctl(kauth_cred_t cred, struct pipe *cpipe, u_long cmd)
 {
        int error;
 
@@ -187,24 +160,6 @@ mac_pipe_check_read(kauth_cred_t cred, struct pipe *cpipe)
        return error;
 }
 
-static int
-mac_pipe_check_label_update(kauth_cred_t cred, struct pipe *cpipe,
-    struct label *newlabel)
-{
-       int error;
-
-#if SECURITY_MAC_CHECK_ENFORCE
-       /* 21167099 - only check if we allow write */
-       if (!mac_pipe_enforce) {
-               return 0;
-       }
-#endif
-
-       MAC_CHECK(pipe_check_label_update, cred, cpipe, cpipe->pipe_label, newlabel);
-
-       return error;
-}
-
 int
 mac_pipe_check_select(kauth_cred_t cred, struct pipe *cpipe, int which)
 {
@@ -255,19 +210,3 @@ mac_pipe_check_write(kauth_cred_t cred, struct pipe *cpipe)
 
        return error;
 }
-
-int
-mac_pipe_label_update(kauth_cred_t cred, struct pipe *cpipe,
-    struct label *label)
-{
-       int error;
-
-       error = mac_pipe_check_label_update(cred, cpipe, label);
-       if (error) {
-               return error;
-       }
-
-       MAC_PERFORM(pipe_label_update, cred, cpipe, cpipe->pipe_label, label);
-
-       return 0;
-}