Fix bug #8542 - smbclient posix_open command fails to return correct info on open...
authorJeremy Allison <jra@samba.org>
Sat, 22 Oct 2011 01:08:46 +0000 (18:08 -0700)
committerKarolin Seeger <kseeger@samba.org>
Wed, 26 Oct 2011 17:41:04 +0000 (19:41 +0200)
source3/client/client.c

index e5426c65e3460e6d5ded74cce3129b89da472e63..b2cb911424c596711af5d10294bb2c801965122d 100644 (file)
@@ -2528,8 +2528,8 @@ static int cmd_posix_open(void)
        }
 
        if (!NT_STATUS_IS_OK(cli_posix_open(targetcli, targetname, O_CREAT|O_RDWR, mode, &fnum))) {
-               if (!NT_STATUS_IS_OK(cli_posix_open(targetcli, targetname, O_CREAT|O_RDONLY, mode, &fnum))) {
-                       d_printf("posix_open file %s: for read/write fnum %d\n", targetname, fnum);
+               if (NT_STATUS_IS_OK(cli_posix_open(targetcli, targetname, O_CREAT|O_RDONLY, mode, &fnum))) {
+                       d_printf("posix_open file %s: for readonly fnum %d\n", targetname, fnum);
                } else {
                        d_printf("Failed to open file %s. %s\n", targetname, cli_errstr(cli));
                }