The branch, v3-6-test has been updated
       via  abb58c0 s3-rpc_server: remove two uneeded include 
registry/reg_parse_prs.h
       via  f6b4ab7 s3-ldapsam: fix ldapsam_create_user() with existing posix 
accounts.
       via  d6a504f s3-netapi: use cli_get_session_key() in netapi.
      from  889cfcf Fix bug 8021 - Incorrect string termination in 
volume/volume_name for TRANS2-QUERY_FS_INFO/Info Volume.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -----------------------------------------------------------------
commit abb58c0a969a6e21c0796e2a70ac73357fd0a0d1
Author: Günther Deschner <g...@samba.org>
Date:   Thu Mar 24 22:29:18 2011 +0100

    s3-rpc_server: remove two uneeded include registry/reg_parse_prs.h
    
    Guenther
    (cherry picked from commit 4a4efc20b43df25ea69239383069e1ce98ed5901)

commit f6b4ab70fa7096613aa16d4208658a3a05975f7b
Author: Günther Deschner <g...@samba.org>
Date:   Thu Mar 24 18:07:23 2011 +0100

    s3-ldapsam: fix ldapsam_create_user() with existing posix accounts.
    
    We were not taking into account the existing posix attributes and thus 
failed
    while trying to add a 2nd uid attribute.
    
    Found by Sumit.
    
    Guenther
    (cherry picked from commit ba510fae2369620875fac80eaba2c222f3ee234b)

commit d6a504fa8e6fb762e3004d955deb9ea86cf6e0e7
Author: Günther Deschner <g...@samba.org>
Date:   Thu Mar 24 22:14:20 2011 +0100

    s3-netapi: use cli_get_session_key() in netapi.
    
    Guenther
    (cherry picked from commit 63bb64d531bccc963e3131658f6c37887f820e87)

-----------------------------------------------------------------------

Summary of changes:
 source3/lib/netapi/joindomain.c           |   40 ++++++++++++++++++++++++++---
 source3/lib/netapi/user.c                 |   19 ++++++++++++-
 source3/passdb/pdb_ldap.c                 |    2 +-
 source3/rpc_server/rpc_server.c           |    1 -
 source3/rpc_server/winreg/srv_winreg_nt.c |    1 -
 5 files changed, 54 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/netapi/joindomain.c b/source3/lib/netapi/joindomain.c
