Loading...
sys/chmodx_np.c Libc-1725.40.4 Libc-498
--- Libc/Libc-1725.40.4/sys/chmodx_np.c
+++ Libc/Libc-498/sys/chmodx_np.c
@@ -34,12 +34,12 @@
 #include <stdlib.h>
 #endif
 
-static int chmodx_syscall(void *obj, uid_t fsowner, gid_t fsgrp, int mode, kauth_filesec_t fsacl);
-static int fchmodx_syscall(void *obj, uid_t fsowner, gid_t fsgrp, int mode, kauth_filesec_t fsacl);
+static int chmodx_syscall(void *obj, uid_t fsowner, gid_t fsgrp, int mode, struct kauth_filesec *fsacl);
+static int fchmodx_syscall(void *obj, uid_t fsowner, gid_t fsgrp, int mode, struct kauth_filesec *fsacl);
 
 static int chmodx1(void *obj,
 		   int (* chmod_syscall)(void *obj, uid_t fsowner, gid_t fsgrp, int mode,
-				       kauth_filesec_t fsacl),
+				       struct kauth_filesec *fsacl),
     		   filesec_t fsec);
 
 /*
@@ -60,11 +60,11 @@
 /*
  * Chmod syscalls.
  */
-extern int __chmod_extended(char *, uid_t, gid_t, int, kauth_filesec_t);
-extern int __fchmod_extended(int, uid_t, gid_t, int, kauth_filesec_t);
+extern int __chmod_extended(char *, uid_t, gid_t, int, struct kauth_filesec *);
+extern int __fchmod_extended(int, uid_t, gid_t, int, struct kauth_filesec *);
 
 static int
-chmodx_syscall(void *obj, uid_t fsowner, gid_t fsgrp, int mode, kauth_filesec_t fsacl)
+chmodx_syscall(void *obj, uid_t fsowner, gid_t fsgrp, int mode, struct kauth_filesec *fsacl)
 {
 	char *path = *(char **)obj;
 
@@ -72,7 +72,7 @@
 }
 
 static int
-fchmodx_syscall(void *obj, uid_t fsowner, gid_t fsgrp, int mode, kauth_filesec_t fsacl)
+fchmodx_syscall(void *obj, uid_t fsowner, gid_t fsgrp, int mode, struct kauth_filesec *fsacl)
 {
 	int fd = *(int *)obj;
 	return(__fchmod_extended(fd, fsowner, fsgrp, mode, fsacl));
@@ -84,7 +84,7 @@
 	
 static int
 chmodx1(void *obj,
-    int (chmod_syscall)(void *obj, uid_t fsowner, gid_t fsgrp, int mode, kauth_filesec_t fsacl),
+    int (chmod_syscall)(void *obj, uid_t fsowner, gid_t fsgrp, int mode, struct kauth_filesec *fsacl),
     filesec_t fsec)
 {
 	uid_t fsowner = KAUTH_UID_NONE;
@@ -94,7 +94,7 @@
 	size_t size = 0;
 	int fsacl_used = 0;
 	int delete_acl = 0;
-	kauth_filesec_t fsacl = KAUTH_FILESEC_NONE;
+	struct kauth_filesec *fsacl = NULL;
 	struct kauth_filesec static_filesec;
 
 	if (fsec == NULL) {
@@ -131,7 +131,7 @@
 	}
 	
 	/* no ACL, use local filesec */
-	if (fsacl == KAUTH_FILESEC_NONE) {
+	if (fsacl == NULL) {
 		bzero(&static_filesec, sizeof(static_filesec));
 		fsacl = &static_filesec;
 		fsacl->fsec_magic = KAUTH_FILESEC_MAGIC;
@@ -165,7 +165,7 @@
 		if (delete_acl) {
 			fsacl = _FILESEC_REMOVE_ACL;
 		} else {
-			fsacl = KAUTH_FILESEC_NONE;
+			fsacl = NULL;
 		}
 	}