From f671e0f195530de4b13072bf7ad5110be547b1c1 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Thu, 25 May 2000 03:10:19 +0000 Subject: just some line shortening --- usr.bin/ssh/session.c | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) (limited to 'usr.bin') diff --git a/usr.bin/ssh/session.c b/usr.bin/ssh/session.c index cb0770e93f0..0d11aae2385 100644 --- a/usr.bin/ssh/session.c +++ b/usr.bin/ssh/session.c @@ -8,7 +8,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: session.c,v 1.13 2000/05/22 16:51:44 markus Exp $"); +RCSID("$OpenBSD: session.c,v 1.14 2000/05/25 03:10:18 deraadt Exp $"); #include "xmalloc.h" #include "ssh.h" @@ -613,7 +613,8 @@ do_exec_pty(Session *s, const char *command, struct passwd * pw) } } /* Do common processing for the child, such as execing the command. */ - do_child(command, pw, s->term, s->display, s->auth_proto, s->auth_data, s->tty); + do_child(command, pw, s->term, s->display, s->auth_proto, + s->auth_data, s->tty); /* NOTREACHED */ } if (pid < 0) @@ -717,7 +718,10 @@ read_environment_file(char ***env, unsigned int *envsize, fprintf(stderr, "Bad line in %.100s: %.200s\n", filename, buf); continue; } - /* Replace the equals sign by nul, and advance value to the value string. */ + /* + * Replace the equals sign by nul, and advance value to + * the value string. + */ *value = '\0'; value++; child_set_env(env, envsize, cp, value); @@ -862,7 +866,8 @@ do_child(const char *command, struct passwd * pw, const char *term, /* read $HOME/.ssh/environment. */ if (!options.use_login) { - snprintf(buf, sizeof buf, "%.200s/.ssh/environment", pw->pw_dir); + snprintf(buf, sizeof buf, "%.200s/.ssh/environment", + pw->pw_dir); read_environment_file(&env, &envsize, buf); } if (debug_flag) { @@ -951,21 +956,27 @@ do_child(const char *command, struct passwd * pw, const char *term, if (auth_proto != NULL && auth_data != NULL) { char *screen = strchr(display, ':'); if (debug_flag) { - fprintf(stderr, "Running %.100s add %.100s %.100s %.100s\n", + fprintf(stderr, + "Running %.100s add %.100s %.100s %.100s\n", XAUTH_PATH, display, auth_proto, auth_data); if (screen != NULL) - fprintf(stderr, "Adding %.*s/unix%s %s %s\n", - screen-display, display, screen, auth_proto, auth_data); + fprintf(stderr, + "Adding %.*s/unix%s %s %s\n", + screen-display, display, + screen, auth_proto, auth_data); } f = popen(XAUTH_PATH " -q -", "w"); if (f) { - fprintf(f, "add %s %s %s\n", display, auth_proto, auth_data); + fprintf(f, "add %s %s %s\n", display, + auth_proto, auth_data); if (screen != NULL) fprintf(f, "add %.*s/unix%s %s %s\n", - screen-display, display, screen, auth_proto, auth_data); + screen-display, display, + screen, auth_proto, auth_data); pclose(f); } else - fprintf(stderr, "Could not run %s -q -\n", XAUTH_PATH); + fprintf(stderr, "Could not run %s -q -\n", + XAUTH_PATH); } } #endif /* XAUTH_PATH */ @@ -995,7 +1006,8 @@ do_child(const char *command, struct passwd * pw, const char *term, struct stat mailstat; mailbox = getenv("MAIL"); if (mailbox != NULL) { - if (stat(mailbox, &mailstat) != 0 || mailstat.st_size == 0) + if (stat(mailbox, &mailstat) != 0 || + mailstat.st_size == 0) printf("No mail.\n"); else if (mailstat.st_mtime < mailstat.st_atime) printf("You have mail.\n"); -- cgit v1.2.3