summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-12-15 18:46:37 +0100
committerStefan Metzmacher <metze@samba.org>2008-12-29 21:10:49 +0100
commit0544734309feea44e8d449737a9934231f63693d (patch)
tree98286bf9580d96ae2ef26d8610efadb461e0c7e4 /source3/include
parent60b366369e7653d9981b4ebd147667400974ccb9 (diff)
downloadsamba-0544734309feea44e8d449737a9934231f63693d.tar.gz
samba-0544734309feea44e8d449737a9934231f63693d.tar.bz2
samba-0544734309feea44e8d449737a9934231f63693d.zip
s3:passdb: make marshalling struct samu from and to a buffer more generic
This marshalling isn't specific to tdbsam and it's ugly to have the related functions in two different files. metze
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/passdb.h8
-rw-r--r--source3/include/proto.h5
2 files changed, 10 insertions, 3 deletions
diff --git a/source3/include/passdb.h b/source3/include/passdb.h
index 744b723c83..bd0929fc75 100644
--- a/source3/include/passdb.h
+++ b/source3/include/passdb.h
@@ -95,7 +95,13 @@ typedef struct logon_cache_struct {
uint16 bad_password_count;
time_t bad_password_time;
} LOGIN_CACHE;
-
+
+#define SAMU_BUFFER_V0 0
+#define SAMU_BUFFER_V1 1
+#define SAMU_BUFFER_V2 2
+#define SAMU_BUFFER_V3 3
+#define SAMU_BUFFER_LATEST SAMU_BUFFER_V3
+
struct samu {
struct pdb_methods *methods;
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 08260517ff..b874beb30b 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -4440,8 +4440,9 @@ NTSTATUS local_password_change(const char *user_name,
const char *new_passwd,
char **pp_err_str,
char **pp_msg_str);
-bool init_sam_from_buffer_v3(struct samu *sampass, uint8 *buf, uint32 buflen);
-uint32 init_buffer_from_sam_v3 (uint8 **buf, struct samu *sampass, bool size_only);
+bool init_samu_from_buffer(struct samu *sampass, uint32_t level,
+ uint8 *buf, uint32 buflen);
+uint32 init_buffer_from_samu (uint8 **buf, struct samu *sampass, bool size_only);
bool pdb_copy_sam_account(struct samu *dst, struct samu *src );
bool pdb_update_bad_password_count(struct samu *sampass, bool *updated);
bool pdb_update_autolock_flag(struct samu *sampass, bool *updated);