The branch, v3-devel has been updated
       via  9336cd1c5e5b5d113cd4912d4479dfe609fe261e (commit)
       via  56ecec50130aa948a431427285aed4b28a5647e8 (commit)
       via  544d1fd19a7e85af5f522c5b6b4b68c6beb093a6 (commit)
      from  9daea0ccfdda58450be3c9a9a94c016f5900c319 (commit)

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


- Log -----------------------------------------------------------------
commit 9336cd1c5e5b5d113cd4912d4479dfe609fe261e
Author: Volker Lendecke <[EMAIL PROTECTED]>
Date:   Mon Sep 1 21:28:57 2008 +0200

    Fix some nonempty blank lines

commit 56ecec50130aa948a431427285aed4b28a5647e8
Author: Volker Lendecke <[EMAIL PROTECTED]>
Date:   Mon Sep 1 18:42:44 2008 +0200

    Slightly simplify logic: remove an else branch

commit 544d1fd19a7e85af5f522c5b6b4b68c6beb093a6
Author: Volker Lendecke <[EMAIL PROTECTED]>
Date:   Mon Sep 1 16:22:04 2008 +0200

    Fix typo

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

Summary of changes:
 source/libsmb/clifile.c    |    2 +-
 source/libsmb/passchange.c |   22 +++++++++++-----------
 source/rpc_client/ndr.c    |    2 +-
 source/smbd/reply.c        |   25 +++++++++++--------------
 source/utils/smbpasswd.c   |   42 +++++++++++++++++++++---------------------
 5 files changed, 45 insertions(+), 48 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/libsmb/clifile.c b/source/libsmb/clifile.c
index b3032a0..a8b3440 100644
--- a/source/libsmb/clifile.c
+++ b/source/libsmb/clifile.c
@@ -1892,7 +1892,7 @@ bool cli_set_ea_fnum(struct cli_state *cli, int fnum, 
const char *ea_name, const
 }
 
 /*********************************************************
- Get an extended attribute list tility fn.
+ Get an extended attribute list utility fn.
 *********************************************************/
 
 static bool cli_get_ea_list(struct cli_state *cli,
diff --git a/source/libsmb/passchange.c b/source/libsmb/passchange.c
index c8a4406..4c76234 100644
--- a/source/libsmb/passchange.c
+++ b/source/libsmb/passchange.c
@@ -42,7 +42,7 @@ NTSTATUS remote_password_change(const char *remote_machine, 
const char *user_nam
                         "%s.\n", remote_machine);
                return NT_STATUS_UNSUCCESSFUL;
        }
