When there is a problem through the "credentials" file processing, the error message provides only a number. This is not really helpful... I would propose this simple (but helpful) patch: --- mount.cifs.orig 2008-08-02 10:25:40.000000000 +0000 +++ mount.cifs.c 2008-08-02 10:41:11.000000000 +0000 @@ -128,7 +128,7 @@ return errno; line_buf = malloc(4096); if(line_buf == NULL) - return -ENOMEM; + return ENOMEM; while(fgets(line_buf,4096,fs)) { /* parse line from credential file */ @@ -420,7 +420,8 @@ if (value && *value) { rc = open_cred_file(value); if(rc) { - printf("error %d opening credential file %s\n",rc, value); + printf("error %d opening credential file %s (%s)\n", + rc, value, strerror(rc)); return 1; } } else {
checked in the following: diff --git a/source/client/mount.cifs.c b/source/client/mount.cifs.c index dd878aa..9d2b449 100644 --- a/source/client/mount.cifs.c +++ b/source/client/mount.cifs.c @@ -196,7 +196,7 @@ static int open_cred_file(char * file_name) line_buf = (char *)malloc(4096); if(line_buf == NULL) { fclose(fs); - return -ENOMEM; + return ENOMEM; } while(fgets(line_buf,4096,fs)) { @@ -537,7 +537,8 @@ static int parse_options(char ** optionsp, int * filesys_flags) if (value && *value) { rc = open_cred_file(value); if(rc) { - printf("error %d opening credential file %s\n",rc, value); + printf("error %d (%s) opening credential file %s\n", + rc, strerror(rc), value); return 1; } } else {
merged into 3-2-test and 3-3-test versions of Samba