The branch, v3-2-test has been updated via af12b24c4f5e3b77d482a011b62a5a3e13be7d67 (commit) via 0567f506986746173d67172cb610c10bacf0ceb9 (commit) via a74f07243d80294167766dfc6bcad02a96afc079 (commit) via 46a021f27c60dc579c9193606997142f5cbeba9e (commit) from 7d7a73944c2dcf078f7bc8de65d575f32f9aa851 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log ----------------------------------------------------------------- commit af12b24c4f5e3b77d482a011b62a5a3e13be7d67 Author: Michael Adam <[EMAIL PROTECTED]> Date: Tue Mar 18 15:50:27 2008 +0100 testparm: only check for %u und passwd program when passwd program is given. Michael commit 0567f506986746173d67172cb610c10bacf0ceb9 Author: Michael Adam <[EMAIL PROTECTED]> Date: Tue Mar 18 15:49:31 2008 +0100 testparm: correctly check for empty lp_passwd_prog(). Michael commit a74f07243d80294167766dfc6bcad02a96afc079 Author: Michael Adam <[EMAIL PROTECTED]> Date: Tue Mar 18 15:33:25 2008 +0100 testparm: fix irritating indentation. Michael commit 46a021f27c60dc579c9193606997142f5cbeba9e Author: Michael Adam <[EMAIL PROTECTED]> 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 ----------------------------------------------------------------------- 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