s3: Remove a use of cli_errstr
authorVolker Lendecke <vl@samba.org>
Sun, 3 Jul 2011 09:47:44 +0000 (11:47 +0200)
committerVolker Lendecke <vl@samba.org>
Sun, 3 Jul 2011 20:45:25 +0000 (22:45 +0200)
source3/libsmb/libsmb_xattr.c

index d04eb1122b92d5bc0074263a0369ea142ec46a20..742b304832aba24e93ed58e2859d7287ec221eb6 100644 (file)
@@ -1559,10 +1559,12 @@ cacl_set(SMBCCTX *context,
        /* The desired access below is the only one I could find that works
           with NT4, W2KP and Samba */
 
-       if (!NT_STATUS_IS_OK(cli_ntcreate(targetcli, targetpath, 0, CREATE_ACCESS_READ, 0,
-                               FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN, 0x0, 0x0, &fnum))) {
+       status = cli_ntcreate(targetcli, targetpath, 0, CREATE_ACCESS_READ, 0,
+                             FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN,
+                             0x0, 0x0, &fnum);
+       if (!NT_STATUS_IS_OK(status)) {
                 DEBUG(5, ("cacl_set failed to open %s: %s\n",
-                          targetpath, cli_errstr(targetcli)));
+                          targetpath, nt_errstr(status)));
                 errno = 0;
                return -1;
        }