aboutsummaryrefslogtreecommitdiff
path: root/src/appl
diff options
context:
space:
mode:
authorTom Yu <tlyu@mit.edu>2009-10-31 00:48:38 +0000
committerTom Yu <tlyu@mit.edu>2009-10-31 00:48:38 +0000
commit02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b (patch)
tree61b9147863cd8be3eff63903dc36cae168254bd5 /src/appl
parent162ab371748cba0cc6f172419bd6e71fa04bb878 (diff)
downloadkrb5-02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b.zip
krb5-02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b.tar.gz
krb5-02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b.tar.bz2
make mark-cstyle
make reindent git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23100 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/appl')
-rw-r--r--src/appl/bsd/defines.h12
-rw-r--r--src/appl/bsd/forward.c14
-rw-r--r--src/appl/bsd/kcmd.c56
-rw-r--r--src/appl/bsd/krcp.c124
-rw-r--r--src/appl/bsd/krlogin.c140
-rw-r--r--src/appl/bsd/krlogind.c164
-rw-r--r--src/appl/bsd/krsh.c30
-rw-r--r--src/appl/bsd/krshd.c210
-rw-r--r--src/appl/bsd/login.c38
-rw-r--r--src/appl/bsd/loginpaths.h2
-rw-r--r--src/appl/bsd/rpaths.h1
-rw-r--r--src/appl/gss-sample/gss-client.c14
-rw-r--r--src/appl/gss-sample/gss-misc.c8
-rw-r--r--src/appl/gss-sample/gss-misc.h4
-rw-r--r--src/appl/gss-sample/gss-server.c10
-rw-r--r--src/appl/gssftp/ftp/cmds.c18
-rw-r--r--src/appl/gssftp/ftp/cmdtab.c1
-rw-r--r--src/appl/gssftp/ftp/ftp.c62
-rw-r--r--src/appl/gssftp/ftp/glob.c6
-rw-r--r--src/appl/gssftp/ftp/main.c4
-rw-r--r--src/appl/gssftp/ftp/ruserpass.c6
-rw-r--r--src/appl/gssftp/ftp/secure.c24
-rw-r--r--src/appl/gssftp/ftpd/ftpd.c51
-rw-r--r--src/appl/gssftp/ftpd/ftpd_var.h4
-rw-r--r--src/appl/libpty/cleanup.c8
-rw-r--r--src/appl/libpty/dump-utmp.c2
-rw-r--r--src/appl/libpty/getpty.c8
-rw-r--r--src/appl/libpty/init.c8
-rw-r--r--src/appl/libpty/init_slave.c10
-rw-r--r--src/appl/libpty/libpty.h4
-rw-r--r--src/appl/libpty/logwtmp.c4
-rw-r--r--src/appl/libpty/open_ctty.c4
-rw-r--r--src/appl/libpty/open_slave.c4
-rw-r--r--src/appl/libpty/pty-int.h6
-rw-r--r--src/appl/libpty/pty_paranoia.c2
-rw-r--r--src/appl/libpty/sane_hostname.c4
-rw-r--r--src/appl/libpty/update_utmp.c8
-rw-r--r--src/appl/libpty/update_wtmp.c4
-rw-r--r--src/appl/libpty/vhangup.c6
-rw-r--r--src/appl/libpty/void_assoc.c4
-rw-r--r--src/appl/sample/sample.h4
-rw-r--r--src/appl/sample/sclient/sclient.c14
-rw-r--r--src/appl/sample/sserver/sserver.c16
-rw-r--r--src/appl/simple/client/sim_client.c26
-rw-r--r--src/appl/simple/server/sim_server.c18
-rw-r--r--src/appl/simple/simple.h4
-rw-r--r--src/appl/telnet/libtelnet/auth-proto.h2
-rw-r--r--src/appl/telnet/libtelnet/auth.c8
-rw-r--r--src/appl/telnet/libtelnet/enc_des.c18
-rw-r--r--src/appl/telnet/libtelnet/encrypt.c14
-rw-r--r--src/appl/telnet/libtelnet/forward.c10
-rw-r--r--src/appl/telnet/libtelnet/kerberos5.c52
-rw-r--r--src/appl/telnet/libtelnet/krb5forw.h5
-rw-r--r--src/appl/telnet/libtelnet/mem.c2
-rw-r--r--src/appl/telnet/libtelnet/parsetos.c1
-rw-r--r--src/appl/telnet/libtelnet/setenv.c2
-rw-r--r--src/appl/telnet/telnet/authenc.c2
-rw-r--r--src/appl/telnet/telnet/commands.c10
-rw-r--r--src/appl/telnet/telnet/externs.h6
-rw-r--r--src/appl/telnet/telnet/main.c10
-rw-r--r--src/appl/telnet/telnet/sys_bsd.c2
-rw-r--r--src/appl/telnet/telnet/telnet.c20
-rw-r--r--src/appl/telnet/telnet/utilities.c4
-rw-r--r--src/appl/telnet/telnetd/pathnames.h2
-rw-r--r--src/appl/telnet/telnetd/slc.c14
-rw-r--r--src/appl/telnet/telnetd/state.c4
-rw-r--r--src/appl/telnet/telnetd/sys_term.c27
-rw-r--r--src/appl/telnet/telnetd/telnetd-ktd.c10
-rw-r--r--src/appl/telnet/telnetd/telnetd.c18
-rw-r--r--src/appl/telnet/telnetd/telnetd.h1
-rw-r--r--src/appl/telnet/telnetd/termio-tn.c2
-rw-r--r--src/appl/telnet/telnetd/termstat.c14
-rw-r--r--src/appl/telnet/telnetd/utility.c16
-rw-r--r--src/appl/user_user/client.c45
-rw-r--r--src/appl/user_user/server.c26
75 files changed, 753 insertions, 765 deletions
diff --git a/src/appl/bsd/defines.h b/src/appl/bsd/defines.h
index d04182b..b565cd8 100644
--- a/src/appl/bsd/defines.h
+++ b/src/appl/bsd/defines.h
@@ -48,7 +48,7 @@ extern void rcmd_stream_init_normal(void);
extern char *strsave(const char *sp);
#endif
-krb5_error_code rd_and_store_for_creds(krb5_context context,
+krb5_error_code rd_and_store_for_creds(krb5_context context,
krb5_auth_context auth_context,
krb5_data *inbuf, krb5_ticket *ticket,
krb5_ccache *ccache);
@@ -65,20 +65,20 @@ extern int setenv(char *, char *, int);
#ifdef KRB_DEFS
krb5_error_code krb5_compat_recvauth(krb5_context, krb5_auth_context *,
- krb5_pointer, char *, krb5_principal,
+ krb5_pointer, char *, krb5_principal,
krb5_int32, krb5_keytab,
krb5_int32, char *, char *,
- struct sockaddr_in *,
+ struct sockaddr_in *,
struct sockaddr_in *, char *,
- krb5_ticket **, krb5_int32 *,
+ krb5_ticket **, krb5_int32 *,
AUTH_DAT **, Key_schedule, char *);
krb5_error_code
krb5_compat_recvauth_version(krb5_context, krb5_auth_context *,
- krb5_pointer, krb5_principal, krb5_int32,
+ krb5_pointer, krb5_principal, krb5_int32,
krb5_keytab, krb5_int32, char *, char *,
struct sockaddr_in *, struct sockaddr_in *,
- char *, krb5_ticket **, krb5_int32*,
+ char *, krb5_ticket **, krb5_int32*,
AUTH_DAT **, Key_schedule, krb5_data *);
#endif
diff --git a/src/appl/bsd/forward.c b/src/appl/bsd/forward.c
index 1ac2a2a..ad0680c 100644
--- a/src/appl/bsd/forward.c
+++ b/src/appl/bsd/forward.c
@@ -45,19 +45,19 @@ rd_and_store_for_creds(context, auth_context, inbuf, ticket, ccache)
*ccache = NULL;
retval = krb5_rd_cred(context, auth_context, inbuf, &creds, NULL);
- if (retval)
+ if (retval)
return(retval);
- /* Set the KRB5CCNAME ENV variable to keep sessions
- * seperate. Use the process id of this process which is
+ /* Set the KRB5CCNAME ENV variable to keep sessions
+ * seperate. Use the process id of this process which is
* the rlogind or rshd. Set the environment variable as well.
*/
-
+
snprintf(ccname, sizeof(ccname), "FILE:/tmp/krb5cc_p%ld", (long) getpid());
setenv("KRB5CCNAME", ccname, 1);
-
+
retval = krb5_cc_resolve(context, ccname, ccache);
- if (retval)
+ if (retval)
goto cleanup;
retval = krb5_cc_initialize(context, *ccache, ticket->enc_part2->client);
@@ -65,7 +65,7 @@ rd_and_store_for_creds(context, auth_context, inbuf, ticket, ccache)
goto cleanup;
retval = krb5_cc_store_cred(context, *ccache, *creds);
- if (retval)
+ if (retval)
goto cleanup;
cleanup:
diff --git a/src/appl/bsd/kcmd.c b/src/appl/bsd/kcmd.c
index 16c8e04..276c703 100644
--- a/src/appl/bsd/kcmd.c
+++ b/src/appl/bsd/kcmd.c
@@ -21,14 +21,14 @@
/*
* Copyright (C) 1998 by the FundsXpress, INC.
- *
+ *
* All rights reserved.
- *
+ *
* Export of this software from the United States of America may require
* a specific license from the United States Government. It is the
* responsibility of any person or organization contemplating export to
* obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -39,14 +39,14 @@
* permission. FundsXpress makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ *
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
/* derived from @(#)rcmd.c 5.17 (Berkeley) 6/27/88 */
-
+
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
@@ -63,7 +63,7 @@
#define _TYPES_
#endif
#include <fcntl.h>
-
+
#ifndef MAXPATHLEN
#define MAXPATHLEN 1024
#endif
@@ -80,7 +80,7 @@
#define sigmask(m) (1 << ((m)-1))
#endif
#endif
-
+
#ifndef roundup
#define roundup(x,y) ((((x)+(y)-1)/(y))*(y))
#endif
@@ -110,7 +110,7 @@ char *default_service = "host";
* Note that the encrypted rlogin packets take the form of a four-byte
* length followed by encrypted data. On writing the data out, a significant
* performance penalty is suffered (at least one RTT per character, two if we
- * are waiting for a shell to echo) by writing the data separately from the
+ * are waiting for a shell to echo) by writing the data separately from the
* length. So, unlike the input buffer, which just contains the output
* data, the output buffer represents the entire packet.
*/
@@ -132,7 +132,7 @@ static char storage[2*RCMD_BUFSIZ]; /* storage for the decryption */
static size_t nstored = 0;
static char *store_ptr = storage;
static int twrite(int, char *, size_t, int);
-static int v5_des_read(int, char *, size_t, int),
+static int v5_des_read(int, char *, size_t, int),
v5_des_write(int, char *, size_t, int);
static int do_lencheck;
@@ -405,9 +405,9 @@ kcmd(sock, ahost, rport, locuser, remuser, cmd, fd2p, service, realm,
}
cksumdat.data = cksumbuf;
cksumdat.length = strlen(cksumbuf);
-
+
block_urgent(&oldmask);
-
+
if (!laddr) laddr = &local_laddr;
if (kcmd_connect(&s, &addrfamily, &sockin, *ahost, &host_save, rport, 0, laddr) == -1) {
restore_sigs(&oldmask);
@@ -416,7 +416,7 @@ kcmd(sock, ahost, rport, locuser, remuser, cmd, fd2p, service, realm,
*ahost = host_save;
/* If no service is given set to the default service */
if (!service) service = default_service;
-
+
if (!(get_cred = (krb5_creds *)calloc(1, sizeof(krb5_creds)))) {
fprintf(stderr,"kcmd: no memory\n");
return(-1);
@@ -433,7 +433,7 @@ kcmd(sock, ahost, rport, locuser, remuser, cmd, fd2p, service, realm,
status = krb5_set_principal_realm(bsd_context, get_cred->server,
realm);
if (status) {
- fprintf(stderr, "kcmd: krb5_set_principal_realm failed %s\n",
+ fprintf(stderr, "kcmd: krb5_set_principal_realm failed %s\n",
error_message(status));
return(-1);
}
@@ -470,12 +470,12 @@ kcmd(sock, ahost, rport, locuser, remuser, cmd, fd2p, service, realm,
authopts &= (~OPTS_FORWARD_CREDS);
authopts &= (~OPTS_FORWARDABLE_CREDS);
- if (krb5_auth_con_init(bsd_context, &auth_context))
+ if (krb5_auth_con_init(bsd_context, &auth_context))
goto bad2;
if (krb5_auth_con_set_req_cksumtype(bsd_context, auth_context, CKSUMTYPE_RSA_MD5) !=0 )
goto bad2;
- if (krb5_auth_con_setflags(bsd_context, auth_context,
+ if (krb5_auth_con_setflags(bsd_context, auth_context,
KRB5_AUTH_CONTEXT_RET_TIME))
goto bad2;
@@ -523,7 +523,7 @@ kcmd(sock, ahost, rport, locuser, remuser, cmd, fd2p, service, realm,
if (!suppress_err) {
fprintf(stderr, "Server returned error code %d (%s)\n",
error->error,
- error_message(ERROR_TABLE_BASE_krb5 +
+ error_message(ERROR_TABLE_BASE_krb5 +
(int) error->error));
if (error->text.length) {
fprintf(stderr, "Error text sent from server: %s\n",
@@ -533,17 +533,17 @@ kcmd(sock, ahost, rport, locuser, remuser, cmd, fd2p, service, realm,
krb5_free_error(bsd_context, error);
error = 0;
}
- }
+ }
if (status) goto bad2;
if (rep_ret && server_seqno) {
*server_seqno = rep_ret->seq_number;
krb5_free_ap_rep_enc_part(bsd_context, rep_ret);
}
-
+
(void) write(s, remuser, strlen(remuser)+1);
(void) write(s, cmd, strlen(cmd)+1);
(void) write(s, locuser, strlen(locuser)+1);
-
+
if (options & OPTS_FORWARD_CREDS) { /* Forward credentials */
status = krb5_fwd_tgt_creds(bsd_context, auth_context,
host_save,
@@ -589,13 +589,13 @@ kcmd(sock, ahost, rport, locuser, remuser, cmd, fd2p, service, realm,
restore_sigs(&oldmask);
*sock = s;
*protonump = protonum;
-
+
/* pass back credentials if wanted */
if (cred) krb5_copy_creds(bsd_context, ret_cred, cred);
krb5_free_creds(bsd_context, ret_cred);
if (authconp)
*authconp = auth_context;
-
+
return (0);
bad2:
if (lport)
@@ -723,7 +723,7 @@ void rcmd_stream_init_krb5(in_keyblock, encrypt_flag, lencheck, am_client,
use_ivecs = 1;
switch (in_keyblock->enctype) {
- /*
+ /*
* For the DES-based enctypes and the 3DES enctype we want to use
* a non-zero IV because that's what we did. In the future we
* use different keyusage for each channel and direction and a fresh
@@ -733,7 +733,7 @@ void rcmd_stream_init_krb5(in_keyblock, encrypt_flag, lencheck, am_client,
case ENCTYPE_DES_CBC_MD4:
case ENCTYPE_DES_CBC_MD5:
case ENCTYPE_DES3_CBC_SHA1:
-
+
status = krb5_c_block_size(bsd_context, keyblock->enctype,
&blocksize);
if (status) {
@@ -829,7 +829,7 @@ static int v5_des_read(fd, buf, len, secondary)
krb5_error_code ret;
krb5_data plain;
krb5_enc_data cipher;
-
+
if (nstored >= len) {
memcpy(buf, store_ptr, len);
store_ptr += len;
@@ -991,7 +991,7 @@ strsave(sp)
const char *sp;
{
register char *ret;
-
+
if((ret = strdup(sp)) == NULL) {
fprintf(stderr, "no memory for saving args\n");
exit(1);
@@ -1002,7 +1002,7 @@ strsave(sp)
/* Server side authentication, etc */
-int princ_maps_to_lname(principal, luser)
+int princ_maps_to_lname(principal, luser)
krb5_principal principal;
char *luser;
{
@@ -1020,7 +1020,7 @@ int default_realm(principal)
{
char *def_realm;
int retval;
-
+
if ((retval = krb5_get_default_realm(bsd_context, &def_realm))) {
return 0;
}
@@ -1029,7 +1029,7 @@ int default_realm(principal)
def_realm)) {
free(def_realm);
return 0;
- }
+ }
free(def_realm);
return 1;
}
diff --git a/src/appl/bsd/krcp.c b/src/appl/bsd/krcp.c
index eed615f..0d9089a 100644
--- a/src/appl/bsd/krcp.c
+++ b/src/appl/bsd/krcp.c
@@ -47,9 +47,9 @@ char copyright[] =
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/ioctl.h>
-
+
#include <netinet/in.h>
-
+
#include <stdio.h>
#include <signal.h>
#include <pwd.h>
@@ -71,7 +71,7 @@ char copyright[] =
#include "defines.h"
#define RCP_BUFSIZ 4096
-
+
int sock;
char *krb_realm = NULL;
char *krb_cache = NULL;
@@ -86,9 +86,9 @@ char *strsave();
#endif
int rcmd_stream_write(), rcmd_stream_read();
void usage(void), sink(int, char **),
- source(int, char **), rsource(char *, struct stat *), verifydir(char *),
+ source(int, char **), rsource(char *, struct stat *), verifydir(char *),
answer_auth(char *, char *);
-int response(void), hosteq(char *, char *), okname(char *),
+int response(void), hosteq(char *, char *), okname(char *),
susystem(char *);
int encryptflag = 0;
@@ -118,7 +118,7 @@ struct buffer {
struct buffer *allocbuf(struct buffer *, int, int);
#define NULLBUF (struct buffer *) 0
-
+
void error (char *fmt, ...)
#if !defined (__cplusplus) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7))
__attribute__ ((__format__ (__printf__, 1, 2)))
@@ -143,7 +143,7 @@ int main(argc, argv)
#endif
#ifdef KERBEROS
krb5_flags authopts;
- krb5_error_code status;
+ krb5_error_code status;
int euid;
char **orig_argv = save_argv(argc, argv);
krb5_auth_context auth_context;
@@ -161,19 +161,19 @@ int main(argc, argv)
fprintf(stderr, "who are you?\n");
exit(1);
}
-
+
for (argc--, argv++; argc > 0 && **argv == '-'; argc--, argv++) {
(*argv)++;
while (**argv) switch (*(*argv)++) {
-
+
case 'r':
iamrecursive++;
break;
-
+
case 'p': /* preserve mtimes and atimes */
pflag++;
break;
-
+
case 'D':
argc--, argv++;
if (argc == 0)
@@ -191,7 +191,7 @@ int main(argc, argv)
break;
case 'k': /* Change kerberos realm */
argc--, argv++;
- if (argc == 0)
+ if (argc == 0)
usage();
if(!(krb_realm = strdup(*argv))){
fprintf(stderr, "rcp: Cannot malloc.\n");
@@ -200,7 +200,7 @@ int main(argc, argv)
goto next_arg;
case 'c': /* Change default ccache file */
argc--, argv++;
- if (argc == 0)
+ if (argc == 0)
usage();
if(!(krb_cache = strdup(*argv))){
fprintf(stderr, "rcp: Cannot malloc.\n");
@@ -209,7 +209,7 @@ int main(argc, argv)
goto next_arg;
case 'C': /* Change default config file */
argc--, argv++;
- if (argc == 0)
+ if (argc == 0)
usage();
if(!(krb_config = strdup(*argv))){
fprintf(stderr, "rcp: Cannot malloc.\n");
@@ -229,7 +229,7 @@ int main(argc, argv)
case 'd':
targetshouldbedirectory = 1;
break;
-
+
case 'f': /* "from" */
iamremote = 1;
rcmd_stream_init_normal();
@@ -241,7 +241,7 @@ int main(argc, argv)
(void) response();
source(--argc, ++argv);
exit(errs);
-
+
case 't': /* "to" */
iamremote = 1;
rcmd_stream_init_normal();
@@ -252,13 +252,13 @@ int main(argc, argv)
sink(--argc, ++argv);
exit(errs);
-
+
default:
usage();
}
next_arg: ;
}
-
+
if (argc < 2)
usage();
if (argc > 2)
@@ -272,7 +272,7 @@ int main(argc, argv)
#else
sp = getservbyname("shell", "tcp");
#endif /* KERBEROS */
-
+
if (sp == NULL) {
#ifdef KERBEROS
fprintf(stderr, "rcp: kshell/tcp: unknown service\n");
@@ -289,7 +289,7 @@ int main(argc, argv)
if (asprintf(&cmd, "%srcp %s%s%s%s%s%s%s%s%s",
encryptflag ? "-x " : "",
- iamrecursive ? " -r" : "", pflag ? " -p" : "",
+ iamrecursive ? " -r" : "", pflag ? " -p" : "",
targetshouldbedirectory ? " -d" : "",
krb_realm != NULL ? " -k " : "",
krb_realm != NULL ? krb_realm : "",
@@ -303,10 +303,10 @@ int main(argc, argv)
#else /* !KERBEROS */
(void) snprintf(cmd, sizeof(cmdbuf), "rcp%s%s%s",
- iamrecursive ? " -r" : "", pflag ? " -p" : "",
+ iamrecursive ? " -r" : "", pflag ? " -p" : "",
targetshouldbedirectory ? " -d" : "");
#endif /* KERBEROS */
-
+
#ifdef POSIX_SIGNALS
(void) sigemptyset(&sa.sa_mask);
sa.sa_flags = 0;
@@ -316,19 +316,19 @@ int main(argc, argv)
(void) signal(SIGPIPE, lostconn);
#endif
targ = colon(argv[argc - 1]);
-
+
/* Check if target machine is the current machine. */
-
+
gethostname(curhost, sizeof(curhost));
if (targ) { /* ... to remote */
*targ++ = 0;
if (hosteq(argv[argc - 1], curhost)) {
-
+
/* If so, pretend there wasn't even one given
* check for an argument of just "host:", it
* should become "."
*/
-
+
if (*targ == 0) {
targ = ".";
argv[argc - 1] = targ;
@@ -407,7 +407,7 @@ int main(argc, argv)
0,
"host",
krb_realm,
- &cred,
+ &cred,
0, /* No seq # */
0, /* No server seq # */
(struct sockaddr_in *) 0,
@@ -469,9 +469,9 @@ int main(argc, argv)
if (src) {
*src++ = 0;
if (hosteq(argv[i], curhost)) {
-
+
/* If so, pretend src machine never given */
-
+
if (*src == 0) {
error("rcp: no path given in arg: %s:\n",
argv[i]);
@@ -518,7 +518,7 @@ int main(argc, argv)
0,
"host",
krb_realm,
- &cred,
+ &cred,
0, /* No seq # */
0, /* No server seq # */
(struct sockaddr_in *) 0,
@@ -553,8 +553,8 @@ int main(argc, argv)
rcmd_stream_init_krb5(key, encryptflag, 0, 1, kcmd_proto);
}
- rem = sock;
-
+ rem = sock;
+
euid = geteuid();
if (euid == 0) {
if (setuid(0)) {
@@ -611,7 +611,7 @@ void verifydir(cp)
char *cp;
{
struct stat stb;
-
+
if (stat(cp, &stb) >= 0) {
if ((stb.st_mode & S_IFMT) == S_IFDIR)
return;
@@ -626,7 +626,7 @@ void verifydir(cp)
char *colon(cp)
char *cp;
{
-
+
while (*cp) {
if (*cp == ':')
return (cp);
@@ -644,7 +644,7 @@ int okname(cp0)
{
register char *cp = cp0;
register int c;
-
+
do {
c = *cp;
if (c & 0200)
@@ -671,7 +671,7 @@ int susystem(s)
#else
register krb5_sigtype (bsd_context, *istat)(), (*qstat)();
#endif
-
+
if ((pid = vfork()) == 0) {
execl("/bin/sh", "sh", "-c", s, (char *)0);
_exit(127);
@@ -687,7 +687,7 @@ int susystem(s)
istat = signal(SIGINT, SIG_IGN);
qstat = signal(SIGQUIT, SIG_IGN);
#endif
-
+
#ifdef HAVE_WAITPID
w = waitpid(pid, &status, 0);
#else
@@ -699,11 +699,11 @@ int susystem(s)
#ifdef POSIX_SIGNALS
(void) sigaction(SIGINT, &isa, (struct sigaction *)0);
(void) sigaction(SIGQUIT, &qsa, (struct sigaction *)0);
-#else
+#else
(void) signal(SIGINT, istat);
(void) signal(SIGQUIT, qstat);
#endif
-
+
return (status);
}
@@ -719,7 +719,7 @@ void source(argc, argv)
unsigned int amt;
off_t i;
char buf[RCP_BUFSIZ];
-
+
for (x = 0; x < argc; x++) {
name = argv[x];
if ((f = open(name, 0)) < 0) {
@@ -729,10 +729,10 @@ void source(argc, argv)
if (fstat(f, &stb) < 0)
goto notreg;
switch (stb.st_mode&S_IFMT) {
-
+
case S_IFREG:
break;
-
+
case S_IFDIR:
if (iamrecursive) {
(void) close(f);
@@ -814,7 +814,7 @@ void rsource(name, statp)
#endif
char buf[RCP_BUFSIZ];
char *bufv[1];
-
+
if (d == 0) {
error("rcp: %s: %s\n", name, error_message(errno));
return;
@@ -866,10 +866,10 @@ int response()
if (rcmd_stream_read(rem, &resp, 1, 0) != 1)
lostconn(0);
switch (resp) {
-
+
case 0: /* ok */
return (0);
-
+
default:
*cp++ = resp;
/* fall into... */
@@ -947,7 +947,7 @@ void sink(argc, argv)
#define atime tv[0]
#define mtime tv[1]
#define SCREWUP(str) { whopp = str; goto screwup; }
-
+
if (!pflag)
(void) umask(mask);
if (argc != 1) {
@@ -985,7 +985,7 @@ void sink(argc, argv)
ga();
return;
}
-
+
#define getnum(t) (t) = 0; while (isdigit((int) *cp)) (t) = (t) * 10 + (*cp++ - '0');
if (*cp == 'T') {
setimes++;
@@ -1123,7 +1123,7 @@ void sink(argc, argv)
if (utimes(nambuf, tv) < 0)
error("rcp: can't set times on %s: %s\n",
nambuf, error_message(errno));
- }
+ }
if (wrerr)
error("rcp: %s: %s\n", nambuf, error_message(errno));
else
@@ -1142,7 +1142,7 @@ struct buffer *allocbuf(bp, fd, blksize)
{
struct stat stb;
int size;
-
+
if (fstat(fd, &stb) < 0) {
error("rcp: fstat: %s\n", error_message(errno));
return (NULLBUF);
@@ -1212,21 +1212,21 @@ int hosteq(h1, h2)
{
struct hostent *h_ptr;
char hname1[256];
-
+
if (forcenet)
return(0);
/* get the official names for the two hosts */
-
+
if ((h_ptr = gethostbyname(h1)) == NULL)
return(0);
strncpy(hname1, h_ptr->h_name, sizeof (hname1));
hname1[sizeof (hname1) - 1] = '\0';
if ((h_ptr = gethostbyname(h2)) == NULL)
return(0);
-
+
/*return if they are equal (strcmp returns 0 for equal - I return 1) */
-
+
return(!strcmp(hname1, h_ptr->h_name));
}
@@ -1259,7 +1259,7 @@ char **save_argv(argc, argv)
char **argv;
{
register int i;
-
+
char **local_argv = (char **)calloc((unsigned) argc+1,
(unsigned) sizeof(char *));
/* allocate an extra pointer, so that it is initialized to NULL
@@ -1292,7 +1292,7 @@ void
krb5_ccache cc;
krb5_error_code status;
krb5_auth_context auth_context = NULL;
-
+
if (config_file) {
const char * filenames[2];
filenames[1] = NULL;
@@ -1300,17 +1300,17 @@ void
if ((status = krb5_set_config_files(bsd_context, filenames)))
exit(1);
}
-
+
memset (&creds, 0, sizeof(creds));
if ((status = krb5_read_message(bsd_context, (krb5_pointer)&rem,
&pname_data)))
exit(1);
-
+
if ((status = krb5_read_message(bsd_context, (krb5_pointer) &rem,
&creds.second_ticket)))
exit(1);
-
+
if (ccache_file == NULL) {
if ((status = krb5_cc_default(bsd_context, &cc)))
exit(1);
@@ -1328,7 +1328,7 @@ void
krb5_free_data_contents(bsd_context, &pname_data);
- if ((status = krb5_get_credentials(bsd_context, KRB5_GC_USER_USER, cc,
+ if ((status = krb5_get_credentials(bsd_context, KRB5_GC_USER_USER, cc,
&creds, &new_creds)))
exit(1);
@@ -1336,16 +1336,16 @@ void
AP_OPTS_USE_SESSION_KEY,
NULL, new_creds, &msg)))
exit(1);
-
+
if ((status = krb5_write_message(bsd_context, (krb5_pointer) &rem,
&msg))) {
krb5_free_data_contents(bsd_context, &msg);
exit(1);
}
-
+
rcmd_stream_init_krb5(&new_creds->keyblock, encryptflag, 0, 0,
KCMD_OLD_PROTOCOL);
-
+
/* cleanup */
krb5_free_cred_contents(bsd_context, &creds);
krb5_free_creds(bsd_context, new_creds);
diff --git a/src/appl/bsd/krlogin.c b/src/appl/bsd/krlogin.c
index 0272b44..0a00e37 100644
--- a/src/appl/bsd/krlogin.c
+++ b/src/appl/bsd/krlogin.c
@@ -21,14 +21,14 @@
/*
* Copyright (C) 1998 by the FundsXpress, INC.
- *
+ *
* All rights reserved.
- *
+ *
* Export of this software from the United States of America may require
* a specific license from the United States Government. It is the
* responsibility of any person or organization contemplating export to
* obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -39,7 +39,7 @@
* permission. FundsXpress makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ *
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -53,11 +53,11 @@ char copyright[] =
/* based on @(#)rlogin.c 5.12 (Berkeley) 9/19/88 */
-
+
/*
* rlogin - remote login
*/
-
+
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
@@ -86,7 +86,7 @@ char copyright[] =
#include <signal.h>
#include <setjmp.h>
#include <netdb.h>
-
+
#ifdef HAVE_SYS_FILIO_H
/* Solaris needs <sys/filio.h> for FIONREAD */
#include <sys/filio.h>
@@ -158,7 +158,7 @@ char copyright[] =
#include <krb5.h>
#include <com_err.h>
#include "defines.h"
-
+
#define RLOGIN_BUFSIZ 5120
void try_normal();
@@ -319,7 +319,7 @@ struct winsize *wp;
if ((error = ioctl(0, TIOCGSIZE, &ts)) != 0)
return (error);
#endif
-
+
wp->ws_row = ts.ts_lines;
wp->ws_col = ts.ts_cols;
wp->ws_xpixel = 0;
@@ -535,12 +535,12 @@ main(argc, argv)
#ifdef KERBEROS
/*
* if there is an entry in /etc/services for Kerberos login,
- * attempt to login with Kerberos.
+ * attempt to login with Kerberos.
* If we fail at any step, use the standard rlogin
*/
if (encrypt_flag)
sp = getservbyname("eklogin","tcp");
- else
+ else
sp = getservbyname("klogin","tcp");
if (sp == 0) {
sp = &defaultservent; /* ANL */
@@ -590,7 +590,7 @@ main(argc, argv)
}
#endif
(void) get_window_size(0, &winsize);
-
+
#ifdef POSIX_TERMIOS
tcgetattr(0, &defmodes);
tcgetattr(0, &ixon_state);
@@ -610,7 +610,7 @@ main(argc, argv)
sa.sa_flags = 0;
sa.sa_handler = lostpeer;
(void) sigaction(SIGPIPE, &sa, (struct sigaction *)0);
-
+
(void) sigemptyset(&urgmask);
(void) sigaddset(&urgmask, SIGUSR1);
oldmask = &omask;
@@ -667,9 +667,9 @@ main(argc, argv)
rcmd_stream_init_krb5(key, encrypt_flag, 1, 1, kcmd_proto);
}
-
+
rem = sock;
-
+
#else
rem = rcmd(&host, port,
null_local_username ? "" : pwd->pw_name,
@@ -678,7 +678,7 @@ main(argc, argv)
if (rem < 0)
exit(1);
-
+
if (options & SO_DEBUG &&
setsockopt(rem, SOL_SOCKET, SO_DEBUG, (char*)&on, sizeof (on)) < 0)
perror("rlogin: setsockopt (SO_DEBUG)");
@@ -711,12 +711,12 @@ static int confirm_death ()
char input;
int answer;
if (!confirm) return (1); /* no confirm, just die */
-
+
if (gethostname (hostname, sizeof(hostname)-1) != 0)
strlcpy (hostname, "???", sizeof(hostname));
else
hostname[sizeof(hostname)-1] = '\0';
-
+
fprintf (stderr, "\r\nKill session on %s from %s (y/n)? ",
host, hostname);
fflush (stderr);
@@ -800,7 +800,7 @@ static void doit(oldmask)
#else
struct sgttyb sb;
#endif
-
+
(void) ioctl(0, TIOCGETP, (char *)&sb);
defflags = sb.sg_flags;
#ifdef USE_TERMIO
@@ -857,13 +857,13 @@ static void doit(oldmask)
prf("\007Connection closed.");
exit(3);
}
-
+
#ifdef POSIX_SIGNALS
/* "sa" has already been initialized above. */
sa.sa_handler = writeroob;
(void) sigaction(SIGUSR1, &sa, (struct sigaction *)0);
-
+
sigprocmask(SIG_SETMASK, oldmask, (sigset_t*)0);
sa.sa_handler = catchild;
@@ -893,7 +893,7 @@ setsignal(sig, act)
#ifdef POSIX_SIGNALS
sigset_t omask, igmask;
struct sigaction sa;
-
+
sigemptyset(&igmask);
sigaddset(&igmask, sig);
sigprocmask(SIG_BLOCK, &igmask, &omask);
@@ -904,7 +904,7 @@ setsignal(sig, act)
int omask = sigblock(sigmask(sig));
#endif
#endif /* POSIX_SIGNALS */
-
+
#ifdef POSIX_SIGNALS
(void) sigaction(sig, (struct sigaction *)0, &sa);
if (sa.sa_handler != SIG_IGN) {
@@ -914,7 +914,7 @@ setsignal(sig, act)
(void) sigaction(sig, &sa, (struct sigaction *)0);
}
sigprocmask(SIG_SETMASK, &omask, (sigset_t*)0);
-#else
+#else
if (signal(sig, act) == SIG_IGN)
(void) signal(sig, SIG_IGN);
#ifndef sgi
@@ -935,7 +935,7 @@ done(status)
#ifndef HAVE_WAITPID
pid_t w;
#endif
-
+
mode(0);
if (child > 0) {
/* make sure catchild does not snap it up */
@@ -947,7 +947,7 @@ done(status)
#else
(void) signal(SIGCHLD, SIG_DFL);
#endif
-
+
if (kill(child, SIGKILL) >= 0) {
#ifdef HAVE_WAITPID
(void) waitpid(child, 0, 0);
@@ -976,7 +976,7 @@ int signo;
#ifdef POSIX_SIGNALS
struct sigaction sa;
#endif
-
+
if (dosigwinch == 0) {
sendwindow();
#ifdef POSIX_SIGNALS
@@ -1003,7 +1003,7 @@ int signo;
union wait status;
#endif
int pid;
-
+
again:
#ifdef HAVE_WAITPID
pid = waitpid(-1, &status, WNOHANG|WUNTRACED);
@@ -1041,10 +1041,10 @@ static void writer()
was encountered */
char c;
-#ifdef ultrix
+#ifdef ultrix
fd_set waitread;
register n;
-
+
/* we need to wait until the reader() has set up the terminal, else
the read() below may block and not unblock when the terminal
state is reset.
@@ -1067,11 +1067,11 @@ static void writer()
/* This loop works as follows. Call read_wrapper to get data until
we would block or until we read a cmdchar at the beginning of a line.
- If got_esc is false, we just send everything we got back. If got_esc
- is true, we send everything except the cmdchar at the end and look at
+ If got_esc is false, we just send everything we got back. If got_esc
+ is true, we send everything except the cmdchar at the end and look at
the next char. If its a "." we break out of the loop and terminate.
If its ^Z or ^Y we call stop with the value of the char and continue.
- If its none of those, we send the cmdchar and then send the char we
+ If its none of those, we send the cmdchar and then send the char we
just read, unless that char is also the cmdchar (in which case we are
only supposed to send one of them). When this loop ends, so does the
program.
@@ -1081,12 +1081,12 @@ static void writer()
/* read until we would block or we get a cmdchar */
n_read = read_wrapper(0,buf,sizeof(buf),&got_esc);
-
+
/* if read returns an error or 0 bytes, just quit */
if (n_read <= 0) {
break;
}
-
+
if (!got_esc) {
if (rcmd_stream_write(rem, buf, (unsigned) n_read, 0) == 0) {
prf("line gone");
@@ -1108,22 +1108,22 @@ static void writer()
}
#ifdef POSIX_TERMIOS
- if (c == '.' || c == deftty.c_cc[VEOF])
+ if (c == '.' || c == deftty.c_cc[VEOF])
#else
- if (c == '.' || c == deftc.t_eofc)
+ if (c == '.' || c == deftc.t_eofc)
#endif
{
if (confirm_death()) {
echo(c);
- break;
+ break;
}
}
#ifdef POSIX_TERMIOS
if ( (
- (c == deftty.c_cc[VSUSP])
+ (c == deftty.c_cc[VSUSP])
#ifdef VDSUSP
- || (c == deftty.c_cc[VDSUSP])
+ || (c == deftty.c_cc[VDSUSP])
#endif
)
&& !no_local_escape) {
@@ -1142,7 +1142,7 @@ static void writer()
#endif /*TIOCGLTC*/
#endif
-
+
if (c != cmdchar) {
rcmd_stream_write(rem, &cmdchar, 1, 0);
}
@@ -1160,15 +1160,15 @@ static void writer()
copy more than size bytes. In addition, if it encounters a cmdchar
at the beginning of a line, it will copy everything up to and including
the cmdchar, but nothing after that. In this instance *esc_char is set
- to true and any remaining data is buffered and copied on a subsequent
+ to true and any remaining data is buffered and copied on a subsequent
call. Otherwise, *esc_char will be set to false and the minimum of size,
1024, and the number of bytes that can be read without blocking will
- be copied. In all cases, a non-negative return value indicates the number
+ be copied. In all cases, a non-negative return value indicates the number
of bytes actually copied and a return value of -1 indicates that there
- was a read error (other than EINTR) and errno is set appropriately.
+ was a read error (other than EINTR) and errno is set appropriately.
*/
-static int read_wrapper(fd,buf,size,got_esc)
+static int read_wrapper(fd,buf,size,got_esc)
int fd;
char *buf;
int size;
@@ -1201,7 +1201,7 @@ static int read_wrapper(fd,buf,size,got_esc)
*/
while (data_start+return_length < data_end && return_length < size) {
-
+
c = *(data_start+return_length);
return_length++;
@@ -1215,14 +1215,14 @@ static int read_wrapper(fd,buf,size,got_esc)
bol = (c == deftty.c_cc[VKILL] ||
c == deftty.c_cc[VINTR] ||
c == '\r' || c == '\n');
-
+
#else /* !POSIX_TERMIOS */
bol = c == defkill || c == deftc.t_eofc ||
c == deftc.t_intrc || c == defltc.t_suspc ||
c == '\r' || c == '\n';
#endif
}
-
+
memcpy(buf, data_start, return_length);
data_start = data_start + return_length;
return return_length;
@@ -1233,7 +1233,7 @@ static void echo(c)
{
char buf[8];
register char *p = buf;
-
+
c &= 0177;
*p++ = cmdchar;
if (c < ' ') {
@@ -1257,7 +1257,7 @@ static void stop(cmdc)
#ifdef POSIX_SIGNALS
struct sigaction sa;
#endif
-
+
mode(0);
#ifdef POSIX_SIGNALS
@@ -1268,7 +1268,7 @@ static void stop(cmdc)
#else
(void) signal(SIGCHLD, SIG_IGN);
#endif
-
+
#ifdef POSIX_TERMIOS
(void) kill(cmdc == deftty.c_cc[VSUSP] ? 0 : getpid(), SIGTSTP);
#else
@@ -1282,7 +1282,7 @@ static void stop(cmdc)
#else
(void) signal(SIGCHLD, catchild);
#endif
-
+
mode(1);
sigwinch(SIGWINCH); /* check for size changes */
}
@@ -1294,7 +1294,7 @@ krb5_sigtype
int signo;
{
struct winsize ws;
-
+
if (dosigwinch && get_window_size(0, &ws) == 0 &&
memcmp(&winsize, &ws, sizeof (ws))) {
winsize = ws;
@@ -1311,7 +1311,7 @@ static void sendwindow()
{
char obuf[4 + sizeof (struct winsize)];
struct winsize *wp = (struct winsize *)(void *)(obuf+4);
-
+
obuf[0] = 0377;
obuf[1] = 0377;
obuf[2] = 's';
@@ -1424,7 +1424,7 @@ void oob()
int atmark, n;
mark = 0;
-
+
recv(rem, &mark, 1, MSG_OOB);
if (server_message(mark)) {
@@ -1445,7 +1445,7 @@ void oob()
/* two control messages are defined:
a double flag byte of 'o' indicates a one-byte message which is
- identical to what was once carried out of band.
+ identical to what was once carried out of band.
a double flag byte of 'q' indicates a zero-byte message. This
message is interpreted as two \377 data bytes. This is just a
@@ -1471,9 +1471,9 @@ static int control(cp, n)
}
/*
- * reader: read from remote: line -> 1
+ * reader: read from remote: line -> 1
*/
-static int
+static int
reader(oldmask)
#ifdef POSIX_SIGNALS
sigset_t *oldmask;
@@ -1495,10 +1495,10 @@ reader(oldmask)
sa.sa_handler = SIG_IGN;
(void) sigaction(SIGTTOU, &sa, (struct sigaction *)0);
-#else
+#else
(void) signal(SIGTTOU, SIG_IGN);
#endif
-
+
ppid = getppid();
FD_ZERO(&readset);
FD_ZERO(&excset);
@@ -1606,7 +1606,7 @@ int f;
/* there's a POSIX way of doing this, but do we need it general? */
newtty.c_cc[VLNEXT] = _POSIX_VDISABLE;
#endif
-
+
newtty.c_lflag &= ~(ICANON|ISIG|ECHO|IEXTEN);
newtty.c_iflag &= ~(ISTRIP|INLCR|ICRNL);
@@ -1648,10 +1648,10 @@ int f;
int lflags;
(void) ioctl(0, TIOCLGET, (char *)&lflags);
#endif
-
+
(void) ioctl(0, TIOCGETP, (char *)&sb);
switch (f) {
-
+
case 0:
#ifdef USE_TERMIO
/*
@@ -1674,7 +1674,7 @@ int f;
#endif
ltc = &defltc;
break;
-
+
case 1:
#ifdef USE_TERMIO
/*
@@ -1722,10 +1722,10 @@ int f;
tc = &notc;
sb.sg_flags &= ~defflags;
#endif /* USE_TERMIO */
-
+
ltc = &noltc;
break;
-
+
default:
return;
}
@@ -1758,7 +1758,7 @@ void try_normal(argv)
#ifdef POSIX_SIGNALS
sigset_t mask;
#endif
-
+
#ifndef KRB5_ATHENA_COMPAT
if (encrypt_flag)
exit(1);
@@ -1766,7 +1766,7 @@ void try_normal(argv)
fprintf(stderr,"trying normal rlogin (%s)\n",
UCB_RLOGIN);
fflush(stderr);
-
+
nhost = strrchr(argv[0], '/');
if (nhost)
nhost++;
@@ -1774,7 +1774,7 @@ void try_normal(argv)
nhost = argv[0];
if (!strcmp(nhost, "rlogin") || !strcmp(nhost, "rsh"))
argv[0] = UCB_RLOGIN;
-
+
#ifdef POSIX_SIGNALS
sigemptyset(&mask);
sigprocmask(SIG_SETMASK, &mask, NULL);
@@ -1801,7 +1801,7 @@ krb5_sigtype lostpeer(signo)
#else
(void) signal(SIGPIPE, SIG_IGN);
#endif
-
+
prf("\007Connection closed.");
done(1);
}
diff --git a/src/appl/bsd/krlogind.c b/src/appl/bsd/krlogind.c
index 09aeaad..cc7acad 100644
--- a/src/appl/bsd/krlogind.c
+++ b/src/appl/bsd/krlogind.c
@@ -21,14 +21,14 @@
/*
* Copyright (C) 1998 by the FundsXpress, INC.
- *
+ *
* All rights reserved.
- *
+ *
* Export of this software from the United States of America may require
* a specific license from the United States Government. It is the
* responsibility of any person or organization contemplating export to
* obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -39,7 +39,7 @@
* permission. FundsXpress makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ *
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -52,7 +52,7 @@ char copyright[] =
#endif /* not lint */
/* based on @(#)rlogind.c 5.17 (Berkeley) 8/31/88 */
-
+
/*
* remote login server:
* remuser\0
@@ -60,45 +60,45 @@ char copyright[] =
* terminal info\0
* data
*/
-
+
/*
- * This is the rlogin daemon. The very basic protocol for checking
+ * This is the rlogin daemon. The very basic protocol for checking
* authentication and authorization is:
* 1) Check authentication.
- * 2) Check authorization via the access-control files:
+ * 2) Check authorization via the access-control files:
* ~/.k5login (using krb5_kuserok) and/or
* 3) Prompt for password if any checks fail, or if so configured.
- * Allow login if all goes well either by calling the accompanying
- * login.krb5 or /bin/login, according to the definition of
+ * Allow login if all goes well either by calling the accompanying
+ * login.krb5 or /bin/login, according to the definition of
* DO_NOT_USE_K_LOGIN.l
- *
- * The configuration is done either by command-line arguments passed by
+ *
+ * The configuration is done either by command-line arguments passed by
* inetd, or by the name of the daemon. If command-line arguments are
* present, they take priority. The options are:
* -k means trust krb5
* -p and -P means prompt for password.
- * If the -P option is passed, then the password is verified in
+ * If the -P option is passed, then the password is verified in
* addition to all other checks. If -p is not passed with -k or -r,
* and both checks fail, then login permission is denied.
* - -e means use encryption.
*
- * If no command-line arguments are present, then the presence of the
- * letters kKrRexpP in the program-name before "logind" determine the
+ * If no command-line arguments are present, then the presence of the
+ * letters kKrRexpP in the program-name before "logind" determine the
* behaviour of the program exactly as with the command-line arguments.
*
* If the ruserok check is to be used, then the client should connect
* from a privileged port, else deny permission.
- */
-
+ */
+
/* DEFINES:
* KERBEROS - Define this if application is to be kerberised.
* CRYPT - Define this if encryption is to be an option.
* DO_NOT_USE_K_LOGIN - Define this if you want to use /bin/login
- * instead of the accompanying login.krb5.
+ * instead of the accompanying login.krb5.
* LOG_ALL_LOGINS - Define this if you want to log all logins.
* LOG_OTHER_USERS - Define this if you want to log all principals
* that do not map onto the local user.
- * LOG_REMOTE_REALM - Define this if you want to log all principals from
+ * LOG_REMOTE_REALM - Define this if you want to log all principals from
* remote realms.
* Note: Root logins are always logged.
*/
@@ -139,14 +139,14 @@ char copyright[] =
#include <netinet/in.h>
#include <errno.h>
#include <pwd.h>
-
+
#ifdef HAVE_SYS_LABEL_H
/* only SunOS 4? */
#include <sys/label.h>
#include <sys/audit.h>
#include <pwdadj.h>
#endif
-
+
#include <signal.h>
#if defined(hpux) || defined(__hpux)
@@ -219,7 +219,7 @@ struct winsize {
unsigned short ws_xpixel, ws_ypixel;
};
#endif /* NO_WINSIZE */
-
+
#ifndef roundup
#define roundup(x,y) ((((x)+(y)-1)/(y))*(y))
#endif
@@ -227,7 +227,7 @@ struct winsize {
#include "fake-addrinfo.h"
#ifdef KERBEROS
-
+
#include "k5-int.h"
#include <libpty.h>
#ifdef HAVE_UTMP_H
@@ -240,7 +240,7 @@ int non_privileged = 0; /* set when connection is seen to be from */
#include "com_err.h"
#include "defines.h"
-
+
#define SECURE_MESSAGE "This rlogin session is encrypting all data transmissions.\r\n"
krb5_authenticator *kdata;
@@ -338,21 +338,21 @@ int main(argc, argv)
#ifdef KERBEROS
krb5_error_code status;
#endif
-
+
progname = *argv;
-
+
pty_init();
-
+
#ifndef LOG_NDELAY
#define LOG_NDELAY 0
#endif
-
+
#ifndef LOG_AUTH /* 4.2 syslog */
openlog(progname, LOG_PID | LOG_NDELAY);
#else
openlog(progname, LOG_PID | LOG_NDELAY, LOG_AUTH);
#endif /* 4.2 syslog */
-
+
#ifdef KERBEROS
status = krb5_init_context(&bsd_context);
if (status) {
@@ -361,7 +361,7 @@ int main(argc, argv)
exit(1);
}
#endif
-
+
/* Analyse parameters. */
opterr = 0;
while ((ch = getopt(argc, argv, ARGSTR)) != -1)
@@ -369,7 +369,7 @@ int main(argc, argv)
#ifdef KERBEROS
case 'k':
break;
-
+
case '5':
break;
case 'c':
@@ -378,7 +378,7 @@ int main(argc, argv)
case 'i':
checksum_ignored = 1;
break;
-
+
#ifdef CRYPT
case 'x': /* Use encryption. */
case 'X':
@@ -442,7 +442,7 @@ int main(argc, argv)
}
argc -= optind;
argv += optind;
-
+
fromlen = sizeof (from);
if (debug_port || do_fork) {
@@ -582,10 +582,10 @@ void doit(f, fromp)
syslog( LOG_CRIT, "Checksums are required and ignored; these options are mutually exclusive--check the documentation.");
fatal(f, "Configuration error: mutually exclusive options specified");
}
-
+
alarm(60);
read(f, &c, 1);
-
+
if (c != 0){
exit(1);
}
@@ -594,7 +594,7 @@ void doit(f, fromp)
/* Initialize syncpipe */
if (pipe( syncpipe ) < 0 )
fatalperror ( f , "");
-
+
#ifdef POSIX_SIGNALS
/* Initialize "sa" structure. */
@@ -608,7 +608,7 @@ void doit(f, fromp)
fatal(f, gai_strerror(retval));
strncpy(rhost_addra, hname, sizeof(rhost_addra));
rhost_addra[sizeof (rhost_addra) -1] = '\0';
-
+
retval = getnameinfo(fromp, socklen(fromp), hname, sizeof(hname), 0, 0, 0);
if (retval)
fatal(f, gai_strerror(retval));
@@ -620,16 +620,16 @@ void doit(f, fromp)
/* Not a real problem, we just haven't bothered to update
the port number checking code to handle ipv6. */
fatal(f, "Permission denied - Malformed from address\n");
-
+
if (fromp->sin_port >= IPPORT_RESERVED ||
fromp->sin_port < IPPORT_RESERVED/2)
fatal(f, "Permission denied - Connection from bad port");
#endif /* KERBEROS */
-
+
/* Set global netf to f now : we may need to drop everything
in do_krb_login. */
netf = f;
-
+
#if defined(KERBEROS)
/* All validation, and authorization goes through do_krb_login() */
do_krb_login(rhost_addra, rhost_name);
@@ -639,18 +639,18 @@ void doit(f, fromp)
getstr(f, term, sizeof(term), "Terminal type");
rcmd_stream_init_normal();
#endif
-
+
write(f, "", 1);
if ((retval = pty_getpty(&p,line, sizeof(line)))) {
com_err(progname, retval, "while getting master pty");
exit(2);
}
-
+
Pfd = p;
#ifdef TIOCSWINSZ
(void) ioctl(p, TIOCSWINSZ, &win);
#endif
-
+
#ifdef POSIX_SIGNALS
sa.sa_handler = cleanup;
(void) sigaction(SIGCHLD, &sa, (struct sigaction *)0);
@@ -672,7 +672,7 @@ void doit(f, fromp)
fatal(f, error_message(retval));
exit(1);
}
-
+
#if defined(POSIX_TERMIOS) && !defined(ultrix)
tcgetattr(t,&new_termio);
@@ -697,7 +697,7 @@ void doit(f, fromp)
#endif /* POSIX_TERMIOS */
pid = 0; /*reset pid incase exec fails*/
-
+
/*
** signal the parent that we have turned off echo
** on the slave side of the pty ... he's waiting
@@ -709,16 +709,16 @@ void doit(f, fromp)
(void) write(syncpipe[1], &c, 1);
(void) close(syncpipe[1]);
(void) close(syncpipe[0]);
-
+
close(f), close(p);
dup2(t, 0), dup2(t, 1), dup2(t, 2);
if (t > 2)
close(t);
-
+
#if defined(sysvimp)
setcompat (COMPAT_CLRPGROUP | (getcompat() & ~COMPAT_BSDTTY));
#endif
-
+
/* Log access to account */
pwd = (struct passwd *) getpwnam(lusername);
if (pwd && (pwd->pw_uid == 0)) {
@@ -727,7 +727,7 @@ void doit(f, fromp)
krusername ? krusername : "",
rusername, rhost_addra, rhost_name);
else
- syslog(LOG_NOTICE, "ROOT login by %s (%s@%s (%s))",
+ syslog(LOG_NOTICE, "ROOT login by %s (%s@%s (%s))",
krusername ? krusername : "",
rusername, rhost_addra, rhost_name);
}
@@ -736,8 +736,8 @@ void doit(f, fromp)
/* Log if principal is from a remote realm */
else if (client && !default_realm(client))
#endif /* LOG_REMOTE_REALM */
-
-#if defined(LOG_OTHER_USERS) && !defined(LOG_ALL_LOGINS)
+
+#if defined(LOG_OTHER_USERS) && !defined(LOG_ALL_LOGINS)
/* Log if principal name does not map to local username */
else if (client && !princ_maps_to_lname(client, lusername))
#endif /* LOG_OTHER_USERS */
@@ -753,11 +753,11 @@ void doit(f, fromp)
"login by %s (%s@%s (%s)) as %s forcing password access",
krusername ? krusername : "", rusername,
rhost_addra, rhost_name, lusername);
- else
+ else
syslog(LOG_NOTICE,
"login by %s (%s@%s (%s)) as %s",
krusername ? krusername : "", rusername,
- rhost_addra, rhost_name, lusername);
+ rhost_addra, rhost_name, lusername);
}
#endif /* LOG_REMOTE_REALM || LOG_OTHER_USERS || LOG_ALL_LOGINS */
#endif /* KERBEROS */
@@ -771,8 +771,8 @@ void doit(f, fromp)
#endif
#ifdef USE_LOGIN_F
-/* use the vendors login, which has -p and -f. Tested on
- * AIX 4.1.4 and HPUX 10
+/* use the vendors login, which has -p and -f. Tested on
+ * AIX 4.1.4 and HPUX 10
*/
{
char *cp;
@@ -807,7 +807,7 @@ void doit(f, fromp)
** turning off echo on the slave side ...
** The master blocks here until it reads a byte.
*/
-
+
(void) close(syncpipe[1]);
if (read(syncpipe[0], &c, 1) != 1) {
/*
@@ -818,8 +818,8 @@ void doit(f, fromp)
}
close(syncpipe[0]);
-
-#if defined(KERBEROS)
+
+#if defined(KERBEROS)
if (do_encrypt) {
if (rcmd_stream_write(f, SECURE_MESSAGE, sizeof(SECURE_MESSAGE), 0) < 0){
snprintf(buferror, sizeof(buferror),
@@ -827,7 +827,7 @@ void doit(f, fromp)
fatal(p,buferror);
}
}
- else
+ else
/*
* if encrypting, don't turn on NBIO, else the read/write routines
* will fail to work properly
@@ -846,7 +846,7 @@ void doit(f, fromp)
signal(SIGTSTP, SIG_IGN);
#endif
-
+
#if !defined(USE_LOGIN_F)
/* Pass down rusername and lusername to login. */
(void) write(p, rusername, strlen(rusername) +1);
@@ -877,7 +877,7 @@ unsigned char oobdata[] = {TIOCPKT_WINDOW};
char oobdata[] = {0};
#endif
-static
+static
void sendoob(fd, byte)
int fd;
char *byte;
@@ -915,7 +915,7 @@ static int control(pty, cp, n)
{
struct winsize w;
int pgrp, got_pgrp;
-
+
if (n < (int) 4+sizeof (w) || cp[2] != 's' || cp[3] != 's')
return (0);
#ifdef TIOCSWINSZ
@@ -956,11 +956,11 @@ void protocol(f, p)
register int tiocpkt_on = 0;
int on = 1;
#endif
-
+
#if defined(TIOCPKT) && !(defined(__svr4__) || defined(HAVE_STREAMS)) \
|| defined(solaris20)
/* if system has TIOCPKT, try to turn it on. Some drivers
- * may not support it. Save flag for later.
+ * may not support it. Save flag for later.
*/
if ( ioctl(p, TIOCPKT, &on) < 0)
tiocpkt_on = 0;
@@ -1016,11 +1016,11 @@ void protocol(f, p)
register unsigned char *cp;
int n;
size_t left;
-
+
if (fcc <= 0)
break;
fbp = fibuf;
-
+
for (cp = fibuf; cp < fibuf+fcc-1; cp++) {
if (cp[0] == magic[0] &&
cp[1] == magic[1]) {
@@ -1037,7 +1037,7 @@ void protocol(f, p)
}
}
}
-
+
if (FD_ISSET(p, &obits) && fcc > 0) {
cc = write(p, fbp, fcc);
if (cc > 0) {
@@ -1045,7 +1045,7 @@ void protocol(f, p)
fbp += cc;
}
}
-
+
if (FD_ISSET(p, &ibits)) {
pcc = read(p, pibuf, sizeof (pibuf));
pbp = pibuf;
@@ -1134,7 +1134,7 @@ void fatal(f, msg)
#ifdef POSIX_SIGNALS
struct sigaction sa;
#endif
-
+
buf[0] = '\01'; /* error indicator */
(void) snprintf(buf + 1, sizeof(buf) - 1, "%s: %s.\r\n", progname, msg);
if ((f == netf) && (pid > 0))
@@ -1169,7 +1169,7 @@ void fatalperror(f, msg)
const char *msg;
{
char buf[512];
-
+
(void) snprintf(buf, sizeof(buf), "%s: %s", msg, error_message(errno));
fatal(f, buf);
}
@@ -1199,10 +1199,10 @@ do_krb_login(host_addr, hostname)
fatal(netf, "Kerberos authentication failed");
return;
}
-
+
/* OK we have authenticated this user - now check authorization. */
/* The Kerberos authenticated programs must use krb5_kuserok or kuserok*/
-
+
/* krb5_kuserok returns 1 if OK */
if (!client || !krb5_kuserok(bsd_context, client, lusername)) {
if (asprintf(&msg_fail,
@@ -1216,7 +1216,7 @@ do_krb_login(host_addr, hostname)
if (checksum_required && !valid_checksum) {
syslog(LOG_WARNING, "Client did not supply required checksum--connection rejected.");
-
+
fatal(netf, "You are using an old Kerberos5 without initial connection support; only newer clients are authorized.");
}
}
@@ -1231,9 +1231,9 @@ void getstr(fd, buf, cnt, err)
int cnt;
char *err;
{
-
+
char c;
-
+
do {
if (read(fd, &c, 1) != 1) {
exit(1);
@@ -1251,10 +1251,10 @@ void getstr(fd, buf, cnt, err)
void usage()
{
#ifdef KERBEROS
- syslog(LOG_ERR,
+ syslog(LOG_ERR,
"usage: klogind [-ePf] [-D port] [-w[ip|maxhostlen[,[no]striplocal]]] or [r/R][k/K][x/e][p/P]logind");
#else
- syslog(LOG_ERR,
+ syslog(LOG_ERR,
"usage: rlogind [-rPf] [-D port] or [r/R][p/P]logind");
#endif
}
@@ -1290,7 +1290,7 @@ recvauth(valid_checksum)
if (getsockname(netf, (struct sockaddr *)&laddr, &len)) {
exit(1);
}
-
+
len = sizeof(peersin);
if (getpeername(netf, (struct sockaddr *)&peersin, &len)) {
syslog(LOG_ERR, "get peer name failed %d", netf);
@@ -1299,7 +1299,7 @@ recvauth(valid_checksum)
if ((status = krb5_auth_con_init(bsd_context, &auth_context)))
return status;
-
+
/* Only need remote address for rd_cred() to verify client */
if ((status = krb5_auth_con_genaddrs(bsd_context, auth_context, netf,
KRB5_AUTH_CONTEXT_GENERATE_REMOTE_FULL_ADDR)))
@@ -1387,7 +1387,7 @@ recvauth(valid_checksum)
krb5_free_authenticator(bsd_context, authenticator);
}
- if ((status = krb5_copy_principal(bsd_context, ticket->enc_part2->client,
+ if ((status = krb5_copy_principal(bsd_context, ticket->enc_part2->client,
&client)))
return status;
@@ -1415,12 +1415,12 @@ recvauth(valid_checksum)
if ((status = krb5_unparse_name(bsd_context, client, &krusername)))
return status;
-
+
if ((status = krb5_read_message(bsd_context, (krb5_pointer)&netf, &inbuf)))
fatal(netf, "Error reading message");
if ((inbuf.length) && /* Forwarding being done, read creds */
- (status = rd_and_store_for_creds(bsd_context, auth_context, &inbuf,
+ (status = rd_and_store_for_creds(bsd_context, auth_context, &inbuf,
ticket, &ccache))) {
fatal(netf, "Can't get forwarded credentials");
}
diff --git a/src/appl/bsd/krsh.c b/src/appl/bsd/krsh.c
index 1999bb5..028d3dd 100644
--- a/src/appl/bsd/krsh.c
+++ b/src/appl/bsd/krsh.c
@@ -73,7 +73,7 @@ char copyright[] =
#define SECURE_MESSAGE "This rsh session is encrypting input/output data transmissions.\r\n"
int error();
-
+
int options;
int rfd2;
int nflag;
@@ -104,11 +104,11 @@ void try_normal(char **);
#define RLOGIN_PROGRAM UCB_RLOGIN
#endif /* KERBEROS */
#endif /* !RLOGIN_PROGRAM */
-
+
#ifndef POSIX_SIGNALS
#define mask(s) (1 << ((s) - 1))
#endif /* POSIX_SIGNALS */
-
+
int
main(argc, argv0)
int argc;
@@ -142,12 +142,12 @@ main(argc, argv0)
memset(&defaultservent, 0, sizeof(struct servent));
if (strrchr(argv[0], '/'))
- argv[0] = strrchr(argv[0], '/')+1;
+ argv[0] = strrchr(argv[0], '/')+1;
if ( argc < 2 ) goto usage;
argc--;
argv++;
-
+
another:
if (argc > 0 && host == 0 && strncmp(*argv, "-", 1)) {
host = *argv;
@@ -316,14 +316,14 @@ main(argc, argv0)
if(debug_port == 0) {
#ifdef KERBEROS
sp = getservbyname("kshell", "tcp");
-#else
+#else
sp = getservbyname("shell", "tcp");
#endif /* KERBEROS */
if (sp == 0) {
#ifdef KERBEROS
sp = &defaultservent;
sp->s_port = htons(544);
-#else
+#else
fprintf(stderr, "rsh: shell/tcp: unknown service\n");
exit(1);
#endif /* KERBEROS */
@@ -345,7 +345,7 @@ main(argc, argv0)
if (fflag || Fflag)
authopts |= OPTS_FORWARD_CREDS;
if (Fflag)
- authopts |= OPTS_FORWARDABLE_CREDS;
+ authopts |= OPTS_FORWARDABLE_CREDS;
#ifdef HAVE_ISATTY
suppress = !isatty(fileno(stderr));
#endif
@@ -391,7 +391,7 @@ main(argc, argv0)
write(2,SECURE_MESSAGE, strlen(SECURE_MESSAGE));
}
#endif
-
+
#else /* !KERBEROS */
rem = rcmd(&host, debug_port, pwd->pw_name,
user ? user : pwd->pw_name, args, &rfd2);
@@ -461,7 +461,7 @@ main(argc, argv0)
char *bp;
int wc;
fd_set rembits;
-
+
(void) close(rfd2);
reread:
errno = 0;
@@ -493,7 +493,7 @@ main(argc, argv0)
goto rewrite;
done:
(void) shutdown(rem, 1);
-#ifdef KERBEROS
+#ifdef KERBEROS
krb5_free_context(bsd_context);
#endif
exit(0);
@@ -538,7 +538,7 @@ main(argc, argv0)
} while (FD_ISSET(rem, &readfrom) || FD_ISSET(rfd2, &readfrom));
if (nflag == 0)
(void) kill(pid, SIGKILL);
-#ifdef KERBEROS
+#ifdef KERBEROS
krb5_free_context(bsd_context);
#endif
exit(0);
@@ -565,7 +565,7 @@ void try_normal(argv)
char **argv;
{
char *host;
-
+
#ifndef KRB5_ATHENA_COMPAT
if (encrypt_flag)
exit(1);
@@ -581,10 +581,10 @@ void try_normal(argv)
host++;
else
host = argv[0];
-
+
if (!strcmp(host, "rsh"))
argv++;
-
+
fprintf(stderr,"trying normal rsh (%s)\n",
UCB_RSH);
fflush(stderr);
diff --git a/src/appl/bsd/krshd.c b/src/appl/bsd/krshd.c
index 59a088e..d491e6e 100644
--- a/src/appl/bsd/krshd.c
+++ b/src/appl/bsd/krshd.c
@@ -34,35 +34,35 @@ char copyright[] =
* command\0
* data
*/
-
+
/*
- * This is the rshell daemon. The very basic protocol for checking
+ * This is the rshell daemon. The very basic protocol for checking
* authentication and authorization is:
* 1) Check authentication.
* 2) Check authorization via the access-control files:
* ~/.k5login (using krb5_kuserok)
- * Execute command if configured authoriztion checks pass, else deny
+ * Execute command if configured authoriztion checks pass, else deny
* permission.
*/
-
+
/* DEFINES:
* KERBEROS - Define this if application is to be kerberised.
* LOG_ALL_LOGINS - Define this if you want to log all logins.
* LOG_OTHER_USERS - Define this if you want to log all principals that do
* not map onto the local user.
- * LOG_REMOTE_REALM - Define this if you want to log all principals from
+ * LOG_REMOTE_REALM - Define this if you want to log all principals from
* remote realms.
* LOG_CMD - Define this if you want to log not only the user but also the
* command executed. This only decides the type of information
- * logged. Whether or not to log is still decided by the above
+ * logged. Whether or not to log is still decided by the above
* three DEFINES.
* Note: Root account access is always logged.
*/
-
-#define SERVE_NON_KRB
+
+#define SERVE_NON_KRB
#define LOG_REMOTE_REALM
#define LOG_CMD
-
+
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
@@ -86,10 +86,10 @@ char copyright[] =
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
-
+
#include <netinet/in.h>
#include <arpa/inet.h>
-
+
#include <stdio.h>
#include <grp.h>
#include <errno.h>
@@ -98,7 +98,7 @@ char copyright[] =
#include <string.h>
#include <libpty.h>
#include <sys/wait.h>
-
+
#ifdef HAVE_SYS_LABEL_H
/* only SunOS 4? */
#include <sys/label.h>
@@ -126,13 +126,13 @@ char copyright[] =
#include <sys/unistd.h>
#include <path.h>
#endif /* CRAY */
-
+
#include <syslog.h>
#ifdef POSIX_TERMIOS
#include <termios.h>
#endif
-
+
#ifdef HAVE_SYS_FILIO_H
/* get FIONBIO from sys/filio.h, so what if it is a compatibility feature */
#include <sys/filio.h>
@@ -194,12 +194,12 @@ static krb5_error_code recvauth(int netfd, struct sockaddr *peersin,
#else /* !KERBEROS */
#define ARGSTR "RD:?"
-
+
#endif /* KERBEROS */
static int accept_a_connection (int debug_port, struct sockaddr *from,
socklen_t *fromlenp);
-
+
#ifndef HAVE_KILLPG
#define killpg(pid, sig) kill(-(pid), (sig))
#endif
@@ -226,7 +226,7 @@ void error (char *fmt, ...)
#endif
;
-void usage(void), getstr(int, char *, int, char *),
+void usage(void), getstr(int, char *, int, char *),
doit(int, struct sockaddr *);
#ifndef HAVE_INITGROUPS
@@ -263,10 +263,10 @@ int main(argc, argv)
#ifdef CRAY
secflag = sysconf(_SC_CRAY_SECURE_SYS);
#endif
-
+
progname = strrchr (*argv, '/');
progname = progname ? progname + 1 : *argv;
-
+
#ifndef LOG_ODELAY /* 4.2 syslog */
openlog(progname, LOG_PID);
#else
@@ -275,7 +275,7 @@ int main(argc, argv)
#endif
openlog(progname, LOG_PID | LOG_ODELAY, LOG_AUTH);
#endif /* 4.2 syslog */
-
+
#ifdef KERBEROS
status = krb5_init_context(&bsd_context);
if (status) {
@@ -284,7 +284,7 @@ int main(argc, argv)
exit(1);
}
#endif
-
+
/* Analyze parameters. */
opterr = 0;
while ((ch = getopt(argc, argv, ARGSTR)) != -1)
@@ -292,7 +292,7 @@ int main(argc, argv)
#ifdef KERBEROS
case 'k':
break;
-
+
case '5':
break;
case 'c':
@@ -301,7 +301,7 @@ int main(argc, argv)
case 'i':
checksum_ignored = 1;
break;
-
+
case 'e':
require_encrypt = 1;
break;
@@ -332,7 +332,7 @@ int main(argc, argv)
if(!save_env[num_env++]) {
com_err(progname, ENOMEM, "in saving environment");
exit(2);
- }
+ }
} else {
fprintf(stderr, "%s: Only %d -L arguments allowed\n",
progname, MAXENV);
@@ -376,10 +376,10 @@ int main(argc, argv)
usage();
exit(1);
}
-
+
argc -= optind;
argv += optind;
-
+
fromlen = sizeof (from);
if (debug_port)
@@ -454,16 +454,16 @@ char local_port[64+NI_MAXSERV]; /* = "KRB5LOCALPORT=" */
/* The following include extra space for TZ and MAXENV pointers... */
#define COMMONVARS homedir, shell, 0/*path*/, username, term
#ifdef CRAY
-char *envinit[] =
+char *envinit[] =
{COMMONVARS, "TZ=GMT0", tmpdir, SAVEENVPAD, KRBPAD, ADDRPAD, 0};
#define TMPDIRENV 6
char *getenv();
#else /* CRAY */
#ifdef KERBEROS
-char *envinit[] =
+char *envinit[] =
{COMMONVARS, 0/*tz*/, SAVEENVPAD, KRBPAD, ADDRPAD, 0};
#else /* KERBEROS */
-char *envinit[] =
+char *envinit[] =
{COMMONVARS, 0/*tz*/, SAVEENVPAD, ADDRPAD, 0};
#endif /* KERBEROS */
#endif /* CRAY */
@@ -486,7 +486,7 @@ int maxlogs;
#define NCARGS 1024
#endif
-#define NMAX 16
+#define NMAX 16
int pid;
char locuser[NMAX+1];
@@ -518,7 +518,7 @@ ignore_signals()
signal(SIGTERM, SIG_IGN);
signal(SIGPIPE, SIG_IGN);
signal(SIGHUP, SIG_IGN);
-
+
killpg(pid, SIGTERM);
#endif
}
@@ -529,7 +529,7 @@ cleanup(signumber)
{
ignore_signals();
wait(0);
-
+
pty_logwtmp(ttyn,"","");
syslog(LOG_INFO ,"Daemon terminated via signal %d.", signumber);
if (ccache)
@@ -569,7 +569,7 @@ void doit(f, fromp)
int packet_level; /* Packet classification level */
long packet_compart; /* Packet compartments */
#endif /* CRAY */
-
+
int s = -1;
char hostname[NI_MAXHOST];
char *sane_host;
@@ -599,8 +599,8 @@ void doit(f, fromp)
#endif
#endif
#endif /* IP_TOS */
-
- {
+
+ {
socklen_t sin_len = sizeof (localaddr);
if (getsockname(f, (struct sockaddr*)&localaddr, &sin_len) < 0) {
perror("getsockname");
@@ -649,9 +649,9 @@ void doit(f, fromp)
}
}
#endif /* KERBEROS */
-
+
#ifdef CRAY
-
+
/* If this is a secure system then get the packet classification
of f. ( Note IP_SECURITY is checked in get_packet_classification:
if it's not set then the user's (root) default
@@ -680,10 +680,10 @@ void doit(f, fromp)
exit(1);
}
}
-
+
}
#endif /* CRAY */
-
+
(void) alarm(60);
port = 0;
for (;;) {
@@ -772,7 +772,7 @@ void doit(f, fromp)
getstr(f, cmdbuf, sizeof(cmdbuf), "command");
rcmd_stream_init_normal();
#endif /* KERBEROS */
-
+
#ifdef CRAY
paddr = inet_addr(inet_ntoa(fromp->sin_addr));
if(secflag){
@@ -788,7 +788,7 @@ void doit(f, fromp)
}
}
#endif /* CRAY */
-
+
pwd = getpwnam(locuser);
if (pwd == (struct passwd *) 0 ) {
syslog(LOG_ERR ,
@@ -798,9 +798,9 @@ void doit(f, fromp)
error("Login incorrect.\n");
exit(1);
}
-
+
#ifdef CRAY
- /* Setup job entry, and validate udb entry.
+ /* Setup job entry, and validate udb entry.
( against packet level also ) */
if ((jid = setjob(pwd->pw_uid, 0)) < 0) {
error("Unable to create new job.\n");
@@ -836,7 +836,7 @@ void doit(f, fromp)
}
#ifndef NO_UDB
(void)getsysudb();
-
+
if ((ue = getudbnam(pwd->pw_name)) == (struct udb *)NULL) {
error("Unable to fetch account id.\n");
exit(1);
@@ -883,7 +883,7 @@ void doit(f, fromp)
open so close it here. */
#endif /* !NO_UDB */
#endif /*CRAY*/
-
+
/* Setup wtmp entry : we do it here so that if this is a CRAY
the Process Id is correct and we have not lost our trusted
privileges. */
@@ -898,13 +898,13 @@ void doit(f, fromp)
else {
pty_logwtmp(ttyn,locuser,sane_host);
}
-
+
#ifdef CRAY
-
+
/* If we are a secure system then we need to get rid of our
trusted facility, so that MAC on the chdir we work. Before we
do this make an entry into wtmp, and any other audit recording. */
-
+
if (secflag) {
if (getusrv(&usrv)){
syslog(LOG_ERR,"Cannot getusrv");
@@ -922,10 +922,10 @@ void doit(f, fromp)
error("Permission denied.\n");
goto signout_please;
}
-
+
loglogin(sane_host, SLG_OKLOG, ue->ue_logfails,ue);
-
- /* Setup usrv structure with user udb info and
+
+ /* Setup usrv structure with user udb info and
packet_level and packet_compart. */
usrv.sv_actlvl = packet_level;
usrv.sv_actcmp = packet_compart; /*Note get_packet_level sets
@@ -938,7 +938,7 @@ void doit(f, fromp)
usrv.sv_valcat = ue->ue_valcat;
usrv.sv_savcmp = 0;
usrv.sv_savlvl = 0;
-
+
/*
* Set user values to workstation boundaries
*/
@@ -948,12 +948,12 @@ void doit(f, fromp)
#ifdef MAX
#undef MAX
#endif
-
+
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#define MAX(a,b) ((a) > (b) ? (a) : (b))
-
+
nal_error = 0;
-
+
if (nal.na_sort) {
if ((ue->ue_minlvl > nal.na_smax) ||
(ue->ue_maxlvl < nal.na_smin))
@@ -961,14 +961,14 @@ void doit(f, fromp)
else {
usrv.sv_minlvl=MAX(ue->ue_minlvl, nal.na_smin);
usrv.sv_maxlvl=MIN(ue->ue_maxlvl, nal.na_smax);
-
+
#ifndef IP_SECURITY
if (usrv.sv_actlvl < usrv.sv_minlvl)
usrv.sv_actlvl = usrv.sv_minlvl;
if (usrv.sv_actlvl > usrv.sv_maxlvl)
usrv.sv_actlvl = usrv.sv_maxlvl;
-
+
#else /*IP_SECURITY*/
if (usrv.sv_actlvl < usrv.sv_minlvl)
nal_error++;
@@ -976,7 +976,7 @@ void doit(f, fromp)
nal_error++;
if (usrv.sv_actlvl != ue->ue_deflvl)
nal_error++;
-
+
usrv.sv_valcmp = ue->ue_comparts & nal.na_scmp;
usrv.sv_actcmp &= nal.na_scmp;
#endif /*IP_SECURITY*/
@@ -1016,7 +1016,7 @@ void doit(f, fromp)
#undef MAX
/* Before the setusrv is done then do a sethost for paddr */
sethost(paddr);
-
+
if (setusrv(&usrv) == -1) {
loglogin(sane_host, SLG_LVERR, ue->ue_logfails,ue);
error("Permission denied.\n");
@@ -1026,10 +1026,10 @@ void doit(f, fromp)
error("Getusrv Permission denied.\n");
goto signout_please;
}
-
+
}
#endif /*CRAY*/
-
+
if (chdir(pwd->pw_dir) < 0) {
if(chdir("/") < 0) {
error("No remote directory.\n");
@@ -1066,17 +1066,17 @@ void doit(f, fromp)
error("You must use encryption.\n");
goto signout_please;
}
-
+
if (pwd->pw_uid && !access(NOLOGIN, F_OK)) {
error("Logins currently disabled.\n");
goto signout_please;
}
-
+
/* Log access to account */
pwd = (struct passwd *) getpwnam(locuser);
if (pwd && (pwd->pw_uid == 0)) {
#ifdef LOG_CMD
- syslog(LOG_NOTICE, "Executing %s for principal %s (%s@%s (%s)) as ROOT",
+ syslog(LOG_NOTICE, "Executing %s for principal %s (%s@%s (%s)) as ROOT",
cmdbuf, kremuser, remuser, hostaddra, hostname);
#else
syslog(LOG_NOTICE ,"Access as ROOT by principal %s (%s@%s (%s))",
@@ -1087,20 +1087,20 @@ void doit(f, fromp)
/* Log if principal is from a remote realm */
else if (client && !default_realm(client))
#endif
-
-#if defined(KERBEROS) && defined(LOG_OTHER_USERS) && !defined(LOG_ALL_LOGINS)
+
+#if defined(KERBEROS) && defined(LOG_OTHER_USERS) && !defined(LOG_ALL_LOGINS)
/* Log if principal name does not map to local username */
else if (client && !princ_maps_to_lname(client, locuser))
#endif /* LOG_OTHER_USERS */
-
+
#ifdef LOG_ALL_LOGINS /* Log everything */
- else
-#endif
-
+ else
+#endif
+
#if defined(LOG_REMOTE_REALM) || defined(LOG_OTHER_USERS) || defined(LOG_ALL_LOGINS)
{
#ifdef LOG_CMD
- syslog(LOG_NOTICE, "Executing %s for principal %s (%s@%s (%s)) as local user %s",
+ syslog(LOG_NOTICE, "Executing %s for principal %s (%s@%s (%s)) as local user %s",
cmdbuf, kremuser, remuser, hostaddra, hostname, locuser);
#else
syslog(LOG_NOTICE ,"Access as %s by principal %s (%s@%s (%s))",
@@ -1108,9 +1108,9 @@ void doit(f, fromp)
#endif
}
#endif
-
+
(void) write(2, "", 1);
-
+
if (port||do_encrypt) {
if (port&&(pipe(pv) < 0)) {
error("Can't make pipe.\n");
@@ -1139,7 +1139,7 @@ void doit(f, fromp)
(void)sigaction(SIGHUP, &sa, (struct sigaction *)0);
sa.sa_handler = SIG_IGN;
- /* SIGPIPE is a crutch that we don't need if we check
+ /* SIGPIPE is a crutch that we don't need if we check
the exit status of write. */
(void)sigaction(SIGPIPE, &sa, (struct sigaction *)0);
(void)sigaction(SIGCHLD, &sa, (struct sigaction *)0);
@@ -1148,20 +1148,20 @@ void doit(f, fromp)
signal(SIGQUIT, cleanup);
signal(SIGTERM, cleanup);
signal(SIGHUP, cleanup);
- /* SIGPIPE is a crutch that we don't need if we check
+ /* SIGPIPE is a crutch that we don't need if we check
the exit status of write. */
signal(SIGPIPE, SIG_IGN);
signal(SIGCHLD,SIG_IGN);
#endif
-
+
(void) close(0); (void) close(1); (void) close(2);
if(port)
(void) close(pv[1]);
(void) close(pw[1]);
(void) close(px[0]);
-
-
-
+
+
+
FD_ZERO(&readfrom);
FD_SET(f, &readfrom);
maxfd = f;
@@ -1176,7 +1176,7 @@ void doit(f, fromp)
FD_SET(pw[0], &readfrom);
if (pw[0] > maxfd)
maxfd = pw[0];
-
+
/* read from f, write to px[1] -- child stdin */
/* read from s, signal child */
/* read from pv[0], write to s -- child stderr */
@@ -1246,7 +1246,7 @@ void doit(f, fromp)
(void) close(px[1]);
FD_CLR(f, &readfrom);
} else if (wcc != cc) {
- syslog(LOG_INFO, "only wrote %d/%d to child",
+ syslog(LOG_INFO, "only wrote %d/%d to child",
wcc, cc);
}
}
@@ -1293,14 +1293,14 @@ void doit(f, fromp)
if(port)
(void) close(pv[1]);
}
-
- /* We are simply execing a program over rshd : log entry into wtmp,
+
+ /* We are simply execing a program over rshd : log entry into wtmp,
as kexe(pid), then finish out the session right after that.
Syslog should have the information as to what was exec'd */
else {
pty_logwtmp(ttyn,"","");
}
-
+
if (*pwd->pw_shell == '\0')
pwd->pw_shell = "/bin/sh";
(void) close(f);
@@ -1317,7 +1317,7 @@ void doit(f, fromp)
#ifdef HAVE_SETLUID
/*
* If we're on a system which keeps track of login uids, then
- * set the login uid.
+ * set the login uid.
*/
if (setluid((uid_t) pwd->pw_uid) < 0) {
perror("setluid");
@@ -1404,7 +1404,7 @@ void doit(f, fromp)
char *buf2;
if(getenv(save_env[cnt])) {
- if (asprintf(&buf2, "%s=%s", save_env[cnt],
+ if (asprintf(&buf2, "%s=%s", save_env[cnt],
getenv(save_env[cnt])) >= 0) {
for (i = 0; envinit[i]; i++);
envinit[i] = buf2;
@@ -1415,7 +1415,7 @@ void doit(f, fromp)
/* XXX - If we do anything else, make sure there is space in the array. */
environ = envinit;
-
+
#ifdef KERBEROS
/* To make Kerberos rcp work correctly, we must ensure that we
invoke Kerberos rcp on this end, not normal rcp, even if the
@@ -1453,7 +1453,7 @@ void doit(f, fromp)
cp++;
else
cp = pwd->pw_shell;
-
+
if (do_encrypt && !strncmp(cmdbuf, "-x ", 3)) {
execl(pwd->pw_shell, cp, "-c", (char *)cmdbuf + 3, (char *)NULL);
}
@@ -1463,7 +1463,7 @@ void doit(f, fromp)
perror(pwd->pw_shell);
perror(cp);
exit(1);
-
+
signout_please:
if (ccache)
krb5_cc_destroy(bsd_context, ccache);
@@ -1485,7 +1485,7 @@ error(fmt, va_alist)
{
va_list ap;
char buf[RCMD_BUFSIZ], *cp = buf;
-
+
#ifdef HAVE_STDARG_H
va_start(ap, fmt);
#else
@@ -1508,7 +1508,7 @@ void getstr(fd, buf, cnt, err)
char *err;
{
char c;
-
+
do {
if (read(fd, &c, 1) != 1)
exit(1);
@@ -1526,11 +1526,11 @@ char *makejtmp(uid, gid, jid)
{
register char *endc, *tdp = &tmpdir[strlen(tmpdir)];
register int i;
-
+
snprintf(tdp, sizeof(tmpdir) - (tdp - tmpdir), "%s/jtmp.%06d",
JTMPDIR, jid);
endc = &tmpdir[strlen(tmpdir)];
-
+
endc[1] = '\0';
for (i = 0; i < 26; i++) {
endc[0] = 'a' + i;
@@ -1595,7 +1595,7 @@ static int get_packet_classification(fd,useruid,level,comp)
struct udb *udb;
int retval;
int sockoptlen;
-
+
retval = 0;
getsysudb ();
udb = getudbuid ((int) useruid);
@@ -1631,8 +1631,8 @@ static int get_packet_classification(fd,useruid,level,comp)
}
#endif /* IP_SECURITY */
-
-
+
+
/*
* Make a security log entry for the login attempt.
@@ -1655,7 +1655,7 @@ loglogin(host, flag, failures, ue)
char urec[sizeof(struct slghdr) + sizeof(struct slglogin)];
struct slghdr *uhdr = (struct slghdr *)urec;
struct slglogin *ulogin=(struct slglogin *)&urec[sizeof(struct slghdr)];
-
+
strncpy(ulogin->sl_line, ttyn, sizeof(ulogin->sl_line));
strncpy(ulogin->sl_host, host, sizeof(ulogin->sl_host));
ulogin->sl_failures = failures;
@@ -1671,7 +1671,7 @@ loglogin(host, flag, failures, ue)
/* uhdr->sl_scls = ue->ue_defcls; enable for integrity policy */
uhdr->sl_olvl = 0;
uhdr->sl_len = sizeof(urec);
-
+
#ifdef CRAY2
slgentry(SLG_LOGN, (word *)urec);
#else /* ! CRAY2 */
@@ -1681,7 +1681,7 @@ loglogin(host, flag, failures, ue)
}
#endif /* CRAY */
-
+
void usage()
@@ -1728,7 +1728,7 @@ recvauth(netfd, peersin, valid_checksum)
if (getsockname(netfd, (struct sockaddr *)&laddr, &len)) {
exit(1);
}
-
+
#ifdef unicos61
#define SIZEOF_INADDR SIZEOF_in_addr
#else
@@ -1784,7 +1784,7 @@ recvauth(netfd, peersin, valid_checksum)
getstr(netfd, cmdbuf, sizeof(cmdbuf), "command");
/* Must be V5 */
-
+
kcmd_proto = KCMD_UNKNOWN_PROTOCOL;
if (version.length != 9)
fatal (netfd, "bad application version length");
@@ -1795,17 +1795,17 @@ recvauth(netfd, peersin, valid_checksum)
getstr(netfd, remuser, sizeof(locuser), "remuser");
- if ((status = krb5_unparse_name(bsd_context, ticket->enc_part2->client,
+ if ((status = krb5_unparse_name(bsd_context, ticket->enc_part2->client,
&kremuser)))
return status;
-
- if ((status = krb5_copy_principal(bsd_context, ticket->enc_part2->client,
+
+ if ((status = krb5_copy_principal(bsd_context, ticket->enc_part2->client,
&client)))
return status;
if ((status = krb5_auth_con_getauthenticator(bsd_context, auth_context,
&authenticator)))
return status;
-
+
if (authenticator->checksum && !checksum_ignored) {
struct sockaddr_storage adr;
unsigned int adr_length = sizeof(adr);
diff --git a/src/appl/bsd/login.c b/src/appl/bsd/login.c
index 57680ad..fc6198c 100644
--- a/src/appl/bsd/login.c
+++ b/src/appl/bsd/login.c
@@ -352,7 +352,7 @@ static void login_get_kconf(k)
kconf_names[0] = "login";
kconf_names[1] = login_conf_set[i].flagname;
kconf_names[2] = 0;
- retval = profile_get_values(k->profile,
+ retval = profile_get_values(k->profile,
kconf_names, &kconf_val);
if (retval) {
/* ignore most (all?) errors */
@@ -445,7 +445,7 @@ void k_init (ttyn)
{
#ifdef KRB5_GET_TICKETS
krb5_error_code retval;
-
+
retval = krb5_init_secure_context(&kcontext);
if (retval) {
com_err("login", retval, "while initializing krb5");
@@ -482,7 +482,7 @@ static int k5_get_password (user_pwstring, pwsize)
unsigned int pwsize;
{
krb5_error_code code;
- char prompt[255];
+ char prompt[255];
snprintf(prompt, sizeof(prompt), "Password for %s", username);
/* reduce opportunities to be swapped out */
@@ -521,7 +521,7 @@ static int try_krb5 (me_p, pass)
if (code) {
if (code == KRB5KRB_AP_ERR_BAD_INTEGRITY)
fprintf (stderr,
- "%s: Kerberos password incorrect\n",
+ "%s: Kerberos password incorrect\n",
username);
else
com_err ("login", code,
@@ -749,8 +749,8 @@ int main(argc, argv)
/*
* -p is used by getty to tell login not to destroy the environment
* -r is used by rlogind to cause the autologin protocol;
- * -f is used to skip a second login authentication
- * -F is used to skip a second login authentication, allows login as root
+ * -f is used to skip a second login authentication
+ * -F is used to skip a second login authentication, allows login as root
* -e is used to skip a second login authentication, but allows
* login as root.
* -h is used by other servers to pass the name of the
@@ -835,11 +835,11 @@ int main(argc, argv)
/* Only do this we we're not using POSIX_TERMIOS */
(void)ioctl(0, TIOCLSET, (char *)&ioctlval);
#endif
-
+
#ifdef TIOCNXCL
(void)ioctl(0, TIOCNXCL, (char *)0);
#endif
-
+
ioctlval = fcntl(0, F_GETFL);
#ifdef O_NONBLOCK
ioctlval &= ~O_NONBLOCK;
@@ -861,7 +861,7 @@ int main(argc, argv)
term[sizeof(term) - 1] = '\0';
}
}
-
+
term_init (rflag || kflag || Kflag || eflag);
for (cnt = getdtablesize(); cnt > 2; cnt--)
@@ -877,7 +877,7 @@ int main(argc, argv)
else
tty = ttyn;
-#ifndef LOG_ODELAY /* 4.2 syslog ... */
+#ifndef LOG_ODELAY /* 4.2 syslog ... */
openlog("login", 0);
#else
openlog("login", LOG_ODELAY, LOG_AUTH);
@@ -1106,7 +1106,7 @@ int main(argc, argv)
controlling tty, which is the case (under SunOS at least.) */
{
- int pid = getpid();
+ int pid = getpid();
struct sigaction sa2, osa;
/* this will set the PGID to the PID. */
@@ -1251,14 +1251,14 @@ int main(argc, argv)
#ifdef KRB5_GET_TICKETS
if (got_v5_tickets) {
- /* set up credential cache -- obeying KRB5_ENV_CCNAME
+ /* set up credential cache -- obeying KRB5_ENV_CCNAME
set earlier */
/* (KRB5_ENV_CCNAME == "KRB5CCNAME" via osconf.h) */
if ((retval = krb5_cc_default(kcontext, &ccache))) {
com_err(argv[0], retval, "while getting default ccache");
} else if ((retval = krb5_cc_initialize(kcontext, ccache, me))) {
com_err(argv[0], retval, "when initializing cache");
- } else if ((retval = krb5_cc_store_cred(kcontext, ccache,
+ } else if ((retval = krb5_cc_store_cred(kcontext, ccache,
&my_creds))) {
com_err(argv[0], retval, "while storing credentials");
} else if (xtra_creds &&
@@ -1279,7 +1279,7 @@ int main(argc, argv)
syslog(LOG_ERR,
"%s while re-storing V5 credentials as user",
error_message(retval));
-
+
}
krb5_free_cred_contents(kcontext, &save_v5creds);
}
@@ -1672,7 +1672,7 @@ void dolastlog(hostname, quiet, tty)
printf("Last login: %.*s ", 24-5, (char *)ctime(&lltime));
if (*ll.ll_host != '\0')
- printf("from %.*s\n", (int) sizeof(ll.ll_host),
+ printf("from %.*s\n", (int) sizeof(ll.ll_host),
ll.ll_host);
else
printf("on %.*s\n", (int) sizeof(ll.ll_line), ll.ll_line);
@@ -1790,7 +1790,7 @@ dofork()
int syncpipe[2];
char c;
int n;
-
+
#ifdef _IBMR2
update_ref_count(1);
#endif
@@ -1826,7 +1826,7 @@ dofork()
/* Setup stuff? This would be things we could do in parallel with login */
(void) chdir("/"); /* Let's not keep the fs busy... */
-
+
/* If we're the parent, watch the child until it dies */
while (1) {
@@ -1849,7 +1849,7 @@ dofork()
if (pid == child)
break;
}
-
+
/* Cleanup stuff */
/* Run destroy_tickets to destroy tickets */
(void) destroy_tickets(); /* If this fails, we lose quietly */
@@ -1873,7 +1873,7 @@ char *strsave(sp)
char *sp;
{
register char *ret;
-
+
if ((ret = strdup(sp)) == NULL) {
fprintf(stderr, "no memory for saving args\n");
exit(1);
diff --git a/src/appl/bsd/loginpaths.h b/src/appl/bsd/loginpaths.h
index 0f2580b..8124e1a 100644
--- a/src/appl/bsd/loginpaths.h
+++ b/src/appl/bsd/loginpaths.h
@@ -34,7 +34,7 @@
#endif
#ifdef _IBMR2
-/* 3.2.0 */
+/* 3.2.0 */
#define LPATH "/usr/bin:/usr/ucb:/usr/bin/X11"
#define RPATH "/usr/bin:/usr/ucb:/usr/bin/X11"
#endif
diff --git a/src/appl/bsd/rpaths.h b/src/appl/bsd/rpaths.h
index 4925ea3..b394677 100644
--- a/src/appl/bsd/rpaths.h
+++ b/src/appl/bsd/rpaths.h
@@ -28,4 +28,3 @@
#undef UCB_RSH
#define UCB_RSH "/usr/bin/remsh"
#endif
-
diff --git a/src/appl/gss-sample/gss-client.c b/src/appl/gss-sample/gss-client.c
index f84d3c6..3f86168 100644
--- a/src/appl/gss-sample/gss-client.c
+++ b/src/appl/gss-sample/gss-client.c
@@ -1,6 +1,6 @@
/*
* Copyright 1994 by OpenVision Technologies, Inc.
- *
+ *
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appears in all copies and
@@ -10,7 +10,7 @@
* without specific, written prior permission. OpenVision makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
- *
+ *
* OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
@@ -27,7 +27,7 @@
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -149,13 +149,13 @@ connect_to_server(host, port)
* Returns: 0 on success, -1 on failure
*
* Effects:
- *
+ *
* service_name is imported as a GSS-API name and a GSS-API context is
* established with the corresponding service; the service should be
* listening on the TCP connection s. The default GSS-API mechanism
* is used, and mutual authentication and replay detection are
* requested.
- *
+ *
* If successful, the context handle is returned in context. If
* unsuccessful, the GSS-API error messages are displayed on stderr
* and -1 is returned.
@@ -209,7 +209,7 @@ client_establish_context(s, service_name, gss_flags, auth_flag,
* transmitted to the server; every received token is stored in
* recv_tok, which token_ptr is then set to, to be processed by
* the next call to gss_init_sec_context.
- *
+ *
* GSS-API guarantees that send_tok's length will be non-zero
* if and only if the server is expecting another token from us,
* and that gss_init_sec_context returns GSS_S_CONTINUE_NEEDED if
@@ -338,7 +338,7 @@ read_file(file_name, in_buf)
* Returns: 0 on success, -1 on failure
*
* Effects:
- *
+ *
* call_server opens a TCP connection to <host:port> and establishes a
* GSS-API context with service_name over the connection. It then
* seals msg in a GSS-API token with gss_wrap, sends it to the server,
diff --git a/src/appl/gss-sample/gss-misc.c b/src/appl/gss-sample/gss-misc.c
index cfaa0f8..3abb0ce 100644
--- a/src/appl/gss-sample/gss-misc.c
+++ b/src/appl/gss-sample/gss-misc.c
@@ -1,6 +1,6 @@
/*
* Copyright 1994 by OpenVision Technologies, Inc.
- *
+ *
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appears in all copies and
@@ -10,7 +10,7 @@
* without specific, written prior permission. OpenVision makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
- *
+ *
* OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
@@ -27,7 +27,7 @@
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -223,7 +223,7 @@ send_token(s, flags, tok)
* Returns: 0 on success, -1 on failure
*
* Effects:
- *
+ *
* recv_token reads the token flags (a single byte, even though
* they're stored into an integer, then reads the token length (as a
* network long), allocates memory to hold the data, and then reads
diff --git a/src/appl/gss-sample/gss-misc.h b/src/appl/gss-sample/gss-misc.h
index 35b3b73..77d8190 100644
--- a/src/appl/gss-sample/gss-misc.h
+++ b/src/appl/gss-sample/gss-misc.h
@@ -1,6 +1,6 @@
/*
* Copyright 1994 by OpenVision Technologies, Inc.
- *
+ *
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appears in all copies and
@@ -10,7 +10,7 @@
* without specific, written prior permission. OpenVision makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
- *
+ *
* OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
diff --git a/src/appl/gss-sample/gss-server.c b/src/appl/gss-sample/gss-server.c
index 488f14c..158414d 100644
--- a/src/appl/gss-sample/gss-server.c
+++ b/src/appl/gss-sample/gss-server.c
@@ -1,6 +1,6 @@
/*
* Copyright 1994 by OpenVision Technologies, Inc.
- *
+ *
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appears in all copies and
@@ -10,7 +10,7 @@
* without specific, written prior permission. OpenVision makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
- *
+ *
* OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
@@ -27,7 +27,7 @@
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -390,7 +390,7 @@ test_import_export_context(context)
* service_name (r) the ASCII name of the GSS-API service to
* establish a context as
* export (r) whether to test context exporting
- *
+ *
* Returns: -1 on error
*
* Effects:
@@ -624,7 +624,7 @@ worker_bee(void *param)
struct _work_plan *work = (struct _work_plan *) param;
/* this return value is not checked, because there's
- * not really anything to do if it fails
+ * not really anything to do if it fails
*/
sign_server(work->s, work->server_creds, work->export);
closesocket(work->s);
diff --git a/src/appl/gssftp/ftp/cmds.c b/src/appl/gssftp/ftp/cmds.c
index 0e06a8d..8bfd552 100644
--- a/src/appl/gssftp/ftp/cmds.c
+++ b/src/appl/gssftp/ftp/cmds.c
@@ -112,7 +112,7 @@ static char *domap (char *);
*
* Returns false if no new arguments have been added.
*/
-int
+int
another(pargc, pargv, prompt)
int *pargc;
char ***pargv;
@@ -260,7 +260,7 @@ void setpeer(argc, argv)
unix_proxy = 0;
else
unix_server = 0;
- if (overbose &&
+ if (overbose &&
!strncmp(reply_string, "215 TOPS20", 10))
printf(
"Remember to set tenex mode when transfering binary files from this machine.\n");
@@ -355,7 +355,7 @@ void setclevel(argc, argv)
if (!strcmp(p->p_name, "clear")) {
comret = command("CCC");
if (comret == COMPLETE)
- clevel = PROT_C;
+ clevel = PROT_C;
return;
}
clevel = p->p_level;
@@ -1180,7 +1180,7 @@ void status(argc, argv)
}
printf("Hash mark printing: %s; Use of PORT cmds: %s\n",
onoff(hash), onoff(sendport));
- printf("Verbose: %s; Bell: %s; Prompting: %s; Globbing: %s\n",
+ printf("Verbose: %s; Bell: %s; Prompting: %s; Globbing: %s\n",
onoff(verbose), onoff(bell), onoff(interactive),
onoff(doglob));
if (macnum > 0) {
@@ -1275,7 +1275,7 @@ void setprompt()
/*VARARGS*/
void setglob()
{
-
+
doglob = !doglob;
printf("Globbing %s.\n", onoff(doglob));
code = doglob;
@@ -1601,7 +1601,7 @@ void shell(argc, argv)
{
int pid;
sig_t old1, old2;
- char shellnam[40], *shellprog, *namep;
+ char shellnam[40], *shellprog, *namep;
#ifdef WAIT_USES_INT
int w_status;
#else
@@ -1910,7 +1910,7 @@ void disconnect()
return;
(void) command("QUIT");
if (cout) {
- (void) FCLOSE_SOCKET(cout);
+ (void) FCLOSE_SOCKET(cout);
cout = NULL;
}
connected = 0;
@@ -2237,7 +2237,7 @@ domap(name)
break;
case '[':
LOOP:
- if (*++cp2 == '$' && isdigit((int) *(cp2+1))) {
+ if (*++cp2 == '$' && isdigit((int) *(cp2+1))) {
if (*++cp2 == '0') {
char *cp3 = name;
@@ -2256,7 +2256,7 @@ LOOP:
}
}
else {
- while (*cp2 && *cp2 != ',' &&
+ while (*cp2 && *cp2 != ',' &&
*cp2 != ']') {
if (*cp2 == '\\') {
cp2++;
diff --git a/src/appl/gssftp/ftp/cmdtab.c b/src/appl/gssftp/ftp/cmdtab.c
index cfa11e3..76fdb46 100644
--- a/src/appl/gssftp/ftp/cmdtab.c
+++ b/src/appl/gssftp/ftp/cmdtab.c
@@ -206,4 +206,3 @@ struct cmd cmdtab[] = {
};
int NCMDS = (sizeof (cmdtab) / sizeof (cmdtab[0])) - 1;
-
diff --git a/src/appl/gssftp/ftp/ftp.c b/src/appl/gssftp/ftp/ftp.c
index 79d844b..6d20fbf 100644
--- a/src/appl/gssftp/ftp/ftp.c
+++ b/src/appl/gssftp/ftp/ftp.c
@@ -33,14 +33,14 @@
/*
* Copyright (C) 1998 by the FundsXpress, INC.
- *
+ *
* All rights reserved.
- *
+ *
* Export of this software from the United States of America may require
* a specific license from the United States Government. It is the
* responsibility of any person or organization contemplating export to
* obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -51,7 +51,7 @@
* permission. FundsXpress makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ *
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -139,7 +139,7 @@ char *auth_type; /* Authentication succeeded? If so, what type? */
unsigned int maxbuf, actualbuf;
unsigned char *ucbuf;
-
+
#define DEFINITIONS
#include "ftp_var.h"
#include "secure.h"
@@ -234,7 +234,7 @@ hookup(char* host, int port)
PERROR_SOCKET((char *) 0);
hp->h_addr_list++;
memcpy(&hisctladdr.sin_addr,
- hp->h_addr_list[0],
+ hp->h_addr_list[0],
sizeof(hisctladdr.sin_addr));
fprintf(stdout, "Trying %s...\n",
inet_ntoa(hisctladdr.sin_addr));
@@ -448,12 +448,12 @@ static int secure_command(char* cmd)
"gss_seal ENC didn't complete":
"gss_seal MIC didn't complete");
} else if ((clevel == PROT_P) && !conf_state) {
- fprintf(stderr,
+ fprintf(stderr,
"GSSAPI didn't encrypt message");
} else {
if (debug)
fprintf(stderr, "sealed (%s) %lu bytes\n",
- clevel==PROT_P?"ENC":"MIC",
+ clevel==PROT_P?"ENC":"MIC",
(unsigned long) out_buf.length);
length=out_buf.length;
memcpy(out, out_buf.value, out_buf.length);
@@ -469,7 +469,7 @@ static int secure_command(char* cmd)
return(0);
}
fprintf(cout, "%s %s", clevel == PROT_P ? "ENC" : "MIC", in);
- if(debug)
+ if(debug)
fprintf(stderr, "secure_command(%s)\nencoding %d bytes %s %s\n",
cmd, length, clevel==PROT_P ? "ENC" : "MIC", in);
} else fputs(cmd, cout);
@@ -492,7 +492,7 @@ int command(char *fmt, ...)
va_start(ap, fmt);
if (strncmp("PASS ", fmt, 5) == 0)
printf("PASS XXXX");
- else
+ else
vfprintf(stdout, fmt, ap);
va_end(ap);
printf("\n");
@@ -662,7 +662,7 @@ int getreply(int expecteof)
else {
int len;
kerror = radix_encode((unsigned char *)obuf,
- (unsigned char *)ibuf,
+ (unsigned char *)ibuf,
&len, 1);
if (kerror) {
printf("Can't base 64 decode reply %d (%s)\n\"%s\"\n",
@@ -678,20 +678,20 @@ int getreply(int expecteof)
xmit_buf.length = len;
/* decrypt/verify the message */
conf_state = safe;
- maj_stat = gss_unseal(&min_stat, gcontext,
- &xmit_buf, &msg_buf,
+ maj_stat = gss_unseal(&min_stat, gcontext,
+ &xmit_buf, &msg_buf,
&conf_state, NULL);
if (maj_stat != GSS_S_COMPLETE) {
- user_gss_error(maj_stat, min_stat,
+ user_gss_error(maj_stat, min_stat,
"failed unsealing reply");
n = '5';
} else {
if(msg_buf.length < sizeof(ibuf) - 2 - 1) {
- memcpy(ibuf, msg_buf.value,
+ memcpy(ibuf, msg_buf.value,
msg_buf.length);
memcpy(&ibuf[msg_buf.length], "\r\n", 3);
} else {
- user_gss_error(maj_stat, min_stat,
+ user_gss_error(maj_stat, min_stat,
"reply was too long");
}
gss_release_buffer(&min_stat,&msg_buf);
@@ -838,7 +838,7 @@ void sendrequest(char *cmd, char *local, char *remote, int printnames)
fin = fopen(local, "rt");
#else /* !_WIN32 */
fin = fopen(local, "r");
-#endif /* !_WIN32 */
+#endif /* !_WIN32 */
if (fin == NULL) {
fprintf(stderr, "local: %s: %s\n", local,
strerror(errno));
@@ -927,7 +927,7 @@ void sendrequest(char *cmd, char *local, char *remote, int printnames)
while ((c = read(fileno(fin), buf, sizeof (buf))) > 0) {
bytes += c;
for (bufp = buf; c > 0; c -= d, bufp += d)
- if ((d = secure_write(fileno(dout), bufp,
+ if ((d = secure_write(fileno(dout), bufp,
(unsigned int) c)) <= 0)
break;
if (hash) {
@@ -937,7 +937,7 @@ void sendrequest(char *cmd, char *local, char *remote, int printnames)
}
(void) fflush(stdout);
}
- if (d <= 0 )
+ if (d <= 0 )
break;
}
if (hash && bytes > 0) {
@@ -950,7 +950,7 @@ void sendrequest(char *cmd, char *local, char *remote, int printnames)
fprintf(stderr, "local: %s: %s\n", local,
strerror(errno));
if (d < 0 || (d = secure_flush(fileno(dout))) < 0) {
- if (d == -1 && errno != EPIPE)
+ if (d == -1 && errno != EPIPE)
perror("netout");
bytes = -1;
}
@@ -975,7 +975,7 @@ void sendrequest(char *cmd, char *local, char *remote, int printnames)
/* if (c == '\r') { */
/* (void) putc('\0', dout); this violates rfc */
/* bytes++; */
- /* } */
+ /* } */
}
if (hash) {
if (bytes < hashbytes)
@@ -1444,7 +1444,7 @@ static int initconn()
noport:
data_addr = myctladdr;
if (sendport)
- data_addr.sin_port = 0; /* let system pick one */
+ data_addr.sin_port = 0; /* let system pick one */
if (data != INVALID_SOCKET)
(void) closesocket(data);
data = socket(AF_INET, SOCK_STREAM, 0);
@@ -1918,7 +1918,7 @@ int do_auth()
char stbuf[FTP_BUFSIZ];
int comcode, trial;
struct gss_channel_bindings_struct chan;
- chan.initiator_addrtype = GSS_C_AF_INET; /* OM_uint32 */
+ chan.initiator_addrtype = GSS_C_AF_INET; /* OM_uint32 */
chan.initiator_address.length = 4;
chan.initiator_address.value = &myctladdr.sin_addr.s_addr;
chan.acceptor_addrtype = GSS_C_AF_INET; /* OM_uint32 */
@@ -1929,9 +1929,9 @@ int do_auth()
if (verbose)
printf("GSSAPI accepted as authentication type\n");
-
+
/* blob from gss-client */
-
+
for (trial = 0; trial < n_gss_trials; trial++) {
/* ftp@hostname first, the host@hostname */
/* the V5 GSSAPI binding canonicalizes this for us... */
@@ -1944,7 +1944,7 @@ int do_auth()
send_tok.length = strlen(stbuf) + 1;
maj_stat = gss_import_name(&min_stat, &send_tok,
gss_nt_service_name, &target_name);
-
+
if (maj_stat != GSS_S_COMPLETE) {
user_gss_error(maj_stat, min_stat, "parsing name");
secure_error("name parsed <%s>\n", stbuf);
@@ -1953,7 +1953,7 @@ int do_auth()
token_ptr = GSS_C_NO_BUFFER;
gcontext = GSS_C_NO_CONTEXT; /* structure copy */
-
+
do {
if (debug)
fprintf(stderr, "calling gss_init_sec_context\n");
@@ -1964,7 +1964,7 @@ int do_auth()
target_name,
(gss_OID_desc *)gss_trials[trial].mech_type,
GSS_C_MUTUAL_FLAG | GSS_C_REPLAY_FLAG |
- (forward ? GSS_C_DELEG_FLAG :
+ (forward ? GSS_C_DELEG_FLAG :
(unsigned) 0),
0,
&chan, /* channel bindings */
@@ -1973,7 +1973,7 @@ int do_auth()
&send_tok,
NULL, /* ignore ret_flags */
NULL); /* ignore time_rec */
-
+
if (maj_stat!=GSS_S_COMPLETE && maj_stat!=GSS_S_CONTINUE_NEEDED){
if (trial == n_gss_trials-1)
@@ -1981,7 +1981,7 @@ int do_auth()
/* could just be that we missed on the service name */
goto outer_loop;
}
-
+
if (send_tok.length != 0) {
int len = send_tok.length;
reply_parse = "ADAT="; /* for command() later */
@@ -2105,7 +2105,7 @@ static void abort_remote(FILE *din)
(void) secure_command("ABOR");
FD_ZERO(&mask);
FD_SET(SOCKETNO(fileno(cin)), &mask);
- if (din) {
+ if (din) {
FD_SET(SOCKETNO(fileno(din)), &mask);
}
if ((nfnd = empty(&mask, 10)) <= 0) {
diff --git a/src/appl/gssftp/ftp/glob.c b/src/appl/gssftp/ftp/glob.c
index bbbcb44..3d62284 100644
--- a/src/appl/gssftp/ftp/glob.c
+++ b/src/appl/gssftp/ftp/glob.c
@@ -86,12 +86,12 @@ char *home;
static char *strspl (char *, char *), *strend (char *);
char **copyblk (char **);
-static void acollect (char *), addpath (int),
- collect (char *), expand (char *),
+static void acollect (char *), addpath (int),
+ collect (char *), expand (char *),
Gcat (char *, char *);
static void ginit (char **), matchdir (char *),
rscan (char **, int (*f)()), sort (void);
-static int amatch (char *, char *),
+static int amatch (char *, char *),
execbrc (char *, char *), match (char *, char *);
static int digit (int), letter (int),
any (int, char *);
diff --git a/src/appl/gssftp/ftp/main.c b/src/appl/gssftp/ftp/main.c
index 6ec5ee1..48302cd 100644
--- a/src/appl/gssftp/ftp/main.c
+++ b/src/appl/gssftp/ftp/main.c
@@ -92,7 +92,7 @@ static void cmdscanner (int);
static char *slurpstring (void);
-int
+int
main(argc, argv)
volatile int argc;
char **volatile argv;
@@ -285,7 +285,7 @@ tail(filename)
char *filename;
{
register char *s;
-
+
while (*filename) {
s = strrchr(filename, '/');
if (s == NULL)
diff --git a/src/appl/gssftp/ftp/ruserpass.c b/src/appl/gssftp/ftp/ruserpass.c
index 6e603e4..03fbc79 100644
--- a/src/appl/gssftp/ftp/ruserpass.c
+++ b/src/appl/gssftp/ftp/ruserpass.c
@@ -124,7 +124,7 @@ token()
return (ID);
}
-int
+int
ruserpass(host, aname, apass, aacct)
char *host, **aname, **apass, **aacct;
{
@@ -160,7 +160,7 @@ next:
continue;
/*
* Allow match either for user's input host name
- * or official hostname. Also allow match of
+ * or official hostname. Also allow match of
* incompletely-specified host in local domain.
*/
if (strcasecmp(host, tokval) == 0)
@@ -186,7 +186,7 @@ next:
case LOGIN:
if (token()) {
- if (*aname == 0) {
+ if (*aname == 0) {
*aname = strdup(tokval);
} else {
if (strcmp(*aname, tokval))
diff --git a/src/appl/gssftp/ftp/secure.c b/src/appl/gssftp/ftp/secure.c
index 3ed15ee..5846604 100644
--- a/src/appl/gssftp/ftp/secure.c
+++ b/src/appl/gssftp/ftp/secure.c
@@ -68,9 +68,9 @@ extern unsigned int maxbuf; /* maximum output buffer size */
extern unsigned char *ucbuf; /* cleartext buffer */
static unsigned int nout; /* number of chars in ucbuf,
* pointer into ucbuf */
-static unsigned int smaxbuf; /* Internal saved value of maxbuf
+static unsigned int smaxbuf; /* Internal saved value of maxbuf
in case changes on us */
-static unsigned int smaxqueue; /* Maximum allowed to queue before
+static unsigned int smaxqueue; /* Maximum allowed to queue before
flush buffer. < smaxbuf by fudgefactor */
/* perhaps use these in general, certainly use them for GSSAPI */
@@ -114,7 +114,7 @@ looping_read(fd, buf, len)
if (errno == EINTR)
continue;
return(cc); /* errno is already set */
- }
+ }
else if (cc == 0) {
return(len2);
} else {
@@ -131,9 +131,9 @@ looping_read(fd, buf, len)
#define ERR -2
-/*
+/*
* Given maxbuf as a buffer size, determine how much can we
- * really transfer given the overhead of different algorithms
+ * really transfer given the overhead of different algorithms
*
* Sets smaxbuf and smaxqueue
*/
@@ -147,12 +147,12 @@ static int secure_determine_constants()
if (strcmp(auth_type, "GSSAPI") == 0) {
OM_uint32 maj_stat, min_stat, mlen;
OM_uint32 msize = maxbuf;
- maj_stat = gss_wrap_size_limit(&min_stat, gcontext,
+ maj_stat = gss_wrap_size_limit(&min_stat, gcontext,
(dlevel == PROT_P),
GSS_C_QOP_DEFAULT,
msize, &mlen);
if (maj_stat != GSS_S_COMPLETE) {
- secure_gss_error(maj_stat, min_stat,
+ secure_gss_error(maj_stat, min_stat,
"GSSAPI fudge determination");
/* Return error how? */
return ERR;
@@ -160,7 +160,7 @@ static int secure_determine_constants()
smaxqueue = mlen;
}
#endif
-
+
return 0;
}
@@ -223,7 +223,7 @@ FILE *stream;
* -1 on error (errno set)
* -2 on security error
*/
-int
+int
secure_write(fd, buf, nbyte)
int fd;
unsigned char *buf;
@@ -264,7 +264,7 @@ unsigned int nbyte;
gss_buffer_desc in_buf, out_buf;
OM_uint32 maj_stat, min_stat;
int conf_state;
-
+
in_buf.value = buf;
in_buf.length = nbyte;
maj_stat = gss_seal(&min_stat, gcontext,
@@ -326,7 +326,7 @@ int fd;
return(ERR);
}
if ((length = (u_long) ntohl(length)) > MAX) {
- secure_error("Length (%d) of PROT buffer > PBSZ=%u",
+ secure_error("Length (%d) of PROT buffer > PBSZ=%u",
length, MAX);
return(ERR);
}
@@ -350,7 +350,7 @@ int fd;
maj_stat = gss_unseal(&min_stat, gcontext, &xmit_buf,
&msg_buf, &conf_state, NULL);
if (maj_stat != GSS_S_COMPLETE) {
- secure_gss_error(maj_stat, min_stat,
+ secure_gss_error(maj_stat, min_stat,
(dlevel == PROT_P)?
"failed unsealing ENC message":
"failed unsealing MIC message");
diff --git a/src/appl/gssftp/ftpd/ftpd.c b/src/appl/gssftp/ftpd/ftpd.c
index ad3c420..7958fac 100644
--- a/src/appl/gssftp/ftpd/ftpd.c
+++ b/src/appl/gssftp/ftpd/ftpd.c
@@ -67,7 +67,7 @@ static char sccsid[] = "@(#)ftpd.c 5.40 (Berkeley) 7/2/91";
#ifdef HAVE_SHADOW
#include <shadow.h>
#endif
-#include <grp.h>
+#include <grp.h>
#include <setjmp.h>
#ifndef POSIX_SETJMP
#undef sigjmp_buf
@@ -224,11 +224,11 @@ int swaitmax = SWAITMAX;
int swaitint = SWAITINT;
void lostconn(int), myoob(int);
-FILE *getdatasock(char *);
+FILE *getdatasock(char *);
#if defined(__STDC__)
-/*
+/*
* The following prototypes must be ANSI for systems for which
- * sizeof(off_t) > sizeof(int) to prevent stack overflow problems
+ * sizeof(off_t) > sizeof(int) to prevent stack overflow problems
*/
FILE *dataconn(char *name, off_t size, char *mymode);
void send_data(FILE *instr, FILE *outstr, off_t blksize);
@@ -740,7 +740,7 @@ user(name)
}
snprintf(buf, sizeof(buf),
"GSSAPI user %s is%s authorized as %s",
- (char *) client_name.value,
+ (char *) client_name.value,
authorized ? "" : " not",
name);
}
@@ -800,7 +800,7 @@ checkuser(name)
return (1);
if (strncmp(line, name, strlen(name)) == 0) {
int i = strlen(name) + 1;
-
+
/* Make sure foo doesn't match foobar */
if (line[i] == '\0' || !isspace((int) line[i]))
continue;
@@ -838,7 +838,7 @@ restricted_user(name)
* Terminate login as previous user, if any, resetting state;
* used when USER command is given or login fails.
*/
-static void
+static void
end_login()
{
@@ -891,7 +891,7 @@ char *name, *passwd;
my_creds.server = server;
if (krb5_timeofday(kcontext, &now))
goto nuke_ccache;
- my_creds.times.starttime = 0; /* start timer when
+ my_creds.times.starttime = 0; /* start timer when
request gets to KDC */
my_creds.times.endtime = now + 60 * 60 * 10;
my_creds.times.renew_till = 0;
@@ -933,7 +933,7 @@ pass(passwd)
if (logged_in || askpasswd == 0) {
reply(503, "Login with USER first.");
return;
- }
+ }
if (!guest) {
/* "ftp" is only account allowed no password */
@@ -1125,7 +1125,7 @@ retrieve(cmd, name)
}
if (c == '\n')
i++;
- }
+ }
} else if (lseek(fileno(fin), restart_point, L_SET) < 0) {
perror_reply(550, name);
goto done;
@@ -1184,7 +1184,7 @@ store_file(name, fmode, unique)
}
if (c == '\n')
i++;
- }
+ }
/*
* We must do this seek to "current" position
* because we are changing from reading to
@@ -1694,7 +1694,7 @@ reply(n, fmt, p0, p1, p2, p3, p4, p5)
gss_buffer_desc in_buf, out_buf;
OM_uint32 maj_stat, min_stat;
int conf_state;
-
+
in_buf.value = in;
in_buf.length = strlen(in);
maj_stat = gss_seal(&min_stat, gcontext,
@@ -1717,7 +1717,7 @@ reply(n, fmt, p0, p1, p2, p3, p4, p5)
secure_error("GSSAPI didn't encrypt message");
#endif /* 0 */
} else {
- memcpy(out, out_buf.value,
+ memcpy(out, out_buf.value,
length=out_buf.length);
gss_release_buffer(&min_stat, &out_buf);
}
@@ -1992,10 +1992,10 @@ myoob(sig)
if (strcmp(cp, "STAT") == 0) {
if (file_size != (off_t) -1)
reply(213, "Status: %lu of %lu bytes transferred",
- (unsigned long) byte_count,
+ (unsigned long) byte_count,
(unsigned long) file_size);
else
- reply(213, "Status: %lu bytes transferred",
+ reply(213, "Status: %lu bytes transferred",
(unsigned long) byte_count);
}
}
@@ -2196,7 +2196,7 @@ char *adata;
name_buf.length = strlen(name_buf.value) + 1;
if (debug)
syslog(LOG_INFO, "importing <%s>", service_name);
- stat_maj = gss_import_name(&stat_min, &name_buf,
+ stat_maj = gss_import_name(&stat_min, &name_buf,
gss_nt_service_name,
&server_name);
if (stat_maj != GSS_S_COMPLETE) {
@@ -2205,7 +2205,7 @@ char *adata;
syslog(LOG_ERR, "gssapi error importing name");
return 0;
}
-
+
acquire_maj = gss_acquire_cred(&acquire_min, server_name, 0,
GSS_C_NULL_OID_SET, GSS_C_ACCEPT,
&server_creds, NULL, NULL);
@@ -2271,7 +2271,7 @@ char *adata;
}
rad_len = out_tok.length;
- kerror = radix_encode(out_tok.value, gbuf,
+ kerror = radix_encode(out_tok.value, gbuf,
&rad_len, 0);
out_tok.length = rad_len;
if (kerror) {
@@ -2301,7 +2301,7 @@ char *adata;
&client_name, &mechid);
if (stat_maj != GSS_S_COMPLETE) {
/* "If the server rejects the security data (if
- a checksum fails, for instance), it should
+ a checksum fails, for instance), it should
respond with reply code 535." */
reply_gss_error(535, stat_maj, stat_min,
"extracting GSSAPI identity name");
@@ -2335,7 +2335,7 @@ char *adata;
else
reply(235, "GSSAPI Authentication succeeded");
}
-
+
return(1);
} else if (accept_maj == GSS_S_CONTINUE_NEEDED) {
/* If the server accepts the security data, and
@@ -2348,10 +2348,10 @@ char *adata;
(void) gss_release_cred(&stat_min, &deleg_creds);
return(0);
} else {
- /* "If the server rejects the security data (if
- a checksum fails, for instance), it should
+ /* "If the server rejects the security data (if
+ a checksum fails, for instance), it should
respond with reply code 535." */
- reply_gss_error(535, stat_maj, stat_min,
+ reply_gss_error(535, stat_maj, stat_min,
"GSSAPI failed processing ADAT");
syslog(LOG_ERR, "GSSAPI failed processing ADAT");
(void) gss_release_cred(&stat_min, &server_creds);
@@ -2676,12 +2676,12 @@ ftpd_gss_userok(gclient_name, name)
{
int retval = -1;
krb5_principal p;
-
+
if (krb5_parse_name(kcontext, gclient_name->value, &p) != 0)
return -1;
if (krb5_kuserok(kcontext, p, name))
retval = 0;
- else
+ else
retval = 1;
krb5_free_principal(kcontext, p);
return retval;
@@ -2723,4 +2723,3 @@ cleanup:
#endif /* GSSAPI */
-
diff --git a/src/appl/gssftp/ftpd/ftpd_var.h b/src/appl/gssftp/ftpd/ftpd_var.h
index 8d833e4..ea0ebe3 100644
--- a/src/appl/gssftp/ftpd/ftpd_var.h
+++ b/src/appl/gssftp/ftpd/ftpd_var.h
@@ -8,7 +8,7 @@
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -22,7 +22,7 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ *
*
* Prototypes for various functions in the ftpd sources.
*/
diff --git a/src/appl/libpty/cleanup.c b/src/appl/libpty/cleanup.c
index 57cc796..2622d19 100644
--- a/src/appl/libpty/cleanup.c
+++ b/src/appl/libpty/cleanup.c
@@ -3,7 +3,7 @@
*
* (C)Copyright 1995, 1996 by the Massachusetts Institute of Technology.
*
- *
+ *
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby
* granted, provided that the above copyright notice appear in all
@@ -17,7 +17,7 @@
* M.I.T. makes no representations about the suitability
* of this software for any purpose. It is provided "as is" without
* express or implied warranty.
- *
+ *
*/
#include "com_err.h"
@@ -35,10 +35,10 @@ long pty_cleanup (char *slave,
#ifdef VHANG_LAST
int retval, fd;
#endif
-
+
if (update_utmp)
pty_update_utmp(PTY_DEAD_PROCESS, pid, "", slave, (char *)0, PTY_UTMP_USERNAME_VALID);
-
+
(void)chmod(slave, 0666);
(void)chown(slave, 0, 0);
#ifdef HAVE_REVOKE
diff --git a/src/appl/libpty/dump-utmp.c b/src/appl/libpty/dump-utmp.c
index d4c303f..de3a746 100644
--- a/src/appl/libpty/dump-utmp.c
+++ b/src/appl/libpty/dump-utmp.c
@@ -277,5 +277,5 @@ main(int argc, char **argv)
#endif
}
}
- exit(0);
+ exit(0);
}
diff --git a/src/appl/libpty/getpty.c b/src/appl/libpty/getpty.c
index e5bf285..f262e61 100644
--- a/src/appl/libpty/getpty.c
+++ b/src/appl/libpty/getpty.c
@@ -3,7 +3,7 @@
*
* Copyright 1995, 1996 by the Massachusetts Institute of Technology.
*
- *
+ *
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby
* granted, provided that the above copyright notice appear in all
@@ -17,7 +17,7 @@
* M.I.T. makes no representations about the suitability
* of this software for any purpose. It is provided "as is" without
* express or implied warranty.
- *
+ *
*/
#include "com_err.h"
@@ -67,7 +67,7 @@ ptyint_getpty_ext(int *fd, char *slave, int slavelength, int do_grantpt)
}
return 0;
#else /*HAVE__GETPTY*/
-
+
*fd = open("/dev/ptym/clone", O_RDWR|O_NDELAY); /* HPUX*/
#ifdef HAVE_STREAMS
if (*fd < 0) *fd = open("/dev/ptmx",O_RDWR|O_NDELAY); /*Solaris*/
@@ -81,7 +81,7 @@ ptyint_getpty_ext(int *fd, char *slave, int slavelength, int do_grantpt)
if (do_grantpt)
if (grantpt(*fd) || unlockpt(*fd)) return PTY_GETPTY_STREAMS;
#endif
-
+
#ifdef HAVE_PTSNAME
p = ptsname(*fd);
#else
diff --git a/src/appl/libpty/init.c b/src/appl/libpty/init.c
index b48a1f8..0b7038b 100644
--- a/src/appl/libpty/init.c
+++ b/src/appl/libpty/init.c
@@ -1,11 +1,11 @@
/*
* pty_init: Initialize internal state of pty.
- *
+ *
* Currently initializes error tables.
- *
+ *
* Copyright 1995 by the Massachusetts Institute of Technology.
*
- *
+ *
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby
* granted, provided that the above copyright notice appear in all
@@ -19,7 +19,7 @@
* M.I.T. makes no representations about the suitability
* of this software for any purpose. It is provided "as is" without
* express or implied warranty.
- *
+ *
*/
#include "com_err.h"
diff --git a/src/appl/libpty/init_slave.c b/src/appl/libpty/init_slave.c
index ce75076..760d5ac 100644
--- a/src/appl/libpty/init_slave.c
+++ b/src/appl/libpty/init_slave.c
@@ -2,7 +2,7 @@
* pty_init_slave: open slave side of terminal, clearing for use.
*
* Copyright 1995, 1996 by the Massachusetts Institute of Technology.
- *
+ *
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby
* granted, provided that the above copyright notice appear in all
@@ -16,7 +16,7 @@
* M.I.T. makes no representations about the suitability
* of this software for any purpose. It is provided "as is" without
* express or implied warranty.
- *
+ *
*/
#include "com_err.h"
@@ -41,7 +41,7 @@ static char *push_list[] = {
0};
#endif /*HAVE_STREAMS but not HAVE_LINE_PUSH*/
-
+
long pty_initialize_slave (int fd)
{
@@ -51,7 +51,7 @@ long pty_initialize_slave (int fd)
struct sgttyb b;
#endif /* POSIX_TERMIOS */
int pid;
-
+
#ifdef HAVE_STREAMS
#ifdef HAVE_LINE_PUSH
while (ioctl (fd, I_POP, 0) == 0); /*Clear out any old lined's*/
@@ -87,7 +87,7 @@ long pty_initialize_slave (int fd)
ioctl(fd, TIOCSPGRP, &pid);
#endif
-
+
#if defined(POSIX_TERMIOS) && !defined(ultrix)
tcsetpgrp(fd, pid);
tcgetattr(fd,&new_termio);
diff --git a/src/appl/libpty/libpty.h b/src/appl/libpty/libpty.h
index d95c8fe..13cc5ec 100644
--- a/src/appl/libpty/libpty.h
+++ b/src/appl/libpty/libpty.h
@@ -3,7 +3,7 @@
*
* Copyright 1995 by the Massachusetts Institute of Technology.
*
- *
+ *
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby
* granted, provided that the above copyright notice appear in all
@@ -17,7 +17,7 @@
* M.I.T. makes no representations about the suitability
* of this software for any purpose. It is provided "as is" without
* express or implied warranty.
- *
+ *
*/
#ifndef __LIBPTY_H__
diff --git a/src/appl/libpty/logwtmp.c b/src/appl/libpty/logwtmp.c
index 03cfab4..2417fb4 100644
--- a/src/appl/libpty/logwtmp.c
+++ b/src/appl/libpty/logwtmp.c
@@ -2,7 +2,7 @@
* pty_logwtmp: Implement the logwtmp function if not present.
*
* Copyright 1995, 2001 by the Massachusetts Institute of Technology.
- *
+ *
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby
* granted, provided that the above copyright notice appear in all
@@ -16,7 +16,7 @@
* M.I.T. makes no representations about the suitability
* of this software for any purpose. It is provided "as is" without
* express or implied warranty.
- *
+ *
*/
#include "com_err.h"
diff --git a/src/appl/libpty/open_ctty.c b/src/appl/libpty/open_ctty.c
index 5a1730b..9d6fb0d 100644
--- a/src/appl/libpty/open_ctty.c
+++ b/src/appl/libpty/open_ctty.c
@@ -16,14 +16,14 @@
* M.I.T. makes no representations about the suitability
* of this software for any purpose. It is provided "as is" without
* express or implied warranty.
- *
+ *
*/
#include "com_err.h"
#include "libpty.h"
#include "pty-int.h"
-/*
+/*
* This function will be called twice. The first time it will acquire
* a controlling terminal from which to vhangup() or revoke() (see
* comments in open_slave.c); the second time, it will be to open the
diff --git a/src/appl/libpty/open_slave.c b/src/appl/libpty/open_slave.c
index 5bab6bc..97f20fe 100644
--- a/src/appl/libpty/open_slave.c
+++ b/src/appl/libpty/open_slave.c
@@ -4,7 +4,7 @@
* Copyright 1995, 1996, 2001 by the Massachusetts Institute of
* Technology.
*
- *
+ *
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby
* granted, provided that the above copyright notice appear in all
@@ -18,7 +18,7 @@
* M.I.T. makes no representations about the suitability
* of this software for any purpose. It is provided "as is" without
* express or implied warranty.
- *
+ *
*/
#include "com_err.h"
diff --git a/src/appl/libpty/pty-int.h b/src/appl/libpty/pty-int.h
index b94a65c..3e7274f 100644
--- a/src/appl/libpty/pty-int.h
+++ b/src/appl/libpty/pty-int.h
@@ -49,14 +49,14 @@
#include <fcntl.h>
#include <errno.h>
#include <pwd.h>
-
+
#ifdef HAVE_SYS_LABEL_H
/* only SunOS 4? */
#include <sys/label.h>
#include <sys/audit.h>
#include <pwdadj.h>
#endif
-
+
#include <signal.h>
#ifdef hpux
@@ -80,7 +80,7 @@
#else
#include <sgtty.h>
#endif
-
+
#include "port-sockets.h"
#include <string.h>
#include <sys/param.h>
diff --git a/src/appl/libpty/pty_paranoia.c b/src/appl/libpty/pty_paranoia.c
index 466a658..18ef6e3 100644
--- a/src/appl/libpty/pty_paranoia.c
+++ b/src/appl/libpty/pty_paranoia.c
@@ -1,6 +1,6 @@
/*
* Copyright 2001 by the Massachusetts Institute of Technology.
- *
+ *
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby
* granted, provided that the above copyright notice appear in all
diff --git a/src/appl/libpty/sane_hostname.c b/src/appl/libpty/sane_hostname.c
index 8ef6de8..46ac842 100644
--- a/src/appl/libpty/sane_hostname.c
+++ b/src/appl/libpty/sane_hostname.c
@@ -1,7 +1,7 @@
/*
* pty_make_sane_hostname: Make a sane hostname from an IP address.
* This returns allocated memory!
- *
+ *
* Copyright 1999, 2000, 2001 by the Massachusetts Institute of
* Technology.
*
@@ -18,7 +18,7 @@
* M.I.T. makes no representations about the suitability
* of this software for any purpose. It is provided "as is" without
* express or implied warranty.
- *
+ *
*/
#include "com_err.h"
#include "pty-int.h"
diff --git a/src/appl/libpty/update_utmp.c b/src/appl/libpty/update_utmp.c
index 292a167..bec57fa 100644
--- a/src/appl/libpty/update_utmp.c
+++ b/src/appl/libpty/update_utmp.c
@@ -1,8 +1,8 @@
/*
* pty_update_utmp: Update or create a utmp entry
- *
+ *
* Copyright 1995, 2001 by the Massachusetts Institute of Technology.
- *
+ *
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby
* granted, provided that the above copyright notice appear in all
@@ -257,7 +257,7 @@
* In addition to other HP-UX issues, 11.23 includes yet another utmp
* management interface in utmps.h. This interface updates a umtpd
* daemon which then manages local files. Directly accessing the files
- * through the existing, yet deprecated, utmp.h interface results in
+ * through the existing, yet deprecated, utmp.h interface results in
* nothing.
*
* Irix 6.x:
@@ -333,7 +333,7 @@
/*
* The following grossness exists to avoid duplicating lots of code
* between the cases where we have an old-style sysV utmp and where we
- * have a modern (Unix98 or XPG4) utmpx, or the new (hp-ux 11.23) utmps.
+ * have a modern (Unix98 or XPG4) utmpx, or the new (hp-ux 11.23) utmps.
* See the above history rant for further explanation.
*/
#if defined(HAVE_SETUTXENT) || defined(HAVE_SETUTENT) || defined(HAVE_SETUTSENT)
diff --git a/src/appl/libpty/update_wtmp.c b/src/appl/libpty/update_wtmp.c
index 988bae6..12a2720 100644
--- a/src/appl/libpty/update_wtmp.c
+++ b/src/appl/libpty/update_wtmp.c
@@ -2,7 +2,7 @@
* ptyint_update_wtmp: Update wtmp.
*
* Copyright 1995, 2001 by the Massachusetts Institute of Technology.
- *
+ *
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby
* granted, provided that the above copyright notice appear in all
@@ -16,7 +16,7 @@
* M.I.T. makes no representations about the suitability
* of this software for any purpose. It is provided "as is" without
* express or implied warranty.
- *
+ *
*/
#include "com_err.h"
diff --git a/src/appl/libpty/vhangup.c b/src/appl/libpty/vhangup.c
index 2924371..a542500 100644
--- a/src/appl/libpty/vhangup.c
+++ b/src/appl/libpty/vhangup.c
@@ -3,7 +3,7 @@
*
* Copyright 1995 by the Massachusetts Institute of Technology.
*
- *
+ *
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby
* granted, provided that the above copyright notice appear in all
@@ -17,7 +17,7 @@
* M.I.T. makes no representations about the suitability
* of this software for any purpose. It is provided "as is" without
* express or implied warranty.
- *
+ *
*/
#include "com_err.h"
@@ -32,7 +32,7 @@ void ptyint_vhangup(void)
/* Initialize "sa" structure. */
(void) sigemptyset(&sa.sa_mask);
sa.sa_flags = 0;
-
+
#endif
#ifdef POSIX_SIGNALS
diff --git a/src/appl/libpty/void_assoc.c b/src/appl/libpty/void_assoc.c
index a39c9c7..9182589 100644
--- a/src/appl/libpty/void_assoc.c
+++ b/src/appl/libpty/void_assoc.c
@@ -3,7 +3,7 @@
*
* Copyright 1995, 1996 by the Massachusetts Institute of Technology.
*
- *
+ *
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby
* granted, provided that the above copyright notice appear in all
@@ -17,7 +17,7 @@
* M.I.T. makes no representations about the suitability
* of this software for any purpose. It is provided "as is" without
* express or implied warranty.
- *
+ *
*/
#include "com_err.h"
diff --git a/src/appl/sample/sample.h b/src/appl/sample/sample.h
index 6c81d93..e61a2f3 100644
--- a/src/appl/sample/sample.h
+++ b/src/appl/sample/sample.h
@@ -7,7 +7,7 @@
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -21,7 +21,7 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ *
*
* Common definitions for the sample client/server.
*/
diff --git a/src/appl/sample/sclient/sclient.c b/src/appl/sample/sclient/sclient.c
index bd9c4e8..2f9b479 100644
--- a/src/appl/sample/sclient/sclient.c
+++ b/src/appl/sample/sclient/sclient.c
@@ -8,7 +8,7 @@
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -22,7 +22,7 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ *
*
* Sample Kerberos v5 client.
*
@@ -70,12 +70,12 @@ net_read(fd, buf, len)
if (cc < 0) {
if (SOCKET_ERRNO == SOCKET_EINTR)
continue;
-
+
/* XXX this interface sucks! */
- errno = SOCKET_ERRNO;
-
+ errno = SOCKET_ERRNO;
+
return(cc); /* errno is already set */
- }
+ }
else if (cc == 0) {
return(len2);
} else {
@@ -209,7 +209,7 @@ main(int argc, char *argv[])
ccdef, &err_ret, &rep_ret, NULL);
krb5_free_principal(context, server); /* finished using it */
- krb5_free_principal(context, client);
+ krb5_free_principal(context, client);
krb5_cc_close(context, ccdef);
if (auth_context) krb5_auth_con_free(context, auth_context);
diff --git a/src/appl/sample/sserver/sserver.c b/src/appl/sample/sserver/sserver.c
index 39710fb..0ad9c07 100644
--- a/src/appl/sample/sserver/sserver.c
+++ b/src/appl/sample/sserver/sserver.c
@@ -8,7 +8,7 @@
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -22,7 +22,7 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ *
*
* Sample Kerberos v5 server.
*
@@ -69,7 +69,7 @@ usage(name)
{
fprintf(stderr, "usage: %s [-p port] [-s service] [-S keytab]\n",
name);
-}
+}
int
main(argc, argv)
@@ -110,7 +110,7 @@ main(argc, argv)
/*
* Parse command line arguments
- *
+ *
*/
opterr = 0;
while ((ch = getopt(argc, argv, "p:S:s:")) != -1)
@@ -144,17 +144,17 @@ main(argc, argv)
port = atoi(argv[1]);
}
- retval = krb5_sname_to_principal(context, NULL, service,
+ retval = krb5_sname_to_principal(context, NULL, service,
KRB5_NT_SRV_HST, &server);
if (retval) {
syslog(LOG_ERR, "while generating service name (%s): %s",
service, error_message(retval));
exit(1);
}
-
+
/*
* If user specified a port, then listen on that port; otherwise,
- * assume we've been started out of inetd.
+ * assume we've been started out of inetd.
*/
if (port) {
@@ -200,7 +200,7 @@ main(argc, argv)
}
retval = krb5_recvauth(context, &auth_context, (krb5_pointer)&sock,
- SAMPLE_VERSION, server,
+ SAMPLE_VERSION, server,
0, /* no flags */
keytab, /* default keytab is NULL */
&ticket);
diff --git a/src/appl/simple/client/sim_client.c b/src/appl/simple/client/sim_client.c
index 3cb71df..4f5e403 100644
--- a/src/appl/simple/client/sim_client.c
+++ b/src/appl/simple/client/sim_client.c
@@ -8,7 +8,7 @@
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -22,7 +22,7 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ *
*
* Simple UDP-based sample client program. For demonstration.
* This program performs no useful function.
@@ -61,7 +61,7 @@ usage(name)
char *name;
{
fprintf(stderr, "usage: %s [-p port] [-h host] [-m message] [-s service] [host]\n", name);
-}
+}
int
main(argc, argv)
@@ -83,7 +83,7 @@ main(argc, argv)
extern int opterr, optind;
extern char * optarg;
int ch;
-
+
short port = 0;
char *message = MSG;
char *hostname = 0;
@@ -110,7 +110,7 @@ main(argc, argv)
/*
* Parse command line arguments
- *
+ *
*/
opterr = 0;
while ((ch = getopt(argc, argv, "p:m:h:s:")) != -1)
@@ -200,14 +200,14 @@ main(argc, argv)
}
memcpy(&c_sock.sin_addr, host->h_addr, sizeof(c_sock.sin_addr));
#endif
-
+
/* Bind it to set the address; kernel will fill in port # */
if (bind(sock, (struct sockaddr *)&c_sock, sizeof(c_sock)) < 0) {
com_err(progname, errno, "while binding datagram socket");
exit(1);
}
-
+
/* PREPARE KRB_AP_REQ MESSAGE */
inbuf.data = hostname;
@@ -234,8 +234,8 @@ main(argc, argv)
exit(1);
}
/* Send authentication info to server */
- if ((i = send(sock, (char *)packet.data, (unsigned) packet.length,
- flags)) < 0)
+ if ((i = send(sock, (char *)packet.data, (unsigned) packet.length,
+ flags)) < 0)
com_err(progname, errno, "while sending KRB_AP_REQ message");
printf("Sent authentication data: %d bytes\n", i);
krb5_free_data_contents(context, &packet);
@@ -275,7 +275,7 @@ main(argc, argv)
com_err(progname, retval, "while generating port address");
exit(1);
}
-
+
if ((retval = krb5_gen_replay_name(context,portlocal_addr,
"_sim_clt",&cp))) {
com_err(progname, retval, "while generating replay cache name");
@@ -303,7 +303,7 @@ main(argc, argv)
}
/* Send it */
- if ((i = send(sock, (char *)packet.data, (unsigned) packet.length,
+ if ((i = send(sock, (char *)packet.data, (unsigned) packet.length,
flags)) < 0)
com_err(progname, errno, "while sending SAFE message");
printf("Sent checksummed message: %d bytes\n", i);
@@ -319,7 +319,7 @@ main(argc, argv)
}
/* Send it */
- if ((i = send(sock, (char *)packet.data, (unsigned) packet.length,
+ if ((i = send(sock, (char *)packet.data, (unsigned) packet.length,
flags)) < 0)
com_err(progname, errno, "while sending PRIV message");
printf("Sent encrypted message: %d bytes\n", i);
@@ -333,6 +333,6 @@ main(argc, argv)
krb5_auth_con_setrcache(context, auth_context, NULL);
krb5_auth_con_free(context, auth_context);
krb5_free_context(context);
-
+
exit(0);
}
diff --git a/src/appl/simple/server/sim_server.c b/src/appl/simple/server/sim_server.c
index bfe2f75..c82c6f3 100644
--- a/src/appl/simple/server/sim_server.c
+++ b/src/appl/simple/server/sim_server.c
@@ -8,7 +8,7 @@
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -22,7 +22,7 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ *
*
* Usage:
* sample_server servername
@@ -57,7 +57,7 @@ usage(name)
char *name;
{
fprintf(stderr, "usage: %s [-p port] [-s service] [-S keytab]\n", name);
-}
+}
int
main(argc, argv)
@@ -99,7 +99,7 @@ char *argv[];
/*
* Parse command line arguments
- *
+ *
*/
opterr = 0;
while ((ch = getopt(argc, argv, "p:s:S:")) != -1)
@@ -125,7 +125,7 @@ char *argv[];
break;
}
- if ((retval = krb5_sname_to_principal(context, NULL, service,
+ if ((retval = krb5_sname_to_principal(context, NULL, service,
KRB5_NT_SRV_HST, &sprinc))) {
com_err(PROGNAME, retval, "while generating service name %s", service);
exit(1);
@@ -145,7 +145,7 @@ char *argv[];
} else {
s_sock.sin_port = htons(port);
}
-
+
if (gethostname(full_hname, sizeof(full_hname)) < 0) {
perror("gethostname");
exit(1);
@@ -192,7 +192,7 @@ char *argv[];
packet.data = (krb5_pointer) pktbuf;
/* Check authentication info */
- if ((retval = krb5_rd_req(context, &auth_context, &packet,
+ if ((retval = krb5_rd_req(context, &auth_context, &packet,
sprinc, keytab, NULL, &ticket))) {
com_err(PROGNAME, retval, "while reading request");
exit(1);
@@ -263,13 +263,13 @@ char *argv[];
packet.length = i;
packet.data = (krb5_pointer) pktbuf;
-
+
if ((retval = krb5_rd_priv(context, auth_context, &packet,
&message, NULL))) {
com_err(PROGNAME, retval, "while verifying PRIV message");
exit(1);
}
- printf("Decrypted message is: '%.*s'\n", (int) message.length,
+ printf("Decrypted message is: '%.*s'\n", (int) message.length,
message.data);
krb5_auth_con_free(context, auth_context);
diff --git a/src/appl/simple/simple.h b/src/appl/simple/simple.h
index f230592..bbee794 100644
--- a/src/appl/simple/simple.h
+++ b/src/appl/simple/simple.h
@@ -8,7 +8,7 @@
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -22,7 +22,7 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ *
*
* Common definitions for the simple UDP-based Kerberos-mediated
* server & client applications.
diff --git a/src/appl/telnet/libtelnet/auth-proto.h b/src/appl/telnet/libtelnet/auth-proto.h
index faf806f..c0d666d 100644
--- a/src/appl/telnet/libtelnet/auth-proto.h
+++ b/src/appl/telnet/libtelnet/auth-proto.h
@@ -40,7 +40,7 @@
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
diff --git a/src/appl/telnet/libtelnet/auth.c b/src/appl/telnet/libtelnet/auth.c
index aed6887..a880196 100644
--- a/src/appl/telnet/libtelnet/auth.c
+++ b/src/appl/telnet/libtelnet/auth.c
@@ -36,7 +36,7 @@
/*
* Copyright (C) 1990 by the Massachusetts Institute of Technology
*
- * Export of this software from the United States of America may
+ * Export of this software from the United States of America may
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
@@ -126,7 +126,7 @@ Authenticator authenticators[] = {
kerberos5_reply,
kerberos5_status,
kerberos5_printsub },
-#endif
+#endif
{ AUTHTYPE_KERBEROS_V5, AUTH_WHO_CLIENT|AUTH_HOW_MUTUAL,
kerberos5_init,
kerberos5_send,
@@ -399,7 +399,7 @@ void auth_send_retry()
static unsigned char str_none[] = { IAC, SB, TELOPT_AUTHENTICATION,
TELQUAL_IS, AUTHTYPE_NULL, 0,
IAC, SE };
-
+
if (Server) {
if (auth_debug_mode) {
printf(">>>%s: auth_send_retry called!\r\n", Name);
@@ -445,7 +445,7 @@ void auth_send_retry()
* We requested strong authentication, however no mechanisms worked.
* Therefore, exit on client end.
*/
- printf("Unable to securely authenticate user ... exit\n");
+ printf("Unable to securely authenticate user ... exit\n");
exit(0);
#endif /* KANNAN */
}
diff --git a/src/appl/telnet/libtelnet/enc_des.c b/src/appl/telnet/libtelnet/enc_des.c
index 6dd48b6..9c20eb0 100644
--- a/src/appl/telnet/libtelnet/enc_des.c
+++ b/src/appl/telnet/libtelnet/enc_des.c
@@ -33,14 +33,14 @@
/*
* Copyright (C) 1998 by the FundsXpress, INC.
- *
+ *
* All rights reserved.
- *
+ *
* Export of this software from the United States of America may require
* a specific license from the United States Government. It is the
* responsibility of any person or organization contemplating export to
* obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -51,7 +51,7 @@
* permission. FundsXpress makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ *
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -149,7 +149,7 @@ int fb64_reply (unsigned char *, int, struct fb *);
static void fb64_session (Session_Key *, int, struct fb *);
void fb64_stream_key (Block, struct stinfo *);
int fb64_keyid (int, unsigned char *, int *, struct fb *);
-void fb64_printsub (unsigned char *, int, unsigned char *, int,
+void fb64_printsub (unsigned char *, int, unsigned char *, int,
unsigned char *);
static void ecb_encrypt(stp, in, out)
@@ -160,7 +160,7 @@ static void ecb_encrypt(stp, in, out)
krb5_error_code code;
krb5_data din;
krb5_enc_data dout;
-
+
din.length = 8;
din.data = in;
@@ -634,7 +634,7 @@ fb64_stream_key(key, stp)
* INPUT --(--------->(+)+---> DATA
* | |
* +-------------+
- *
+ *
*
* Given:
* iV: Initial vector, 64 bits (8 bytes) long.
@@ -695,7 +695,7 @@ cfb64_decrypt(data)
ecb_encrypt(stp, stp->str_output, b);
memcpy(stp->str_feed, b, sizeof(Block));
stp->str_index = 1; /* Next time will be 1 */
- idx = 0; /* But now use 0 */
+ idx = 0; /* But now use 0 */
}
/* On decryption we store (data) which is cypher. */
@@ -768,7 +768,7 @@ ofb64_decrypt(data)
ecb_encrypt(stp, stp->str_feed, b);
memcpy(stp->str_feed, b, sizeof(Block));
stp->str_index = 1; /* Next time will be 1 */
- idx = 0; /* But now use 0 */
+ idx = 0; /* But now use 0 */
}
return(data ^ stp->str_feed[idx]);
diff --git a/src/appl/telnet/libtelnet/encrypt.c b/src/appl/telnet/libtelnet/encrypt.c
index 6317ece..19e855d 100644
--- a/src/appl/telnet/libtelnet/encrypt.c
+++ b/src/appl/telnet/libtelnet/encrypt.c
@@ -108,7 +108,7 @@ static long remote_supports_decrypt = 0;
static Encryptions encryptions[] = {
#ifdef DES_ENCRYPTION
{ "DES_CFB64", ENCTYPE_DES_CFB64,
- cfb64_encrypt,
+ cfb64_encrypt,
cfb64_decrypt,
cfb64_init,
cfb64_start,
@@ -118,7 +118,7 @@ static Encryptions encryptions[] = {
cfb64_keyid,
cfb64_printsub },
{ "DES_OFB64", ENCTYPE_DES_OFB64,
- ofb64_encrypt,
+ ofb64_encrypt,
ofb64_decrypt,
ofb64_init,
ofb64_start,
@@ -563,7 +563,7 @@ encrypt_is(data, cnt)
} else {
ret = (*ep->is)(data, cnt);
if (encrypt_debug_mode)
- printf("(*ep->is)(%lx, %d) returned %s(%d)\n",
+ printf("(*ep->is)(%lx, %d) returned %s(%d)\n",
(unsigned long) data, cnt,
(ret < 0) ? "FAIL " :
(ret == 0) ? "SUCCESS " : "MORE_TO_DO ", ret);
@@ -713,7 +713,7 @@ encrypt_request_end()
* Called when ENCRYPT REQUEST-START is received. If we receive
* this before a type is picked, then that indicates that the
* other side wants us to start encrypting data as soon as we
- * can.
+ * can.
*/
void
encrypt_request_start(data, cnt)
@@ -731,7 +731,7 @@ encrypt_request_start(data, cnt)
static unsigned char str_keyid[(MAXKEYLEN*2)+5] = { IAC, SB, TELOPT_ENCRYPT };
static void encrypt_keyid (struct key_info *kp, unsigned char *, unsigned int);
-
+
void encrypt_enc_keyid(keyid, len)
unsigned char *keyid;
int len;
@@ -769,7 +769,7 @@ static void encrypt_keyid(kp, keyid, len)
if (ep->keyid)
(void)(*ep->keyid)(dir, kp->keyid, &kp->keylen);
- } else if ((len != kp->keylen) ||
+ } else if ((len != kp->keylen) ||
(memcmp(keyid, kp->keyid, len) != 0)) {
/*
* Length or contents are different
@@ -858,7 +858,7 @@ encrypt_start_output(type)
i = (*ep->start)(DIR_ENCRYPT, Server);
if (encrypt_debug_mode) {
printf(">>>%s: Encrypt start: %s (%d) %s\r\n",
- Name,
+ Name,
(i < 0) ? "failed" :
"initial negotiation in progress",
i, ENCTYPE_NAME(type));
diff --git a/src/appl/telnet/libtelnet/forward.c b/src/appl/telnet/libtelnet/forward.c
index 98dcb78..98afb39 100644
--- a/src/appl/telnet/libtelnet/forward.c
+++ b/src/appl/telnet/libtelnet/forward.c
@@ -21,7 +21,7 @@
/* General-purpose forwarding routines. These routines may be put into */
-/* libkrb5.a to allow widespread use */
+/* libkrb5.a to allow widespread use */
#if defined(KERBEROS) || defined(KRB5)
#include <stdio.h>
@@ -29,12 +29,12 @@
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
-
+
#include "krb5.h"
#include <errno.h>
#include "krb5forw.h"
-
+
#if defined(NEED_SETENV) || defined(NEED_SETENV_PROTO)
extern int setenv(char *, char *, int);
#endif
@@ -63,11 +63,11 @@ rd_and_store_for_creds(context, auth_context, inbuf, ticket)
if ((retval = krb5_cc_resolve(context, ccname, &ccache)))
goto cleanup;
- if ((retval = krb5_cc_initialize(context, ccache,
+ if ((retval = krb5_cc_initialize(context, ccache,
ticket->enc_part2->client)))
goto cleanup;
- if ((retval = krb5_cc_store_cred(context, ccache, *creds)))
+ if ((retval = krb5_cc_store_cred(context, ccache, *creds)))
goto cleanup;
cleanup:
diff --git a/src/appl/telnet/libtelnet/kerberos5.c b/src/appl/telnet/libtelnet/kerberos5.c
index 77a1b5a..bc3cecf 100644
--- a/src/appl/telnet/libtelnet/kerberos5.c
+++ b/src/appl/telnet/libtelnet/kerberos5.c
@@ -83,7 +83,7 @@ extern char *malloc();
#else
#include <strings.h>
#endif
-
+
#include "encrypt.h"
#include "auth.h"
#include "misc.h"
@@ -182,7 +182,7 @@ kerberos5_init(ap, server)
int server;
{
krb5_error_code retval;
-
+
if (server)
str_data[3] = TELQUAL_REPLY;
else
@@ -201,7 +201,7 @@ kerberos5_cleanup()
krb5_error_code retval;
krb5_ccache ccache;
char *ccname;
-
+
if (telnet_context == 0)
return;
@@ -306,7 +306,7 @@ kerberos5_send(ap)
#ifdef ENCRYPTION
ap_opts |= AP_OPTS_USE_SUBKEY;
#endif /* ENCRYPTION */
-
+
if (auth_context) {
krb5_auth_con_free(telnet_context, auth_context);
auth_context = 0;
@@ -318,10 +318,10 @@ kerberos5_send(ap)
}
return(0);
}
-
+
krb5_auth_con_setflags(telnet_context, auth_context,
KRB5_AUTH_CONTEXT_RET_TIME);
-
+
type_check[0] = ap->type;
type_check[1] = ap->way;
check_data.magic = KV5M_DATA;
@@ -366,7 +366,7 @@ kerberos5_send(ap)
return(0);
}
- if (!auth_sendname((unsigned char *) UserNameRequested,
+ if (!auth_sendname((unsigned char *) UserNameRequested,
(int) strlen(UserNameRequested))) {
if (auth_debug_mode)
printf("telnet: Not enough room for user name\r\n");
@@ -415,7 +415,7 @@ kerberos5_is(ap, data, cnt)
r = krb5_auth_con_init(telnet_context, &auth_context);
if (!r) {
krb5_rcache rcache;
-
+
r = krb5_auth_con_getrcache(telnet_context, auth_context,
&rcache);
if (!r && !rcache) {
@@ -434,7 +434,7 @@ kerberos5_is(ap, data, cnt)
auth_context, rcache);
}
if (!r && telnet_srvtab)
- r = krb5_kt_resolve(telnet_context,
+ r = krb5_kt_resolve(telnet_context,
telnet_srvtab, &keytabid);
if (!r)
r = krb5_rd_req(telnet_context, &auth_context, &auth,
@@ -458,10 +458,10 @@ kerberos5_is(ap, data, cnt)
}
if (krb5_princ_component(telnet_context,ticket->server,0)->length < 256) {
char princ[256];
- strncpy(princ,
+ strncpy(princ,
krb5_princ_component(telnet_context, ticket->server,0)->data,
krb5_princ_component(telnet_context, ticket->server,0)->length);
- princ[krb5_princ_component(telnet_context,
+ princ[krb5_princ_component(telnet_context,
ticket->server,0)->length] = '\0';
if (strcmp("host", princ)) {
if(strlen(princ) < sizeof(errbuf) - 39) {
@@ -543,8 +543,8 @@ kerberos5_is(ap, data, cnt)
}
Data(ap, KRB_RESPONSE, outbuf.data, outbuf.length);
- }
- if (krb5_unparse_name(telnet_context,
+ }
+ if (krb5_unparse_name(telnet_context,
ticket->enc_part2 ->client,
&name))
name = 0;
@@ -555,7 +555,7 @@ kerberos5_is(ap, data, cnt)
name ? name : "");
}
auth_finished(ap, AUTH_USER);
-
+
if (name)
free(name);
krb5_auth_con_getrecvsubkey(telnet_context, auth_context,
@@ -572,7 +572,7 @@ kerberos5_is(ap, data, cnt)
ticket->enc_part2->session,
&session_key);
}
-
+
#ifdef ENCRYPTION
skey.type = SK_DES;
skey.length = 8;
@@ -584,8 +584,8 @@ kerberos5_is(ap, data, cnt)
case KRB_FORWARD:
inbuf.length = cnt;
inbuf.data = (char *)data;
- if ((r = krb5_auth_con_genaddrs(telnet_context, auth_context,
- net, KRB5_AUTH_CONTEXT_GENERATE_REMOTE_FULL_ADDR)) ||
+ if ((r = krb5_auth_con_genaddrs(telnet_context, auth_context,
+ net, KRB5_AUTH_CONTEXT_GENERATE_REMOTE_FULL_ADDR)) ||
(r = rd_and_store_for_creds(telnet_context, auth_context,
&inbuf, ticket))) {
@@ -599,7 +599,7 @@ kerberos5_is(ap, data, cnt)
printf(
"telnetd: Could not read forwarded credentials\r\n");
}
- else
+ else
Data(ap, KRB_FORWARD_ACCEPT, 0, 0);
if (auth_debug_mode)
printf("telnetd: Forwarded credentials obtained\r\n");
@@ -613,7 +613,7 @@ kerberos5_is(ap, data, cnt)
break;
}
return;
-
+
errout:
{
char eerrbuf[329];
@@ -745,7 +745,7 @@ kerberos5_status(ap, name, level)
}
if (UserNameRequested &&
- krb5_kuserok(telnet_context, ticket->enc_part2->client,
+ krb5_kuserok(telnet_context, ticket->enc_part2->client,
UserNameRequested))
{
return(AUTH_VALID);
@@ -839,14 +839,14 @@ kerberos5_forward(ap)
forw_creds.data = 0;
if ((r = krb5_cc_default(telnet_context, &ccache))) {
- if (auth_debug_mode)
+ if (auth_debug_mode)
printf("Kerberos V5: could not get default ccache - %s\r\n",
error_message(r));
return;
}
if ((r = krb5_cc_get_principal(telnet_context, ccache, &client))) {
- if (auth_debug_mode)
+ if (auth_debug_mode)
printf("Kerberos V5: could not get default principal - %s\r\n",
error_message(r));
goto cleanup;
@@ -854,7 +854,7 @@ kerberos5_forward(ap)
if ((r = krb5_sname_to_principal(telnet_context, RemoteHostName, "host",
KRB5_NT_SRV_HST, &server))) {
- if (auth_debug_mode)
+ if (auth_debug_mode)
printf("Kerberos V5: could not make server principal - %s\r\n",
error_message(r));
goto cleanup;
@@ -872,12 +872,12 @@ kerberos5_forward(ap)
server, ccache,
forward_flags & OPTS_FORWARDABLE_CREDS,
&forw_creds))) {
- if (auth_debug_mode)
+ if (auth_debug_mode)
printf("Kerberos V5: error getting forwarded creds - %s\r\n",
error_message(r));
goto cleanup;
}
-
+
/* Send forwarded credentials */
if (!Data(ap, KRB_FORWARD, forw_creds.data, forw_creds.length)) {
if (auth_debug_mode)
@@ -886,7 +886,7 @@ kerberos5_forward(ap)
if (auth_debug_mode)
printf("Forwarded local Kerberos V5 credentials to server\r\n");
}
-
+
cleanup:
if (client)
krb5_free_principal(telnet_context, client);
diff --git a/src/appl/telnet/libtelnet/krb5forw.h b/src/appl/telnet/libtelnet/krb5forw.h
index 1fb757d..4984d35 100644
--- a/src/appl/telnet/libtelnet/krb5forw.h
+++ b/src/appl/telnet/libtelnet/krb5forw.h
@@ -1,4 +1,3 @@
-extern krb5_error_code
-rd_and_store_for_creds(krb5_context, krb5_auth_context, krb5_data *,
+extern krb5_error_code
+rd_and_store_for_creds(krb5_context, krb5_auth_context, krb5_data *,
krb5_ticket *);
-
diff --git a/src/appl/telnet/libtelnet/mem.c b/src/appl/telnet/libtelnet/mem.c
index 5a2ced8..4a1239d 100644
--- a/src/appl/telnet/libtelnet/mem.c
+++ b/src/appl/telnet/libtelnet/mem.c
@@ -141,7 +141,7 @@ memset(dst0, c0, length)
*
* but we use a minimum of 3 here since the overhead of the code
* to do word writes is substantial.
- */
+ */
if (length < 3 * wsize) {
while (length != 0) {
*dst++ = VAL;
diff --git a/src/appl/telnet/libtelnet/parsetos.c b/src/appl/telnet/libtelnet/parsetos.c
index 303d7c3..92a3afc 100644
--- a/src/appl/telnet/libtelnet/parsetos.c
+++ b/src/appl/telnet/libtelnet/parsetos.c
@@ -1,4 +1,3 @@
-
/*
* The routine parsetos() for UNICOS 6.0/6.1, as well as more traditional
* Unix systems. This is part of UNICOS 7.0 and later.
diff --git a/src/appl/telnet/libtelnet/setenv.c b/src/appl/telnet/libtelnet/setenv.c
index 941b816..a917af1 100644
--- a/src/appl/telnet/libtelnet/setenv.c
+++ b/src/appl/telnet/libtelnet/setenv.c
@@ -44,7 +44,7 @@
#include "misc-proto.h"
-static char *__findenv (const char *, int *);
+static char *__findenv (const char *, int *);
/*
* setenv --
diff --git a/src/appl/telnet/telnet/authenc.c b/src/appl/telnet/telnet/authenc.c
index aa4459f..ee312df 100644
--- a/src/appl/telnet/telnet/authenc.c
+++ b/src/appl/telnet/telnet/authenc.c
@@ -78,7 +78,7 @@ telnet_spin()
scheduler_lockout_tty = 1;
Scheduler(0);
scheduler_lockout_tty = 0;
-
+
return 0;
}
diff --git a/src/appl/telnet/telnet/commands.c b/src/appl/telnet/telnet/commands.c
index a029e63..6af6c5b 100644
--- a/src/appl/telnet/telnet/commands.c
+++ b/src/appl/telnet/telnet/commands.c
@@ -282,7 +282,7 @@ control(c)
* the "send" command.
*
*/
-
+
struct sendlist {
char *name; /* How user refers to it (case independent) */
char *help; /* Help information (0 ==> no help) */
@@ -1931,7 +1931,7 @@ env_is_exported(var)
return ep->export;
return 0;
}
-
+
#if defined(OLD_ENVIRON) && defined(ENV_HACK)
void
env_varval(what)
@@ -2398,7 +2398,7 @@ status(argc, argv)
* Function that gets called when SIGINFO is received.
*/
#if defined(CRAY) || (defined(USE_TERMIO) && !defined(SYSV_TERMIO))
-void
+void
ayt_status()
{
(void) call(status, "status", "notmuch", 0);
@@ -3047,10 +3047,10 @@ cmdrc(m1, m2)
* *cpp: If *cpp was equal to NULL, it will be filled
* in with a pointer to our static area that has
* the option filled in. This will be 32bit aligned.
- *
+ *
* *lenp: This will be filled in with how long the option
* pointed to by *cpp is.
- *
+ *
*/
static unsigned long
sourceroute(arg, cpp, lenp)
diff --git a/src/appl/telnet/telnet/externs.h b/src/appl/telnet/telnet/externs.h
index 3d098ad..192663a 100644
--- a/src/appl/telnet/telnet/externs.h
+++ b/src/appl/telnet/telnet/externs.h
@@ -296,7 +296,7 @@ extern void
lm_mode (unsigned char *, int, int);
extern void
- ExitString (char *, int),
+ ExitString (char *, int),
Exit (int),
SetForExit (void),
EmptyTerminal (void),
@@ -313,7 +313,7 @@ extern void
slc_end_reply (void);
extern int
- quit (int, char *[]),
+ quit (int, char *[]),
ttyflush (int),
rlogin_susp (void),
tn (int, char **),
@@ -325,7 +325,7 @@ extern int
slc_update (void),
Scheduler (int),
SetSockOpt (int, int, int, int),
- stilloob (void),
+ stilloob (void),
telrcv (void),
telnet_spin (void),
TerminalWrite (unsigned char *, int),
diff --git a/src/appl/telnet/telnet/main.c b/src/appl/telnet/telnet/main.c
index c1dc204..e0bdb18 100644
--- a/src/appl/telnet/telnet/main.c
+++ b/src/appl/telnet/telnet/main.c
@@ -71,7 +71,7 @@ tninit()
init_terminal();
init_network();
-
+
init_telnet();
init_sys();
@@ -206,7 +206,7 @@ main(argc, argv)
case 'f':
#if defined(AUTHENTICATION) && defined(KRB5) && defined(FORWARD)
if (forward_flags & OPTS_FORWARD_CREDS) {
- fprintf(stderr,
+ fprintf(stderr,
"%s: Only one of -f and -F allowed.\n",
prompt);
usage();
@@ -214,14 +214,14 @@ main(argc, argv)
forward_flags |= OPTS_FORWARD_CREDS;
#else
fprintf(stderr,
- "%s: Warning: -f ignored, no Kerberos V5 support.\n",
+ "%s: Warning: -f ignored, no Kerberos V5 support.\n",
prompt);
#endif
break;
case 'F':
#if defined(AUTHENTICATION) && defined(KRB5) && defined(FORWARD)
if (forward_flags & OPTS_FORWARD_CREDS) {
- fprintf(stderr,
+ fprintf(stderr,
"%s: Only one of -f and -F allowed.\n",
prompt);
usage();
@@ -230,7 +230,7 @@ main(argc, argv)
forward_flags |= OPTS_FORWARDABLE_CREDS;
#else
fprintf(stderr,
- "%s: Warning: -F ignored, no Kerberos V5 support.\n",
+ "%s: Warning: -F ignored, no Kerberos V5 support.\n",
prompt);
#endif
break;
diff --git a/src/appl/telnet/telnet/sys_bsd.c b/src/appl/telnet/telnet/sys_bsd.c
index 89f9d4b..07def19 100644
--- a/src/appl/telnet/telnet/sys_bsd.c
+++ b/src/appl/telnet/telnet/sys_bsd.c
@@ -987,7 +987,7 @@ process_rings(netin, netout, netex, ttyin, ttyout, poll)
if (netout) {
FD_SET(net, &obits);
- }
+ }
if (ttyout) {
FD_SET(tout, &obits);
}
diff --git a/src/appl/telnet/telnet/telnet.c b/src/appl/telnet/telnet/telnet.c
index be00687..0d05b8f 100644
--- a/src/appl/telnet/telnet/telnet.c
+++ b/src/appl/telnet/telnet/telnet.c
@@ -75,7 +75,7 @@
#include <libtelnet/encrypt.h>
#endif
-#if defined(AUTHENTICATION) || defined(ENCRYPTION)
+#if defined(AUTHENTICATION) || defined(ENCRYPTION)
#include <libtelnet/misc-proto.h>
#endif /* defined(AUTHENTICATION) || defined(ENCRYPTION) */
@@ -207,7 +207,7 @@ init_telnet()
ClearArray(options);
connected = In3270 = ISend = localflow = donebinarytoggle = 0;
-#if defined(AUTHENTICATION) || defined(ENCRYPTION)
+#if defined(AUTHENTICATION) || defined(ENCRYPTION)
auth_encrypt_connect(connected);
#endif /* defined(AUTHENTICATION) || defined(ENCRYPTION) */
restartany = -1;
@@ -697,8 +697,8 @@ mklist(buf, name)
*/
if (n || (cp - cp2 > 41))
;
- else if (name && (strncasecmp(name, cp2,
- (unsigned) (cp-cp2))
+ else if (name && (strncasecmp(name, cp2,
+ (unsigned) (cp-cp2))
== 0))
*argv = cp2;
else if (is_unique(cp2, argv+1, argvp))
@@ -724,7 +724,7 @@ mklist(buf, name)
else if (islower((unsigned char) c))
*cp = toupper((unsigned char) c);
}
-
+
/*
* Check for an old V6 2 character name. If the second
* name points to the beginning of the buffer, and is
@@ -1874,7 +1874,7 @@ telrcv()
case TS_IAC:
process_iac:
switch (c) {
-
+
case WILL:
telrcv_state = TS_WILL;
continue;
@@ -2292,10 +2292,10 @@ telnet(user)
char *user;
{
int printed_encrypt = 0;
-
+
sys_telnet_init();
-#if defined(AUTHENTICATION) || defined(ENCRYPTION)
+#if defined(AUTHENTICATION) || defined(ENCRYPTION)
{
static char local_host[256] = { 0 };
@@ -2339,7 +2339,7 @@ telnet(user)
/*
* Note: we assume a tie to the authentication option here. This
* is necessary so that authentication fails, we don't spin
- * forever.
+ * forever.
*/
if (wantencryption) {
extern int auth_has_failed;
@@ -2373,7 +2373,7 @@ telnet(user)
printed_encrypt = 1;
printf("Waiting for encryption to be negotiated...\n");
/*
- * Turn on MODE_TRAPSIG and then turn off localchars
+ * Turn on MODE_TRAPSIG and then turn off localchars
* so that ^C will cause telnet to exit.
*/
TerminalNewMode(getconnmode()|MODE_TRAPSIG);
diff --git a/src/appl/telnet/telnet/utilities.c b/src/appl/telnet/telnet/utilities.c
index 4a076e5..dc9f3bc 100644
--- a/src/appl/telnet/telnet/utilities.c
+++ b/src/appl/telnet/telnet/utilities.c
@@ -606,7 +606,7 @@ printsub(direction, pointer, length)
break;
}
break;
-
+
case LM_SLC:
fprintf(NetTrace, "SLC");
for (i = 2; i < length - 2; i += 3) {
@@ -738,7 +738,7 @@ printsub(direction, pointer, length)
fprintf(NetTrace, "\n");
break;
-
+
default:
fprintf(NetTrace, " %d", pointer[i]);
break;
diff --git a/src/appl/telnet/telnetd/pathnames.h b/src/appl/telnet/telnetd/pathnames.h
index c8b0806..4e14a88 100644
--- a/src/appl/telnet/telnetd/pathnames.h
+++ b/src/appl/telnet/telnetd/pathnames.h
@@ -42,7 +42,7 @@
# endif
#else
-
+
# define _PATH_TTY "/dev/tty"
# ifndef _PATH_LOGIN
# define _PATH_LOGIN "/bin/login"
diff --git a/src/appl/telnet/telnetd/slc.c b/src/appl/telnet/telnetd/slc.c
index 8f32f43..d5e2713 100644
--- a/src/appl/telnet/telnetd/slc.c
+++ b/src/appl/telnet/telnetd/slc.c
@@ -107,10 +107,10 @@ get_slc_defaults()
init_termbuf();
for (i = 1; i <= NSLC; i++) {
- slctab[i].defset.flag =
+ slctab[i].defset.flag =
spcset(i, &slctab[i].defset.val, &slctab[i].sptr);
- slctab[i].current.flag = SLC_NOSUPPORT;
- slctab[i].current.val = 0;
+ slctab[i].current.flag = SLC_NOSUPPORT;
+ slctab[i].current.val = 0;
}
} /* end of get_slc_defaults */
@@ -285,7 +285,7 @@ change_slc(func, flag, val)
register cc_t val;
{
register int hislevel, mylevel;
-
+
hislevel = flag & SLC_LEVELBITS;
mylevel = slctab[func].defset.flag & SLC_LEVELBITS;
/*
@@ -344,7 +344,7 @@ change_slc(func, flag, val)
* request as he asks.
*
* If our level is DEFAULT, then just ack whatever was
- * sent.
+ * sent.
*
* If he can't change and we can't change,
* then degenerate to NOSUPPORT.
@@ -371,7 +371,7 @@ change_slc(func, flag, val)
slctab[func].defset.val;
val = slctab[func].current.val;
}
-
+
}
add_slc(func, flag, val);
}
@@ -422,7 +422,7 @@ check_slc()
slctab[i].current.val);
}
}
-
+
} /* check_slc */
/*
diff --git a/src/appl/telnet/telnetd/state.c b/src/appl/telnet/telnetd/state.c
index 4693fc9..17d6fb6 100644
--- a/src/appl/telnet/telnetd/state.c
+++ b/src/appl/telnet/telnetd/state.c
@@ -403,7 +403,7 @@ gotiac: switch (c) {
* All state defaults are negative, and resp defaults to 0.
*
* When initiating a request to change state to new_state:
- *
+ *
* if ((want_resp == 0 && new_state == my_state) || want_state == new_state) {
* do nothing;
* } else {
@@ -1121,7 +1121,7 @@ suboption()
break;
sb_auth_complete();
-
+
settimer(tspeedsubopt);
if (SB_EOF() || SB_GET() != TELQUAL_IS)
diff --git a/src/appl/telnet/telnetd/sys_term.c b/src/appl/telnet/telnetd/sys_term.c
index a0a0ee5..1535ac8 100644
--- a/src/appl/telnet/telnetd/sys_term.c
+++ b/src/appl/telnet/telnetd/sys_term.c
@@ -72,7 +72,7 @@ char utmpf[] = _PATH_UTMP;
#else
char utmpf[] = "/etc/utmp";
#endif
-
+
# ifdef CRAY
#include <tmpdir.h>
#include <sys/wait.h>
@@ -96,7 +96,7 @@ extern struct sysv sysv;
#ifdef STREAMSPTY
#ifdef HAVE_SAC_H
-#include <sac.h>
+#include <sac.h>
#endif
#include <sys/stropts.h>
#endif
@@ -115,7 +115,7 @@ extern struct sysv sysv;
#ifdef HAVE_SYS_TTY_H
#include <sys/tty.h>
#endif
-
+
#ifdef t_erase
#undef t_erase
#undef t_kill
@@ -1076,9 +1076,9 @@ startslave(host, autologin, autoname)
register int n;
#endif /* NEWINIT */
- if ( pipe(syncpipe) < 0 )
+ if ( pipe(syncpipe) < 0 )
fatal(net, "failed getting synchronization pipe");
-
+
#if defined(AUTHENTICATION)
if (!autoname || !autoname[0])
autologin = 0;
@@ -1110,9 +1110,9 @@ startslave(host, autologin, autoname)
}
close(syncpipe[0]);
-
+
} else {
-
+
pty_update_utmp (PTY_LOGIN_PROCESS, getpid(), "LOGIN", line,
host, PTY_TTYSLOT_USABLE);
getptyslave();
@@ -1121,7 +1121,7 @@ startslave(host, autologin, autoname)
write(syncpipe[1],"y",1);
close(syncpipe[0]);
close(syncpipe[1]);
-
+
start_login(host, autologin, autoname);
/*NOTREACHED*/
}
@@ -1275,7 +1275,7 @@ start_login(host, autologin, name)
if (bftpd) {
argv = addarg(argv, "-e");
argv = addarg(argv, BFTPPATH);
- } else
+ } else
#endif
#if defined (SecurID)
/*
@@ -1431,7 +1431,7 @@ start_login(host, autologin, name)
/*
* This code returns a pointer to the first element of the array and
* expects the same to be called with.
- * Therefore the -1 reference is legal.
+ * Therefore the -1 reference is legal.
*/
static char **
@@ -1483,12 +1483,7 @@ cleanup(sig)
#ifdef KRB5
kerberos5_cleanup();
#endif
-
+
(void) shutdown(net, 2);
exit(1);
}
-
-
-
-
-
diff --git a/src/appl/telnet/telnetd/telnetd-ktd.c b/src/appl/telnet/telnetd/telnetd-ktd.c
index 5a340bd..86a594c 100644
--- a/src/appl/telnet/telnetd/telnetd-ktd.c
+++ b/src/appl/telnet/telnetd/telnetd-ktd.c
@@ -390,7 +390,7 @@ main(argc, argv)
secflag = sysconf(_SC_CRAY_SECURE_SYS);
/*
- * Get socket's security label
+ * Get socket's security label
*/
if (secflag) {
int sz = sizeof(ss);
@@ -704,13 +704,13 @@ doit(who)
*/
if ( (retval = pty_getpty(&pty, line, sizeof(line)) < 0 ) {
com_err(retval, "telnetd", "");
-
+
if (pty < 0)
fatal(net, "All network ports in use");
#if defined(_SC_CRAY_SECURE_SYS)
/*
- * set ttyp line security label
+ * set ttyp line security label
*/
if (secflag) {
extern char *myline;
@@ -1278,7 +1278,7 @@ telnet(f, p, host)
}
cleanup(0);
} /* end of telnet */
-
+
#ifndef TCSIG
# ifdef TIOCSIG
# define TCSIG TIOCSIG
@@ -1354,7 +1354,7 @@ int readstream(p, ibuf, bufsize)
tp = (struct termio *) (ibuf+1 + sizeof(struct iocblk));
vstop = tp->c_cc[VSTOP];
vstart = tp->c_cc[VSTART];
- ixon = tp->c_iflag & IXON;
+ ixon = tp->c_iflag & IXON;
break;
default:
errno = EAGAIN;
diff --git a/src/appl/telnet/telnetd/telnetd.c b/src/appl/telnet/telnetd/telnetd.c
index 8ee129e..86280f3 100644
--- a/src/appl/telnet/telnetd/telnetd.c
+++ b/src/appl/telnet/telnetd/telnetd.c
@@ -199,7 +199,7 @@ get_default_IM()
{
struct utsname name;
static char banner[1024];
-
+
if (uname(&name) < 0)
snprintf(banner, sizeof(banner),
"\r\nError getting hostname: %s\r\n",
@@ -399,7 +399,7 @@ main(argc, argv)
{
extern krb5_context telnet_context;
krb5_error_code retval;
-
+
if (telnet_context == 0) {
retval = krb5_init_context(&telnet_context);
if (retval) {
@@ -640,7 +640,7 @@ main(argc, argv)
#endif /* defined(IPPROTO_IP) && defined(IP_TOS) */
net = 0;
doit((struct sockaddr *)&from);
-
+
/* NOTREACHED */
return 0;
} /* end of main */
@@ -765,7 +765,7 @@ getterminaltype(name)
}
if (must_encrypt || auth_must_encrypt()) {
time_t timeout = time(0) + 60;
-
+
if (my_state_is_dont(TELOPT_ENCRYPT) ||
my_state_is_wont(TELOPT_ENCRYPT) ||
his_state_is_wont(TELOPT_AUTHENTICATION))
@@ -956,7 +956,7 @@ static void doit(who)
* Find an available pty to use.
*/
pty_init();
-
+
if ((retval = pty_getpty(&pty, line, 17)) != 0) {
fatal(net, error_message(retval));
@@ -964,7 +964,7 @@ static void doit(who)
#if defined(_SC_CRAY_SECURE_SYS)
/*
- * set ttyp line security label
+ * set ttyp line security label
*/
if (secflag) {
char slave_dev[16];
@@ -1549,7 +1549,7 @@ telnet(f, p, host)
(void) signal(SIGCHLD, SIG_DFL);
cleanup(0);
} /* end of telnet */
-
+
#ifndef TCSIG
# ifdef TIOCSIG
# define TCSIG TIOCSIG
@@ -1608,9 +1608,9 @@ int readstream(p, ibuf, bufsize)
case M_IOCTL:
ip = (struct iocblk *) (ibuf+1);
- if (readstream_termio(ip->ioc_cmd, ibuf,
+ if (readstream_termio(ip->ioc_cmd, ibuf,
&vstop, &vstart, &ixon)) {
- if (readstream_termios(ip->ioc_cmd, ibuf,
+ if (readstream_termios(ip->ioc_cmd, ibuf,
&vstop, &vstart, &ixon)) {
errno = EAGAIN;
return(-1);
diff --git a/src/appl/telnet/telnetd/telnetd.h b/src/appl/telnet/telnetd/telnetd.h
index f21f617..48980c5 100644
--- a/src/appl/telnet/telnetd/telnetd.h
+++ b/src/appl/telnet/telnetd/telnetd.h
@@ -45,4 +45,3 @@
/* other external variables */
extern char **environ;
-
diff --git a/src/appl/telnet/telnetd/termio-tn.c b/src/appl/telnet/telnetd/termio-tn.c
index 7447f1e..8f27d59 100644
--- a/src/appl/telnet/telnetd/termio-tn.c
+++ b/src/appl/telnet/telnetd/termio-tn.c
@@ -25,7 +25,7 @@ int readstream_termio(cmd, ibuf, vstop, vstart, ixon)
*vstop = tp->c_cc[VSTOP];
*vstart = tp->c_cc[VSTART];
#endif
- *ixon = tp->c_iflag & IXON;
+ *ixon = tp->c_iflag & IXON;
return 0;
}
return -1;
diff --git a/src/appl/telnet/telnetd/termstat.c b/src/appl/telnet/telnetd/termstat.c
index fa7803d..d620719 100644
--- a/src/appl/telnet/telnetd/termstat.c
+++ b/src/appl/telnet/telnetd/termstat.c
@@ -316,7 +316,7 @@ localstat()
IAC, SE);
editmode = useeditmode;
}
-
+
/*
* Check for changes to special characters in use.
@@ -416,7 +416,7 @@ clientstat(code, parm1, parm2)
uselinemode = 1;
}
}
-
+
/*
* Quit now if we can't do it.
*/
@@ -456,7 +456,7 @@ clientstat(code, parm1, parm2)
send_will(TELOPT_ECHO, 1);
}
break;
-
+
case LM_MODE:
{
register int ack, changed;
@@ -504,7 +504,7 @@ clientstat(code, parm1, parm2)
useeditmode|MODE_ACK,
IAC, SE);
}
-
+
editmode = useeditmode;
}
@@ -538,9 +538,9 @@ clientstat(code, parm1, parm2)
(void) ioctl(pty, TIOCSWINSZ, (char *)&ws);
}
#endif /* TIOCSWINSZ */
-
+
break;
-
+
case TELOPT_TSPEED:
{
def_tspeed = parm1;
@@ -605,7 +605,7 @@ _termstat()
*
* Some things should not be done until after the login process has started
* and all the pty modes are set to what they are supposed to be. This
- * function is called when the pty state has been processed for the first time.
+ * function is called when the pty state has been processed for the first time.
* It calls other functions that do things that were deferred in each module.
*/
void
diff --git a/src/appl/telnet/telnetd/utility.c b/src/appl/telnet/telnetd/utility.c
index 4a4c130..7e53c48 100644
--- a/src/appl/telnet/telnetd/utility.c
+++ b/src/appl/telnet/telnetd/utility.c
@@ -90,7 +90,7 @@ read_again:
}
} /* end of ttloop */
-/*
+/*
* ttsuck - This is a horrible kludge to deal with a bug in
* HostExplorer. HostExplorer thinks it knows how to do krb5 auth, but
* it doesn't really. So if you offer it krb5 as an auth choice before
@@ -872,7 +872,7 @@ printsub(direction, pointer, length)
break;
}
break;
-
+
case LM_SLC:
netputs("SLC");
for (i = 2; i < length - 2; i += 3) {
@@ -1010,7 +1010,7 @@ do { \
netputs("\r\n");
break;
-
+
default:
netprintf(" %d", pointer[i]);
break;
@@ -1103,7 +1103,7 @@ do { \
#if defined(AUTHENTICATION)
case TELOPT_AUTHENTICATION:
netputs("AUTHENTICATION");
-
+
if (length < 2) {
netputs(" (empty suboption??\?)");
break;
@@ -1127,7 +1127,7 @@ do { \
netputs(((pointer[3] & AUTH_ENCRYPT_MASK) == AUTH_ENCRYPT_ON)
? "|ENCRYPT" : "");
- auth_printsub(&pointer[1], length - 1, (unsigned char *)buf,
+ auth_printsub(&pointer[1], length - 1, (unsigned char *)buf,
sizeof(buf));
netputs(buf);
break;
@@ -1215,7 +1215,7 @@ do { \
netprintf("%d (unknown)", pointer[2]);
netputs(" ");
- encrypt_printsub(&pointer[1], length - 1,
+ encrypt_printsub(&pointer[1], length - 1,
(unsigned char *) buf, sizeof(buf));
netputs(buf);
break;
@@ -1283,7 +1283,7 @@ printdata(tag, ptr, cnt)
netputs(": ");
for (i = 0; i < 20 && cnt; i++) {
netprintf(nfrontp, "%02x", *ptr);
- nfrontp += strlen(nfrontp);
+ nfrontp += strlen(nfrontp);
if (isprint((int) *ptr)) {
xbuf[i] = *ptr;
} else {
@@ -1298,6 +1298,6 @@ printdata(tag, ptr, cnt)
netputs(" ");
netputs(xbuf);
netputs("\r\n");
- }
+ }
}
#endif /* DIAGNOSTICS */
diff --git a/src/appl/user_user/client.c b/src/appl/user_user/client.c
index 6edf0ff..a2f8e7f 100644
--- a/src/appl/user_user/client.c
+++ b/src/appl/user_user/client.c
@@ -8,7 +8,7 @@
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -22,7 +22,7 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ *
*
* Other end of user-user client/server pair.
*/
@@ -82,11 +82,11 @@ char *argv[];
}
if ((host = gethostbyname (argv[1])) == NULL) {
- fprintf (stderr, "uu-client: can't get address of host \"%s\".\n",
+ fprintf (stderr, "uu-client: can't get address of host \"%s\".\n",
argv[1]);
return 3;
}
-
+
if (host->h_addrtype != AF_INET) {
fprintf (stderr, "uu-client: bad address type %d for \"%s\".\n",
host->h_addrtype, argv[1]);
@@ -103,13 +103,13 @@ char *argv[];
cli_net_addr.sin_family = AF_INET;
cli_net_addr.sin_port = 0;
cli_net_addr.sin_addr.s_addr = 0;
- if (bind (s, (struct sockaddr *)&cli_net_addr,
+ if (bind (s, (struct sockaddr *)&cli_net_addr,
sizeof (cli_net_addr)) < 0) {
com_err ("uu-client", errno, "binding socket");
return 4;
}
}
-
+
serv_net_addr.sin_family = AF_INET;
serv_net_addr.sin_port = port;
@@ -120,10 +120,10 @@ char *argv[];
return 5;
}
- memcpy (&serv_net_addr.sin_addr, host->h_addr_list[i++],
+ memcpy (&serv_net_addr.sin_addr, host->h_addr_list[i++],
sizeof(serv_net_addr.sin_addr));
- if (connect(s, (struct sockaddr *)&serv_net_addr,
+ if (connect(s, (struct sockaddr *)&serv_net_addr,
sizeof (serv_net_addr)) == 0)
break;
com_err ("uu-client", errno, "connecting to \"%s\" (%s).",
@@ -146,12 +146,12 @@ char *argv[];
com_err("uu-client", retval, "getting principal name");
return 6;
}
-
+
retval = krb5_unparse_name(context, creds.client, &princ);
if (retval) {
com_err("uu-client", retval, "printing principal name");
return 7;
- }
+ }
else
fprintf(stderr, "uu-client: client principal is \"%s\".\n", princ);
@@ -161,7 +161,7 @@ char *argv[];
return 7;
}
- retval =
+ retval =
krb5_build_principal_ext(context, &creds.server,
krb5_princ_realm(context, creds.client)->length,
krb5_princ_realm(context, creds.client)->data,
@@ -173,9 +173,9 @@ char *argv[];
com_err("uu-client", retval, "setting up tgt server name");
return 7;
}
-
+
/* Get TGT from credentials cache */
- retval = krb5_get_credentials(context, KRB5_GC_CACHED, cc,
+ retval = krb5_get_credentials(context, KRB5_GC_CACHED, cc,
&creds, &new_creds);
if (retval) {
com_err("uu-client", retval, "getting TGT");
@@ -193,9 +193,9 @@ char *argv[];
com_err("uu-client", retval, "sending principal name to server");
return 8;
}
-
+
free(princ);
-
+
retval = krb5_write_message(context, (krb5_pointer) &s, &new_creds->ticket);
if (retval) {
com_err("uu-client", retval, "sending ticket to server");
@@ -213,8 +213,8 @@ char *argv[];
com_err("uu-client", retval, "initializing the auth_context");
return 9;
}
-
- retval =
+
+ retval =
krb5_auth_con_genaddrs(context, auth_context, s,
KRB5_AUTH_CONTEXT_GENERATE_LOCAL_FULL_ADDR |
KRB5_AUTH_CONTEXT_GENERATE_REMOTE_FULL_ADDR);
@@ -229,14 +229,14 @@ char *argv[];
com_err("uu-client", retval, "initializing the auth_context flags");
return 9;
}
-
- retval = krb5_auth_con_setuseruserkey(context, auth_context,
+
+ retval = krb5_auth_con_setuseruserkey(context, auth_context,
&new_creds->keyblock);
if (retval) {
com_err("uu-client", retval, "setting useruserkey for authcontext");
return 9;
}
-
+
#if 1
/* read the ap_req to get the session key */
retval = krb5_rd_req(context, &auth_context, &reply,
@@ -246,7 +246,7 @@ char *argv[];
retval = krb5_recvauth(context, &auth_context, (krb5_pointer)&s, "???",
0, /* server */, 0, NULL, &ticket);
#endif
-
+
if (retval) {
com_err("uu-client", retval, "reading AP_REQ from server");
return 9;
@@ -265,7 +265,7 @@ char *argv[];
com_err("uu-client", retval, "reading reply from server");
return 9;
}
-
+
retval = krb5_rd_safe(context, auth_context, &reply, &msg, NULL);
if (retval) {
com_err("uu-client", retval, "decoding reply from server");
@@ -275,4 +275,3 @@ char *argv[];
printf ("uu-client: server says \"%s\".\n", msg.data);
return 0;
}
-
diff --git a/src/appl/user_user/server.c b/src/appl/user_user/server.c
index 40243fe..8a66bbd 100644
--- a/src/appl/user_user/server.c
+++ b/src/appl/user_user/server.c
@@ -8,7 +8,7 @@
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -22,7 +22,7 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ *
*
* One end of the user-user client-server pair.
*/
@@ -75,12 +75,12 @@ char *argv[];
int acc;
struct servent *sp;
socklen_t namelen = sizeof(f_inaddr);
-
+
if ((sock = socket(PF_INET, SOCK_STREAM, 0)) < 0) {
com_err("uu-server", errno, "creating socket");
exit(3);
}
-
+
l_inaddr.sin_family = AF_INET;
l_inaddr.sin_addr.s_addr = 0;
if (!(sp = getservbyname("uu-sample", "tcp"))) {
@@ -145,7 +145,7 @@ char *argv[];
printf ("uu-server: client ticket is %d bytes.\n",
creds.second_ticket.length);
- retval = krb5_get_credentials(context, KRB5_GC_USER_USER, cc,
+ retval = krb5_get_credentials(context, KRB5_GC_USER_USER, cc,
&creds, &new_creds);
if (retval) {
com_err("uu-server", retval, "getting user-user ticket");
@@ -182,8 +182,8 @@ char *argv[];
com_err("uu-server", retval, "initializing the auth_context flags");
return 8;
}
-
- retval =
+
+ retval =
krb5_auth_con_genaddrs(context, auth_context, sock,
KRB5_AUTH_CONTEXT_GENERATE_LOCAL_FULL_ADDR |
KRB5_AUTH_CONTEXT_GENERATE_REMOTE_FULL_ADDR);
@@ -191,10 +191,10 @@ char *argv[];
com_err("uu-server", retval, "generating addrs for auth_context");
return 9;
}
-
+
#if 1
- retval = krb5_mk_req_extended(context, &auth_context,
- AP_OPTS_USE_SESSION_KEY,
+ retval = krb5_mk_req_extended(context, &auth_context,
+ AP_OPTS_USE_SESSION_KEY,
NULL, new_creds, &msg);
if (retval) {
com_err("uu-server", retval, "making AP_REQ");
@@ -208,12 +208,12 @@ char *argv[];
#endif
if (retval)
goto cl_short_wrt;
-
+
free(msg.data);
-
+
msgtext.length = 32;
msgtext.data = "Hello, other end of connection.";
-
+
retval = krb5_mk_safe(context, auth_context, &msgtext, &msg, NULL);
if (retval) {
com_err("uu-server", retval, "encoding message to client");