diff options
author | Andrew Tridgell <tridge@samba.org> | 2006-04-06 03:31:31 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:00:20 -0500 |
commit | fd25c102849779fd5f0153d34c8ac3b82ddeca0c (patch) | |
tree | a539289194cd206c53a852bfe0b82913d783e216 /source4 | |
parent | 09a6f728a3bd3cad5707e2e1b106c77281555618 (diff) | |
download | samba-fd25c102849779fd5f0153d34c8ac3b82ddeca0c.tar.gz samba-fd25c102849779fd5f0153d34c8ac3b82ddeca0c.tar.bz2 samba-fd25c102849779fd5f0153d34c8ac3b82ddeca0c.zip |
r14938: add smbcli_fsetatr() as a convenient interface to a setfileinfo for
torture testing. Used by RAW-NOTIFY.
(This used to be commit 517db1b1b0061be57c67ea02d42000fb8ace844d)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/libcli/clifile.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/source4/libcli/clifile.c b/source4/libcli/clifile.c index cc0c14a2e8..3acd215f3e 100644 --- a/source4/libcli/clifile.c +++ b/source4/libcli/clifile.c @@ -588,6 +588,29 @@ NTSTATUS smbcli_setatr(struct smbcli_tree *tree, const char *fname, uint16_t mod return status; } +/**************************************************************************** + Do a setfileinfo basic_info call. +****************************************************************************/ +NTSTATUS smbcli_fsetatr(struct smbcli_tree *tree, int fnum, uint16_t mode, + NTTIME create_time, NTTIME access_time, + NTTIME write_time, NTTIME change_time) +{ + union smb_setfileinfo parms; + NTSTATUS status; + + parms.basic_info.level = RAW_SFILEINFO_BASIC_INFO; + parms.basic_info.in.file.fnum = fnum; + parms.basic_info.in.attrib = mode; + parms.basic_info.in.create_time = create_time; + parms.basic_info.in.access_time = access_time; + parms.basic_info.in.write_time = write_time; + parms.basic_info.in.change_time = change_time; + + status = smb_raw_setfileinfo(tree, &parms); + + return status; +} + /**************************************************************************** Check for existence of a dir. |