summaryrefslogtreecommitdiffhomepage
path: root/src/cmds/ntux_cmd_chmod.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmds/ntux_cmd_chmod.c')
-rw-r--r--src/cmds/ntux_cmd_chmod.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/cmds/ntux_cmd_chmod.c b/src/cmds/ntux_cmd_chmod.c
index 03ab8f5..55b517d 100644
--- a/src/cmds/ntux_cmd_chmod.c
+++ b/src/cmds/ntux_cmd_chmod.c
@@ -4,15 +4,19 @@
/* Released under GPLv2 and GPLv3; see COPYING.NTUX. */
/***********************************************************/
-#include <ntapi/ntapi.h>
#include <psxabi/sys_sysapi.h>
#include <psxabi/sys_stat.h>
#include <psxabi/sys_errno.h>
+#include <psxxfi/xfi_base.h>
+#include <psxxfi/xfi_acl.h>
#include <psxxfi/xfi_fs.h>
#include <psxxfi/xfi_ofd.h>
#include <psxxfi/xfi_unicode.h>
+#include <ntapi/nt_acl.h>
+#include <ntapi/nt_file.h>
+
#include <ntux/ntux.h>
#include "ntux_driver_impl.h"
#include "ntux_nolibc_impl.h"
@@ -21,7 +25,7 @@
static int ntux_cmd_chmod_ret(int fd, struct __ofd * ofd, void * hasync, int ret)
{
if (hasync)
- ntapi->zw_close(hasync);
+ __xfi_close_handle(hasync);
if (ofd)
__xfi_ofd_ref_dec(ofd);
@@ -103,7 +107,7 @@ int ntux_cmd_chmod(const struct ntux_driver_ctx * dctx, const char * dunit)
/* srcsd */
srcsd = (nt_sd *)buf;
- if ((status = ntapi->zw_query_security_object(
+ if ((status = __xfi_query_security_object(
hasync,
NT_OWNER_SECURITY_INFORMATION
| NT_GROUP_SECURITY_INFORMATION
@@ -113,7 +117,7 @@ int ntux_cmd_chmod(const struct ntux_driver_ctx * dctx, const char * dunit)
fd,ofd,hasync,
NTUX_SYSTEM_ERROR(dctx));
- if ((status = ntapi->acl_init_common_descriptor_meta(
+ if ((status = __xfi_acl_init_common_descriptor_meta(
&meta,srcsd,
NT_ACL_INIT_COMMON_DESCRIPTION_META_STRICT_MODE)))
return ntux_cmd_chmod_ret(
@@ -129,13 +133,13 @@ int ntux_cmd_chmod(const struct ntux_driver_ctx * dctx, const char * dunit)
access_admin = access_owner | NT_SEC_WRITE_DAC;
/* updated dacl */
- ntapi->acl_init_common_descriptor(
+ __xfi_acl_init_common_descriptor(
&dstsd,
meta.owner,meta.group,0,0,
access_owner,access_group,access_other,
access_admin,meta.system_acc);
- if ((status = ntapi->zw_set_security_object(
+ if ((status = __xfi_set_security_object(
hasync,
NT_DACL_SECURITY_INFORMATION,
&dstsd.sd)))