summaryrefslogtreecommitdiff
path: root/source3/libsmb/clirap.c
diff options
context:
space:
mode:
authorDerrell Lipman <derrell@samba.org>2006-01-29 04:57:42 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:06:18 -0500
commit7ed3868780f72e00687cbd056109ef85ea2ea092 (patch)
treea5daab65939d36dd72a18f53ceb52b9d73779c0f /source3/libsmb/clirap.c
parentc9811b857a7d8407659180a7cc453cead589bb4f (diff)
downloadsamba-7ed3868780f72e00687cbd056109ef85ea2ea092.tar.gz
samba-7ed3868780f72e00687cbd056109ef85ea2ea092.tar.bz2
samba-7ed3868780f72e00687cbd056109ef85ea2ea092.zip
r13216: r12422@cabra: derrell | 2006-01-28 23:57:35 -0500
Fix cli_setpathinfo() to actually do what it's supposed to. Also, get rid of some apparently drug-induced code to deal with create time which isn't being manipulated anyway. (This used to be commit aa25dc1248b15e8e1b39cf8a98496e5aba475c4a)
Diffstat (limited to 'source3/libsmb/clirap.c')
-rw-r--r--source3/libsmb/clirap.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/source3/libsmb/clirap.c b/source3/libsmb/clirap.c
index 6716971fe2..58fa9c8dff 100644
--- a/source3/libsmb/clirap.c
+++ b/source3/libsmb/clirap.c
@@ -471,7 +471,6 @@ BOOL cli_setpathinfo(struct cli_state *cli, const char *fname,
char *rparam=NULL, *rdata=NULL;
int count=8;
BOOL ret;
- void (*date_fn)(struct cli_state *, char *buf,int offset,time_t unixdate);
char *p;
memset(param, 0, sizeof(param));
@@ -480,7 +479,7 @@ BOOL cli_setpathinfo(struct cli_state *cli, const char *fname,
p = param;
/* Add the information level */
- SSVAL(p, 0, SMB_INFO_STANDARD);
+ SSVAL(p, 0, SMB_FILE_BASIC_INFORMATION);
/* Skip reserved */
p += 6;
@@ -492,26 +491,27 @@ BOOL cli_setpathinfo(struct cli_state *cli, const char *fname,
p = data;
- if (cli->win95) {
- date_fn = cli_put_dos_date;
- } else {
- date_fn = cli_put_dos_date2;
- }
-
- /* Add the create, last access, and modification times */
- (*date_fn)(cli, p, 0, c_time);
- (*date_fn)(cli, p, 4, a_time);
- (*date_fn)(cli, p, 8, m_time);
- p += 12;
+ /*
+ * Add the create, last access, modification, and status change times
+ */
+
+ /* Don't set create time, at offset 0 */
+ p += 8;
- /* Skip DataSize and AllocationSize */
+ put_long_date(p, a_time);
+ p += 8;
+
+ put_long_date(p, m_time);
+ p += 8;
+
+ put_long_date(p, c_time);
p += 8;
/* Add attributes */
- SSVAL(p, 0, mode);
- p += 2;
+ SIVAL(p, 0, mode);
+ p += 4;
- /* Add EA size (none) */
+ /* Add padding */
SIVAL(p, 0, 0);
p += 4;