[BACK]Return to login.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / login

Diff for /src/usr.bin/login/login.c between version 1.20 and 1.21

version 1.20, 1997/04/19 21:01:12 version 1.21, 1997/06/02 03:08:55
Line 156 
Line 156 
                 syslog(LOG_ERR, "couldn't get local hostname: %m");                  syslog(LOG_ERR, "couldn't get local hostname: %m");
         else          else
                 domain = strchr(localhost, '.');                  domain = strchr(localhost, '.');
           if (domain) {
                   domain++;
                   if (*domain && strchr(domain, '.') == NULL)
                           domain = localhost;
           }
   
         fflag = hflag = pflag = 0;          fflag = hflag = pflag = 0;
         uid = getuid();          uid = getuid();
Line 169 
Line 174 
                                 errx(1, "-h option: %s", strerror(EPERM));                                  errx(1, "-h option: %s", strerror(EPERM));
                         hflag = 1;                          hflag = 1;
                         if (domain && (p = strchr(optarg, '.')) &&                          if (domain && (p = strchr(optarg, '.')) &&
                             strcasecmp(p, domain) == 0)                              strcasecmp(p+1, domain) == 0)
                                 *p = 0;                                  *p = 0;
                         hostname = optarg;                          hostname = optarg;
                         break;                          break;

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21