summaryrefslogtreecommitdiffstats
path: root/ldap/synctools/passwordsync/passhook/passhook.cpp
diff options
context:
space:
mode:
authorDavid Boreham <dboreham@redhat.com>2005-03-11 02:44:17 +0000
committerDavid Boreham <dboreham@redhat.com>2005-03-11 02:44:17 +0000
commita957eeb8962ee1611b2546fda2bb11a5c909e59b (patch)
treea954c178f40f3531a52b01227c48e7a2df8d8894 /ldap/synctools/passwordsync/passhook/passhook.cpp
parent9a7d1e1fd10a644ed17952acd18f755470d4744a (diff)
downloadds-a957eeb8962ee1611b2546fda2bb11a5c909e59b.tar.gz
ds-a957eeb8962ee1611b2546fda2bb11a5c909e59b.tar.xz
ds-a957eeb8962ee1611b2546fda2bb11a5c909e59b.zip
Merge over new code: fractional replication, wan replication and windows sync plus associated UI
Diffstat (limited to 'ldap/synctools/passwordsync/passhook/passhook.cpp')
-rw-r--r--ldap/synctools/passwordsync/passhook/passhook.cpp47
1 files changed, 47 insertions, 0 deletions
diff --git a/ldap/synctools/passwordsync/passhook/passhook.cpp b/ldap/synctools/passwordsync/passhook/passhook.cpp
new file mode 100644
index 00000000..ff49d575
--- /dev/null
+++ b/ldap/synctools/passwordsync/passhook/passhook.cpp
@@ -0,0 +1,47 @@
+// Created: 2-8-2005
+// Author(s): Scott Bridges
+#include <windows.h>
+#include <ntsecapi.h>
+#include "../passhand.h"
+
+#ifndef STATUS_SUCCESS
+#define STATUS_SUCCESS ((NTSTATUS)0x00000000L)
+#endif
+
+NTSTATUS NTAPI PasswordChangeNotify(
+ PUNICODE_STRING UserName,
+ ULONG RelativeId,
+ PUNICODE_STRING Password)
+{
+ PasswordHandler ourPasswordHandler;
+ HANDLE passhookEventHandle = OpenEvent(EVENT_MODIFY_STATE, FALSE, PASSHAND_EVENT_NAME);
+
+ ourPasswordHandler.LoadSet("passhook.dat");
+ ourPasswordHandler.PushUserPass(UserName, Password);
+ ourPasswordHandler.SaveSet("passhook.dat");
+
+ if(passhookEventHandle == NULL)
+ {
+ // ToDo: Generate event sync service not running.
+ }
+ else
+ {
+ SetEvent(passhookEventHandle);
+ }
+
+ return STATUS_SUCCESS;
+}
+
+BOOL NTAPI PasswordFilter(
+ PUNICODE_STRING UserName,
+ PUNICODE_STRING FullName,
+ PUNICODE_STRING Password,
+ BOOL SetOperation)
+{
+ return TRUE;
+}
+
+BOOL NTAPI InitializeChangeNotify()
+{
+ return TRUE;
+} \ No newline at end of file