[SCM] Samba Shared Repository - branch master updated
Stefan Metzmacher
metze at samba.org
Wed Oct 26 03:28:04 MDT 2011
The branch, master has been updated
via 0d9bd56 libcli/smb: merge NEGOTIATE_SECURITY_* flags to smb_constants.h
via 44689b1 s3:lib: make_unix_date3() is the same as pull_dos_date3()
via 0e95c8a s3:lib: make_unix_date2() is the same as pull_dos_date2()
via a179646 s3:lib: make_unix_date() is the same as pull_dos_date()
from 2fac12b s3-util: dbwrap_tool: fix fetch_string function
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 0d9bd56afb8ecb1d42fad4f344b1892bf01b153e
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Oct 26 09:28:10 2011 +0200
libcli/smb: merge NEGOTIATE_SECURITY_* flags to smb_constants.h
metze
Autobuild-User: Stefan Metzmacher <metze at samba.org>
Autobuild-Date: Wed Oct 26 11:27:12 CEST 2011 on sn-devel-104
commit 44689b1ee78e9197db5ef041dbc5e0e2aa8e61f7
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Oct 26 08:54:11 2011 +0200
s3:lib: make_unix_date3() is the same as pull_dos_date3()
Except for a 'void *' vs. 'uint8_t *'.
As a first step let make_unix_date() call pull_dos_date(),
so that we he the logic only once. We can fix the callers
later.
metze
commit 0e95c8aa5c9658f50cc9e146474929152b2ade58
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Oct 26 08:54:11 2011 +0200
s3:lib: make_unix_date2() is the same as pull_dos_date2()
Except for a 'void *' vs. 'uint8_t *'.
As a first step let make_unix_date() call pull_dos_date(),
so that we he the logic only once. We can fix the callers
later.
metze
commit a1796465e83cb57d3ee3071e48c417cbd76692a5
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Oct 26 08:54:11 2011 +0200
s3:lib: make_unix_date() is the same as pull_dos_date()
Except for a 'void *' vs. 'uint8_t *'.
As a first step let make_unix_date() call pull_dos_date(),
so that we he the logic only once. We can fix the callers
later.
metze
-----------------------------------------------------------------------
Summary of changes:
libcli/smb/smb_constants.h | 6 ++++++
source3/include/smb.h | 6 ------
source3/lib/time.c | 34 +++-------------------------------
source4/libcli/raw/smb.h | 6 ------
4 files changed, 9 insertions(+), 43 deletions(-)
Changeset truncated at 500 lines:
diff --git a/libcli/smb/smb_constants.h b/libcli/smb/smb_constants.h
index bde66dc..e7898f8 100644
--- a/libcli/smb/smb_constants.h
+++ b/libcli/smb/smb_constants.h
@@ -196,6 +196,12 @@ enum smb_signing_setting {
/* used to indicate end of chain */
#define SMB_CHAIN_NONE 0xFF
+/* Sercurity mode bits. */
+#define NEGOTIATE_SECURITY_USER_LEVEL 0x01
+#define NEGOTIATE_SECURITY_CHALLENGE_RESPONSE 0x02
+#define NEGOTIATE_SECURITY_SIGNATURES_ENABLED 0x04
+#define NEGOTIATE_SECURITY_SIGNATURES_REQUIRED 0x08
+
/* Capabilities. see ftp.microsoft.com/developr/drg/cifs/cifs/cifs4.txt */
#define CAP_RAW_MODE 0x00000001
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 1769ec2..22575be 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -1067,12 +1067,6 @@ char *strdup(char *s);
#define BROWSER_ELECTION_VERSION 0x010f
#define BROWSER_CONSTANT 0xaa55
-/* Sercurity mode bits. */
-#define NEGOTIATE_SECURITY_USER_LEVEL 0x01
-#define NEGOTIATE_SECURITY_CHALLENGE_RESPONSE 0x02
-#define NEGOTIATE_SECURITY_SIGNATURES_ENABLED 0x04
-#define NEGOTIATE_SECURITY_SIGNATURES_REQUIRED 0x08
-
/* TCONX Flag (smb_vwv2). */
#define TCONX_FLAG_EXTENDED_RESPONSE 0x8
diff --git a/source3/lib/time.c b/source3/lib/time.c
index 7fe5392..a83cb63 100644
--- a/source3/lib/time.c
+++ b/source3/lib/time.c
@@ -198,25 +198,7 @@ void dos_filetime_timespec(struct timespec *tsp)
time_t make_unix_date(const void *date_ptr, int zone_offset)
{
- uint32_t dos_date=0;
- struct tm t;
- time_t ret;
-
- dos_date = IVAL(date_ptr,0);
-
- if (dos_date == 0) {
- return 0;
- }
-
- interpret_dos_date(dos_date,&t.tm_year,&t.tm_mon,
- &t.tm_mday,&t.tm_hour,&t.tm_min,&t.tm_sec);
- t.tm_isdst = -1;
-
- ret = timegm(&t);
-
- ret += zone_offset;
-
- return(ret);
+ return pull_dos_date(date_ptr, zone_offset);
}
/*******************************************************************
@@ -225,13 +207,7 @@ time_t make_unix_date(const void *date_ptr, int zone_offset)
time_t make_unix_date2(const void *date_ptr, int zone_offset)
{
- uint32_t x,x2;
-
- x = IVAL(date_ptr,0);
- x2 = ((x&0xFFFF)<<16) | ((x&0xFFFF0000)>>16);
- SIVAL(&x,0,x2);
-
- return(make_unix_date((const void *)&x, zone_offset));
+ return pull_dos_date2(date_ptr, zone_offset);
}
/*******************************************************************
@@ -241,11 +217,7 @@ time_t make_unix_date2(const void *date_ptr, int zone_offset)
time_t make_unix_date3(const void *date_ptr, int zone_offset)
{
- time_t t = (time_t)IVAL(date_ptr,0);
- if (!null_time(t)) {
- t += zone_offset;
- }
- return(t);
+ return pull_dos_date3(date_ptr, zone_offset);
}
time_t srv_make_unix_date(const void *date_ptr)
diff --git a/source4/libcli/raw/smb.h b/source4/libcli/raw/smb.h
index 99dcf43..be1bfdb 100644
--- a/source4/libcli/raw/smb.h
+++ b/source4/libcli/raw/smb.h
@@ -337,12 +337,6 @@
#define BROWSER_ELECTION_VERSION 0x010f
#define BROWSER_CONSTANT 0xaa55
-/* Sercurity mode bits. */
-#define NEGOTIATE_SECURITY_USER_LEVEL 0x01
-#define NEGOTIATE_SECURITY_CHALLENGE_RESPONSE 0x02
-#define NEGOTIATE_SECURITY_SIGNATURES_ENABLED 0x04
-#define NEGOTIATE_SECURITY_SIGNATURES_REQUIRED 0x08
-
/*
* Global value meaning that the smb_uid field should be
* ingored (in share level security and protocol level == CORE)
--
Samba Shared Repository
More information about the samba-cvs
mailing list