|
7 | 7 | *
|
8 | 8 | *
|
9 | 9 | * IDENTIFICATION
|
10 |
| - * $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.1.1.1 1996/07/09 06:21:30 scrappy Exp $ |
| 10 | + * $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.2 1996/08/14 04:51:02 scrappy Exp $ |
11 | 11 | *
|
12 | 12 | *-------------------------------------------------------------------------
|
13 | 13 | */
|
@@ -403,11 +403,8 @@ hba_recvauth(struct sockaddr_in *addr, PacketBuf *pbuf, StartupInfo *sp)
|
403 | 403 | char *conf_file;
|
404 | 404 |
|
405 | 405 | /* put together the full pathname to the config file */
|
406 |
| - conf_file = (char *) malloc((strlen(GetPGData())+strlen(CONF_FILE)+2)*sizeof(char)); |
407 |
| - strcpy(conf_file, GetPGData()); |
408 |
| - strcat(conf_file, "/"); |
409 |
| - strcat(conf_file, CONF_FILE); |
410 |
| - |
| 406 | + conf_file = (char *) malloc((strlen(DataDir)+strlen(CONF_FILE)+2)*sizeof(char)); |
| 407 | + sprintf(conf_file, "%s/%s", DataDir, CONF_FILE); |
411 | 408 |
|
412 | 409 | /* Open the config file. */
|
413 | 410 | file = fopen(conf_file, "r");
|
@@ -463,7 +460,10 @@ hba_recvauth(struct sockaddr_in *addr, PacketBuf *pbuf, StartupInfo *sp)
|
463 | 460 | }
|
464 | 461 | else
|
465 | 462 | { (void) sprintf(PQerrormsg,
|
466 |
| - "hba_recvauth: config file does not exist or permissions are not setup correctly!\n"); |
| 463 | + "hba_recvauth: Host-based authentication config file " |
| 464 | + "does not exist or permissions are not setup correctly! " |
| 465 | + "Unable to open file \"%s\".\n", |
| 466 | + conf_file); |
467 | 467 | fputs(PQerrormsg, stderr);
|
468 | 468 | pqdebug("%s", PQerrormsg);
|
469 | 469 | free(conf_file);
|
|
0 commit comments