summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-12-16 11:51:14 +0100
committerStefan Metzmacher <metze@samba.org>2008-12-29 21:10:49 +0100
commit671469ae7e3013809fe3995ec8f33dda9adda2ed (patch)
tree930c363ffcb9f67abb46b310fc6ad89e514509d9
parent0544734309feea44e8d449737a9934231f63693d (diff)
downloadsamba-671469ae7e3013809fe3995ec8f33dda9adda2ed.tar.gz
samba-671469ae7e3013809fe3995ec8f33dda9adda2ed.tar.bz2
samba-671469ae7e3013809fe3995ec8f33dda9adda2ed.zip
s3:passdb: add SAMU_BUFFER_V4 with no changes
The upgrade is required because of the followin TDBSAM_VERSION upgrade. metze
-rw-r--r--source3/include/passdb.h4
-rw-r--r--source3/passdb/passdb.c17
2 files changed, 19 insertions, 2 deletions
diff --git a/source3/include/passdb.h b/source3/include/passdb.h
index bd0929fc75..93c1e3f0ab 100644
--- a/source3/include/passdb.h
+++ b/source3/include/passdb.h
@@ -100,7 +100,9 @@ typedef struct logon_cache_struct {
#define SAMU_BUFFER_V1 1
#define SAMU_BUFFER_V2 2
#define SAMU_BUFFER_V3 3
-#define SAMU_BUFFER_LATEST SAMU_BUFFER_V3
+/* nothing changed from V3 to V4 */
+#define SAMU_BUFFER_V4 4
+#define SAMU_BUFFER_LATEST SAMU_BUFFER_V4
struct samu {
struct pdb_methods *methods;
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c
index 042e6fc39b..e677d429af 100644
--- a/source3/passdb/passdb.c
+++ b/source3/passdb/passdb.c
@@ -860,6 +860,7 @@ NTSTATUS local_password_change(const char *user_name,
#define SAMU_BUFFER_FORMAT_V1 "dddddddBBBBBBBBBBBBddBBwdwdBwwd"
#define SAMU_BUFFER_FORMAT_V2 "dddddddBBBBBBBBBBBBddBBBwwdBwwd"
#define SAMU_BUFFER_FORMAT_V3 "dddddddBBBBBBBBBBBBddBBBdwdBwwd"
+/* nothing changed between V3 and V4 */
/*********************************************************************
*********************************************************************/
@@ -1973,6 +1974,18 @@ static uint32 init_buffer_from_samu_v3 (uint8 **buf, struct samu *sampass, bool
return (buflen);
}
+static bool init_samu_from_buffer_v4(struct samu *sampass, uint8 *buf, uint32 buflen)
+{
+ /* nothing changed between V3 and V4 */
+ return init_samu_from_buffer_v3(sampass, buf, buflen);
+}
+
+static uint32 init_buffer_from_samu_v4(uint8 **buf, struct samu *sampass, bool size_only)
+{
+ /* nothing changed between V3 and V4 */
+ return init_buffer_from_samu_v3(buf, sampass, size_only);
+}
+
/**********************************************************************
Intialize a struct samu struct from a BYTE buffer of size len
*********************************************************************/
@@ -1989,6 +2002,8 @@ bool init_samu_from_buffer(struct samu *sampass, uint32_t level,
return init_samu_from_buffer_v2(sampass, buf, buflen);
case SAMU_BUFFER_V3:
return init_samu_from_buffer_v3(sampass, buf, buflen);
+ case SAMU_BUFFER_V4:
+ return init_samu_from_buffer_v4(sampass, buf, buflen);
}
return false;
@@ -2000,7 +2015,7 @@ bool init_samu_from_buffer(struct samu *sampass, uint32_t level,
uint32 init_buffer_from_samu (uint8 **buf, struct samu *sampass, bool size_only)
{
- return init_buffer_from_samu_v3(buf, sampass, size_only);
+ return init_buffer_from_samu_v4(buf, sampass, size_only);
}
/*********************************************************************