Recompile neccessary if another krbsrvname is needed?

225 Views Asked by At

According to https://www.postgresql.org/docs/current/gssapi-auth.html:

When GSSAPI uses Kerberos, it uses a standard principal in the format servicename/hostname@realm

and

care needs to be taken to specify the correct principal details when making the connection from the client using the krbsrvname connection parameter. (See also Section 33.1.2.) The installation default can be changed from the default postgres at build time using ./configure --with-krb-srvnam=whatever.

But if I look into the Postgres source code at Github,

  1. the settings seems to propagate into C program code as PG_KRB_SRVNAM
  2. the only place it is used seems to be in the libpq library at https://github.com/postgres/postgres/blob/master/src/interfaces/libpq/fe-connect.c

Does this mean the server does not need to be recompiled if I need to use another krbsrvname?

1

There are 1 best solutions below

1
On BEST ANSWER

It is the client, not the server, that would need to be recompiled. (Although usually you would probably recompile both together). Or you could just override the default with the correct value, and not recompile anything.