diff options
Diffstat (limited to 'eBones/usr.sbin')
-rw-r--r-- | eBones/usr.sbin/ext_srvtab/ext_srvtab.c | 18 | ||||
-rw-r--r-- | eBones/usr.sbin/kadmin/admin_server.c | 18 | ||||
-rw-r--r-- | eBones/usr.sbin/kadmin/kadm_funcs.c | 40 | ||||
-rw-r--r-- | eBones/usr.sbin/kadmin/kadm_ser_wrap.c | 6 | ||||
-rw-r--r-- | eBones/usr.sbin/kadmin/kadm_server.c | 2 | ||||
-rw-r--r-- | eBones/usr.sbin/kadmin/kadm_server.h | 6 | ||||
-rw-r--r-- | eBones/usr.sbin/kadmind/admin_server.c | 18 | ||||
-rw-r--r-- | eBones/usr.sbin/kadmind/kadm_funcs.c | 40 | ||||
-rw-r--r-- | eBones/usr.sbin/kadmind/kadm_ser_wrap.c | 6 | ||||
-rw-r--r-- | eBones/usr.sbin/kadmind/kadm_server.c | 2 | ||||
-rw-r--r-- | eBones/usr.sbin/kadmind/kadm_server.h | 6 | ||||
-rw-r--r-- | eBones/usr.sbin/kdb_edit/kdb_edit.c | 16 | ||||
-rw-r--r-- | eBones/usr.sbin/kdb_init/kdb_init.c | 16 | ||||
-rw-r--r-- | eBones/usr.sbin/kdb_util/kdb_util.c | 30 | ||||
-rw-r--r-- | eBones/usr.sbin/kerberos/Makefile | 4 | ||||
-rw-r--r-- | eBones/usr.sbin/kerberos/cr_err_reply.c | 22 | ||||
-rw-r--r-- | eBones/usr.sbin/kerberos/kerberos.c | 36 | ||||
-rw-r--r-- | eBones/usr.sbin/ksrvutil/ksrvutil.c | 88 | ||||
-rw-r--r-- | eBones/usr.sbin/kstash/Makefile | 4 | ||||
-rw-r--r-- | eBones/usr.sbin/kstash/kstash.c | 8 |
20 files changed, 193 insertions, 193 deletions
diff --git a/eBones/usr.sbin/ext_srvtab/ext_srvtab.c b/eBones/usr.sbin/ext_srvtab/ext_srvtab.c index 3a5dcec..093dfe2 100644 --- a/eBones/usr.sbin/ext_srvtab/ext_srvtab.c +++ b/eBones/usr.sbin/ext_srvtab/ext_srvtab.c @@ -1,13 +1,13 @@ /* - * Copyright 1987, 1988 by the Massachusetts Institute of Technology. + * Copyright 1987, 1988 by the Massachusetts Institute of Technology. * * from: ext_srvtab.c,v 4.1 89/07/18 16:49:30 jtkohl Exp $ - * $Id: ext_srvtab.c,v 1.2 1994/07/19 19:22:36 g89r4222 Exp $ + * $Id: ext_srvtab.c,v 1.1.1.1 1994/09/30 14:49:53 csgr Exp $ */ #ifndef lint static char rcsid[] = -"$Id: ext_srvtab.c,v 1.2 1994/07/19 19:22:36 g89r4222 Exp $"; +"$Id: ext_srvtab.c,v 1.1.1.1 1994/09/30 14:49:53 csgr Exp $"; #endif lint #include <stdio.h> @@ -39,12 +39,12 @@ main(argc, argv) int fopen_errs = 0; int arg; Principal princs[40]; - int more; + int more; int prompt = TRUE; register int n, i; - + bzero(realm, sizeof(realm)); - + /* Parse commandline arguments */ if (argc < 2) usage(); @@ -57,7 +57,7 @@ main(argc, argv) usage(); else { strcpy(realm, argv[i]); - /* + /* * This is to humor the broken way commandline * argument parsing is done. Later, this * program ignores everything that starts with -. @@ -118,7 +118,7 @@ main(argc, argv) bcopy(&princs[i].key_low, session_key, sizeof(long)); bcopy(&princs[i].key_high, session_key + sizeof(long), sizeof(long)); - kdb_encrypt_key (session_key, session_key, + kdb_encrypt_key (session_key, session_key, master_key, master_key_schedule, DES_DECRYPT); FWrite(session_key, sizeof session_key, 1, fout); } @@ -158,7 +158,7 @@ StampOutSecrets() usage() { - fprintf(stderr, + fprintf(stderr, "Usage: %s [-n] [-r realm] instance [instance ...]\n", progname); exit(1); } diff --git a/eBones/usr.sbin/kadmin/admin_server.c b/eBones/usr.sbin/kadmin/admin_server.c index cca1aaf..7f04ff2 100644 --- a/eBones/usr.sbin/kadmin/admin_server.c +++ b/eBones/usr.sbin/kadmin/admin_server.c @@ -96,7 +96,7 @@ char *argv[]; if (krbrlm[0] == 0) if (krb_get_lrealm(krbrlm, 0) != KSUCCESS) { - fprintf(stderr, + fprintf(stderr, "Unable to get local realm. Fix krb.conf or use -r.\n"); exit(1); } @@ -165,7 +165,7 @@ doexit() return(0); #endif /* POSIX */ } - + unsigned pidarraysize = 0; int *pidarray = (int *)0; @@ -217,7 +217,7 @@ kadm_listen() if (errno != EINTR) log("select: %s",error_message(errno)); continue; - } + } if (FD_ISSET(admin_fd, &readfds)) { /* accept the conn */ addrlen = sizeof(peer); @@ -297,7 +297,7 @@ struct sockaddr_in *who; /* db locked */ u_long retcode = KADM_DB_INUSE; char *pdat; - + dat_len = KADM_VERSIZE + sizeof(u_long); dat = (u_char *) malloc((unsigned)dat_len); pdat = (char *) dat; @@ -352,10 +352,10 @@ struct sockaddr_in *who; } if ((retval = kadm_ser_in(&dat,&dat_len)) != KADM_SUCCESS) log("processing request: %s", error_message(retval)); - + /* kadm_ser_in did the processing and returned stuff in dat & dat_len , return the appropriate data */ - + out: dlen = (u_short) dat_len; @@ -364,13 +364,13 @@ struct sockaddr_in *who; abort(); /* XXX */ } dlen = htons(dlen); - + if (krb_net_write(fd, (char *)&dlen, sizeof(u_short)) < 0) { log("writing dlen to client: %s",error_message(errno)); (void) close(fd); cleanexit(6); } - + if (krb_net_write(fd, (char *)dat, dat_len) < 0) { log(LOG_ERR, "writing to client: %s",error_message(errno)); (void) close(fd); @@ -435,7 +435,7 @@ kill_children() { register int i; int osigmask; - + osigmask = sigblock(sigmask(SIGCHLD)); for (i = 0; i < pidarraysize; i++) { diff --git a/eBones/usr.sbin/kadmin/kadm_funcs.c b/eBones/usr.sbin/kadmin/kadm_funcs.c index 585a834..9f06e30 100644 --- a/eBones/usr.sbin/kadmin/kadm_funcs.c +++ b/eBones/usr.sbin/kadmin/kadm_funcs.c @@ -13,7 +13,7 @@ static char rcsid_kadm_funcs_c[] = "Id: kadm_funcs.c,v 4.3 90/03/20 01:39:51 jon Exp "; #endif static const char rcsid[] = - "$Id$"; + "$Id: kadm_funcs.c,v 1.1 1995/01/20 03:12:55 wollman Exp $"; #endif lint /* @@ -40,7 +40,7 @@ enum acl_types acltype; extern char *acldir; (void) sprintf(checkname, "%s.%s@%s", pname, pinst, prealm); - + switch (acltype) { case ADDACL: (void) sprintf(filename, "%s%s", acldir, ADD_ACL_FILE); @@ -85,7 +85,7 @@ Kadm_vals *valsout; rname, rinstance, rrealm, valsin->name, valsin->instance); return KADM_UNAUTH; } - + /* Need to check here for "legal" name and instance */ if (wildcard(valsin->name) || wildcard(valsin->instance)) { failadd(KADM_ILL_WILDCARD); @@ -93,7 +93,7 @@ Kadm_vals *valsout; (void) log("request to add an entry for '%s.%s' from '%s.%s@%s'", valsin->name, valsin->instance, rname, rinstance, rrealm); - + numfound = kerb_get_principal(KERB_DEFAULT_NAME, KERB_DEFAULT_INST, &default_princ, 1, &more); if (numfound == -1) { @@ -111,7 +111,7 @@ Kadm_vals *valsout; if (!IS_FIELD(KADM_ATTR,valsin->fields)) data_i.attributes = default_princ.attributes; if (!IS_FIELD(KADM_MAXLIFE,valsin->fields)) - data_i.max_life = default_princ.max_life; + data_i.max_life = default_princ.max_life; bzero((char *)&default_princ, sizeof(default_princ)); @@ -131,7 +131,7 @@ Kadm_vals *valsout; bzero((char *)newpw, sizeof(newpw)); data_o = data_i; - numfound = kerb_get_principal(valsin->name, valsin->instance, + numfound = kerb_get_principal(valsin->name, valsin->instance, &data_o, 1, &more); if (numfound == -1) { failadd(KADM_DB_INUSE); @@ -150,7 +150,7 @@ Kadm_vals *valsout; } else if (numfound) { failadd(KADM_UK_SERROR); } else { - numfound = kerb_get_principal(valsin->name, valsin->instance, + numfound = kerb_get_principal(valsin->name, valsin->instance, &data_o, 1, &more); if ((numfound!=1) || (more!=0)) { failadd(KADM_UK_RERROR); @@ -183,22 +183,22 @@ Kadm_vals *valsout; /* what data is there */ int more; /* To point to more name.instances */ Principal data_o; /* Data object to hold Principal */ - + if (!check_access(rname, rinstance, rrealm, GETACL)) { (void) log("WARNING: '%s.%s@%s' tried to get '%s.%s's entry", rname, rinstance, rrealm, valsin->name, valsin->instance); return KADM_UNAUTH; } - + if (wildcard(valsin->name) || wildcard(valsin->instance)) { failget(KADM_ILL_WILDCARD); } (void) log("retrieve '%s.%s's entry for '%s.%s@%s'", valsin->name, valsin->instance, rname, rinstance, rrealm); - + /* Look up the record in the database */ - numfound = kerb_get_principal(valsin->name, valsin->instance, + numfound = kerb_get_principal(valsin->name, valsin->instance, &data_o, 1, &more); if (numfound == -1) { failget(KADM_DB_INUSE); @@ -231,17 +231,17 @@ Kadm_vals *valsout; /* the actual record which is returned */ if (wildcard(valsin1->name) || wildcard(valsin1->instance)) { failmod(KADM_ILL_WILDCARD); } - + if (!check_access(rname, rinstance, rrealm, MODACL)) { (void) log("WARNING: '%s.%s@%s' tried to change '%s.%s's entry", rname, rinstance, rrealm, valsin1->name, valsin1->instance); return KADM_UNAUTH; } - + (void) log("request to modify '%s.%s's entry from '%s.%s@%s' ", valsin1->name, valsin1->instance, rname, rinstance, rrealm); - - numfound = kerb_get_principal(valsin1->name, valsin1->instance, + + numfound = kerb_get_principal(valsin1->name, valsin1->instance, &data_o, 1, &more); if (numfound == -1) { failmod(KADM_DB_INUSE); @@ -254,7 +254,7 @@ Kadm_vals *valsout; /* the actual record which is returned */ if (IS_FIELD(KADM_ATTR,valsin2->fields)) data_o.attributes = temp_key.attributes; if (IS_FIELD(KADM_MAXLIFE,valsin2->fields)) - data_o.max_life = temp_key.max_life; + data_o.max_life = temp_key.max_life; if (IS_FIELD(KADM_DESKEY,valsin2->fields)) { data_o.key_version++; data_o.kdc_key_ver = server_parm.master_key_version; @@ -289,7 +289,7 @@ Kadm_vals *valsout; /* the actual record which is returned */ } else if (more) { failmod(KADM_UK_SERROR); } else { - numfound = kerb_get_principal(valsin1->name, valsin1->instance, + numfound = kerb_get_principal(valsin1->name, valsin1->instance, &data_o, 1, &more); if ((more!=0)||(numfound!=1)) { failmod(KADM_UK_RERROR); @@ -335,14 +335,14 @@ des_cblock newpw; } (void) log("'%s.%s@%s' wants to change its password", rname, rinstance, rrealm); - + bcopy(newpw, local_pw, sizeof(local_pw)); - + /* encrypt new key in master key */ kdb_encrypt_key (local_pw, local_pw, server_parm.master_key, server_parm.master_key_schedule, ENCRYPT); - numfound = kerb_get_principal(rname, rinstance, + numfound = kerb_get_principal(rname, rinstance, &data_o, 1, &more); if (numfound == -1) { failchange(KADM_DB_INUSE); diff --git a/eBones/usr.sbin/kadmin/kadm_ser_wrap.c b/eBones/usr.sbin/kadmin/kadm_ser_wrap.c index c019bc0..79196c6 100644 --- a/eBones/usr.sbin/kadmin/kadm_ser_wrap.c +++ b/eBones/usr.sbin/kadmin/kadm_ser_wrap.c @@ -12,7 +12,7 @@ static char rcsid_module_c[] = "BonesHeader: /afs/athena.mit.edu/astaff/project/kerberos/src/kadmin/RCS/kadm_ser_wrap.c,v 4.4 89/09/26 09:29:36 jtkohl Exp "; #endif lint -/* +/* kadm_ser_wrap.c unwraps wrapped packets and calls the appropriate server subroutine */ @@ -28,7 +28,7 @@ unwraps wrapped packets and calls the appropriate server subroutine Kadm_Server server_parm; -/* +/* kadm_ser_init set up the server_parm structure */ @@ -147,7 +147,7 @@ int *dat_len; #else des_key_sched(ad.session, sess_sched); #endif - if (retc = (int) krb_rd_priv(in_st, r_len, sess_sched, ad.session, + if (retc = (int) krb_rd_priv(in_st, r_len, sess_sched, ad.session, &server_parm.recv_addr, &server_parm.admin_addr, &msg_st)) { clr_cli_secrets(); diff --git a/eBones/usr.sbin/kadmin/kadm_server.c b/eBones/usr.sbin/kadmin/kadm_server.c index 56631d3..25a58be 100644 --- a/eBones/usr.sbin/kadmin/kadm_server.c +++ b/eBones/usr.sbin/kadmin/kadm_server.c @@ -15,7 +15,7 @@ static char rcsid_kadm_server_c[] = #include <kadm.h> #include <kadm_err.h> -/* +/* kadm_ser_cpw - the server side of the change_password routine recieves : KTEXT, {key} returns : CKSUM, RETCODE diff --git a/eBones/usr.sbin/kadmin/kadm_server.h b/eBones/usr.sbin/kadmin/kadm_server.h index db9d21f..33b1904 100644 --- a/eBones/usr.sbin/kadmin/kadm_server.h +++ b/eBones/usr.sbin/kadmin/kadm_server.h @@ -1,7 +1,7 @@ /* - * $Source: /afs/athena.mit.edu/astaff/project/kerberos/src/kadmin/RCS/kadm_server.h,v $ - * $Author: jtkohl $ - * Header: /afs/athena.mit.edu/astaff/project/kerberos/src/kadmin/RCS/kadm_server.h,v 4.1 89/12/21 17:46:51 jtkohl Exp + * $Source: /home/ncvs/src/eBones/kadmind/kadm_server.h,v $ + * $Author: wollman $ + * Header: /afs/athena.mit.edu/astaff/project/kerberos/src/kadmin/RCS/kadm_server.h,v 4.1 89/12/21 17:46:51 jtkohl Exp * * Copyright 1988 by the Massachusetts Institute of Technology. * diff --git a/eBones/usr.sbin/kadmind/admin_server.c b/eBones/usr.sbin/kadmind/admin_server.c index cca1aaf..7f04ff2 100644 --- a/eBones/usr.sbin/kadmind/admin_server.c +++ b/eBones/usr.sbin/kadmind/admin_server.c @@ -96,7 +96,7 @@ char *argv[]; if (krbrlm[0] == 0) if (krb_get_lrealm(krbrlm, 0) != KSUCCESS) { - fprintf(stderr, + fprintf(stderr, "Unable to get local realm. Fix krb.conf or use -r.\n"); exit(1); } @@ -165,7 +165,7 @@ doexit() return(0); #endif /* POSIX */ } - + unsigned pidarraysize = 0; int *pidarray = (int *)0; @@ -217,7 +217,7 @@ kadm_listen() if (errno != EINTR) log("select: %s",error_message(errno)); continue; - } + } if (FD_ISSET(admin_fd, &readfds)) { /* accept the conn */ addrlen = sizeof(peer); @@ -297,7 +297,7 @@ struct sockaddr_in *who; /* db locked */ u_long retcode = KADM_DB_INUSE; char *pdat; - + dat_len = KADM_VERSIZE + sizeof(u_long); dat = (u_char *) malloc((unsigned)dat_len); pdat = (char *) dat; @@ -352,10 +352,10 @@ struct sockaddr_in *who; } if ((retval = kadm_ser_in(&dat,&dat_len)) != KADM_SUCCESS) log("processing request: %s", error_message(retval)); - + /* kadm_ser_in did the processing and returned stuff in dat & dat_len , return the appropriate data */ - + out: dlen = (u_short) dat_len; @@ -364,13 +364,13 @@ struct sockaddr_in *who; abort(); /* XXX */ } dlen = htons(dlen); - + if (krb_net_write(fd, (char *)&dlen, sizeof(u_short)) < 0) { log("writing dlen to client: %s",error_message(errno)); (void) close(fd); cleanexit(6); } - + if (krb_net_write(fd, (char *)dat, dat_len) < 0) { log(LOG_ERR, "writing to client: %s",error_message(errno)); (void) close(fd); @@ -435,7 +435,7 @@ kill_children() { register int i; int osigmask; - + osigmask = sigblock(sigmask(SIGCHLD)); for (i = 0; i < pidarraysize; i++) { diff --git a/eBones/usr.sbin/kadmind/kadm_funcs.c b/eBones/usr.sbin/kadmind/kadm_funcs.c index 585a834..9f06e30 100644 --- a/eBones/usr.sbin/kadmind/kadm_funcs.c +++ b/eBones/usr.sbin/kadmind/kadm_funcs.c @@ -13,7 +13,7 @@ static char rcsid_kadm_funcs_c[] = "Id: kadm_funcs.c,v 4.3 90/03/20 01:39:51 jon Exp "; #endif static const char rcsid[] = - "$Id$"; + "$Id: kadm_funcs.c,v 1.1 1995/01/20 03:12:55 wollman Exp $"; #endif lint /* @@ -40,7 +40,7 @@ enum acl_types acltype; extern char *acldir; (void) sprintf(checkname, "%s.%s@%s", pname, pinst, prealm); - + switch (acltype) { case ADDACL: (void) sprintf(filename, "%s%s", acldir, ADD_ACL_FILE); @@ -85,7 +85,7 @@ Kadm_vals *valsout; rname, rinstance, rrealm, valsin->name, valsin->instance); return KADM_UNAUTH; } - + /* Need to check here for "legal" name and instance */ if (wildcard(valsin->name) || wildcard(valsin->instance)) { failadd(KADM_ILL_WILDCARD); @@ -93,7 +93,7 @@ Kadm_vals *valsout; (void) log("request to add an entry for '%s.%s' from '%s.%s@%s'", valsin->name, valsin->instance, rname, rinstance, rrealm); - + numfound = kerb_get_principal(KERB_DEFAULT_NAME, KERB_DEFAULT_INST, &default_princ, 1, &more); if (numfound == -1) { @@ -111,7 +111,7 @@ Kadm_vals *valsout; if (!IS_FIELD(KADM_ATTR,valsin->fields)) data_i.attributes = default_princ.attributes; if (!IS_FIELD(KADM_MAXLIFE,valsin->fields)) - data_i.max_life = default_princ.max_life; + data_i.max_life = default_princ.max_life; bzero((char *)&default_princ, sizeof(default_princ)); @@ -131,7 +131,7 @@ Kadm_vals *valsout; bzero((char *)newpw, sizeof(newpw)); data_o = data_i; - numfound = kerb_get_principal(valsin->name, valsin->instance, + numfound = kerb_get_principal(valsin->name, valsin->instance, &data_o, 1, &more); if (numfound == -1) { failadd(KADM_DB_INUSE); @@ -150,7 +150,7 @@ Kadm_vals *valsout; } else if (numfound) { failadd(KADM_UK_SERROR); } else { - numfound = kerb_get_principal(valsin->name, valsin->instance, + numfound = kerb_get_principal(valsin->name, valsin->instance, &data_o, 1, &more); if ((numfound!=1) || (more!=0)) { failadd(KADM_UK_RERROR); @@ -183,22 +183,22 @@ Kadm_vals *valsout; /* what data is there */ int more; /* To point to more name.instances */ Principal data_o; /* Data object to hold Principal */ - + if (!check_access(rname, rinstance, rrealm, GETACL)) { (void) log("WARNING: '%s.%s@%s' tried to get '%s.%s's entry", rname, rinstance, rrealm, valsin->name, valsin->instance); return KADM_UNAUTH; } - + if (wildcard(valsin->name) || wildcard(valsin->instance)) { failget(KADM_ILL_WILDCARD); } (void) log("retrieve '%s.%s's entry for '%s.%s@%s'", valsin->name, valsin->instance, rname, rinstance, rrealm); - + /* Look up the record in the database */ - numfound = kerb_get_principal(valsin->name, valsin->instance, + numfound = kerb_get_principal(valsin->name, valsin->instance, &data_o, 1, &more); if (numfound == -1) { failget(KADM_DB_INUSE); @@ -231,17 +231,17 @@ Kadm_vals *valsout; /* the actual record which is returned */ if (wildcard(valsin1->name) || wildcard(valsin1->instance)) { failmod(KADM_ILL_WILDCARD); } - + if (!check_access(rname, rinstance, rrealm, MODACL)) { (void) log("WARNING: '%s.%s@%s' tried to change '%s.%s's entry", rname, rinstance, rrealm, valsin1->name, valsin1->instance); return KADM_UNAUTH; } - + (void) log("request to modify '%s.%s's entry from '%s.%s@%s' ", valsin1->name, valsin1->instance, rname, rinstance, rrealm); - - numfound = kerb_get_principal(valsin1->name, valsin1->instance, + + numfound = kerb_get_principal(valsin1->name, valsin1->instance, &data_o, 1, &more); if (numfound == -1) { failmod(KADM_DB_INUSE); @@ -254,7 +254,7 @@ Kadm_vals *valsout; /* the actual record which is returned */ if (IS_FIELD(KADM_ATTR,valsin2->fields)) data_o.attributes = temp_key.attributes; if (IS_FIELD(KADM_MAXLIFE,valsin2->fields)) - data_o.max_life = temp_key.max_life; + data_o.max_life = temp_key.max_life; if (IS_FIELD(KADM_DESKEY,valsin2->fields)) { data_o.key_version++; data_o.kdc_key_ver = server_parm.master_key_version; @@ -289,7 +289,7 @@ Kadm_vals *valsout; /* the actual record which is returned */ } else if (more) { failmod(KADM_UK_SERROR); } else { - numfound = kerb_get_principal(valsin1->name, valsin1->instance, + numfound = kerb_get_principal(valsin1->name, valsin1->instance, &data_o, 1, &more); if ((more!=0)||(numfound!=1)) { failmod(KADM_UK_RERROR); @@ -335,14 +335,14 @@ des_cblock newpw; } (void) log("'%s.%s@%s' wants to change its password", rname, rinstance, rrealm); - + bcopy(newpw, local_pw, sizeof(local_pw)); - + /* encrypt new key in master key */ kdb_encrypt_key (local_pw, local_pw, server_parm.master_key, server_parm.master_key_schedule, ENCRYPT); - numfound = kerb_get_principal(rname, rinstance, + numfound = kerb_get_principal(rname, rinstance, &data_o, 1, &more); if (numfound == -1) { failchange(KADM_DB_INUSE); diff --git a/eBones/usr.sbin/kadmind/kadm_ser_wrap.c b/eBones/usr.sbin/kadmind/kadm_ser_wrap.c index c019bc0..79196c6 100644 --- a/eBones/usr.sbin/kadmind/kadm_ser_wrap.c +++ b/eBones/usr.sbin/kadmind/kadm_ser_wrap.c @@ -12,7 +12,7 @@ static char rcsid_module_c[] = "BonesHeader: /afs/athena.mit.edu/astaff/project/kerberos/src/kadmin/RCS/kadm_ser_wrap.c,v 4.4 89/09/26 09:29:36 jtkohl Exp "; #endif lint -/* +/* kadm_ser_wrap.c unwraps wrapped packets and calls the appropriate server subroutine */ @@ -28,7 +28,7 @@ unwraps wrapped packets and calls the appropriate server subroutine Kadm_Server server_parm; -/* +/* kadm_ser_init set up the server_parm structure */ @@ -147,7 +147,7 @@ int *dat_len; #else des_key_sched(ad.session, sess_sched); #endif - if (retc = (int) krb_rd_priv(in_st, r_len, sess_sched, ad.session, + if (retc = (int) krb_rd_priv(in_st, r_len, sess_sched, ad.session, &server_parm.recv_addr, &server_parm.admin_addr, &msg_st)) { clr_cli_secrets(); diff --git a/eBones/usr.sbin/kadmind/kadm_server.c b/eBones/usr.sbin/kadmind/kadm_server.c index 56631d3..25a58be 100644 --- a/eBones/usr.sbin/kadmind/kadm_server.c +++ b/eBones/usr.sbin/kadmind/kadm_server.c @@ -15,7 +15,7 @@ static char rcsid_kadm_server_c[] = #include <kadm.h> #include <kadm_err.h> -/* +/* kadm_ser_cpw - the server side of the change_password routine recieves : KTEXT, {key} returns : CKSUM, RETCODE diff --git a/eBones/usr.sbin/kadmind/kadm_server.h b/eBones/usr.sbin/kadmind/kadm_server.h index db9d21f..33b1904 100644 --- a/eBones/usr.sbin/kadmind/kadm_server.h +++ b/eBones/usr.sbin/kadmind/kadm_server.h @@ -1,7 +1,7 @@ /* - * $Source: /afs/athena.mit.edu/astaff/project/kerberos/src/kadmin/RCS/kadm_server.h,v $ - * $Author: jtkohl $ - * Header: /afs/athena.mit.edu/astaff/project/kerberos/src/kadmin/RCS/kadm_server.h,v 4.1 89/12/21 17:46:51 jtkohl Exp + * $Source: /home/ncvs/src/eBones/kadmind/kadm_server.h,v $ + * $Author: wollman $ + * Header: /afs/athena.mit.edu/astaff/project/kerberos/src/kadmin/RCS/kadm_server.h,v 4.1 89/12/21 17:46:51 jtkohl Exp * * Copyright 1988 by the Massachusetts Institute of Technology. * diff --git a/eBones/usr.sbin/kdb_edit/kdb_edit.c b/eBones/usr.sbin/kdb_edit/kdb_edit.c index 4c02db6..438317f 100644 --- a/eBones/usr.sbin/kdb_edit/kdb_edit.c +++ b/eBones/usr.sbin/kdb_edit/kdb_edit.c @@ -5,19 +5,19 @@ * <Copyright.MIT>. * * This routine changes the Kerberos encryption keys for principals, - * i.e., users or services. + * i.e., users or services. * * from: kdb_edit.c,v 4.2 90/01/09 16:05:09 raeburn Exp $ - * $Id: kdb_edit.c,v 1.3 1994/09/09 21:43:46 g89r4222 Exp $ + * $Id: kdb_edit.c,v 1.1.1.1 1994/09/30 14:49:56 csgr Exp $ */ /* - * exit returns 0 ==> success -1 ==> error + * exit returns 0 ==> success -1 ==> error */ #ifndef lint static char rcsid[] = -"$Id: kdb_edit.c,v 1.3 1994/09/09 21:43:46 g89r4222 Exp $"; +"$Id: kdb_edit.c,v 1.1.1.1 1994/09/30 14:49:56 csgr Exp $"; #endif lint #include <stdio.h> @@ -158,7 +158,7 @@ main(argc, argv) #endif - if (kdb_get_master_key ((nflag == 0), + if (kdb_get_master_key ((nflag == 0), master_key, master_key_schedule) != 0) { fprintf (stdout, "Couldn't read master key.\n"); fflush (stdout); @@ -241,7 +241,7 @@ change_principal() if (!creating) { /* * copy the existing data so we can use the old values - * for the qualifier clause of the replace + * for the qualifier clause of the replace */ principal_data[i].old = (char *) &old_principal; bcopy(&principal_data[i], &old_principal, @@ -310,7 +310,7 @@ change_principal() } /* seal it under the kerberos master key */ - kdb_encrypt_key (new_key, new_key, + kdb_encrypt_key (new_key, new_key, master_key, master_key_schedule, ENCRYPT); bcopy(new_key, &principal_data[i].key_low, 4); @@ -398,7 +398,7 @@ change_principal() /* * remaining fields -- key versions and mod info, should - * not be directly manipulated + * not be directly manipulated */ if (changed) { if (kerb_put_principal(&principal_data[i], 1)) { diff --git a/eBones/usr.sbin/kdb_init/kdb_init.c b/eBones/usr.sbin/kdb_init/kdb_init.c index dc7055e..7a8e32f 100644 --- a/eBones/usr.sbin/kdb_init/kdb_init.c +++ b/eBones/usr.sbin/kdb_init/kdb_init.c @@ -1,18 +1,18 @@ /* - * Copyright 1987, 1988 by the Massachusetts Institute of Technology. + * Copyright 1987, 1988 by the Massachusetts Institute of Technology. * For copying and distribution information, please see the file - * <Copyright.MIT>. + * <Copyright.MIT>. * * program to initialize the database, reports error if database file - * already exists. + * already exists. * * from: kdb_init.c,v 4.0 89/01/24 21:50:45 jtkohl Exp $ - * $Id: kdb_init.c,v 1.3 1994/09/24 14:04:17 g89r4222 Exp $ + * $Id: kdb_init.c,v 1.1.1.1 1994/09/30 14:49:56 csgr Exp $ */ #ifndef lint static char rcsid[] = -"$Id: kdb_init.c,v 1.3 1994/09/24 14:04:17 g89r4222 Exp $"; +"$Id: kdb_init.c,v 1.1.1.1 1994/09/30 14:49:56 csgr Exp $"; #endif lint #include <stdio.h> @@ -44,7 +44,7 @@ main(argc, argv) char *cp; int code; char *database; - + progname = (cp = rindex(*argv, '/')) ? cp + 1 : *argv; if (argc > 3) { @@ -96,7 +96,7 @@ main(argc, argv) add_principal(KERB_M_NAME, KERB_M_INST, MASTER_KEY) || add_principal(KERB_DEFAULT_NAME, KERB_DEFAULT_INST, NULL_KEY) || add_principal("krbtgt", realm, RANDOM_KEY) || - add_principal("changepw", KRB_MASTER, RANDOM_KEY) + add_principal("changepw", KRB_MASTER, RANDOM_KEY) ) { fprintf(stderr, "\n%s: couldn't initialize database.\n", progname); @@ -169,7 +169,7 @@ add_principal(name, instance, aap_op) principal.old = 0; kerb_db_put_principal(&principal, 1); - + /* let's play it safe */ bzero (new_key, sizeof (C_Block)); bzero (&principal.key_low, 4); diff --git a/eBones/usr.sbin/kdb_util/kdb_util.c b/eBones/usr.sbin/kdb_util/kdb_util.c index 8465b5b..7bc8559 100644 --- a/eBones/usr.sbin/kdb_util/kdb_util.c +++ b/eBones/usr.sbin/kdb_util/kdb_util.c @@ -7,17 +7,17 @@ * dump a kerberos database to an ascii readable file and load this * file into the database. Read locking of the database is done during a * dump operation. NO LOCKING is done during a load operation. Loads - * should happen with other processes shutdown. + * should happen with other processes shutdown. * * Written July 9, 1987 by Jeffrey I. Schiller * * from: kdb_util.c,v 4.4 90/01/09 15:57:20 raeburn Exp $ - * $Id: kdb_util.c,v 1.3 1994/09/24 14:04:21 g89r4222 Exp $ + * $Id: kdb_util.c,v 1.1.1.1 1994/09/30 14:49:57 csgr Exp $ */ #ifndef lint static char rcsid[] = -"$Id: kdb_util.c,v 1.3 1994/09/24 14:04:21 g89r4222 Exp $"; +"$Id: kdb_util.c,v 1.1.1.1 1994/09/30 14:49:57 csgr Exp $"; #endif lint #include <stdio.h> @@ -62,7 +62,7 @@ main(argc, argv) char *db_name; progname = prog; - + if (argc != 3 && argc != 4) { fprintf(stderr, "Usage: %s operation file-name [database name].\n", argv[0]); @@ -77,7 +77,7 @@ main(argc, argv) perror("Can't open database"); exit(1); } - + if (!strcmp(argv[1], "load")) op = OP_LOAD; else if (!strcmp(argv[1], "dump")) @@ -134,7 +134,7 @@ main(argc, argv) break; case OP_CONVERT_OLD_DB: convert_old_format_db (db_name, file); - printf("Don't forget to do a `kdb_util load %s' to reload the database!\n", file_name); + printf("Don't forget to do a `kdb_util load %s' to reload the database!\n", file_name); break; } exit(0); @@ -148,7 +148,7 @@ clear_secrets () bzero((char *)new_master_key_schedule, sizeof (Key_schedule)); } -/* cv_key is a procedure which takes a principle and changes its key, +/* cv_key is a procedure which takes a principle and changes its key, either for a new method of encrypting the keys, or a new master key. if cv_key is null no transformation of key is done (other than net byte order). */ @@ -163,7 +163,7 @@ static int dump_db_1(arg, principal) Principal *principal; { /* replace null strings with "*" */ struct callback_args *a = (struct callback_args *)arg; - + if (principal->instance[0] == '\0') { principal->instance[0] = '*'; principal->instance[1] = '\0'; @@ -205,7 +205,7 @@ dump_db (db_file, output_file, cv_key) a.cv_key = cv_key; a.output_file = output_file; - + kerb_db_iterate (dump_db_1, (char *)&a); return fflush(output_file); } @@ -432,7 +432,7 @@ convert_old_format_db (db_file, out) /* * now use the master key to decrypt (old style) the key in the db, had better - * be the same! + * be the same! */ bcopy((char *)&principal_data[0].key_low, (char *)key_from_db, 4); bcopy((char *)&principal_data[0].key_high, @@ -451,7 +451,7 @@ convert_old_format_db (db_file, out) fprintf(stderr, "does not match database.\n"); exit (-1); } - + fprintf(stderr, "Master key verified.\n"); (void) fflush(stderr); @@ -468,14 +468,14 @@ register char *cp; int local; zaptime(&tp); /* clear out the struct */ - + if (strlen(cp) > 10) { /* new format */ (void) strncpy(wbuf, cp, 4); wbuf[4] = 0; tp.tm_year = atoi(wbuf); cp += 4; /* step over the year */ local = 0; /* GMT */ - } else { /* old format: local time, + } else { /* old format: local time, year is 2 digits, assuming 19xx */ wbuf[0] = *cp++; wbuf[1] = *cp++; @@ -492,11 +492,11 @@ register char *cp; wbuf[0] = *cp++; wbuf[1] = *cp++; tp.tm_mday = atoi(wbuf); - + wbuf[0] = *cp++; wbuf[1] = *cp++; tp.tm_hour = atoi(wbuf); - + wbuf[0] = *cp++; wbuf[1] = *cp++; tp.tm_min = atoi(wbuf); diff --git a/eBones/usr.sbin/kerberos/Makefile b/eBones/usr.sbin/kerberos/Makefile index 7f36cf7..44853ef 100644 --- a/eBones/usr.sbin/kerberos/Makefile +++ b/eBones/usr.sbin/kerberos/Makefile @@ -1,9 +1,9 @@ # From: @(#)Makefile 5.1 (Berkeley) 6/25/90 -# $Id: Makefile,v 1.2 1994/07/19 19:24:22 g89r4222 Exp $ +# $Id: Makefile,v 1.1.1.1 1994/09/30 14:49:57 csgr Exp $ PROG= kerberos SRCS= kerberos.c cr_err_reply.c -CFLAGS+=-DKERBEROS -DDEBUG -I${.CURDIR}/../include +CFLAGS+=-DKERBEROS -DDEBUG -I${.CURDIR}/../include DPADD= ${LIBKDB} ${LIBKRB} ${LIBDES} LDADD= -L${KDBOBJDIR} -lkdb -L${KRBOBJDIR} -lkrb -L${DESOBJDIR} -ldes NOMAN= noman diff --git a/eBones/usr.sbin/kerberos/cr_err_reply.c b/eBones/usr.sbin/kerberos/cr_err_reply.c index 585fd03..c5178fe 100644 --- a/eBones/usr.sbin/kerberos/cr_err_reply.c +++ b/eBones/usr.sbin/kerberos/cr_err_reply.c @@ -5,12 +5,12 @@ * <Copyright.MIT>. * * from: cr_err_reply.c,v 4.10 89/01/10 11:34:42 steiner Exp $ - * $Id: cr_err_reply.c,v 1.1 1994/07/19 19:24:24 g89r4222 Exp $ + * $Id: cr_err_reply.c,v 1.1.1.1 1994/09/30 14:49:57 csgr Exp $ */ #ifndef lint static char rcsid[] = -"$Id: cr_err_reply.c,v 1.1 1994/07/19 19:24:24 g89r4222 Exp $"; +"$Id: cr_err_reply.c,v 1.1.1.1 1994/09/30 14:49:57 csgr Exp $"; #endif /* lint */ #include <sys/types.h> @@ -30,28 +30,28 @@ extern int req_act_vno; /* this is defined in the kerberos * and an error string as arguments. Its return value is undefined. * * The packet is built in the following format: - * + * * type variable data * or constant * ---- ----------- ---- * * unsigned char req_ack_vno protocol version number - * + * * unsigned char AUTH_MSG_ERR_REPLY protocol message type - * + * * [least significant HOST_BYTE_ORDER sender's (server's) byte * bit of above field] order - * + * * string pname principal's name - * + * * string pinst principal's instance - * + * * string prealm principal's realm - * + * * unsigned long time_ws client's timestamp - * + * * unsigned long e error code - * + * * string e_string error text */ diff --git a/eBones/usr.sbin/kerberos/kerberos.c b/eBones/usr.sbin/kerberos/kerberos.c index b980577..a7f391c 100644 --- a/eBones/usr.sbin/kerberos/kerberos.c +++ b/eBones/usr.sbin/kerberos/kerberos.c @@ -5,12 +5,12 @@ * <Copyright.MIT>. * * from: kerberos.c,v 4.19 89/11/01 17:18:07 qjb Exp $ - * $Id: kerberos.c,v 1.3 1994/09/09 21:43:51 g89r4222 Exp $ + * $Id: kerberos.c,v 1.1.1.1 1994/09/30 14:49:57 csgr Exp $ */ #ifndef lint static char rcsid[] = -"$Id: kerberos.c,v 1.3 1994/09/09 21:43:51 g89r4222 Exp $"; +"$Id: kerberos.c,v 1.1.1.1 1994/09/30 14:49:57 csgr Exp $"; #endif lint #include <stdio.h> @@ -97,7 +97,7 @@ static void hang(); */ static void usage() { - fprintf(stderr, "Usage: %s [-s] [-m] [-n] [-p pause_seconds]%s%s\n", progname, + fprintf(stderr, "Usage: %s [-s] [-m] [-n] [-p pause_seconds]%s%s\n", progname, " [-a max_age] [-l log_file] [-r realm]" ," [database_pathname]" ); @@ -160,7 +160,7 @@ main(argc, argv) break; case 'a': /* Set max age. */ - if (!isdigit(optarg[0])) + if (!isdigit(optarg[0])) usage(); max_age = atoi(optarg); if ((max_age < ONE_HOUR) || (max_age > THREE_DAYS)) { @@ -194,9 +194,9 @@ main(argc, argv) if (optind != argc) usage(); - + printf("Kerberos server starting\n"); - + if ((!nflag) && (max_age != -1)) printf("\tMaximum database age: %d seconds\n", max_age); if (pause_int != -1) @@ -205,12 +205,12 @@ main(argc, argv) printf("\tSleep forever on error\n"); if (mflag) printf("\tMaster key will be entered manually\n"); - + printf("\tLog file is %s\n", lflag ? log_file : KRBLOG); if (lflag) kset_logfile(log_file); - + /* find our hostname, and use it as the instance */ if (gethostname(k_instance, INST_SZ)) { fprintf(stderr, "%s: gethostname error\n", progname); @@ -249,7 +249,7 @@ main(argc, argv) /* Make sure database isn't stale */ check_db_age(); - + /* setup master key */ if (kdb_get_master_key (mflag, master_key, master_key_schedule) != 0) { klog (L_KRB_PERR, "kerberos: couldn't get master key.\n"); @@ -449,7 +449,7 @@ kerberos(client, pkt) /* * get the user's key, unseal it from the server's key, and - * use it to seal the cipher + * use it to seal the cipher */ /* a_name_data.key_low a_name_data.key_high */ @@ -457,7 +457,7 @@ kerberos(client, pkt) bcopy(&a_name_data.key_high, ((long *) key) + 1, 4); /* unseal the a_name key from the master key */ - kdb_encrypt_key(key, key, master_key, + kdb_encrypt_key(key, key, master_key, master_key_schedule, DECRYPT); create_ciph(ciph, session_key, s_name_data.name, @@ -616,10 +616,10 @@ kerberos(client, pkt) /* - * setup_disc + * setup_disc * * disconnect all descriptors, remove ourself from the process - * group that spawned us. + * group that spawned us. */ setup_disc() @@ -648,7 +648,7 @@ setup_disc() /* * kerb_er_reply creates an error reply packet and sends it to the - * client. + * client. */ kerb_err_reply(client, pkt, err, string) @@ -680,7 +680,7 @@ kerb_err_reply(client, pkt, err, string) static void check_db_age() { long age; - + if (max_age != -1) { /* Requires existance of kerb_get_db_age() */ gettimeofday(&kerb_time, 0); @@ -712,16 +712,16 @@ check_princ(p_name, instance, lifetime, p) klog(L_ALL_REQ, "Principal: \"%s\", Instance: \"%s\" Lifetime = %d n = %d", p_name, instance, lifetime, n, 0); - + if (n < 0) { lt = klog(L_KRB_PERR, "Database unavailable!"); hang(); } - + /* * if more than one p_name, pick one, randomly create a session key, * compute maximum lifetime, lookup authorizations if applicable, - * and stuff into cipher. + * and stuff into cipher. */ if (n == 0) { /* service unknown, log error, skip to next request */ diff --git a/eBones/usr.sbin/ksrvutil/ksrvutil.c b/eBones/usr.sbin/ksrvutil/ksrvutil.c index 679d7e2..d1e9474 100644 --- a/eBones/usr.sbin/ksrvutil/ksrvutil.c +++ b/eBones/usr.sbin/ksrvutil/ksrvutil.c @@ -13,7 +13,7 @@ static char rcsid_ksrvutil_c[] = "BonesHeader: /afs/athena.mit.edu/astaff/project/kerberos/src/kadmin/RCS/ksrvutil.c,v 4.1 89/09/26 09:33:49 jtkohl Exp "; #endif static const char rcsid[] = - "$Id: ksrvutil.c,v 1.1 1995/01/20 22:38:30 wollman Exp $"; + "$Id: ksrvutil.c,v 1.2 1995/01/23 22:54:08 wollman Exp $"; #endif lint /* @@ -72,9 +72,9 @@ copy_keyfile(progname, keyfile, backup_keyfile) char buf[BUFSIZ]; /* for copying keyfiles */ int rcount; /* for copying keyfiles */ int try_again; - + (void) bzero((char *)buf, sizeof(buf)); - + do { try_again = FALSE; if ((keyfile_fd = open(keyfile, O_RDONLY, 0)) < 0) { @@ -83,8 +83,8 @@ copy_keyfile(progname, keyfile, backup_keyfile) } else { try_again = TRUE; - if ((keyfile_fd = - open(keyfile, + if ((keyfile_fd = + open(keyfile, O_WRONLY | O_TRUNC | O_CREAT, SRVTAB_MODE)) < 0) { err(1, "unable to create %s", keyfile); } @@ -98,8 +98,8 @@ copy_keyfile(progname, keyfile, backup_keyfile) keyfile_mode = get_mode(keyfile); - if ((backup_keyfile_fd = - open(backup_keyfile, O_WRONLY | O_TRUNC | O_CREAT, + if ((backup_keyfile_fd = + open(backup_keyfile, O_WRONLY | O_TRUNC | O_CREAT, keyfile_mode)) < 0) { err(1, "unable to write %s", backup_keyfile); } @@ -134,8 +134,8 @@ safe_read_stdin(prompt, buf, size) } fflush(stdin); buf[strlen(buf)-1] = 0; -} - +} + void safe_write(progname, filename, fd, buf, len) @@ -150,7 +150,7 @@ safe_write(progname, filename, fd, buf, len) close(fd); leave("In progress srvtab in this file.", 1); } -} +} int yn(string) @@ -161,7 +161,7 @@ yn(string) (void) printf("%s (y,n) [y] ", string); for (;;) { safe_read_stdin("", ynbuf, sizeof(ynbuf)); - + if ((ynbuf[0] == 'n') || (ynbuf[0] == 'N')) return(0); else if ((ynbuf[0] == 'y') || (ynbuf[0] == 'Y') || (ynbuf[0] == 0)) @@ -174,7 +174,7 @@ yn(string) } void -append_srvtab(progname, filename, fd, sname, sinst, +append_srvtab(progname, filename, fd, sname, sinst, srealm, key_vno, key) char *progname; char *filename; @@ -192,7 +192,7 @@ append_srvtab(progname, filename, fd, sname, sinst, safe_write(progname, filename, fd, (char *)&key_vno, 1); safe_write(progname, filename, fd, (char *)key, sizeof(des_cblock)); (void) fsync(fd); -} +} unsigned short get_mode(filename) @@ -202,8 +202,8 @@ get_mode(filename) unsigned short mode; (void) bzero((char *)&statbuf, sizeof(statbuf)); - - if (stat(filename, &statbuf) < 0) + + if (stat(filename, &statbuf) < 0) mode = SRVTAB_MODE; else mode = statbuf.st_mode; @@ -240,33 +240,33 @@ main(argc,argv) int change_this_key = FALSE; char databuf[BUFSIZ]; int first_printed = FALSE; /* have we printed the first item? */ - + int get_svc_new_key(); void get_key_from_password(); void print_key(); void print_name(); - + (void) bzero((char *)sname, sizeof(sname)); (void) bzero((char *)sinst, sizeof(sinst)); (void) bzero((char *)srealm, sizeof(srealm)); - + (void) bzero((char *)change_tkt, sizeof(change_tkt)); (void) bzero((char *)keyfile, sizeof(keyfile)); (void) bzero((char *)work_keyfile, sizeof(work_keyfile)); (void) bzero((char *)backup_keyfile, sizeof(backup_keyfile)); (void) bzero((char *)local_realm, sizeof(local_realm)); - + (void) sprintf(change_tkt, "/tmp/tkt_ksrvutil.%d", getpid()); krb_set_tkt_string(change_tkt); /* This is used only as a default for adding keys */ if (krb_get_lrealm(local_realm, 1) != KSUCCESS) (void) strcpy(local_realm, KRB_REALM); - + for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-i") == 0) + if (strcmp(argv[i], "-i") == 0) interactive++; - else if (strcmp(argv[i], "-k") == 0) + else if (strcmp(argv[i], "-k") == 0) key++; else if (strcmp(argv[i], "list") == 0) { if (arg_entered) @@ -301,23 +301,23 @@ main(argc,argv) else usage(); } - + if (!arg_entered) usage(); if (!keyfile[0]) (void) strcpy(keyfile, KEYFILE); - + (void) strcpy(work_keyfile, keyfile); (void) strcpy(backup_keyfile, keyfile); - + if (change || add) { (void) strcat(work_keyfile, ".work"); (void) strcat(backup_keyfile, ".old"); - + copy_keyfile(argv[0], keyfile, backup_keyfile); } - + if (add) copy_keyfile(argv[0], backup_keyfile, work_keyfile); @@ -330,8 +330,8 @@ main(argc,argv) } if (change) { - if ((work_keyfile_fd = - open(work_keyfile, O_WRONLY | O_CREAT | O_TRUNC, + if ((work_keyfile_fd = + open(work_keyfile, O_WRONLY | O_CREAT | O_TRUNC, SRVTAB_MODE)) < 0) { err(1, "unable to write %s", work_keyfile); } @@ -342,7 +342,7 @@ main(argc,argv) err(1, "unable to append to %s", work_keyfile); } } - + if (change || list) { while ((getst(backup_keyfile_fd, sname, SNAME_SZ) > 0) && (getst(backup_keyfile_fd, sinst, INST_SZ) > 0) && @@ -379,19 +379,19 @@ main(argc,argv) change_this_key = 1; else change_this_key = 0; - + if (change_this_key) (void) printf("Changing to version %d.\n", key_vno + 1); else if (change) (void) printf("Not changing this key.\n"); - + if (change_this_key) { - /* + /* * Pick a new key and determine whether or not * it is safe to change */ - if ((status = - get_svc_new_key(new_key, sname, sinst, + if ((status = + get_svc_new_key(new_key, sname, sinst, srealm, keyfile)) == KADM_SUCCESS) key_vno++; else { @@ -400,9 +400,9 @@ main(argc,argv) change_this_key = FALSE; } } - else + else (void) bcopy(old_key, new_key, sizeof(new_key)); - append_srvtab(argv[0], work_keyfile, work_keyfile_fd, + append_srvtab(argv[0], work_keyfile, work_keyfile_fd, sname, sinst, srealm, key_vno, new_key); if (key && change_this_key) { (void) printf("Old key: "); @@ -417,7 +417,7 @@ main(argc,argv) (void) dest_tkt(); } else { - com_err(argv[0], status, + com_err(argv[0], status, " attempting to change password."); (void) dest_tkt(); /* XXX This knows the format of a keyfile */ @@ -464,17 +464,17 @@ main(argc,argv) print_key(new_key); (void) printf("\n"); } - append_srvtab(argv[0], work_keyfile, work_keyfile_fd, + append_srvtab(argv[0], work_keyfile, work_keyfile_fd, sname, sinst, srealm, key_vno, new_key); (void) printf("Key successfully added.\n"); } while (yn("Would you like to add another key?")); } - if (change || list) + if (change || list) if (close(backup_keyfile_fd) < 0) { warn("failure closing %s, continuing", backup_keyfile); } - + if (change || add) { if (close(work_keyfile_fd) < 0) { err(1, "failure closing %s", work_keyfile); @@ -525,7 +525,7 @@ get_svc_new_key(new_key, sname, sinst, srealm, keyfile) if (((status = krb_get_svc_in_tkt(sname, sinst, srealm, PWSERV_NAME, KADM_SINST, 1, keyfile)) == KSUCCESS) && - ((status = kadm_init_link("changepw", KRB_MASTER, srealm)) == + ((status = kadm_init_link("changepw", KRB_MASTER, srealm)) == KADM_SUCCESS)) { #ifdef NOENCRYPTION (void) bzero((char *) new_key, sizeof(des_cblock)); @@ -535,7 +535,7 @@ get_svc_new_key(new_key, sname, sinst, srealm, keyfile) #endif /* NOENCRYPTION */ return(KADM_SUCCESS); } - + return(status); } @@ -555,7 +555,7 @@ get_key_from_password(key) (void) des_string_to_key(password, key); #endif /* NOENCRYPTION */ (void) bzero((char *)password, sizeof(password)); -} +} usage() { diff --git a/eBones/usr.sbin/kstash/Makefile b/eBones/usr.sbin/kstash/Makefile index 8331c97a..d096b9c 100644 --- a/eBones/usr.sbin/kstash/Makefile +++ b/eBones/usr.sbin/kstash/Makefile @@ -1,10 +1,10 @@ # From: @(#)Makefile 5.2 (Berkeley) 3/5/91 -# $Id: Makefile,v 1.2 1994/07/19 19:27:04 g89r4222 Exp $ +# $Id: Makefile,v 1.1.1.1 1994/09/30 14:50:04 csgr Exp $ PROG= kstash CFLAGS+=-DKERBEROS -DDEBUG -I${.CURDIR}/../include DPADD= ${LIBKDB} ${LIBKRB} ${LIBDES} -LDADD= -L${KDBOBJDIR} -lkdb -L${KRBOBJDIR} -lkrb -L${DESOBJDIR} -ldes +LDADD= -L${KDBOBJDIR} -lkdb -L${KRBOBJDIR} -lkrb -L${DESOBJDIR} -ldes NOMAN= noman .include <bsd.prog.mk> diff --git a/eBones/usr.sbin/kstash/kstash.c b/eBones/usr.sbin/kstash/kstash.c index 696e4e1..d8afe20 100644 --- a/eBones/usr.sbin/kstash/kstash.c +++ b/eBones/usr.sbin/kstash/kstash.c @@ -1,16 +1,16 @@ /* * Copyright 1985, 1986, 1987, 1988 by the Massachusetts Institute - * of Technology + * of Technology * For copying and distribution information, please see the file * <Copyright.MIT>. * * from: kstash.c,v 4.0 89/01/23 09:45:43 jtkohl Exp $ - * $Id: kstash.c,v 1.2 1994/07/19 19:27:05 g89r4222 Exp $ + * $Id: kstash.c,v 1.1.1.1 1994/09/30 14:50:05 csgr Exp $ */ #ifndef lint static char rcsid[] = -"$Id: kstash.c,v 1.2 1994/07/19 19:27:05 g89r4222 Exp $"; +"$Id: kstash.c,v 1.1.1.1 1994/09/30 14:50:05 csgr Exp $"; #endif lint #include <stdio.h> @@ -84,7 +84,7 @@ main(argc, argv) clear_secrets(); } -static void +static void clear_secrets() { bzero(master_key_schedule, sizeof(master_key_schedule)); |