- 
+
        cli = cli_initialise();
        if (!cli) {
                return NT_STATUS_NO_MEMORY;
@@ -56,10 +56,10 @@ NTSTATUS remote_password_change(const char *remote_machine, 
const char *user_nam
                cli_shutdown(cli);
                return result;
        }
-  
+
        make_nmb_name(&calling, global_myname() , 0x0);
        make_nmb_name(&called , remote_machine, 0x20);
-       
+
        if (!cli_session_request(cli, &calling, &called)) {
                asprintf(err_str, "machine %s rejected the session setup. "
                         "Error was : %s.\n",
@@ -68,7 +68,7 @@ NTSTATUS remote_password_change(const char *remote_machine, 
const char *user_nam
                cli_shutdown(cli);
                return result;
        }
-  
+
        cli->protocol = PROTOCOL_NT1;
 
        if (!cli_negprot(cli)) {
@@ -79,7 +79,7 @@ NTSTATUS remote_password_change(const char *remote_machine, 
const char *user_nam
                cli_shutdown(cli);
                return result;
        }
-  
+
        /* Given things like SMB signing, restrict anonymous and the like, 
           try an authenticated connection first */
        result = cli_session_setup(cli, user_name,
@@ -188,7 +188,7 @@ NTSTATUS remote_password_change(const char *remote_machine, 
const char *user_nam
        } else if (!(NT_STATUS_EQUAL(result, NT_STATUS_ACCESS_DENIED) 
                     || NT_STATUS_EQUAL(result, NT_STATUS_UNSUCCESSFUL))) {
                /* it failed, but for reasons such as wrong password, too short 
etc ... */
-               
+
                asprintf(err_str, "machine %s rejected the password change: "
                         "Error was : %s.\n",
                         remote_machine, get_friendly_nt_error_msg(result));
@@ -198,12 +198,12 @@ NTSTATUS remote_password_change(const char 
*remote_machine, const char *user_nam
 
        /* OK, that failed, so try again... */
        TALLOC_FREE(pipe_hnd);
-       
+
        /* Try anonymous NTLMSSP... */
        cli_init_creds(cli, "", "", NULL);
-       
+
        result = NT_STATUS_UNSUCCESSFUL;
-       
+
        /* OK, this is ugly, but... try an anonymous pipe. */
        result = cli_rpc_pipe_open_noauth(cli, &ndr_table_samr.syntax_id,
                                          &pipe_hnd);
@@ -227,10 +227,10 @@ NTSTATUS remote_password_change(const char 
*remote_machine, const char *user_nam
                        cli_shutdown(cli);
                        return result;
                }
-               
+
                /* We have failed to change the user's password, and we think 
the server
                   just might not support SAMR password changes, so fall back */
-               
+
                if (lp_client_lanman_auth()) {
                        /* Use the old RAP method. */
                        if (cli_oem_change_password(cli, user_name, new_passwd, 
old_passwd)) {
diff --git a/source/rpc_client/ndr.c b/source/rpc_client/ndr.c
index c494cce..72a3313 100644
--- a/source/rpc_client/ndr.c
+++ b/source/rpc_client/ndr.c
@@ -60,7 +60,7 @@ NTSTATUS cli_do_rpc_ndr(struct rpc_pipe_client *cli,
        talloc_free(push);
 
        prs_init_empty( &r_ps, mem_ctx, UNMARSHALL );
-       
+
        status = rpc_api_pipe_req(cli, opnum, &q_ps, &r_ps); 
 
        prs_mem_free( &q_ps );
diff --git a/source/smbd/reply.c b/source/smbd/reply.c
index ff38ac8..16f8a5b 100644
--- a/source/smbd/reply.c
+++ b/source/smbd/reply.c
@@ -3264,25 +3264,22 @@ normal_read:
                }
                TALLOC_FREE(req->outbuf);
                return;
-       } else {
-               reply_outbuf(req, 12, smb_maxcnt);
+       }
 
-               nread = read_file(fsp, smb_buf(req->outbuf), startpos,
-                                 smb_maxcnt);
-               if (nread < 0) {
-                       reply_unixerror(req, ERRDOS, ERRnoaccess);
-                       return;
-               }
+       reply_outbuf(req, 12, smb_maxcnt);
 
-               setup_readX_header((char *)req->outbuf, nread);
+       nread = read_file(fsp, smb_buf(req->outbuf), startpos, smb_maxcnt);
+       if (nread < 0) {
+               reply_unixerror(req, ERRDOS, ERRnoaccess);
+               return;
+       }
 
-               DEBUG( 3, ( "send_file_readX fnum=%d max=%d nread=%d\n",
-                       fsp->fnum, (int)smb_maxcnt, (int)nread ) );
+       setup_readX_header((char *)req->outbuf, nread);
 
-               chain_reply(req);
+       DEBUG( 3, ( "send_file_readX fnum=%d max=%d nread=%d\n",
+                   fsp->fnum, (int)smb_maxcnt, (int)nread ) );
 
-               return;
-       }
+       chain_reply(req);
 }
 
 /****************************************************************************
diff --git a/source/utils/smbpasswd.c b/source/utils/smbpasswd.c
index 493a249..600fe52 100644
--- a/source/utils/smbpasswd.c
+++ b/source/utils/smbpasswd.c
@@ -210,7 +210,7 @@ static char *prompt_for_new_password(bool stdin_get)
        fstring new_pw;
 
        ZERO_ARRAY(new_pw);
- 
+
        p = get_pass("New SMB password:", stdin_get);
 
        fstrcpy(new_pw, p);
@@ -254,7 +254,7 @@ static NTSTATUS password_change(const char *remote_mach, 
char *username,
                SAFE_FREE(err_str);
                return ret;
        }
-       
+
        ret = local_password_change(username, local_flags, new_pw, 
                                     &err_str, &msg_str);
 
@@ -278,7 +278,7 @@ static bool store_ldap_admin_pw (char* pw)
 
        if (!secrets_init())
                return False;
-       
+
        return secrets_store_ldap_pw(lp_ldap_admin_dn(), pw);
 }
 
@@ -316,7 +316,7 @@ static int process_root(int local_flags)
                DEBUG(0, ("Failed to open passdb!\n"));
                exit(1);
        }
-               
+
        /* Ensure we have a SAM sid. */
        get_global_sam_sid();
 
@@ -330,7 +330,7 @@ static int process_root(int local_flags)
                (remote_machine != NULL))) {
                usage();
        }
-       
+
        /* Only load interfaces if we are doing network operations. */
 
        if (remote_machine) {
@@ -386,19 +386,19 @@ static int process_root(int local_flags)
                                exit(1);
                        }
                }
-               
+
                /* prepare uppercased and '$' terminated username */
                slprintf(buf, sizeof(buf) - 1, "%s$", user_name);
                fstrcpy(user_name, buf);
-               
+
        } else {
-               
+
                if (remote_machine != NULL) {
                        old_passwd = get_pass("Old SMB 
password:",stdin_passwd_get);
                }
-               
+
                if (!(local_flags & LOCAL_SET_PASSWORD)) {
-                       
+
                        /*
                         * If we are trying to enable a user, first we need to 
find out
                         * if they are using a modern version of the smbpasswd 
file that
@@ -407,10 +407,10 @@ static int process_root(int local_flags)
                         * password. If not (ie. they have a no stored password 
in the
                         * smbpasswd file) then we need to prompt for a new 
password.
                         */
-                       
+
                        if(local_flags & LOCAL_ENABLE_USER) {
                                struct samu *sampass = NULL;
-                               
+
                                sampass = samu_new( NULL );
                                if (!sampass) {
                                        fprintf(stderr, "talloc fail for struct 
samu.\n");
@@ -428,10 +428,10 @@ static int process_root(int local_flags)
                                TALLOC_FREE(sampass);
                        }
                }
-               
+
                if((local_flags & LOCAL_SET_PASSWORD) && (new_passwd == NULL)) {
                        new_passwd = prompt_for_new_password(stdin_passwd_get);
-                       
+
                        if(!new_passwd) {
                                fprintf(stderr, "Unable to get new 
password.\n");
                                exit(1);
@@ -451,7 +451,7 @@ static int process_root(int local_flags)
                printf("Password changed for user %s on %s.\n", user_name, 
remote_machine );
        } else if(!(local_flags & 
(LOCAL_ADD_USER|LOCAL_DISABLE_USER|LOCAL_ENABLE_USER|LOCAL_DELETE_USER|LOCAL_SET_NO_PASSWORD|LOCAL_SET_PASSWORD)))
 {
                struct samu *sampass = NULL;
-               
+
                sampass = samu_new( NULL );
                if (!sampass) {
                        fprintf(stderr, "talloc fail for struct samu.\n");
@@ -507,7 +507,7 @@ static int process_nonroot(int local_flags)
                        exit(1);
                }
        }
-       
+
        /*
         * A non-root user is always setting a password
         * via a remote machine (even if that machine is
@@ -523,13 +523,13 @@ static int process_nonroot(int local_flags)
        if (remote_machine != NULL) {
                old_pw = get_pass("Old SMB password:",stdin_passwd_get);
        }
-       
+
        if (!new_passwd) {
                new_pw = prompt_for_new_password(stdin_passwd_get);
        }
        else
                new_pw = smb_xstrdup(new_passwd);
-       
+
        if (!new_pw) {
                fprintf(stderr, "Unable to get new password.\n");
                exit(1);
@@ -561,7 +561,7 @@ int main(int argc, char **argv)
        TALLOC_CTX *frame = talloc_stackframe();
        int local_flags = 0;
        int ret;
-       
+
        AllowDebugChange = False;
 
 #if defined(HAVE_SET_AUTH_PARAMETERS)
@@ -577,12 +577,12 @@ int main(int argc, char **argv)
        local_flags = process_options(argc, argv, local_flags);
 
        setup_logging("smbpasswd", True);
-       
+
        /*
         * Set the machine NETBIOS name if not already
         * set from the config file. 
         */ 
-    
+
        if (!init_names())
                return 1;
 


-- 
Samba Shared Repository

Reply via email to