/[cvs]/ccvs/src/main.c
ViewVC logotype

Diff of /ccvs/src/main.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.253 by dprice, Tue Sep 6 04:35:22 2005 UTC revision 1.254 by dprice, Mon Sep 12 02:43:10 2005 UTC
# Line 798  cause intermittent sandbox corruption.") Line 798  cause intermittent sandbox corruption.")
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
# Line 814  cause intermittent sandbox corruption.") Line 831  cause intermittent sandbox corruption.")
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          {          {
# Line 864  cause intermittent sandbox corruption.") Line 880  cause intermittent sandbox corruption.")
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

Legend:
Removed from v.1.253  
changed lines
  Added in v.1.254

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26