|
10 | 10 | *
|
11 | 11 | *
|
12 | 12 | * IDENTIFICATION
|
13 |
| - * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.16 1996/10/24 07:55:07 scrappy Exp $ |
| 13 | + * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.17 1996/10/28 09:05:29 bryanh Exp $ |
14 | 14 | *
|
15 | 15 | * NOTES
|
16 | 16 | *
|
@@ -598,20 +598,23 @@ ConnStartup(Port *port, int *status,
|
598 | 598 | (void)strncpy(namebuf,sp.user,NAMEDATALEN);
|
599 | 599 | namebuf[NAMEDATALEN]='\0';
|
600 | 600 | if (!namebuf[0]) {
|
601 |
| -snprintf(errormsg,errormsg_len, |
602 |
| -"No Postgres username specified in startup packet."); |
| 601 | +strncpy(errormsg, |
| 602 | +"No Postgres username specified in startup packet.", |
| 603 | +errormsg_len); |
603 | 604 | *status=STATUS_ERROR;
|
604 | 605 | }else {
|
605 | 606 | if (be_recvauth(msgType,port,namebuf,&sp)!=STATUS_OK) {
|
606 |
| -snprintf(errormsg,errormsg_len, |
607 |
| -"Failed to authenticate client as Postgres user '%s' " |
608 |
| -"using authentication scheme %d.", |
609 |
| -namebuf,msgType); |
| 607 | +charbuffer[200+sizeof(namebuf)]; |
| 608 | +sprintf(buffer, |
| 609 | +"Failed to authenticate client as Postgres user '%s' " |
| 610 | +"using authentication scheme %d.", |
| 611 | +namebuf,msgType); |
| 612 | +strncpy(errormsg,buffer,errormsg_len); |
610 | 613 | *status=STATUS_ERROR;
|
611 | 614 | }else {
|
612 | 615 | if (BackendStartup(&sp,port,&pid)!=STATUS_OK) {
|
613 |
| -snprintf(errormsg,errormsg_len, |
614 |
| -"Startup (fork) of backend failed."); |
| 616 | +strncpy(errormsg,"Startup (fork) of backend failed.", |
| 617 | +errormsg_len); |
615 | 618 | *status=STATUS_ERROR;
|
616 | 619 | }else {
|
617 | 620 | errormsg[0]='\0';/* just for robustness */
|
|