summaryrefslogtreecommitdiffstats
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-05-07 23:26:54 +0200
committerGünther Deschner <gd@samba.org>2009-05-08 00:44:46 +0200
commitd17c6af57c6e5ec10d71a9fcbffc6ce4d34a553f (patch)
treeffa7cc7d2063e83b8af7d6470385e57c4cbd2a47 /source3/rpc_server
parentc400fc1e1e9a0c3db82c9a96e9684c8debfb3b74 (diff)
downloadsamba-d17c6af57c6e5ec10d71a9fcbffc6ce4d34a553f.tar.gz
samba-d17c6af57c6e5ec10d71a9fcbffc6ce4d34a553f.tar.xz
samba-d17c6af57c6e5ec10d71a9fcbffc6ce4d34a553f.zip
s3-samr: implement _samr_OemChangePasswordUser2().
Guenther
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_samr_nt.c58
1 files changed, 48 insertions, 10 deletions
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index e656e6c4569..cef8c08c640 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -1811,6 +1811,54 @@ NTSTATUS _samr_ChangePasswordUser2(pipes_struct *p,
return status;
}
+/****************************************************************
+ _samr_OemChangePasswordUser2
+****************************************************************/
+
+NTSTATUS _samr_OemChangePasswordUser2(pipes_struct *p,
+ struct samr_OemChangePasswordUser2 *r)
+{
+ NTSTATUS status;
+ fstring user_name;
+ const char *wks = NULL;
+
+ DEBUG(5,("_samr_OemChangePasswordUser2: %d\n", __LINE__));
+
+ fstrcpy(user_name, r->in.account->string);
+ if (r->in.server && r->in.server->string) {
+ wks = r->in.server->string;
+ }
+
+ DEBUG(5,("_samr_OemChangePasswordUser2: user: %s wks: %s\n", user_name, wks));
+
+ /*
+ * Pass the user through the NT -> unix user mapping
+ * function.
+ */
+
+ (void)map_username(user_name);
+
+ /*
+ * UNIX username case mangling not required, pass_oem_change
+ * is case insensitive.
+ */
+
+ if (!r->in.hash || !r->in.password) {
+ return NT_STATUS_INVALID_PARAMETER;
+ }
+
+ status = pass_oem_change(user_name,
+ r->in.password->data,
+ r->in.hash->hash,
+ 0,
+ 0,
+ NULL);
+
+ DEBUG(5,("_samr_OemChangePasswordUser2: %d\n", __LINE__));
+
+ return status;
+}
+
/*******************************************************************
_samr_ChangePasswordUser3
********************************************************************/
@@ -6109,16 +6157,6 @@ NTSTATUS _samr_RemoveMultipleMembersFromAlias(pipes_struct *p,
/****************************************************************
****************************************************************/
-NTSTATUS _samr_OemChangePasswordUser2(pipes_struct *p,
- struct samr_OemChangePasswordUser2 *r)
-{
- p->rng_fault_state = true;
- return NT_STATUS_NOT_IMPLEMENTED;
-}
-
-/****************************************************************
-****************************************************************/
-
NTSTATUS _samr_SetBootKeyInformation(pipes_struct *p,
struct samr_SetBootKeyInformation *r)
{