samba-cvs.cvs
[Top] [All Lists]

[SCM] Samba Shared Repository - branch v3-2-stable updated - release-3-2

Subject: [SCM] Samba Shared Repository - branch v3-2-stable updated - release-3-2-0pre2-115-g640ceff
From: Karolin Seeger
Date: Tue, 18 Mar 2008 10:09:29 -0500 CDT
The branch, v3-2-stable has been updated
       via  640ceff3bb19cf0ebaea2d1153f68665f655f78e (commit)
       via  b6e11404cc62904181f40ffef92484ba8bb798f2 (commit)
       via  ec6cacb0274af769121cffc41d4f2bd7562979f2 (commit)
       via  1f675379b01e425af588e6b77bf27852af4b3822 (commit)
      from  86ab51cce01840bdf54963569e97c0f212d92ffe (commit)

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


- Log -----------------------------------------------------------------
commit 640ceff3bb19cf0ebaea2d1153f68665f655f78e
Author: Michael Adam <obnox@xxxxxxxxx>
Date:   Tue Mar 18 15:50:27 2008 +0100

    testparm: only check for %u und passwd program when passwd program is given.
    
    Michael
    (cherry picked from commit af12b24c4f5e3b77d482a011b62a5a3e13be7d67)

commit b6e11404cc62904181f40ffef92484ba8bb798f2
Author: Michael Adam <obnox@xxxxxxxxx>
Date:   Tue Mar 18 15:49:31 2008 +0100

    testparm: correctly check for empty lp_passwd_prog().
    
    Michael
    (cherry picked from commit 0567f506986746173d67172cb610c10bacf0ceb9)

commit ec6cacb0274af769121cffc41d4f2bd7562979f2
Author: Michael Adam <obnox@xxxxxxxxx>
Date:   Tue Mar 18 15:33:25 2008 +0100

    testparm: fix irritating indentation.
    
    Michael
    (cherry picked from commit a74f07243d80294167766dfc6bcad02a96afc079)

commit 1f675379b01e425af588e6b77bf27852af4b3822
Author: Michael Adam <obnox@xxxxxxxxx>
Date:   Tue Mar 18 15:30:17 2008 +0100

    testparm: fix a segfault triggered by setting "unix password sync = yes".
    
    (introduced by pstring removal 041163551194102ca67fef52c57d87020a1d09bc)
    
    Michael
    (cherry picked from commit 46a021f27c60dc579c9193606997142f5cbeba9e)

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

Summary of changes:
 source/utils/testparm.c |   23 ++++++++++++++---------
 1 files changed, 14 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/utils/testparm.c b/source/utils/testparm.c
index fbfc855..aded4a8 100644
--- a/source/utils/testparm.c
+++ b/source/utils/testparm.c
@@ -109,7 +109,9 @@ to a valid password server.\n", sec_setting );
                if (!lp_pam_password_change()) {
 #endif
 
-                       if(lp_passwd_program() == NULL) {
+                       if((lp_passwd_program() == NULL) ||
+                          (strlen(lp_passwd_program()) == 0))
+                       {
                                fprintf( stderr, "ERROR: the 'unix password 
sync' parameter is set and there is no valid 'passwd program' \
 parameter.\n" );
                                ret = 1;
@@ -120,7 +122,6 @@ parameter.\n" );
 
                                passwd_prog = lp_passwd_program();
                                p = passwd_prog;
-                               *truncated_prog = '\0';
                                next_token_talloc(talloc_tos(),
                                                &p,
                                                &truncated_prog, NULL);
@@ -129,8 +130,7 @@ parameter.\n" );
 cannot be executed (error was %s).\n", truncated_prog, strerror(errno) );
                                        ret = 1;
                                }
-
-             }
+                       }
 
 #ifdef WITH_PAM
                }
@@ -140,11 +140,16 @@ cannot be executed (error was %s).\n", truncated_prog, 
strerror(errno) );
                        fprintf(stderr, "ERROR: the 'unix password sync' 
parameter is set and there is no valid 'passwd chat' \
 parameter.\n");
                        ret = 1;
-               } else 
-               /* check if there's a %u parameter present */
-               if(strstr_m(lp_passwd_program(), "%u") == NULL) {
-                       fprintf(stderr, "ERROR: the 'passwd program' (%s) 
requires a '%%u' parameter.\n", lp_passwd_program());
-                       ret = 1;
+               }
+
+               if ((lp_passwd_program() != NULL) &&
+                   (strlen(lp_passwd_program()) > 0))
+               {
+                       /* check if there's a %u parameter present */
+                       if(strstr_m(lp_passwd_program(), "%u") == NULL) {
+                               fprintf(stderr, "ERROR: the 'passwd program' 
(%s) requires a '%%u' parameter.\n", lp_passwd_program());
+                               ret = 1;
+                       }
                }
 
                /*


-- 
Samba Shared Repository

<Prev in Thread] Current Thread [Next in Thread>
  • [SCM] Samba Shared Repository - branch v3-2-stable updated - release-3-2-0pre2-115-g640ceff, Karolin Seeger <=