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
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;
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;
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;
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;
}
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;
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;
}
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);
}
*alt_name = strdup(parms.alt_name_info.out.fname.s);
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return NT_STATUS_OK;
}