From b6453d997b389fcff085e3c3751b388c678f6879 Mon Sep 17 00:00:00 2001 From: djm Date: Fri, 21 Nov 2003 12:56:47 +0000 Subject: [PATCH] more whitespace (tabs this time) --- auth-krb5.c | 16 ++++++++-------- auth-pam.c | 6 +++--- auth-passwd.c | 2 +- auth-sia.c | 2 +- auth.c | 2 +- auth2-gss.c | 14 +++++++------- authfd.c | 2 +- buffer.c | 2 +- channels.c | 2 +- entropy.c | 2 +- gss-genr.c | 4 ++-- md5crypt.c | 2 +- moduli.c | 4 ++-- monitor.c | 18 +++++++++--------- monitor_wrap.c | 2 +- scard-opensc.c | 8 ++++---- scp.c | 2 +- session.c | 12 ++++++------ sftp-glob.c | 2 +- sftp-int.c | 6 +++--- ssh-keygen.c | 2 +- ssh-rand-helper.c | 10 +++++----- sshconnect2.c | 18 +++++++++--------- 23 files changed, 70 insertions(+), 70 deletions(-) diff --git a/auth-krb5.c b/auth-krb5.c index b41c4882..8377aed1 100644 --- a/auth-krb5.c +++ b/auth-krb5.c @@ -68,7 +68,7 @@ auth_krb5_password(Authctxt *authctxt, const char *password) krb5_principal server; char ccname[40]; int tmpfd; -#endif +#endif krb5_error_code problem; krb5_ccache ccache = NULL; @@ -97,10 +97,10 @@ auth_krb5_password(Authctxt *authctxt, const char *password) goto out; restore_uid(); - + problem = krb5_verify_user(authctxt->krb5_ctx, authctxt->krb5_user, ccache, password, 1, NULL); - + temporarily_use_uid(authctxt->pw); if (problem) @@ -135,7 +135,7 @@ auth_krb5_password(Authctxt *authctxt, const char *password) temporarily_use_uid(authctxt->pw); if (problem) goto out; - + if (!krb5_kuserok(authctxt->krb5_ctx, authctxt->krb5_user, authctxt->pw->pw_name)) { problem = -1; @@ -143,13 +143,13 @@ auth_krb5_password(Authctxt *authctxt, const char *password) } snprintf(ccname,sizeof(ccname),"FILE:/tmp/krb5cc_%d_XXXXXX",geteuid()); - + if ((tmpfd = mkstemp(ccname+strlen("FILE:")))==-1) { logit("mkstemp(): %.100s", strerror(errno)); problem = errno; goto out; } - + if (fchmod(tmpfd,S_IRUSR | S_IWUSR) == -1) { logit("fchmod(): %.100s", strerror(errno)); close(tmpfd); @@ -166,12 +166,12 @@ auth_krb5_password(Authctxt *authctxt, const char *password) authctxt->krb5_user); if (problem) goto out; - + problem= krb5_cc_store_cred(authctxt->krb5_ctx, authctxt->krb5_fwd_ccache, &creds); if (problem) goto out; -#endif +#endif authctxt->krb5_ticket_file = (char *)krb5_cc_get_name(authctxt->krb5_ctx, authctxt->krb5_fwd_ccache); diff --git a/auth-pam.c b/auth-pam.c index 9388d2ba..f27404fa 100644 --- a/auth-pam.c +++ b/auth-pam.c @@ -321,7 +321,7 @@ sshpam_thread(void *ctxtp) ssh_msg_send(ctxt->pam_csock, PAM_AUTH_ERR, &buffer); buffer_free(&buffer); pthread_exit(NULL); - + return (NULL); /* Avoid warning for non-pthread case */ } @@ -613,7 +613,7 @@ do_pam_account(void) { sshpam_err = pam_acct_mgmt(sshpam_handle, 0); debug3("%s: pam_acct_mgmt = %d", __func__, sshpam_err); - + if (sshpam_err != PAM_SUCCESS && sshpam_err != PAM_NEW_AUTHTOK_REQD) return (0); @@ -773,7 +773,7 @@ int do_pam_putenv(char *name, char *value) { int ret = 1; -#ifdef HAVE_PAM_PUTENV +#ifdef HAVE_PAM_PUTENV char *compound; size_t len; diff --git a/auth-passwd.c b/auth-passwd.c index 4cbfe368..54571f97 100644 --- a/auth-passwd.c +++ b/auth-passwd.c @@ -101,7 +101,7 @@ auth_password(Authctxt *authctxt, const char *password) (char *)get_canonical_hostname(options.use_dns); authsuccess = 1; - aix_remove_embedded_newlines(authmsg); + aix_remove_embedded_newlines(authmsg); debug3("AIX/authenticate succeeded for user %s: %.100s", pw->pw_name, authmsg); diff --git a/auth-sia.c b/auth-sia.c index 544b601b..cdd39d67 100644 --- a/auth-sia.c +++ b/auth-sia.c @@ -100,7 +100,7 @@ session_setup_sia(struct passwd *pw, char *tty) if (sia_ses_launch(sia_collect_trm, ent) != SIASUCCESS) fatal("Couldn't launch session for %s from %s", pw->pw_name, host); - + sia_ses_release(&ent); if (setreuid(geteuid(), geteuid()) < 0) diff --git a/auth.c b/auth.c index a8cf0ce2..4b307dab 100644 --- a/auth.c +++ b/auth.c @@ -597,7 +597,7 @@ fakepw(void) memset(&fake, 0, sizeof(fake)); fake.pw_name = "NOUSER"; fake.pw_passwd = - "$2a$06$r3.juUaHZDlIbQaO2dS9FuYxL1W9M81R1Tc92PoSNmzvpEqLkLGrK"; + "$2a$06$r3.juUaHZDlIbQaO2dS9FuYxL1W9M81R1Tc92PoSNmzvpEqLkLGrK"; fake.pw_gecos = "NOUSER"; fake.pw_uid = -1; fake.pw_gid = -1; diff --git a/auth2-gss.c b/auth2-gss.c index 799d3326..9249988d 100644 --- a/auth2-gss.c +++ b/auth2-gss.c @@ -255,21 +255,21 @@ input_gssapi_mic(int type, u_int32_t plen, void *ctxt) Buffer b; gss_buffer_desc mic, gssbuf; u_int len; - + if (authctxt == NULL || (authctxt->methoddata == NULL && !use_privsep)) fatal("No authentication or GSSAPI context"); - + gssctxt = authctxt->methoddata; - + mic.value = packet_get_string(&len); mic.length = len; - + ssh_gssapi_buildmic(&b, authctxt->user, authctxt->service, "gssapi-with-mic"); - + gssbuf.value = buffer_ptr(&b); gssbuf.length = buffer_len(&b); - + if (!GSS_ERROR(PRIVSEP(ssh_gssapi_checkmic(gssctxt, &gssbuf, &mic)))) authenticated = PRIVSEP(ssh_gssapi_userok(authctxt->user)); else @@ -277,7 +277,7 @@ input_gssapi_mic(int type, u_int32_t plen, void *ctxt) buffer_free(&b); xfree(mic.value); - + authctxt->postponed = 0; dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_TOKEN, NULL); dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_ERRTOK, NULL); diff --git a/authfd.c b/authfd.c index 6a7c0720..42ca0825 100644 --- a/authfd.c +++ b/authfd.c @@ -607,7 +607,7 @@ ssh_update_card(AuthenticationConnection *auth, int add, buffer_put_char(&msg, type); buffer_put_cstring(&msg, reader_id); buffer_put_cstring(&msg, pin); - + if (constrained) { if (life != 0) { buffer_put_char(&msg, SSH_AGENT_CONSTRAIN_LIFETIME); diff --git a/buffer.c b/buffer.c index 236aeb0c..9217cb26 100644 --- a/buffer.c +++ b/buffer.c @@ -105,7 +105,7 @@ restart: goto restart; } /* Increase the size of the buffer and retry. */ - + newlen = buffer->alloc + len + 32768; if (newlen > 0xa00000) fatal("buffer_append_space: alloc %u not supported", diff --git a/channels.c b/channels.c index 4150b550..25f85c8b 100644 --- a/channels.c +++ b/channels.c @@ -1035,7 +1035,7 @@ channel_decode_socks5(Channel *c, fd_set * readset, fd_set * writeset) else if (inet_ntop(af, dest_addr, c->path, sizeof(c->path)) == NULL) return -1; c->host_port = ntohs(dest_port); - + debug2("channel %d: dynamic request: socks5 host %s port %u command %u", c->self, c->path, c->host_port, s5_req.command); diff --git a/entropy.c b/entropy.c index 96dd3fe1..431d5ea5 100644 --- a/entropy.c +++ b/entropy.c @@ -93,7 +93,7 @@ seed_rng(void) (long int)original_uid, strerror(errno)); _exit(1); } - + execl(SSH_RAND_HELPER, "ssh-rand-helper", NULL); fprintf(stderr, "(rand child) Couldn't exec '%s': %s\n", SSH_RAND_HELPER, strerror(errno)); diff --git a/gss-genr.c b/gss-genr.c index 1e044dbb..3f5727b3 100644 --- a/gss-genr.c +++ b/gss-genr.c @@ -253,14 +253,14 @@ ssh_gssapi_sign(Gssctxt *ctx, gss_buffer_t buffer, gss_buffer_t hash) if ((ctx->major = gss_get_mic(&ctx->minor, ctx->context, GSS_C_QOP_DEFAULT, buffer, hash))) ssh_gssapi_error(ctx); - + return (ctx->major); } void ssh_gssapi_buildmic(Buffer *b, const char *user, const char *service, const char *context) -{ +{ buffer_init(b); buffer_put_string(b, session_id2, session_id2_len); buffer_put_char(b, SSH2_MSG_USERAUTH_REQUEST); diff --git a/md5crypt.c b/md5crypt.c index c939717c..28336982 100644 --- a/md5crypt.c +++ b/md5crypt.c @@ -35,7 +35,7 @@ to64(unsigned long v, int n) *s++ = itoa64[v&0x3f]; v >>= 6; } - + return (buf); } diff --git a/moduli.c b/moduli.c index ae71b250..eb8cb78e 100644 --- a/moduli.c +++ b/moduli.c @@ -151,7 +151,7 @@ qfileout(FILE * ofile, u_int32_t otype, u_int32_t otests, u_int32_t otries, time(&time_now); gtm = gmtime(&time_now); - + res = fprintf(ofile, "%04d%02d%02d%02d%02d%02d %u %u %u %u %x ", gtm->tm_year + 1900, gtm->tm_mon + 1, gtm->tm_mday, gtm->tm_hour, gtm->tm_min, gtm->tm_sec, @@ -573,7 +573,7 @@ prime_test(FILE *in, FILE *out, u_int32_t trials, count_in); continue; } - + /* * q is possibly prime, so go ahead and really make sure * that p is prime. If it is, then we can go back and do diff --git a/monitor.c b/monitor.c index 449397e3..46e8d16e 100644 --- a/monitor.c +++ b/monitor.c @@ -783,7 +783,7 @@ int mm_answer_pam_start(int socket, Buffer *m) { char *user; - + if (!options.use_pam) fatal("UsePAM not set, but ended up in %s anyway", __func__); @@ -802,7 +802,7 @@ int mm_answer_pam_account(int socket, Buffer *m) { u_int ret; - + if (!options.use_pam) fatal("UsePAM not set, but ended up in %s anyway", __func__); @@ -1798,25 +1798,25 @@ mm_answer_gss_checkmic(int socket, Buffer *m) gss_buffer_desc gssbuf, mic; OM_uint32 ret; u_int len; - + gssbuf.value = buffer_get_string(m, &len); gssbuf.length = len; mic.value = buffer_get_string(m, &len); mic.length = len; - + ret = ssh_gssapi_checkmic(gsscontext, &gssbuf, &mic); - + xfree(gssbuf.value); xfree(mic.value); - + buffer_clear(m); buffer_put_int(m, ret); - + mm_request_send(socket, MONITOR_ANS_GSSCHECKMIC, m); - + if (!GSS_ERROR(ret)) monitor_permit(mon_dispatch, MONITOR_REQ_GSSUSEROK, 1); - + return (0); } diff --git a/monitor_wrap.c b/monitor_wrap.c index 7ca9672f..e7c15cec 100644 --- a/monitor_wrap.c +++ b/monitor_wrap.c @@ -720,7 +720,7 @@ mm_do_pam_account(void) ret = buffer_get_int(&m); buffer_free(&m); - + debug3("%s returning %d", __func__, ret); return (ret); diff --git a/scard-opensc.c b/scard-opensc.c index ff3017f5..a9b7ebc6 100644 --- a/scard-opensc.c +++ b/scard-opensc.c @@ -189,7 +189,7 @@ sc_private_decrypt(int flen, u_char *from, u_char *to, RSA *rsa, int r; if (padding != RSA_PKCS1_PADDING) - return -1; + return -1; r = sc_prkey_op_init(rsa, &key_obj, SC_USAGE_DECRYPT); if (r) return -1; @@ -325,7 +325,7 @@ static void convert_rsa_to_rsa1(Key * in, Key * out) { struct sc_priv_data *priv; - + out->rsa->flags = in->rsa->flags; out->flags = in->flags; RSA_set_method(out->rsa, RSA_get_method(in->rsa)); @@ -349,7 +349,7 @@ sc_read_pubkey(Key * k, const struct sc_pkcs15_object *cert_obj) EVP_PKEY *pubkey = NULL; u8 *p; char *tmp; - + debug("sc_read_pubkey() with cert id %02X", cinfo->id.value[0]); r = sc_pkcs15_read_certificate(p15card, cinfo, &cert); if (r) { @@ -391,7 +391,7 @@ sc_read_pubkey(Key * k, const struct sc_pkcs15_object *cert_obj) tmp = key_fingerprint(k, SSH_FP_MD5, SSH_FP_HEX); debug("fingerprint %d %s", key_size(k), tmp); xfree(tmp); - + return 0; err: if (cert) diff --git a/scp.c b/scp.c index cece74a9..10f6428b 100644 --- a/scp.c +++ b/scp.c @@ -907,7 +907,7 @@ bad: run_err("%s: %s", np, strerror(errno)); cp += j; statbytes += j; } while (amt > 0); - + if (limitbw) bwlimit(4096); diff --git a/session.c b/session.c index 3a3a09b5..7e56c54f 100644 --- a/session.c +++ b/session.c @@ -924,11 +924,11 @@ read_etc_default_login(char ***env, u_int *envsize, uid_t uid) var = child_get_env(tmpenv, "PATH"); if (var != NULL) child_set_env(env, envsize, "PATH", var); - + if ((var = child_get_env(tmpenv, "UMASK")) != NULL) if (sscanf(var, "%5lo", &mask) == 1) umask((mode_t)mask); - + for (i = 0; tmpenv[i] != NULL; i++) xfree(tmpenv[i]); xfree(tmpenv); @@ -953,7 +953,7 @@ void copy_environment(char **source, char ***env, u_int *envsize) debug3("Copy environment: %s=%s", var_name, var_val); child_set_env(env, envsize, var_name, var_val); - + xfree(var_name); } } @@ -1096,7 +1096,7 @@ do_setup_env(Session *s, const char *shell) */ if (options.use_pam) { char **p; - + p = fetch_pam_child_environment(); copy_environment(p, &env, &envsize); free_pam_environment(p); @@ -2033,13 +2033,13 @@ session_tty_list(void) for (i = 0; i < MAX_SESSIONS; i++) { Session *s = &sessions[i]; if (s->used && s->ttyfd != -1) { - + if (strncmp(s->tty, "/dev/", 5) != 0) { cp = strrchr(s->tty, '/'); cp = (cp == NULL) ? s->tty : cp + 1; } else cp = s->tty + 5; - + if (buf[0] != '\0') strlcat(buf, ",", sizeof buf); strlcat(buf, cp, sizeof buf); diff --git a/sftp-glob.c b/sftp-glob.c index 4f223465..f099227f 100644 --- a/sftp-glob.c +++ b/sftp-glob.c @@ -70,7 +70,7 @@ fudge_readdir(struct SFTP_OPENDIR *od) #ifdef __GNU_LIBRARY__ static int inum = 1; #endif /* __GNU_LIBRARY__ */ - + if (od->dir[od->offset] == NULL) return(NULL); diff --git a/sftp-int.c b/sftp-int.c index 4c280b49..599a3444 100644 --- a/sftp-int.c +++ b/sftp-int.c @@ -390,7 +390,7 @@ get_pathname(const char **cpp, char **path) fail: xfree(*path); - *path = NULL; + *path = NULL; return (-1); } @@ -679,7 +679,7 @@ do_globbed_ls(struct sftp_conn *conn, char *path, char *strip_path, if (!(lflag & SHORT_VIEW)) { int m = 0, width = 80; - struct winsize ws; + struct winsize ws; /* Count entries for sort and find longest filename */ for (i = 0; g.gl_pathv[i]; i++) @@ -759,7 +759,7 @@ parse_args(const char **cpp, int *pflag, int *lflag, int *iflag, *iflag = 1; cp++; } - + /* Figure out which command we have */ for (i = 0; cmds[i].c; i++) { int cmdlen = strlen(cmds[i].c); diff --git a/ssh-keygen.c b/ssh-keygen.c index 95d22b6a..54aa5a59 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c @@ -968,7 +968,7 @@ main(int ac, char **av) if (do_gen_candidates) { FILE *out = fopen(out_file, "w"); - + if (out == NULL) { error("Couldn't open modulus candidate file \"%s\": %s", out_file, strerror(errno)); diff --git a/ssh-rand-helper.c b/ssh-rand-helper.c index c2cffe52..9c9c4956 100644 --- a/ssh-rand-helper.c +++ b/ssh-rand-helper.c @@ -779,7 +779,7 @@ main(int argc, char **argv) /* Don't write binary data to a tty, unless we are forced to */ if (isatty(STDOUT_FILENO)) output_hex = 1; - + while ((ch = getopt(argc, argv, "vxXhb:")) != -1) { switch (ch) { case 'v': @@ -806,7 +806,7 @@ main(int argc, char **argv) } log_init(argv[0], ll, SYSLOG_FACILITY_USER, 1); - + #ifdef USE_SEED_FILES prng_read_seedfile(); #endif @@ -816,7 +816,7 @@ main(int argc, char **argv) /* * Seed the RNG from wherever we can */ - + /* Take whatever is on the stack, but don't credit it */ RAND_add(buf, bytes, 0); @@ -859,9 +859,9 @@ main(int argc, char **argv) printf("\n"); } else ret = atomicio(vwrite, STDOUT_FILENO, buf, bytes); - + memset(buf, '\0', bytes); xfree(buf); - + return ret == bytes ? 0 : 1; } diff --git a/sshconnect2.c b/sshconnect2.c index 76670e8a..281fecdc 100644 --- a/sshconnect2.c +++ b/sshconnect2.c @@ -546,7 +546,7 @@ process_gssapi_token(void *ctxt, gss_buffer_t recv_tok) gss_buffer_desc gssbuf, mic; OM_uint32 status, ms, flags; Buffer b; - + status = ssh_gssapi_init_ctx(gssctxt, options.gss_deleg_creds, recv_tok, &send_tok, &flags); @@ -555,12 +555,12 @@ process_gssapi_token(void *ctxt, gss_buffer_t recv_tok) packet_start(SSH2_MSG_USERAUTH_GSSAPI_ERRTOK); else packet_start(SSH2_MSG_USERAUTH_GSSAPI_TOKEN); - + packet_put_string(send_tok.value, send_tok.length); packet_send(); gss_release_buffer(&ms, &send_tok); } - + if (status == GSS_S_COMPLETE) { /* send either complete or MIC, depending on mechanism */ if (!(flags & GSS_C_INTEG_FLAG)) { @@ -572,21 +572,21 @@ process_gssapi_token(void *ctxt, gss_buffer_t recv_tok) gssbuf.value = buffer_ptr(&b); gssbuf.length = buffer_len(&b); - + status = ssh_gssapi_sign(gssctxt, &gssbuf, &mic); - + if (!GSS_ERROR(status)) { packet_start(SSH2_MSG_USERAUTH_GSSAPI_MIC); packet_put_string(mic.value, mic.length); - + packet_send(); } - + buffer_free(&b); gss_release_buffer(&ms, &mic); - } + } } - + return status; } -- 2.45.2