From d74e42e0eca0bb15c12fa51f125d905a6cee5db5 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 28 May 2009 13:05:50 -0700 Subject: Make getfacl async. Jeremy. --- source3/client/client.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'source3/client/client.c') diff --git a/source3/client/client.c b/source3/client/client.c index 2edeb1ae2b..0e874ec171 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -3043,17 +3043,16 @@ static int cmd_getfacl(void) return 1; } - if (!cli_unix_getfacl(targetcli, targetname, &rb_size, &retbuf)) { + if (!NT_STATUS_IS_OK(cli_posix_getfacl(targetcli, targetname, ctx, &rb_size, &retbuf))) { d_printf("%s getfacl file %s\n", cli_errstr(targetcli), src); return 1; } /* ToDo : Print out the ACL values. */ - if (SVAL(retbuf,0) != SMB_POSIX_ACL_VERSION || rb_size < 6) { + if (rb_size < 6 || SVAL(retbuf,0) != SMB_POSIX_ACL_VERSION) { d_printf("getfacl file %s, unknown POSIX acl version %u.\n", src, (unsigned int)CVAL(retbuf,0) ); - SAFE_FREE(retbuf); return 1; } @@ -3064,8 +3063,6 @@ static int cmd_getfacl(void) src, (unsigned int)(SMB_POSIX_ACL_HEADER_SIZE + SMB_POSIX_ACL_ENTRY_SIZE*(num_file_acls+num_dir_acls)), (unsigned int)rb_size); - - SAFE_FREE(retbuf); return 1; } @@ -3150,7 +3147,6 @@ static int cmd_getfacl(void) d_printf("%s\n", perms_to_string(permstring, perms)); } - SAFE_FREE(retbuf); return 0; } -- cgit From 656e86d5fa876131fc8e373f0c2100f4bef1cc26 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 28 May 2009 13:32:00 -0700 Subject: Make cli_posix_stat() async. Jeremy. --- source3/client/client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/client/client.c') diff --git a/source3/client/client.c b/source3/client/client.c index 0e874ec171..7e98dea91c 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -3037,7 +3037,7 @@ static int cmd_getfacl(void) return 1; } - if (!cli_unix_stat(targetcli, targetname, &sbuf)) { + if (!NT_STATUS_IS_OK(cli_posix_stat(targetcli, targetname, &sbuf))) { d_printf("%s getfacl doing a stat on file %s\n", cli_errstr(targetcli), src); return 1; @@ -3188,7 +3188,7 @@ static int cmd_stat(void) return 1; } - if (!cli_unix_stat(targetcli, targetname, &sbuf)) { + if (!NT_STATUS_IS_OK(cli_posix_stat(targetcli, targetname, &sbuf))) { d_printf("%s stat file %s\n", cli_errstr(targetcli), src); return 1; -- cgit From 9df85a93746d2de0c68c50d634a04e957e8b2c0d Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 28 May 2009 16:15:09 -0700 Subject: Make cli_posix_chown()/cli_posix_chmod() async. Jeremy. --- source3/client/client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/client/client.c') diff --git a/source3/client/client.c b/source3/client/client.c index 7e98dea91c..0852652725 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -2872,7 +2872,7 @@ static int cmd_chmod(void) return 1; } - if (!cli_unix_chmod(targetcli, targetname, mode)) { + if (!NT_STATUS_IS_OK(cli_posix_chmod(targetcli, targetname, mode))) { d_printf("%s chmod file %s 0%o\n", cli_errstr(targetcli), src, (unsigned int)mode); return 1; @@ -3292,7 +3292,7 @@ static int cmd_chown(void) return 1; } - if (!cli_unix_chown(targetcli, targetname, uid, gid)) { + if (!NT_STATUS_IS_OK(cli_posix_chown(targetcli, targetname, uid, gid))) { d_printf("%s chown file %s uid=%d, gid=%d\n", cli_errstr(targetcli), src, (int)uid, (int)gid); return 1; -- cgit