s3:libsmb_xattr: make use of the new cli_query_secdesc()
authorStefan Metzmacher <metze@samba.org>
Sat, 23 Jul 2011 07:43:32 +0000 (09:43 +0200)
committerStefan Metzmacher <metze@samba.org>
Sat, 23 Jul 2011 07:55:54 +0000 (09:55 +0200)
metze

source3/libsmb/libsmb_xattr.c

index f4c22e3422bee6d7c2ecef8b0e3b228100d968af..5ed38415bf62abfb5e40290a0c7b417eaf3904aa 100644 (file)
@@ -911,14 +911,14 @@ cacl_get(SMBCCTX *context,
                        return -1;
                }
 
-               sd = cli_query_secdesc_old(targetcli, fnum, ctx);
-
-                if (!sd) {
-                        DEBUG(5,
-                              ("cacl_get Failed to query old descriptor\n"));
-                        errno = 0;
-                        return -1;
-                }
+               status = cli_query_secdesc(targetcli, fnum, ctx, &sd);
+               if (!NT_STATUS_IS_OK(status)) {
+                       DEBUG(5,("cacl_get Failed to query old descriptor "
+                                "of %s: %s\n",
+                                 targetpath, nt_errstr(status)));
+                       errno = 0;
+                       return -1;
+               }
 
                 cli_close(targetcli, fnum);
 
@@ -1570,11 +1570,11 @@ cacl_set(SMBCCTX *context,
                return -1;
        }
 
-       old = cli_query_secdesc_old(targetcli, fnum, ctx);
-
-       if (!old) {
-                DEBUG(5, ("cacl_set Failed to query old descriptor\n"));
-                errno = 0;
+       status = cli_query_secdesc(targetcli, fnum, ctx, &old);
+       if (!NT_STATUS_IS_OK(status)) {
+               DEBUG(5,("cacl_set Failed to query old descriptor of %s: %s\n",
+                        targetpath, nt_errstr(status)));
+               errno = 0;
                return -1;
        }