summaryrefslogtreecommitdiffstats
path: root/eBones/usr.bin
diff options
context:
space:
mode:
authorrgrimes <rgrimes@FreeBSD.org>1995-05-30 06:41:30 +0000
committerrgrimes <rgrimes@FreeBSD.org>1995-05-30 06:41:30 +0000
commita14d555c873398b14776ca4f2c33f9c69617afb9 (patch)
tree350f6f98843363254f9afe467ae0c92d5a9d7f43 /eBones/usr.bin
parentf3a2b348daf9fa6063c38d2d69563f732a2f80e7 (diff)
downloadFreeBSD-src-a14d555c873398b14776ca4f2c33f9c69617afb9.zip
FreeBSD-src-a14d555c873398b14776ca4f2c33f9c69617afb9.tar.gz
Remove trailing whitespace.
Diffstat (limited to 'eBones/usr.bin')
-rw-r--r--eBones/usr.bin/kadmin/kadmin.c66
-rw-r--r--eBones/usr.bin/kdestroy/kdestroy.c12
-rw-r--r--eBones/usr.bin/kinit/kinit.c14
-rw-r--r--eBones/usr.bin/klist/klist.c26
-rw-r--r--eBones/usr.bin/ksrvtgt/ksrvtgt.c12
-rw-r--r--eBones/usr.bin/passwd/kpasswd.c40
6 files changed, 85 insertions, 85 deletions
diff --git a/eBones/usr.bin/kadmin/kadmin.c b/eBones/usr.bin/kadmin/kadmin.c
index 3d939bc..cbf4d6f 100644
--- a/eBones/usr.bin/kadmin/kadmin.c
+++ b/eBones/usr.bin/kadmin/kadmin.c
@@ -1,15 +1,15 @@
/*
- * $Source: /afs/athena.mit.edu/astaff/project/kerberos/src/kadmin/RCS/kadmin.c,v $
- * $Author: qjb $
+ * $Source: /home/ncvs/src/eBones/kadmin/kadmin.c,v $
+ * $Author: wollman $
*
* Copyright 1988 by the Massachusetts Institute of Technology.
*
* For copying and distribution information, please see the file
* Copyright.MIT.
*
- * Kerberos database administrator's tool.
- *
- * The default behavior of kadmin is if the -m option is given
+ * Kerberos database administrator's tool.
+ *
+ * The default behavior of kadmin is if the -m option is given
* on the commandline, multiple requests are allowed to be given
* with one entry of the admin password (until the tickets expire).
* If you do not want this to be an available option, compile with
@@ -54,7 +54,7 @@ static char default_realm[REALM_SZ]; /* default kerberos realm */
static char krbrlm[REALM_SZ]; /* current realm being administered */
#ifndef NO_MULTIPLE
static int multiple = 0; /* Allow multiple requests per ticket */
-#endif
+#endif
main(argc, argv)
int argc;
@@ -106,18 +106,18 @@ setvals(vals, string)
strcpy(realm, default_realm);
if (strcmp(realm, krbrlm)) {
strcpy(krbrlm, realm);
- if ((status = kadm_init_link(PWSERV_NAME, KRB_MASTER, krbrlm))
+ if ((status = kadm_init_link(PWSERV_NAME, KRB_MASTER, krbrlm))
!= KADM_SUCCESS)
- printf("kadm error for realm %s: %s\n",
+ printf("kadm error for realm %s: %s\n",
krbrlm, error_message(status));
}
- if (status)
+ if (status)
return 1;
else
return KADM_SUCCESS;
-}
+}
-void
+void
change_password(argc, argv)
int argc;
char *argv[];
@@ -145,7 +145,7 @@ change_password(argc, argv)
/* get the new password */
(void) sprintf(pw_prompt, "New password for %s:", argv[1]);
-
+
if (get_password(&new.key_low, &new.key_high,
pw_prompt, SWAP) == GOOD_PW) {
status = kadm_mod(&old, &new);
@@ -163,13 +163,13 @@ change_password(argc, argv)
clean_up();
#endif
}
- else
+ else
printf("kadmin: Principal does not exist.\n");
return;
}
/*ARGSUSED*/
-void
+void
change_admin_password(argc, argv)
int argc;
char *argv[];
@@ -206,7 +206,7 @@ change_admin_password(argc, argv)
return;
}
-void
+void
add_new_key(argc, argv)
int argc;
char *argv[];
@@ -228,10 +228,10 @@ add_new_key(argc, argv)
/* get the admin's password */
if (get_admin_password() != GOOD_PW)
return;
-
+
/* get the new password */
(void) sprintf(pw_prompt, "Password for %s:", argv[1]);
-
+
if (get_password(&new.key_low, &new.key_high,
pw_prompt, SWAP) == GOOD_PW) {
status = kadm_add(&new);
@@ -253,7 +253,7 @@ add_new_key(argc, argv)
return;
}
-void
+void
get_entry(argc, argv)
int argc;
char *argv[];
@@ -283,12 +283,12 @@ get_entry(argc, argv)
/* get the admin's password */
if (get_admin_password() != GOOD_PW)
return;
-
+
if ((status = kadm_get(&vals, fields)) == KADM_SUCCESS)
prin_vals(&vals);
else
printf("kadm error: %s\n",error_message(status));
-
+
#ifndef NO_MULTIPLE
if (!multiple)
clean_up();
@@ -300,7 +300,7 @@ get_entry(argc, argv)
}
-void
+void
help(argc, argv)
int argc;
char *argv[];
@@ -435,18 +435,18 @@ do_init(argc, argv)
#else
#define OPTION_STRING "u:r:"
#endif
-
+
bzero(myname, sizeof(myname));
if (!inited) {
- /*
- * This is only as a default/initial realm; we don't care
+ /*
+ * This is only as a default/initial realm; we don't care
* about failure.
*/
if (krb_get_lrealm(default_realm, 1) != KSUCCESS)
strcpy(default_realm, KRB_REALM);
- /*
+ /*
* If we can reach the local realm, initialize to it. Otherwise,
* don't initialize.
*/
@@ -455,7 +455,7 @@ do_init(argc, argv)
else
strcpy(krbrlm, default_realm);
- while ((c = getopt(argc, argv, OPTION_STRING)) != EOF)
+ while ((c = getopt(argc, argv, OPTION_STRING)) != EOF)
switch (c) {
case 'u':
strncpy(myname, optarg, sizeof(myname) - 1);
@@ -508,9 +508,9 @@ get_admin_password()
/* If admin tickets exist and are valid, just exit. */
bzero(&c, sizeof(c));
if (krb_get_cred(PWSERV_NAME, KADM_SINST, krbrlm, &c) == KSUCCESS)
- /*
+ /*
* If time is less than lifetime - FUDGE_VALUE after issue date,
- * tickets will probably last long enough for the next
+ * tickets will probably last long enough for the next
* transaction.
*/
if (time(0) < (c.issue_date + (5 * 60 * c.lifetime) - FUDGE_VALUE))
@@ -518,14 +518,14 @@ get_admin_password()
ticket_life = DEFAULT_TKT_LIFE;
}
#endif
-
+
if (princ_exists(myname, "admin", krbrlm) != PE_NO) {
if (read_long_pw_string(admin_passwd, sizeof(admin_passwd)-1,
"Admin password:", 0)) {
fprintf(stderr, "Error reading admin password.\n");
goto bad;
}
- status = krb_get_pw_in_tkt(myname, "admin", krbrlm, PWSERV_NAME,
+ status = krb_get_pw_in_tkt(myname, "admin", krbrlm, PWSERV_NAME,
KADM_SINST, ticket_life, admin_passwd);
bzero(admin_passwd, sizeof(admin_passwd));
}
@@ -546,7 +546,7 @@ get_admin_password()
"while getting password tickets");
goto bad;
}
-
+
bad:
bzero(admin_passwd, sizeof(admin_passwd));
(void) dest_tkt();
@@ -560,8 +560,8 @@ clean_up()
return;
}
-void
-quit()
+void
+quit()
{
printf("Cleaning up and exiting.\n");
clean_up();
diff --git a/eBones/usr.bin/kdestroy/kdestroy.c b/eBones/usr.bin/kdestroy/kdestroy.c
index f010fcd..8a7cbb7 100644
--- a/eBones/usr.bin/kdestroy/kdestroy.c
+++ b/eBones/usr.bin/kdestroy/kdestroy.c
@@ -1,21 +1,21 @@
/*
- * 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>.
*
* This program causes Kerberos tickets to be destroyed.
- * Options are:
+ * Options are:
*
* -q[uiet] - no bell even if tickets not destroyed
- * -f[orce] - no message printed at all
+ * -f[orce] - no message printed at all
*
* from: kdestroy.c,v 4.5 88/03/18 15:16:02 steiner Exp $
- * $Id: kdestroy.c,v 1.2 1994/07/19 19:24:16 g89r4222 Exp $
+ * $Id: kdestroy.c,v 1.1.1.1 1994/09/30 14:49:57 csgr Exp $
*/
#ifndef lint
static char rcsid[] =
-"$Id: kdestroy.c,v 1.2 1994/07/19 19:24:16 g89r4222 Exp $";
+"$Id: kdestroy.c,v 1.1.1.1 1994/09/30 14:49:57 csgr Exp $";
#endif lint
#include <stdio.h>
diff --git a/eBones/usr.bin/kinit/kinit.c b/eBones/usr.bin/kinit/kinit.c
index 94ce0fe..9f531d1 100644
--- a/eBones/usr.bin/kinit/kinit.c
+++ b/eBones/usr.bin/kinit/kinit.c
@@ -1,13 +1,13 @@
/*
- * 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>.
*
* Routine to initialize user to Kerberos. Prompts optionally for
* user, instance and realm. Authenticates user and gets a ticket
- * for the Kerberos ticket-granting service for future use.
+ * for the Kerberos ticket-granting service for future use.
*
- * Options are:
+ * Options are:
*
* -i[instance]
* -r[realm]
@@ -15,12 +15,12 @@
* -l[ifetime]
*
* from: kinit.c,v 4.12 90/03/20 16:11:15 jon Exp $
- * $Id: kinit.c,v 1.2 1994/07/19 19:24:33 g89r4222 Exp $
+ * $Id: kinit.c,v 1.1.1.1 1994/09/30 14:49:58 csgr Exp $
*/
#ifndef lint
static char rcsid[] =
-"$Id: kinit.c,v 1.2 1994/07/19 19:24:33 g89r4222 Exp $";
+"$Id: kinit.c,v 1.1.1.1 1994/09/30 14:49:58 csgr Exp $";
#endif lint
#include <stdio.h>
@@ -151,7 +151,7 @@ main(argc, argv)
strncpy(aname, pwd->pw_name, sizeof(aname));
}
}
-
+
if (!*aname)
exit(0);
if (!k_isname(aname)) {
diff --git a/eBones/usr.bin/klist/klist.c b/eBones/usr.bin/klist/klist.c
index 4a95bc0..bfc3aa0 100644
--- a/eBones/usr.bin/klist/klist.c
+++ b/eBones/usr.bin/klist/klist.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>.
*
* Lists your current Kerberos tickets.
* Written by Bill Sommerfeld, MIT Project Athena.
*
* from: klist.c,v 4.15 89/08/30 11:19:16 jtkohl Exp $
- * $Id: klist.c,v 1.2 1994/07/19 19:24:38 g89r4222 Exp $
+ * $Id: klist.c,v 1.1.1.1 1994/09/30 14:49:58 csgr Exp $
*/
#ifndef lint
static char rcsid[] =
-"$Id: klist.c,v 1.2 1994/07/19 19:24:38 g89r4222 Exp $";
+"$Id: klist.c,v 1.1.1.1 1994/09/30 14:49:58 csgr Exp $";
#endif lint
#include <stdio.h>
@@ -97,11 +97,11 @@ int tgt_test, long_form;
if (long_form)
printf("Ticket file: %s\n", file);
- /*
- * Since krb_get_tf_realm will return a ticket_file error,
+ /*
+ * Since krb_get_tf_realm will return a ticket_file error,
* we will call tf_init and tf_close first to filter out
- * things like no ticket file. Otherwise, the error that
- * the user would see would be
+ * things like no ticket file. Otherwise, the error that
+ * the user would see would be
* klist: can't find realm of ticket file: No ticket file (tf_util)
* instead of
* klist: No ticket file (tf_util)
@@ -116,7 +116,7 @@ int tgt_test, long_form;
/* Close ticket file */
(void) tf_close();
- /*
+ /*
* We must find the realm of the ticket file here before calling
* tf_init because since the realm of the ticket file is not
* really stored in the principal section of the file, the
@@ -143,13 +143,13 @@ int tgt_test, long_form;
exit(1);
}
- /*
+ /*
* You may think that this is the obvious place to get the
* realm of the ticket file, but it can't be done here as the
- * routine to do this must open the ticket file. This is why
+ * routine to do this must open the ticket file. This is why
* it was done before tf_init.
*/
-
+
if (!tgt_test && long_form)
printf("Principal:\t%s%s%s%s%s\n\n", pname,
(pinst[0] ? "." : ""), pinst,
@@ -218,7 +218,7 @@ char *file;
int count;
printf("Server key file: %s\n", file);
-
+
if ((stab = open(file, O_RDONLY, 0400)) < 0) {
perror(file);
exit(1);
diff --git a/eBones/usr.bin/ksrvtgt/ksrvtgt.c b/eBones/usr.bin/ksrvtgt/ksrvtgt.c
index 46bbd56..79acf3e 100644
--- a/eBones/usr.bin/ksrvtgt/ksrvtgt.c
+++ b/eBones/usr.bin/ksrvtgt/ksrvtgt.c
@@ -1,18 +1,18 @@
/*
- * Copyright 1988 by the Massachusetts Institute of Technology.
+ * Copyright 1988 by the Massachusetts Institute of Technology.
* For copying and distribution information, please see the file
- * <Copyright.MIT>.
+ * <Copyright.MIT>.
*
* Get a ticket-granting-ticket given a service key file (srvtab)
* The lifetime is the shortest allowed [1 five-minute interval]
*
* from: ksrvtgt.c,v 4.3 89/07/28 10:17:28 jtkohl Exp $
- * $Id: ksrvtgt.c,v 1.2 1994/07/19 19:26:56 g89r4222 Exp $
+ * $Id: ksrvtgt.c,v 1.1.1.1 1994/09/30 14:50:04 csgr Exp $
*/
#ifndef lint
const char rcsid[] =
-"$Id: ksrvtgt.c,v 1.2 1994/07/19 19:26:56 g89r4222 Exp $";
+"$Id: ksrvtgt.c,v 1.1.1.1 1994/09/30 14:50:04 csgr Exp $";
#endif /* lint */
#include <stdio.h>
@@ -36,10 +36,10 @@ main(argc,argv)
argv[0]);
exit(1);
}
-
+
if (argc == 4)
(void) strncpy(srvtab, argv[3], sizeof(srvtab) -1);
-
+
if (argc == 5) {
(void) strncpy(realm, argv[3], sizeof(realm) - 1);
(void) strncpy(srvtab, argv[4], sizeof(srvtab) -1);
diff --git a/eBones/usr.bin/passwd/kpasswd.c b/eBones/usr.bin/passwd/kpasswd.c
index 708e677..2425bed 100644
--- a/eBones/usr.bin/passwd/kpasswd.c
+++ b/eBones/usr.bin/passwd/kpasswd.c
@@ -13,7 +13,7 @@ static char rcsid_kpasswd_c[] =
"BonesHeader: /afs/athena.mit.edu/astaff/project/kerberos/src/kadmin/RCS/kpasswd.c,v 4.3 89/09/26 09:33:02 jtkohl Exp ";
#endif
static const char rcsid[] =
- "$Id$";
+ "$Id: kpasswd.c,v 1.1 1995/01/20 22:14:14 wollman Exp $";
#endif lint
/*
@@ -50,28 +50,28 @@ int krb_passwd(char *uname, char *iflag, char *rflag, char *uflag)
extern char *optarg;
extern int optind;
char tktstring[MAXPATHLEN];
-
+
void get_pw_new_key();
-
+
#ifdef NOENCRYPTION
#define read_long_pw_string placebo_read_pw_string
#else
#define read_long_pw_string des_read_pw_string
#endif
int read_long_pw_string();
-
+
bzero(name, sizeof(name));
bzero(inst, sizeof(inst));
bzero(realm, sizeof(realm));
-
- if (krb_get_tf_fullname(TKT_FILE, default_name, default_inst,
+
+ if (krb_get_tf_fullname(TKT_FILE, default_name, default_inst,
default_realm) != KSUCCESS) {
pw = getpwuid((int) getuid());
if (pw) {
strcpy(default_name, pw->pw_name);
} else {
/* seems like a null name is kinda silly */
- strcpy(default_name, "");
+ strcpy(default_name, "");
}
strcpy(default_inst, "");
if (krb_get_lrealm(default_realm, 1) != KSUCCESS)
@@ -108,7 +108,7 @@ int krb_passwd(char *uname, char *iflag, char *rflag, char *uflag)
if(rflag) {
if (k_isrealm(rflag)) {
strncpy(realm, rflag, sizeof(realm) - 1);
- realm_given++;
+ realm_given++;
} else {
errx(1, "bad realm: %s", rflag);
}
@@ -129,11 +129,11 @@ int krb_passwd(char *uname, char *iflag, char *rflag, char *uflag)
(void) sprintf(tktstring, "/tmp/tkt_cpw_%d",getpid());
krb_set_tkt_string(tktstring);
-
+
get_pw_new_key(new_key, name, inst, realm, realm_given);
-
- if ((status = kadm_init_link("changepw", KRB_MASTER, realm))
- != KADM_SUCCESS)
+
+ if ((status = kadm_init_link("changepw", KRB_MASTER, realm))
+ != KADM_SUCCESS)
com_err("kpasswd", status, "while initializing");
else if ((status = kadm_change_pw(new_key)) != KADM_SUCCESS)
com_err("kpasswd", status, " attempting to change password.");
@@ -146,7 +146,7 @@ int krb_passwd(char *uname, char *iflag, char *rflag, char *uflag)
(void) dest_tkt();
if (status)
exit(2);
- else
+ else
exit(0);
}
@@ -160,19 +160,19 @@ void get_pw_new_key(new_key, name, inst, realm, print_realm)
char ppromp[40+ANAME_SZ+INST_SZ+REALM_SZ]; /* for the password prompt */
char pword[MAX_KPW_LEN]; /* storage for the password */
char npromp[40+ANAME_SZ+INST_SZ+REALM_SZ]; /* for the password prompt */
-
+
char local_realm[REALM_SZ];
int status;
-
+
/*
* We don't care about failure; this is to determine whether or
- * not to print the realm in the prompt for a new password.
+ * not to print the realm in the prompt for a new password.
*/
(void) krb_get_lrealm(local_realm, 1);
-
+
if (strcmp(local_realm, realm))
print_realm++;
-
+
(void) sprintf(ppromp,"Old password for %s%s%s%s%s:",
name, *inst ? "." : "", inst,
print_realm ? "@" : "", print_realm ? realm : "");
@@ -181,7 +181,7 @@ void get_pw_new_key(new_key, name, inst, realm, print_realm)
exit(1);
}
- if ((status = krb_get_pw_in_tkt(name, inst, realm, PWSERV_NAME,
+ if ((status = krb_get_pw_in_tkt(name, inst, realm, PWSERV_NAME,
KADM_SINST, 1, pword)) != KSUCCESS) {
if (status == INTK_BADPW) {
printf("Incorrect old password.\n");
@@ -202,7 +202,7 @@ void get_pw_new_key(new_key, name, inst, realm, print_realm)
if (strlen(pword) == 0)
printf("Null passwords are not allowed; try again.\n");
} while (strlen(pword) == 0);
-
+
#ifdef NOENCRYPTION
bzero((char *) new_key, sizeof(des_cblock));
new_key[0] = (unsigned char) 1;
OpenPOWER on IntegriCloud