The branch, master has been updated via 68529bc s3-charcnv: remove unused labels. via 4a4efc2 s3-rpc_server: remove two uneeded include registry/reg_parse_prs.h via ba510fa s3-ldapsam: fix ldapsam_create_user() with existing posix accounts. via 63bb64d s3-netapi: use cli_get_session_key() in netapi. from 042aafb 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=master - Log ----------------------------------------------------------------- commit 68529bc14efd077531086b3e8bcaf85287cfa6ba Author: Günther Deschner <g...@samba.org> Date: Thu Mar 24 23:02:36 2011 +0100 s3-charcnv: remove unused labels. Guenther Autobuild-User: Günther Deschner <g...@samba.org> Autobuild-Date: Thu Mar 24 23:54:25 CET 2011 on sn-devel-104 commit 4a4efc20b43df25ea69239383069e1ce98ed5901 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 commit ba510fae2369620875fac80eaba2c222f3ee234b 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 commit 63bb64d531bccc963e3131658f6c37887f820e87 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 ----------------------------------------------------------------------- Summary of changes: source3/lib/charcnv.c | 6 ---- 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 - 6 files changed, 54 insertions(+), 15 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c index 6addc90..12c708e 100644 --- a/source3/lib/charcnv.c +++ b/source3/lib/charcnv.c @@ -127,8 +127,6 @@ static size_t convert_string_internal(charset_t from, charset_t to, i_len=srclen; o_len=destlen; - again: - retval = smb_iconv(descriptor, &inbuf, &i_len, &outbuf, &o_len); if(retval==(size_t)-1) { const char *reason="unknown error"; @@ -416,8 +414,6 @@ bool convert_string_talloc(TALLOC_CTX *ctx, charset_t from, charset_t to, i_len = srclen; o_len = destlen; - again: - retval = smb_iconv(descriptor, &inbuf, &i_len, &outbuf, &o_len); @@ -444,8 +440,6 @@ bool convert_string_talloc(TALLOC_CTX *ctx, charset_t from, charset_t to, return false; } - out: - destlen = destlen - o_len; /* Don't shrink unless we're reclaiming a lot of * space. This is in the hot codepath and these 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