mirror of
https://github.com/samba-team/samba.git
synced 2025-11-13 08:23:49 +03:00
r11511: A classic "friday night check-in" :-). This moves much
of the Samba4 timezone handling code back into Samba3. Gets rid of "kludge-gmt" and removes the effectiveness of the parameter "time offset" (I can add this back in very easily if needed) - it's no longer being looked at. I'm hoping this will fix the problems people have been having with DST transitions. I'll start comprehensive testing tomorrow, but for now all modifications are done. Splits time get/set functions into srv_XXX and cli_XXX as they need to look at different timezone offsets. Get rid of much of the "efficiency" cruft that was added to Samba back in the day when the C library timezone handling functions were slow. Jeremy.
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
c93a08be4a
commit
414303bc02
@@ -390,7 +390,7 @@ BOOL cli_qpathinfo(struct cli_state *cli, const char *fname,
|
||||
char *rparam=NULL, *rdata=NULL;
|
||||
int count=8;
|
||||
BOOL ret;
|
||||
time_t (*date_fn)(void *);
|
||||
time_t (*date_fn)(struct cli_state *, void *);
|
||||
char *p;
|
||||
|
||||
p = param;
|
||||
@@ -429,19 +429,19 @@ BOOL cli_qpathinfo(struct cli_state *cli, const char *fname,
|
||||
}
|
||||
|
||||
if (cli->win95) {
|
||||
date_fn = make_unix_date;
|
||||
date_fn = cli_make_unix_date;
|
||||
} else {
|
||||
date_fn = make_unix_date2;
|
||||
date_fn = cli_make_unix_date2;
|
||||
}
|
||||
|
||||
if (c_time) {
|
||||
*c_time = date_fn(rdata+0);
|
||||
*c_time = date_fn(cli, rdata+0);
|
||||
}
|
||||
if (a_time) {
|
||||
*a_time = date_fn(rdata+4);
|
||||
*a_time = date_fn(cli, rdata+4);
|
||||
}
|
||||
if (m_time) {
|
||||
*m_time = date_fn(rdata+8);
|
||||
*m_time = date_fn(cli, rdata+8);
|
||||
}
|
||||
if (size) {
|
||||
*size = IVAL(rdata, 12);
|
||||
@@ -471,7 +471,7 @@ BOOL cli_setpathinfo(struct cli_state *cli, const char *fname,
|
||||
char *rparam=NULL, *rdata=NULL;
|
||||
int count=8;
|
||||
BOOL ret;
|
||||
void (*date_fn)(char *buf,int offset,time_t unixdate);
|
||||
void (*date_fn)(struct cli_state *, char *buf,int offset,time_t unixdate);
|
||||
char *p;
|
||||
|
||||
memset(param, 0, sizeof(param));
|
||||
@@ -493,15 +493,15 @@ BOOL cli_setpathinfo(struct cli_state *cli, const char *fname,
|
||||
p = data;
|
||||
|
||||
if (cli->win95) {
|
||||
date_fn = put_dos_date;
|
||||
date_fn = cli_put_dos_date;
|
||||
} else {
|
||||
date_fn = put_dos_date2;
|
||||
date_fn = cli_put_dos_date2;
|
||||
}
|
||||
|
||||
/* Add the create, last access, and modification times */
|
||||
(*date_fn)(p, 0, c_time);
|
||||
(*date_fn)(p, 4, a_time);
|
||||
(*date_fn)(p, 8, m_time);
|
||||
(*date_fn)(cli, p, 0, c_time);
|
||||
(*date_fn)(cli, p, 4, a_time);
|
||||
(*date_fn)(cli, p, 8, m_time);
|
||||
p += 12;
|
||||
|
||||
/* Skip DataSize and AllocationSize */
|
||||
|
||||
Reference in New Issue
Block a user