index 6bae363..edc45ef 100644
--- a/source3/lib/netapi/joindomain.c
+++ b/source3/lib/netapi/joindomain.c
@@ -113,6 +113,7 @@ WERROR NetJoinDomain_r(struct libnetapi_ctx *ctx,
        WERROR werr;
        unsigned int old_timeout = 0;
        struct dcerpc_binding_handle *b;
+       DATA_BLOB session_key;
 
        werr = libnetapi_open_pipe(ctx, r->in.server,
                                   &ndr_table_wkssvc.syntax_id,
@@ -124,9 +125,16 @@ WERROR NetJoinDomain_r(struct libnetapi_ctx *ctx,
        b = pipe_cli->binding_handle;
 
        if (r->in.password) {
+
+               status = cli_get_session_key(ctx, pipe_cli, &session_key);
+               if (!NT_STATUS_IS_OK(status)) {
+                       werr = ntstatus_to_werror(status);
+                       goto done;
+               }
+
                encode_wkssvc_join_password_buffer(ctx,
                                                   r->in.password,
-                                                  
&pipe_cli->auth->user_session_key,
+                                                  &session_key,
                                                   &encrypted_password);
        }
 
@@ -246,6 +254,7 @@ WERROR NetUnjoinDomain_r(struct libnetapi_ctx *ctx,
        WERROR werr;
        unsigned int old_timeout = 0;
        struct dcerpc_binding_handle *b;
+       DATA_BLOB session_key;
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
                                   &ndr_table_wkssvc.syntax_id,
@@ -257,9 +266,16 @@ WERROR NetUnjoinDomain_r(struct libnetapi_ctx *ctx,
        b = pipe_cli->binding_handle;
 
        if (r->in.password) {
+
+               status = cli_get_session_key(ctx, pipe_cli, &session_key);
+               if (!NT_STATUS_IS_OK(status)) {
+                       werr = ntstatus_to_werror(status);
+                       goto done;
+               }
+
                encode_wkssvc_join_password_buffer(ctx,
                                                   r->in.password,
-                                                  
&pipe_cli->auth->user_session_key,
+                                                  &session_key,
                                                   &encrypted_password);
        }
 
@@ -436,6 +452,7 @@ WERROR NetGetJoinableOUs_r(struct libnetapi_ctx *ctx,
        NTSTATUS status;
        WERROR werr;
        struct dcerpc_binding_handle *b;
+       DATA_BLOB session_key;
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
                                   &ndr_table_wkssvc.syntax_id,
@@ -447,9 +464,16 @@ WERROR NetGetJoinableOUs_r(struct libnetapi_ctx *ctx,
        b = pipe_cli->binding_handle;
 
        if (r->in.password) {
+
+               status = cli_get_session_key(ctx, pipe_cli, &session_key);
+               if (!NT_STATUS_IS_OK(status)) {
+                       werr = ntstatus_to_werror(status);
+                       goto done;
+               }
+
                encode_wkssvc_join_password_buffer(ctx,
                                                   r->in.password,
-                                                  
&pipe_cli->auth->user_session_key,
+                                                  &session_key,
                                                   &encrypted_password);
        }
 
@@ -481,6 +505,7 @@ WERROR NetRenameMachineInDomain_r(struct libnetapi_ctx *ctx,
        NTSTATUS status;
        WERROR werr;
        struct dcerpc_binding_handle *b;
+       DATA_BLOB session_key;
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
                                   &ndr_table_wkssvc.syntax_id,
@@ -492,9 +517,16 @@ WERROR NetRenameMachineInDomain_r(struct libnetapi_ctx 
*ctx,
        b = pipe_cli->binding_handle;
 
        if (r->in.password) {
+
+               status = cli_get_session_key(ctx, pipe_cli, &session_key);
+               if (!NT_STATUS_IS_OK(status)) {
+                       werr = ntstatus_to_werror(status);
+                       goto done;
+               }
+
                encode_wkssvc_join_password_buffer(ctx,
                                                   r->in.password,
-                                                  
&pipe_cli->auth->user_session_key,
+                                                  &session_key,
                                                   &encrypted_password);
        }
 
diff --git a/source3/lib/netapi/user.c b/source3/lib/netapi/user.c
index 51a0934..29f609d 100644
--- a/source3/lib/netapi/user.c
+++ b/source3/lib/netapi/user.c
@@ -29,6 +29,7 @@
 #include "rpc_client/init_lsa.h"
 #include "../libcli/security/security.h"
 #include "../libds/common/flag_mapping.h"
+#include "rpc_client/cli_pipe.h"
 
 /****************************************************************
 ****************************************************************/
@@ -377,6 +378,7 @@ WERROR NetUserAdd_r(struct libnetapi_ctx *ctx,
        uint32_t rid = 0;
        struct USER_INFO_X uX;
        struct dcerpc_binding_handle *b = NULL;
+       DATA_BLOB session_key;
 
        ZERO_STRUCT(connect_handle);
        ZERO_STRUCT(domain_handle);
@@ -481,10 +483,16 @@ WERROR NetUserAdd_r(struct libnetapi_ctx *ctx,
                goto done;
        }
 
+       status = cli_get_session_key(ctx, pipe_cli, &session_key);
+       if (!NT_STATUS_IS_OK(status)) {
+               werr = ntstatus_to_werror(status);
+               goto done;
+       }
+
        uX.usriX_flags |= ACB_NORMAL;
 
        status = set_user_info_USER_INFO_X(ctx, pipe_cli,
-                                          &pipe_cli->auth->user_session_key,
+                                          &session_key,
                                           &user_handle,
                                           &uX);
        if (!NT_STATUS_IS_OK(status)) {
@@ -1850,6 +1858,7 @@ WERROR NetUserSetInfo_r(struct libnetapi_ctx *ctx,
 
        struct USER_INFO_X uX;
        struct dcerpc_binding_handle *b = NULL;
+       DATA_BLOB session_key;
 
        ZERO_STRUCT(connect_handle);
        ZERO_STRUCT(domain_handle);
@@ -1980,8 +1989,14 @@ WERROR NetUserSetInfo_r(struct libnetapi_ctx *ctx,
                goto done;
        }
 
+       status = cli_get_session_key(ctx, pipe_cli, &session_key);
+       if (!NT_STATUS_IS_OK(status)) {
+               werr = ntstatus_to_werror(status);
+               goto done;
+       }
+
        status = set_user_info_USER_INFO_X(ctx, pipe_cli,
-                                          &pipe_cli->auth->user_session_key,
+                                          &session_key,
                                           &user_handle,
                                           &uX);
        if (!NT_STATUS_IS_OK(status)) {
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index d1bee87..0e5567f 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -5364,7 +5364,7 @@ static NTSTATUS ldapsam_create_user(struct pdb_methods 
*my_methods,
                return NT_STATUS_UNSUCCESSFUL;
        }
 
-       if (!init_ldap_from_sam(ldap_state, NULL, &mods, user, 
element_is_set_or_changed)) {
+       if (!init_ldap_from_sam(ldap_state, entry, &mods, user, 
element_is_set_or_changed)) {
                DEBUG(1,("ldapsam_create_user: Unable to fill user structs\n"));
                return NT_STATUS_UNSUCCESSFUL;
        }
diff --git a/source3/rpc_server/rpc_server.c b/source3/rpc_server/rpc_server.c
index 94aa5a5..9a6b933 100644
--- a/source3/rpc_server/rpc_server.c
+++ b/source3/rpc_server/rpc_server.c
@@ -22,7 +22,6 @@
 #include "rpc_dce.h"
 #include "librpc/gen_ndr/netlogon.h"
 #include "librpc/gen_ndr/auth.h"
-#include "registry/reg_parse_prs.h"
 #include "lib/tsocket/tsocket.h"
 #include "libcli/named_pipe_auth/npa_tstream.h"
 #include "../auth/auth_sam_reply.h"
diff --git a/source3/rpc_server/winreg/srv_winreg_nt.c 
b/source3/rpc_server/winreg/srv_winreg_nt.c
index 1b54d37..b97c1e3 100644
--- a/source3/rpc_server/winreg/srv_winreg_nt.c
+++ b/source3/rpc_server/winreg/srv_winreg_nt.c
@@ -22,7 +22,6 @@
 
 #include "includes.h"
 #include "../librpc/gen_ndr/srv_winreg.h"
-#include "registry/reg_parse_prs.h"
 #include "registry.h"
 #include "registry/reg_api.h"
 #include "registry/reg_api_regf.h"


-- 
Samba Shared Repository

Reply via email to