From 471bb043390d0995c847d01f1af89763bbee668f Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 26 May 2019 21:47:57 +0000 Subject: framework: code against the newly added __xfi_xxx interfaces. --- src/cmds/ntux_cmd_chmod.c | 16 ++++++++++------ src/cmds/ntux_cmd_spawn.c | 1 - src/cmds/ntux_cmd_stat.c | 4 ++-- src/cmds/ntux_cmd_strace.c | 1 - 4 files changed, 12 insertions(+), 10 deletions(-) (limited to 'src/cmds') 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 #include #include #include +#include +#include #include #include #include +#include +#include + #include #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))) diff --git a/src/cmds/ntux_cmd_spawn.c b/src/cmds/ntux_cmd_spawn.c index cb88696..f488e3e 100644 --- a/src/cmds/ntux_cmd_spawn.c +++ b/src/cmds/ntux_cmd_spawn.c @@ -4,7 +4,6 @@ /* Released under GPLv2 and GPLv3; see COPYING.NTUX. */ /***********************************************************/ -#include #include #include diff --git a/src/cmds/ntux_cmd_stat.c b/src/cmds/ntux_cmd_stat.c index 8634c4a..f043ddb 100644 --- a/src/cmds/ntux_cmd_stat.c +++ b/src/cmds/ntux_cmd_stat.c @@ -4,12 +4,12 @@ /* Released under GPLv2 and GPLv3; see COPYING.NTUX. */ /***********************************************************/ -#include #include #include #include #include +#include #include #include @@ -100,7 +100,7 @@ int ntux_cmd_stat(const struct ntux_driver_ctx * dctx, const char * dunit) nstat = (nt_stat *)sbuf; /* stat */ - if ((status = ntapi->tt_stat( + if ((status = __xfi_stat( ofd->info.hfile, nstat,bufsize, buf,bufsize, diff --git a/src/cmds/ntux_cmd_strace.c b/src/cmds/ntux_cmd_strace.c index 4f23e39..bdc1308 100644 --- a/src/cmds/ntux_cmd_strace.c +++ b/src/cmds/ntux_cmd_strace.c @@ -4,7 +4,6 @@ /* Released under GPLv2 and GPLv3; see COPYING.NTUX. */ /***********************************************************/ -#include #include #include -- cgit v1.2.3