Add header files for secace and secacl.
[amitay/samba.git] / source4 / libcli / clitrans2.c
index 7a37df6e1fe6620b9b9671591b29c40cdaf74957..5c5ba6585f6eb1e287678ca544b222ba3ec40134 100644 (file)
@@ -5,7 +5,7 @@
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #include "includes.h"
+#include "libcli/raw/libcliraw.h"
+#include "libcli/libcli.h"
 
 /****************************************************************************
 send a qpathinfo call
@@ -35,10 +36,10 @@ NTSTATUS smbcli_qpathinfo(struct smbcli_tree *tree, const char *fname,
        if (!mem_ctx) return NT_STATUS_NO_MEMORY;
 
        parms.standard.level = RAW_FILEINFO_STANDARD;
-       parms.standard.in.fname = fname;
+       parms.standard.in.file.path = fname;
 
        status = smb_raw_pathinfo(tree, mem_ctx, &parms);
-       talloc_destroy(mem_ctx);
+       talloc_free(mem_ctx);
        if (!NT_STATUS_IS_OK(status))
                return status;
 
@@ -67,7 +68,7 @@ send a qpathinfo call with the SMB_QUERY_FILE_ALL_INFO info level
 NTSTATUS smbcli_qpathinfo2(struct smbcli_tree *tree, const char *fname, 
                        time_t *c_time, time_t *a_time, time_t *m_time, 
                        time_t *w_time, size_t *size, uint16_t *mode,
-                       SMB_INO_T *ino)
+                       ino_t *ino)
 {
        union smb_fileinfo parms;
        TALLOC_CTX *mem_ctx;
@@ -77,10 +78,10 @@ NTSTATUS smbcli_qpathinfo2(struct smbcli_tree *tree, const char *fname,
        if (!mem_ctx) return NT_STATUS_NO_MEMORY;
 
        parms.all_info.level = RAW_FILEINFO_ALL_INFO;
-       parms.all_info.in.fname = fname;
+       parms.all_info.in.file.path = fname;
 
        status = smb_raw_pathinfo(tree, mem_ctx, &parms);
-       talloc_destroy(mem_ctx);
+       talloc_free(mem_ctx);
        if (!NT_STATUS_IS_OK(status))
                return status;
 
@@ -120,18 +121,18 @@ NTSTATUS smbcli_qfilename(struct smbcli_tree *tree, int fnum, const char **name)
        if (!mem_ctx) return NT_STATUS_NO_MEMORY;
 
        parms.name_info.level = RAW_FILEINFO_NAME_INFO;
-       parms.name_info.in.fnum = fnum;
+       parms.name_info.in.file.fnum = fnum;
 
        status = smb_raw_fileinfo(tree, mem_ctx, &parms);
        if (!NT_STATUS_IS_OK(status)) {
-               talloc_destroy(mem_ctx);
+               talloc_free(mem_ctx);
                *name = NULL;
                return status;
        }
 
        *name = strdup(parms.name_info.out.fname.s);
 
-       talloc_destroy(mem_ctx);
+       talloc_free(mem_ctx);
 
        return status;
 }
@@ -143,7 +144,7 @@ send a qfileinfo call
 NTSTATUS smbcli_qfileinfo(struct smbcli_tree *tree, int fnum, 
                       uint16_t *mode, size_t *size,
                       time_t *c_time, time_t *a_time, time_t *m_time, 
-                      time_t *w_time, SMB_INO_T *ino)
+                      time_t *w_time, ino_t *ino)
 {
        union smb_fileinfo parms;
        TALLOC_CTX *mem_ctx;
@@ -154,10 +155,10 @@ NTSTATUS smbcli_qfileinfo(struct smbcli_tree *tree, int fnum,
                return NT_STATUS_NO_MEMORY;
 
        parms.all_info.level = RAW_FILEINFO_ALL_INFO;
-       parms.all_info.in.fnum = fnum;
+       parms.all_info.in.file.fnum = fnum;
 
        status = smb_raw_fileinfo(tree, mem_ctx, &parms);
-       talloc_destroy(mem_ctx);
+       talloc_free(mem_ctx);
        if (!NT_STATUS_IS_OK(status)) {
                return status;
        }
@@ -199,14 +200,14 @@ NTSTATUS smbcli_qpathinfo_alt_name(struct smbcli_tree *tree, const char *fname,
        NTSTATUS status;
 
        parms.alt_name_info.level = RAW_FILEINFO_ALT_NAME_INFO;
-       parms.alt_name_info.in.fname = fname;
+       parms.alt_name_info.in.file.path = fname;
 
        mem_ctx = talloc_init("smbcli_qpathinfo_alt_name");
        if (!mem_ctx) return NT_STATUS_NO_MEMORY;
 
        status = smb_raw_pathinfo(tree, mem_ctx, &parms);
        if (!NT_STATUS_IS_OK(status)) {
-               talloc_destroy(mem_ctx);
+               talloc_free(mem_ctx);
                *alt_name = NULL;
                return smbcli_nt_error(tree);
        }
@@ -217,7 +218,7 @@ NTSTATUS smbcli_qpathinfo_alt_name(struct smbcli_tree *tree, const char *fname,
                *alt_name = strdup(parms.alt_name_info.out.fname.s);
        }
 
-       talloc_destroy(mem_ctx);
+       talloc_free(mem_ctx);
 
        return NT_STATUS_OK;
 }