From ac193579e7db00c7a2ea0aadaaf0d34c10dcf1a5 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 10 Apr 2004 20:18:22 +0000 Subject: r152: a quick airport commit .... added ldbedit, a _really_ useful command added ldbadd, ldbdel, ldbsearch and ldbmodify to build solved lots of timezone issues, we now pass the torture tests with client and server in different zones fixed several build issues I know this breaks the no-LDAP build. Wait till I arrive in San Jose for that fix. (This used to be commit af34710d4da1841653624fe304b1c8d812c0fdd9) --- source4/libcli/raw/rawdate.c | 81 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 source4/libcli/raw/rawdate.c (limited to 'source4/libcli/raw/rawdate.c') diff --git a/source4/libcli/raw/rawdate.c b/source4/libcli/raw/rawdate.c new file mode 100644 index 0000000000..e80c376bf7 --- /dev/null +++ b/source4/libcli/raw/rawdate.c @@ -0,0 +1,81 @@ +/* + Unix SMB/CIFS implementation. + + raw date handling functions + + Copyright (C) Andrew Tridgell 2004 + + 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 + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + 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. +*/ + +#include "includes.h" + +/******************************************************************* +put a dos date into a buffer (time/date format) +This takes GMT time and puts local time for zone_offset in the buffer +********************************************************************/ +void raw_push_dos_date(struct cli_transport *transport, + uint8 *buf, int offset, time_t unixdate) +{ + push_dos_date(buf, offset, unixdate, transport->negotiate.server_zone); +} + +/******************************************************************* +put a dos date into a buffer (date/time format) +This takes GMT time and puts local time in the buffer +********************************************************************/ +void raw_push_dos_date2(struct cli_transport *transport, + char *buf, int offset, time_t unixdate) +{ + push_dos_date2(buf, offset, unixdate, transport->negotiate.server_zone); +} + +/******************************************************************* +put a dos 32 bit "unix like" date into a buffer. This routine takes +GMT and converts it to LOCAL time in zone_offset before putting it +********************************************************************/ +void raw_push_dos_date3(struct cli_transport *transport, + char *buf, int offset, time_t unixdate) +{ + push_dos_date3(buf, offset, unixdate, transport->negotiate.server_zone); +} + +/******************************************************************* +convert a dos date +********************************************************************/ +time_t raw_pull_dos_date(struct cli_transport *transport, + const uint8 *date_ptr) +{ + return pull_dos_date(date_ptr, transport->negotiate.server_zone); +} + +/******************************************************************* +like raw_pull_dos_date() but the words are reversed +********************************************************************/ +time_t raw_pull_dos_date2(struct cli_transport *transport, + const uint8 *date_ptr) +{ + return pull_dos_date2(date_ptr, transport->negotiate.server_zone); +} + +/******************************************************************* + create a unix GMT date from a dos date in 32 bit "unix like" format + these arrive in server zone, with corresponding DST + ******************************************************************/ +time_t raw_pull_dos_date3(struct cli_transport *transport, + const uint8 *date_ptr) +{ + return pull_dos_date3(date_ptr, transport->negotiate.server_zone); +} -- cgit From fcd718c7d8a6850ae8719f23ed044b06b57501cd Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 25 May 2004 17:50:17 +0000 Subject: r890: convert samba4 to use [u]int8_t instead of [u]int8 metze (This used to be commit 2986c5f08c8f0c26a2ea7b6ce20aae025183109f) --- source4/libcli/raw/rawdate.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source4/libcli/raw/rawdate.c') diff --git a/source4/libcli/raw/rawdate.c b/source4/libcli/raw/rawdate.c index e80c376bf7..3b731d653b 100644 --- a/source4/libcli/raw/rawdate.c +++ b/source4/libcli/raw/rawdate.c @@ -27,7 +27,7 @@ put a dos date into a buffer (time/date format) This takes GMT time and puts local time for zone_offset in the buffer ********************************************************************/ void raw_push_dos_date(struct cli_transport *transport, - uint8 *buf, int offset, time_t unixdate) + uint8_t *buf, int offset, time_t unixdate) { push_dos_date(buf, offset, unixdate, transport->negotiate.server_zone); } @@ -56,7 +56,7 @@ void raw_push_dos_date3(struct cli_transport *transport, convert a dos date ********************************************************************/ time_t raw_pull_dos_date(struct cli_transport *transport, - const uint8 *date_ptr) + const uint8_t *date_ptr) { return pull_dos_date(date_ptr, transport->negotiate.server_zone); } @@ -65,7 +65,7 @@ time_t raw_pull_dos_date(struct cli_transport *transport, like raw_pull_dos_date() but the words are reversed ********************************************************************/ time_t raw_pull_dos_date2(struct cli_transport *transport, - const uint8 *date_ptr) + const uint8_t *date_ptr) { return pull_dos_date2(date_ptr, transport->negotiate.server_zone); } @@ -75,7 +75,7 @@ time_t raw_pull_dos_date2(struct cli_transport *transport, these arrive in server zone, with corresponding DST ******************************************************************/ time_t raw_pull_dos_date3(struct cli_transport *transport, - const uint8 *date_ptr) + const uint8_t *date_ptr) { return pull_dos_date3(date_ptr, transport->negotiate.server_zone); } -- cgit From c5fbb6f23c2d399c7510bc552cdb1a27b1ef66a8 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 4 Aug 2004 13:23:35 +0000 Subject: r1654: rename cli_ -> smbcli_ rename CLI_ -> SMBCLI_ metze (This used to be commit 8441750fd9427dd6fe477f27e603821b4026f038) --- source4/libcli/raw/rawdate.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source4/libcli/raw/rawdate.c') diff --git a/source4/libcli/raw/rawdate.c b/source4/libcli/raw/rawdate.c index 3b731d653b..bfb7465bd5 100644 --- a/source4/libcli/raw/rawdate.c +++ b/source4/libcli/raw/rawdate.c @@ -26,7 +26,7 @@ put a dos date into a buffer (time/date format) This takes GMT time and puts local time for zone_offset in the buffer ********************************************************************/ -void raw_push_dos_date(struct cli_transport *transport, +void raw_push_dos_date(struct smbcli_transport *transport, uint8_t *buf, int offset, time_t unixdate) { push_dos_date(buf, offset, unixdate, transport->negotiate.server_zone); @@ -36,7 +36,7 @@ void raw_push_dos_date(struct cli_transport *transport, put a dos date into a buffer (date/time format) This takes GMT time and puts local time in the buffer ********************************************************************/ -void raw_push_dos_date2(struct cli_transport *transport, +void raw_push_dos_date2(struct smbcli_transport *transport, char *buf, int offset, time_t unixdate) { push_dos_date2(buf, offset, unixdate, transport->negotiate.server_zone); @@ -46,7 +46,7 @@ void raw_push_dos_date2(struct cli_transport *transport, put a dos 32 bit "unix like" date into a buffer. This routine takes GMT and converts it to LOCAL time in zone_offset before putting it ********************************************************************/ -void raw_push_dos_date3(struct cli_transport *transport, +void raw_push_dos_date3(struct smbcli_transport *transport, char *buf, int offset, time_t unixdate) { push_dos_date3(buf, offset, unixdate, transport->negotiate.server_zone); @@ -55,7 +55,7 @@ void raw_push_dos_date3(struct cli_transport *transport, /******************************************************************* convert a dos date ********************************************************************/ -time_t raw_pull_dos_date(struct cli_transport *transport, +time_t raw_pull_dos_date(struct smbcli_transport *transport, const uint8_t *date_ptr) { return pull_dos_date(date_ptr, transport->negotiate.server_zone); @@ -64,7 +64,7 @@ time_t raw_pull_dos_date(struct cli_transport *transport, /******************************************************************* like raw_pull_dos_date() but the words are reversed ********************************************************************/ -time_t raw_pull_dos_date2(struct cli_transport *transport, +time_t raw_pull_dos_date2(struct smbcli_transport *transport, const uint8_t *date_ptr) { return pull_dos_date2(date_ptr, transport->negotiate.server_zone); @@ -74,7 +74,7 @@ time_t raw_pull_dos_date2(struct cli_transport *transport, create a unix GMT date from a dos date in 32 bit "unix like" format these arrive in server zone, with corresponding DST ******************************************************************/ -time_t raw_pull_dos_date3(struct cli_transport *transport, +time_t raw_pull_dos_date3(struct smbcli_transport *transport, const uint8_t *date_ptr) { return pull_dos_date3(date_ptr, transport->negotiate.server_zone); -- cgit From 9f1210a243654fd6d94acdef83f468a33c1b3b3f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 1 Nov 2004 01:03:22 +0000 Subject: r3419: moved the libcli/raw structures into libcli/raw/libcliraw.h and made them private (This used to be commit 386ac565c452ede1d74e06acb401ca9db99d3ff3) --- source4/libcli/raw/rawdate.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/libcli/raw/rawdate.c') diff --git a/source4/libcli/raw/rawdate.c b/source4/libcli/raw/rawdate.c index bfb7465bd5..db18a7a194 100644 --- a/source4/libcli/raw/rawdate.c +++ b/source4/libcli/raw/rawdate.c @@ -21,6 +21,7 @@ */ #include "includes.h" +#include "libcli/raw/libcliraw.h" /******************************************************************* put a dos date into a buffer (time/date format) -- cgit From 9112a632f6791ffc3c3c1aadd214cbaba8fe816e Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sat, 4 Dec 2004 13:56:25 +0000 Subject: r4063: - change char * -> uint8_t in struct request_buffer - change smbcli_read/write to take void * for the buffers to match read(2)/write(2) all this fixes a lot of gcc-4 warnings metze (This used to be commit b94f92bc6637f748d6f7049f4f9a30b0b8d18a7a) --- source4/libcli/raw/rawdate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/libcli/raw/rawdate.c') diff --git a/source4/libcli/raw/rawdate.c b/source4/libcli/raw/rawdate.c index db18a7a194..894eb53528 100644 --- a/source4/libcli/raw/rawdate.c +++ b/source4/libcli/raw/rawdate.c @@ -38,7 +38,7 @@ put a dos date into a buffer (date/time format) This takes GMT time and puts local time in the buffer ********************************************************************/ void raw_push_dos_date2(struct smbcli_transport *transport, - char *buf, int offset, time_t unixdate) + uint8_t *buf, int offset, time_t unixdate) { push_dos_date2(buf, offset, unixdate, transport->negotiate.server_zone); } @@ -48,7 +48,7 @@ put a dos 32 bit "unix like" date into a buffer. This routine takes GMT and converts it to LOCAL time in zone_offset before putting it ********************************************************************/ void raw_push_dos_date3(struct smbcli_transport *transport, - char *buf, int offset, time_t unixdate) + uint8_t *buf, int offset, time_t unixdate) { push_dos_date3(buf, offset, unixdate, transport->negotiate.server_zone); } -- cgit From 0479a2f1cbae51fcd8dbdc3c148c808421fb4d25 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 02:07:03 +0000 Subject: r23792: convert Samba4 to GPLv3 There are still a few tidyups of old FSF addresses to come (in both s3 and s4). More commits soon. (This used to be commit fcf38a38ac691abd0fa51b89dc951a08e89fdafa) --- source4/libcli/raw/rawdate.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source4/libcli/raw/rawdate.c') diff --git a/source4/libcli/raw/rawdate.c b/source4/libcli/raw/rawdate.c index 894eb53528..9a86c88697 100644 --- a/source4/libcli/raw/rawdate.c +++ b/source4/libcli/raw/rawdate.c @@ -7,7 +7,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, @@ -16,8 +16,7 @@ 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 . */ #include "includes.h" -- cgit