summaryrefslogtreecommitdiffstats
path: root/source3/utils/testparm.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-05-10 06:53:19 +0000
committerJeremy Allison <jra@samba.org>2001-05-10 06:53:19 +0000
commit47cd09ee57d8f24022d60c1c52677a0e236b6853 (patch)
treefb8aed39b8494566e3a77fb1f4f8b61711aab742 /source3/utils/testparm.c
parent7a906cd02bd7e4e342e9667ee2f8591c97f24832 (diff)
downloadsamba-47cd09ee57d8f24022d60c1c52677a0e236b6853.tar.gz
samba-47cd09ee57d8f24022d60c1c52677a0e236b6853.tar.xz
samba-47cd09ee57d8f24022d60c1c52677a0e236b6853.zip
Don't check for passwd program if using pam change password.
Original patch from Andrew Bartlett. Jeremy. (This used to be commit aae779d0a3d3c80e6fa010fdb397af3aff360551)
Diffstat (limited to 'source3/utils/testparm.c')
-rw-r--r--source3/utils/testparm.c42
1 files changed, 25 insertions, 17 deletions
diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c
index 20f36fcffe..ae4a12a882 100644
--- a/source3/utils/testparm.c
+++ b/source3/utils/testparm.c
@@ -93,29 +93,37 @@ to a valid password server.\n", sec_setting );
if(lp_security() == SEC_USER && lp_unix_password_sync()) {
/*
- * Check that we have a valid lp_passwd_program().
+ * Check that we have a valid lp_passwd_program() if not using pam.
*/
- if(lp_passwd_program() == NULL) {
- printf("ERROR: the 'unix password sync' parameter is set and there is no valid 'passwd program' \
+#ifdef WITH_PAM
+ if (!lp_pam_password_change()) {
+#endif
+
+ if(lp_passwd_program() == NULL) {
+ printf("ERROR: the 'unix password sync' parameter is set and there is no valid 'passwd program' \
parameter.\n" );
- ret = 1;
- } else {
- pstring passwd_prog;
- pstring truncated_prog;
- char *p;
-
- pstrcpy( passwd_prog, lp_passwd_program());
- p = passwd_prog;
- *truncated_prog = '\0';
- next_token(&p, truncated_prog, NULL, sizeof(pstring));
-
- if(access(truncated_prog, F_OK) == -1) {
- printf("ERROR: the 'unix password sync' parameter is set and the 'passwd program' (%s) \
-cannot be executed (error was %s).\n", truncated_prog, strerror(errno) );
ret = 1;
+ } else {
+ pstring passwd_prog;
+ pstring truncated_prog;
+ char *p;
+
+ pstrcpy( passwd_prog, lp_passwd_program());
+ p = passwd_prog;
+ *truncated_prog = '\0';
+ next_token(&p, truncated_prog, NULL, sizeof(pstring));
+
+ if(access(truncated_prog, F_OK) == -1) {
+ printf("ERROR: the 'unix password sync' parameter is set and the 'passwd program' (%s) \
+cannot be executed (error was %s).\n", truncated_prog, strerror(errno) );
+ ret = 1;
+ }
}
+
+#ifdef WITH_PAM
}
+#endif
if(lp_passwd_chat() == NULL) {
printf("ERROR: the 'unix password sync' parameter is set and there is no valid 'passwd chat' \