summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
authorKevin Steves <stevesk@pobox.com>2001-02-05 12:42:17 +0000
committerKevin Steves <stevesk@pobox.com>2001-02-05 12:42:17 +0000
commitef4eea9badfb65f05ac24f786b710cc3f27f0e43 (patch)
treef54abef181ccd6ad5285a5c16b4c159d8b74e932 /session.c
parentd2ddda4efab29fd8663757634773fa10e557e0f3 (diff)
- stevesk@cvs.openbsd.org 2001/02/04 08:32:27
[many files; did this manually to our top-level source dir] unexpand and remove end-of-line whitespace; ok markus@
Diffstat (limited to 'session.c')
-rw-r--r--session.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/session.c b/session.c
index 51b661afb..dcbf70f31 100644
--- a/session.c
+++ b/session.c
@@ -62,7 +62,7 @@ RCSID("$OpenBSD: session.c,v 1.52 2001/02/03 10:08:37 markus Exp $");
62#endif /* WITH_IRIX_PROJECT */ 62#endif /* WITH_IRIX_PROJECT */
63#ifdef WITH_IRIX_JOBS 63#ifdef WITH_IRIX_JOBS
64#include <sys/resource.h> 64#include <sys/resource.h>
65#endif 65#endif
66#ifdef WITH_IRIX_AUDIT 66#ifdef WITH_IRIX_AUDIT
67#include <sat.h> 67#include <sat.h>
68#endif /* WITH_IRIX_AUDIT */ 68#endif /* WITH_IRIX_AUDIT */
@@ -150,7 +150,7 @@ extern int startup_pipe;
150static char *xauthfile; 150static char *xauthfile;
151 151
152/* original command from peer. */ 152/* original command from peer. */
153char *original_command = NULL; 153char *original_command = NULL;
154 154
155/* data */ 155/* data */
156#define MAX_SESSIONS 10 156#define MAX_SESSIONS 10
@@ -874,11 +874,11 @@ void do_pam_environment(char ***env, int *envsize)
874 874
875 if ((pam_env = fetch_pam_environment()) == NULL) 875 if ((pam_env = fetch_pam_environment()) == NULL)
876 return; 876 return;
877 877
878 for(i = 0; pam_env[i] != NULL; i++) { 878 for(i = 0; pam_env[i] != NULL; i++) {
879 if ((equals = strstr(pam_env[i], "=")) == NULL) 879 if ((equals = strstr(pam_env[i], "=")) == NULL)
880 continue; 880 continue;
881 881
882 if (strlen(pam_env[i]) < (sizeof(var_name) - 1)) { 882 if (strlen(pam_env[i]) < (sizeof(var_name) - 1)) {
883 memset(var_name, '\0', sizeof(var_name)); 883 memset(var_name, '\0', sizeof(var_name));
884 memset(var_val, '\0', sizeof(var_val)); 884 memset(var_val, '\0', sizeof(var_val));
@@ -904,7 +904,7 @@ void copy_environment(char ***env, int *envsize)
904 for(i = 0; environ[i] != NULL; i++) { 904 for(i = 0; environ[i] != NULL; i++) {
905 if ((equals = strstr(environ[i], "=")) == NULL) 905 if ((equals = strstr(environ[i], "=")) == NULL)
906 continue; 906 continue;
907 907
908 if (strlen(environ[i]) < (sizeof(var_name) - 1)) { 908 if (strlen(environ[i]) < (sizeof(var_name) - 1)) {
909 memset(var_name, '\0', sizeof(var_name)); 909 memset(var_name, '\0', sizeof(var_name));
910 memset(var_val, '\0', sizeof(var_val)); 910 memset(var_val, '\0', sizeof(var_val));
@@ -1106,7 +1106,7 @@ do_child(const char *command, struct passwd * pw, const char *term,
1106 if (jid == -1) { 1106 if (jid == -1) {
1107 fatal("Failed to create job container: %.100s", 1107 fatal("Failed to create job container: %.100s",
1108 strerror(errno)); 1108 strerror(errno));
1109 } 1109 }
1110# endif /* WITH_IRIX_JOBS */ 1110# endif /* WITH_IRIX_JOBS */
1111# ifdef WITH_IRIX_ARRAY 1111# ifdef WITH_IRIX_ARRAY
1112 /* initialize array session */ 1112 /* initialize array session */
@@ -1384,7 +1384,7 @@ do_child(const char *command, struct passwd * pw, const char *term,
1384 fprintf(f, "add %s %s %s\n", display, 1384 fprintf(f, "add %s %s %s\n", display,
1385 auth_proto, auth_data); 1385 auth_proto, auth_data);
1386#ifndef HAVE_CYGWIN /* Unix sockets are not supported */ 1386#ifndef HAVE_CYGWIN /* Unix sockets are not supported */
1387 if (screen != NULL) 1387 if (screen != NULL)
1388 fprintf(f, "add %.*s/unix%s %s %s\n", 1388 fprintf(f, "add %.*s/unix%s %s %s\n",
1389 (int)(screen-display), display, 1389 (int)(screen-display), display,
1390 screen, auth_proto, auth_data); 1390 screen, auth_proto, auth_data);
@@ -1968,7 +1968,7 @@ session_close_by_channel(int id, void *arg)
1968 session_close(s); 1968 session_close(s);
1969 } else { 1969 } else {
1970 /* notify child, delay session cleanup */ 1970 /* notify child, delay session cleanup */
1971 if (s->pid <= 1) 1971 if (s->pid <= 1)
1972 fatal("session_close_by_channel: Unsafe s->pid = %d", s->pid); 1972 fatal("session_close_by_channel: Unsafe s->pid = %d", s->pid);
1973 if (kill(s->pid, (s->ttyfd == -1) ? SIGTERM : SIGHUP) < 0) 1973 if (kill(s->pid, (s->ttyfd == -1) ? SIGTERM : SIGHUP) < 0)
1974 error("session_close_by_channel: kill %d: %s", 1974 error("session_close_by_channel: kill %d: %s",