7
7
*
8
8
*
9
9
* IDENTIFICATION
10
- * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-auth.c,v 1.3 1996/07/27 02:27:55 scrappy Exp $
10
+ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-auth.c,v 1.4 1996/08/06 16:16:42 scrappy Exp $
11
11
*
12
12
*-------------------------------------------------------------------------
13
13
*/
@@ -162,16 +162,16 @@ pg_krb4_authname(char* PQerrormsg)
162
162
* (canonicalized to omit all domain suffixes).
163
163
*/
164
164
static int
165
- pg_krb4_sendauth (char * PQerrormsg , int sock ,
165
+ pg_krb4_sendauth (const char * PQerrormsg , int sock ,
166
166
struct sockaddr_in * laddr ,
167
167
struct sockaddr_in * raddr ,
168
- char * hostname )
168
+ const char * hostname )
169
169
{
170
170
long krbopts = 0 ; /* one-way authentication */
171
171
KTEXT_ST clttkt ;
172
172
int status ;
173
173
char hostbuf [MAXHOSTNAMELEN ];
174
- char * realm = getenv ("PGREALM" ); /* NULL == current realm */
174
+ const char * realm = getenv ("PGREALM" ); /* NULL == current realm */
175
175
176
176
if (!hostname || !(* hostname )) {
177
177
if (gethostname (hostbuf , MAXHOSTNAMELEN ) < 0 )
@@ -227,7 +227,7 @@ pg_krb4_sendauth(char* PQerrormsg, int sock,
227
227
* and we can't afford to punt.
228
228
*/
229
229
static char *
230
- pg_an_to_ln (char * aname )
230
+ pg_an_to_ln (const char * aname )
231
231
{
232
232
char * p ;
233
233
@@ -246,7 +246,7 @@ pg_an_to_ln(char *aname)
246
246
*
247
247
*/
248
248
static int
249
- krb5_ccache pg_krb5_init ()
249
+ krb5_ccache pg_krb5_init (void )
250
250
{
251
251
krb5_error_code code ;
252
252
char * realm , * defname ;
@@ -287,8 +287,8 @@ krb5_ccache pg_krb5_init()
287
287
*
288
288
* We obtain this information by digging around in the ticket file.
289
289
*/
290
- static char *
291
- pg_krb5_authname (char * PQerrormsg )
290
+ static const char *
291
+ pg_krb5_authname (const char * PQerrormsg )
292
292
{
293
293
krb5_ccache ccache ;
294
294
krb5_principal principal ;
@@ -335,15 +335,15 @@ pg_krb5_authname(char* PQerrormsg)
335
335
* in the PGREALM (or local) database. This is probably a bad assumption.
336
336
*/
337
337
static int
338
- pg_krb5_sendauth (char * PQerrormsg ,int sock ,
338
+ pg_krb5_sendauth (const char * PQerrormsg ,int sock ,
339
339
struct sockaddr_in * laddr ,
340
340
struct sockaddr_in * raddr ,
341
- char * hostname )
341
+ const char * hostname )
342
342
{
343
343
char servbuf [MAXHOSTNAMELEN + 1 +
344
344
sizeof (PG_KRB_SRVNAM )];
345
- char * hostp ;
346
- char * realm ;
345
+ const char * hostp ;
346
+ const char * realm ;
347
347
krb5_error_code code ;
348
348
krb5_principal client , server ;
349
349
krb5_ccache ccache ;
@@ -430,7 +430,7 @@ pg_krb5_sendauth(char* PQerrormsg,int sock,
430
430
* fe_sendauth -- client demux routine for outgoing authentication information
431
431
*/
432
432
int
433
- fe_sendauth (MsgType msgtype , Port * port , char * hostname , char * PQerrormsg )
433
+ fe_sendauth (MsgType msgtype , Port * port , const char * hostname , const char * PQerrormsg )
434
434
{
435
435
switch (msgtype ) {
436
436
#ifdef KRB4
@@ -474,7 +474,7 @@ fe_sendauth(MsgType msgtype, Port *port, char *hostname, char* PQerrormsg)
474
474
static pg_authsvc = -1 ;
475
475
476
476
void
477
- fe_setauthsvc (char * name , char * PQerrormsg )
477
+ fe_setauthsvc (const char * name , char * PQerrormsg )
478
478
{
479
479
int i ;
480
480
0 commit comments