From 4f11f0ff179a000c980f65f12049549511259e55 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 13 Jan 1999 18:32:56 +0000 Subject: utils/testparm.c: Fixed "passwd program" tests to look for the correct program. smbd/reply.c: Changed "Error" in level 0 debug message about NT bug to "Warning" as Samba will continue without it. Jeremy. --- source/smbd/reply.c | 4 ++-- source/utils/testparm.c | 17 +++++++++++++---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/source/smbd/reply.c b/source/smbd/reply.c index b96461aba6a..c47337fb097 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -3821,7 +3821,7 @@ SMB_OFF_T get_lock_count( char *data, int data_offset, BOOL large_file_format, B */ if(IVAL(data,SMB_LARGE_LKLEN_OFFSET_HIGH(data_offset)) != 0){ - DEBUG(0,("get_lock_count: Error : a large file count (%x << 32 | %x) was sent and we don't \ + DEBUG(0,("get_lock_count: Warning : a large file count (%x << 32 | %x) was sent and we don't \ support large counts.\n", (unsigned int)IVAL(data,SMB_LARGE_LKLEN_OFFSET_HIGH(data_offset)), (unsigned int)IVAL(data,SMB_LARGE_LKLEN_OFFSET_LOW(data_offset)) )); @@ -3873,7 +3873,7 @@ SMB_OFF_T get_lock_offset( char *data, int data_offset, BOOL large_file_format, */ if(IVAL(data,SMB_LARGE_LKOFF_OFFSET_HIGH(data_offset)) != 0){ - DEBUG(0,("get_lock_count: Error : a large file offset (%x << 32 | %x) was sent and we don't \ + DEBUG(0,("get_lock_count: Warning : a large file offset (%x << 32 | %x) was sent and we don't \ support large offsets.\n", (unsigned int)IVAL(data,SMB_LARGE_LKOFF_OFFSET_HIGH(data_offset)), (unsigned int)IVAL(data,SMB_LARGE_LKOFF_OFFSET_LOW(data_offset)) )); diff --git a/source/utils/testparm.c b/source/utils/testparm.c index 9632f9c49fe..1f1d5e45031 100644 --- a/source/utils/testparm.c +++ b/source/utils/testparm.c @@ -83,9 +83,18 @@ cannot be set in the smb.conf file. nmbd will abort with this setting.\n"); printf("ERROR: the 'unix password sync' parameter is set and there is no valid 'passwd program' \ parameter.\n" ); } else { - if(access(lp_passwd_program(), F_OK) == -1) { + 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", lp_passwd_program(), strerror(errno) ); +cannot be executed (error was %s).\n", truncated_prog, strerror(errno) ); } } @@ -101,8 +110,8 @@ parameter.\n"); if(lp_encrypted_passwords()) { if(strstr( lp_passwd_chat(), "%o")!=NULL) { - printf("ERROR: the 'passwd chat' script expects to use the old plaintext password \ -via the %%o substitution. With encrypted passwords this is not possible.\n" ); + printf("ERROR: the 'passwd chat' script [%s] expects to use the old plaintext password \ +via the %%o substitution. With encrypted passwords this is not possible.\n", lp_passwd_chat() ); } } } -- cgit