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

Diff for /src/usr.bin/chpass/Attic/pw_yp.c between version 1.8 and 1.9

version 1.8, 1998/03/30 06:59:32 version 1.9, 1998/08/03 17:09:47
Line 58 
Line 58 
 #include <rpcsvc/yppasswd.h>  #include <rpcsvc/yppasswd.h>
 #undef passwd  #undef passwd
   
 extern char *progname;  extern char *__progname;
   
 static char *domain;  static char *domain;
   
Line 81 
Line 81 
          */           */
         if (!domain && (r = yp_get_default_domain(&domain))) {          if (!domain && (r = yp_get_default_domain(&domain))) {
                 fprintf(stderr, "%s: can't get local YP domain. Reason: %s\n",                  fprintf(stderr, "%s: can't get local YP domain. Reason: %s\n",
                     progname, yperr_string(r));                      __progname, yperr_string(r));
                 return(0);                  return(0);
         }          }
   
Line 92 
Line 92 
         if ((r = yp_master(domain, "passwd.byname", &master)) != 0) {          if ((r = yp_master(domain, "passwd.byname", &master)) != 0) {
                 fprintf(stderr,                  fprintf(stderr,
                     "%s: can't find the master YP server. Reason: %s\n",                      "%s: can't find the master YP server. Reason: %s\n",
                     progname, yperr_string(r));                      __progname, yperr_string(r));
                 return(0);                  return(0);
         }          }
   
Line 103 
Line 103 
             IPPROTO_UDP)) == 0) {              IPPROTO_UDP)) == 0) {
                 fprintf(stderr,                  fprintf(stderr,
                     "%s: master YP server not running yppasswd daemon.\n",                      "%s: master YP server not running yppasswd daemon.\n",
                     progname);                      __progname);
                 fprintf(stderr, "\tCan't change password.\n");                  fprintf(stderr, "\tCan't change password.\n");
                 return(0);                  return(0);
         }          }
Line 114 
Line 114 
         if (rpcport >= IPPORT_RESERVED) {          if (rpcport >= IPPORT_RESERVED) {
                 (void)fprintf(stderr,                  (void)fprintf(stderr,
                     "%s: yppasswd daemon running on an invalid port.\n",                      "%s: yppasswd daemon running on an invalid port.\n",
                     progname);                      __progname);
                 return(0);                  return(0);
         }          }
   
Line 160 
Line 160 
         r = clnt_call(client, YPPASSWDPROC_UPDATE,          r = clnt_call(client, YPPASSWDPROC_UPDATE,
             xdr_yppasswd, &yppasswd, xdr_int, &status, tv);              xdr_yppasswd, &yppasswd, xdr_int, &status, tv);
         if (r) {          if (r) {
                 fprintf(stderr, "%s: rpc to yppasswdd failed. %d\n", progname, r);                  fprintf(stderr, "%s: rpc to yppasswdd failed. %d\n",
                       __progname, r);
                 clnt_destroy(client);                  clnt_destroy(client);
                 return(1);                  return(1);
         } else if (status) {          } else if (status) {
Line 240 
Line 241 
          */           */
         if (!domain && (reason = yp_get_default_domain(&domain))) {          if (!domain && (reason = yp_get_default_domain(&domain))) {
                 fprintf(stderr, "%s: can't get local YP domain. Reason: %s\n",                  fprintf(stderr, "%s: can't get local YP domain. Reason: %s\n",
                     progname, yperr_string(reason));                      __progname, yperr_string(reason));
                 exit(1);                  exit(1);
         }          }
   
Line 274 
Line 275 
   
         if (!domain && (reason = yp_get_default_domain(&domain))) {          if (!domain && (reason = yp_get_default_domain(&domain))) {
                 fprintf(stderr, "%s: can't get local YP domain. Reason: %s\n",                  fprintf(stderr, "%s: can't get local YP domain. Reason: %s\n",
                     progname, yperr_string(reason));                      __progname, yperr_string(reason));
                 exit(1);                  exit(1);
         }          }
   

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9