The branch, v3-5-test has been updated
       via  cb6559062909f365b32cd8e3986269e38701c78c (commit)
       via  fb0b85b59c4a7db846d66d6db816c2c4dee1b887 (commit)
       via  b5117b18fdcbbc64e583264085f08c76b587c43b (commit)
       via  804be72c085b3add97043149c78b767820d182f5 (commit)
       via  805d851a7d45fbcd74f9a85a8c33d111fd53e763 (commit)
       via  a272430e74f390c35ee525156753346115f7895f (commit)
      from  a86f80beefb11fdebc00b0442d7735d6e1081995 (commit)

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


- Log -----------------------------------------------------------------
commit cb6559062909f365b32cd8e3986269e38701c78c
Author: Günther Deschner <g...@samba.org>
Date:   Mon Oct 5 13:01:53 2009 +0200

    s3-net: print error when "net rpc changetrustpw" has failed.
    
    Guenther
    (cherry picked from commit 55b12d032c82b280bc0fda43bff8e5b05b934ecf)

commit fb0b85b59c4a7db846d66d6db816c2c4dee1b887
Author: Volker Lendecke <v...@samba.org>
Date:   Sun Oct 4 15:19:19 2009 +0200

    s3: Remove a scary error message -- talloc_move can not fail :-)
    
    Signed-off-by: Günther Deschner <g...@samba.org>
    (cherry picked from commit 84de81b4786bed411199f2785a1eafc7c86db478)

commit b5117b18fdcbbc64e583264085f08c76b587c43b
Author: Volker Lendecke <v...@samba.org>
Date:   Sun Oct 4 15:13:44 2009 +0200

    s3: Fix nonempty blank lines
    
    Signed-off-by: Günther Deschner <g...@samba.org>
    (cherry picked from commit d696f9a7ed0bb42c6d9de99ab07af27b00fe2d40)

commit 804be72c085b3add97043149c78b767820d182f5
Author: Günther Deschner <g...@samba.org>
Date:   Fri Oct 2 01:25:13 2009 +0200

    lib/tdr: get rid of build warning when using TDR_ALLOC macro.
    
    Guenther
    (cherry picked from commit ab8a16c77f8222115493bbc295318a7d9ceb6d38)

commit 805d851a7d45fbcd74f9a85a8c33d111fd53e763
Author: Günther Deschner <g...@samba.org>
Date:   Thu Oct 1 13:42:29 2009 +0200

    s3: remove unused PRS_POINTER_CAST macro.
    
    Guenther
    (cherry picked from commit 926457ec9565c980c14a658b34291e41317d404b)

commit a272430e74f390c35ee525156753346115f7895f
Author: Günther Deschner <g...@samba.org>
Date:   Thu Oct 1 12:52:46 2009 +0200

    s3: remove unused SYSTEMTIME struct.
    
    Guenther
    (cherry picked from commit 2497f70257bd7b5523c65d342e68d8a1c85c41c2)

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

Summary of changes:
 lib/tdr/tdr.h                 |    2 +-
 source3/include/rpc_misc.h    |   20 --------------------
 source3/libsmb/trusts_util.c  |    8 ++++----
 source3/rpc_client/cli_pipe.c |    5 -----
 source3/utils/net_rpc.c       |   10 +++++++++-
 5 files changed, 14 insertions(+), 31 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tdr/tdr.h b/lib/tdr/tdr.h
index 1eedc58..84f3e50 100644
--- a/lib/tdr/tdr.h
+++ b/lib/tdr/tdr.h
@@ -55,7 +55,7 @@ struct tdr_print {
                         } while (0)
 
 #define TDR_ALLOC(ctx, s, n) do { \
-                              (s) = talloc_array_size(ctx, sizeof(*(s)), n); \
+                              (s) = talloc_array_ptrtype(ctx, (s), n); \
                            if ((n) && !(s)) return NT_STATUS_NO_MEMORY; \
                            } while (0)
 
diff --git a/source3/include/rpc_misc.h b/source3/include/rpc_misc.h
index aff9b1c..58ea916 100644
--- a/source3/include/rpc_misc.h
+++ b/source3/include/rpc_misc.h
@@ -24,7 +24,6 @@
 #define _RPC_MISC_H 
 
 #define SMB_RPC_INTERFACE_VERSION 1
