798 |
CVSUMASK_ENV, cp); |
CVSUMASK_ENV, cp); |
799 |
} |
} |
800 |
|
|
801 |
|
/* HOSTNAME & SERVER_HOSTNAME need to be set before they are |
802 |
|
* potentially used in gserver_authenticate_connection() (called from |
803 |
|
* pserver_authenticate_connection, below). |
804 |
|
*/ |
805 |
|
hostname = xgethostname (); |
806 |
|
if (!hostname) |
807 |
|
{ |
808 |
|
error (0, errno, |
809 |
|
"xgethostname () returned NULL, using \"localhost\""); |
810 |
|
hostname = xstrdup ("localhost"); |
811 |
|
} |
812 |
|
|
813 |
|
/* Keep track of this separately since the client can change |
814 |
|
* HOSTNAME on the server. |
815 |
|
*/ |
816 |
|
server_hostname = xstrdup (hostname); |
817 |
|
|
818 |
#ifdef SERVER_SUPPORT |
#ifdef SERVER_SUPPORT |
819 |
|
|
820 |
# ifdef HAVE_KERBEROS |
# ifdef HAVE_KERBEROS |
831 |
} |
} |
832 |
# endif /* HAVE_KERBEROS */ |
# endif /* HAVE_KERBEROS */ |
833 |
|
|
|
|
|
834 |
# if defined (AUTH_SERVER_SUPPORT) || defined (HAVE_GSSAPI) |
# if defined (AUTH_SERVER_SUPPORT) || defined (HAVE_GSSAPI) |
835 |
if (strcmp (cvs_cmd_name, "pserver") == 0) |
if (strcmp (cvs_cmd_name, "pserver") == 0) |
836 |
{ |
{ |
880 |
/* make sure we clean up on error */ |
/* make sure we clean up on error */ |
881 |
signals_register (main_cleanup); |
signals_register (main_cleanup); |
882 |
|
|
|
hostname = xgethostname (); |
|
|
if (hostname == NULL) |
|
|
{ |
|
|
error (0, errno, |
|
|
"xgethostname () returned NULL, using \"localhost\""); |
|
|
hostname = xstrdup ("localhost"); |
|
|
|
|
|
} |
|
|
|
|
|
/* Keep track of this separately since the client can change |
|
|
* HOSTNAME on the server. |
|
|
*/ |
|
|
server_hostname = xstrdup (hostname); |
|
|
|
|
|
|
|
883 |
#ifdef KLUDGE_FOR_WNT_TESTSUITE |
#ifdef KLUDGE_FOR_WNT_TESTSUITE |
884 |
/* Probably the need for this will go away at some point once |
/* Probably the need for this will go away at some point once |
885 |
we call fflush enough places (e.g. fflush (stdout) in |
we call fflush enough places (e.g. fflush (stdout) in |