#include <stdlib.h>
#endif
-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 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 chmodx1(void *obj,
int (* chmod_syscall)(void *obj, uid_t fsowner, gid_t fsgrp, int mode,
- struct kauth_filesec *fsacl),
+ kauth_filesec_t fsacl),
filesec_t fsec);
/*
/*
* Chmod syscalls.
*/
-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 *);
+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);
static int
-chmodx_syscall(void *obj, uid_t fsowner, gid_t fsgrp, int mode, struct kauth_filesec *fsacl)
+chmodx_syscall(void *obj, uid_t fsowner, gid_t fsgrp, int mode, kauth_filesec_t fsacl)
{
char *path = *(char **)obj;
}
static int
-fchmodx_syscall(void *obj, uid_t fsowner, gid_t fsgrp, int mode, struct kauth_filesec *fsacl)
+fchmodx_syscall(void *obj, uid_t fsowner, gid_t fsgrp, int mode, kauth_filesec_t fsacl)
{
int fd = *(int *)obj;
return(__fchmod_extended(fd, fsowner, fsgrp, mode, fsacl));
static int
chmodx1(void *obj,
- int (chmod_syscall)(void *obj, uid_t fsowner, gid_t fsgrp, int mode, struct kauth_filesec *fsacl),
+ int (chmod_syscall)(void *obj, uid_t fsowner, gid_t fsgrp, int mode, kauth_filesec_t fsacl),
filesec_t fsec)
{
uid_t fsowner = KAUTH_UID_NONE;
size_t size = 0;
int fsacl_used = 0;
int delete_acl = 0;
- struct kauth_filesec *fsacl = NULL;
+ kauth_filesec_t fsacl = KAUTH_FILESEC_NONE;
struct kauth_filesec static_filesec;
if (fsec == NULL) {
}
/* no ACL, use local filesec */
- if (fsacl == NULL) {
+ if (fsacl == KAUTH_FILESEC_NONE) {
bzero(&static_filesec, sizeof(static_filesec));
fsacl = &static_filesec;
fsacl->fsec_magic = KAUTH_FILESEC_MAGIC;
if (delete_acl) {
fsacl = _FILESEC_REMOVE_ACL;
} else {
- fsacl = NULL;
+ fsacl = KAUTH_FILESEC_NONE;
}
}