-#define PRS_POINTER_CAST bool (*)(const char*, prs_struct*, int, void*)
 
 
 /********************************************************************** 
@@ -104,23 +103,4 @@ typedef struct {           /* UNISTR - unicode string size 
and buffer */
                                   little-endian. ***MUST*** be null-terminated 
*/
 } UNISTR;
 
-/*
- * I'm really wondering how many different time formats
- * I will have to cope with
- *
- * JFM, 09/13/98 In a mad mood ;-(
-*/
-typedef struct systemtime
-{
-       uint16 year;
-       uint16 month;
-       uint16 dayofweek;
-       uint16 day;
-       uint16 hour;
-       uint16 minute;
-       uint16 second;
-       uint16 milliseconds;
-}
-SYSTEMTIME;
-
 #endif /* _RPC_MISC_H */
diff --git a/source3/libsmb/trusts_util.c b/source3/libsmb/trusts_util.c
index 929816e..adf1525 100644
--- a/source3/libsmb/trusts_util.c
+++ b/source3/libsmb/trusts_util.c
@@ -35,7 +35,7 @@ NTSTATUS trust_pw_change_and_store_it(struct rpc_pipe_client 
*cli, TALLOC_CTX *m
        unsigned char new_trust_passwd_hash[16];
        char *new_trust_passwd;
        NTSTATUS nt_status;
-               
+
        /* Create a random machine account password */
        new_trust_passwd = generate_random_str(mem_ctx, 
DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH);
 
@@ -43,7 +43,7 @@ NTSTATUS trust_pw_change_and_store_it(struct rpc_pipe_client 
*cli, TALLOC_CTX *m
                DEBUG(0, ("talloc_strdup failed\n"));
                return NT_STATUS_NO_MEMORY;
        }
-       
+
        E_md4hash(new_trust_passwd, new_trust_passwd_hash);
 
        nt_status = rpccli_netlogon_set_trust_password(cli, mem_ctx,
@@ -51,7 +51,7 @@ NTSTATUS trust_pw_change_and_store_it(struct rpc_pipe_client 
*cli, TALLOC_CTX *m
                                                       new_trust_passwd,
                                                       new_trust_passwd_hash,
                                                       sec_channel_type);
-       
+
        if (NT_STATUS_IS_OK(nt_status)) {
                DEBUG(3,("%s : trust_pw_change_and_store_it: Changed 
password.\n", 
                         current_timestring(debug_ctx(), False)));
@@ -86,7 +86,7 @@ NTSTATUS trust_pw_find_change_and_store_it(struct 
rpc_pipe_client *cli,
                DEBUG(0, ("could not fetch domain secrets for domain %s!\n", 
domain));
                return NT_STATUS_UNSUCCESSFUL;
        }
-       
+
        return trust_pw_change_and_store_it(cli, mem_ctx, domain,
                                            old_trust_passwd_hash,
                                            sec_channel_type);
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index 34b8616..dc4dfbd 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -3940,11 +3940,6 @@ NTSTATUS cli_rpc_pipe_open_schannel_with_key(struct 
cli_state *cli,
         * in - reference them in
         */
        result->dc = talloc_move(result, pdc);
-       if (result->dc == NULL) {
-               DEBUG(0, ("talloc reference failed\n"));
-               TALLOC_FREE(result);
-               return NT_STATUS_NO_MEMORY;
-       }
 
        DEBUG(10,("cli_rpc_pipe_open_schannel_with_key: opened pipe %s to 
machine %s "
                  "for domain %s and bound using schannel.\n",
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index b450534..be971d8 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -239,8 +239,16 @@ static NTSTATUS rpc_changetrustpw_internals(struct 
net_context *c,
                                        int argc,
                                        const char **argv)
 {
+       NTSTATUS status;
+
+       status = trust_pw_find_change_and_store_it(pipe_hnd, mem_ctx, 
c->opt_target_workgroup);
+       if (!NT_STATUS_IS_OK(status)) {
+               d_fprintf(stderr, _("Failed to change machine account password: 
%s\n"),
+                       nt_errstr(status));
+               return status;
+       }
 
-       return trust_pw_find_change_and_store_it(pipe_hnd, mem_ctx, 
c->opt_target_workgroup);
+       return NT_STATUS_OK;
 }
 
 /**


-- 
Samba Shared Repository

Reply via email to