summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-07-01 13:24:21 +1000
committerDamien Miller <djm@mindrot.org>2000-07-01 13:24:21 +1000
commit7b413d2d1702997152051a54dcda984e288eeea5 (patch)
tree8cd4bc0a9dd3d58ddbdcef3f43f3366400117856
parent8e81ed3081412b3525d6819216ec3eb3f8b65c7e (diff)
- (djm) Replace "/bin/sh" with _PATH_BSHELL
- (djm) Replace "/usr/bin/login" with LOGIN_PROGRAM
-rw-r--r--ChangeLog2
-rw-r--r--session.c10
-rw-r--r--sshconnect.c6
3 files changed, 10 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 06ed24d51..ad858a998 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
120000701 120000701
2 - (djm) Fix Tru64 SIA problems reported by John P Speno <speno@isc.upenn.edu> 2 - (djm) Fix Tru64 SIA problems reported by John P Speno <speno@isc.upenn.edu>
3 - (djm) Login fixes from Tom Bertelson <tbert@abac.com> 3 - (djm) Login fixes from Tom Bertelson <tbert@abac.com>
4 - (djm) Replace "/bin/sh" with _PATH_BSHELL
5 - (djm) Replace "/usr/bin/login" with LOGIN_PROGRAM
4 6
520000628 720000628
6 - (djm) Fixes to lastlog code for Irix 8 - (djm) Fixes to lastlog code for Irix
diff --git a/session.c b/session.c
index ca4a994e3..29956777f 100644
--- a/session.c
+++ b/session.c
@@ -1057,9 +1057,9 @@ do_child(const char *command, struct passwd * pw, const char *term,
1057 if (!options.use_login) { 1057 if (!options.use_login) {
1058 if (stat(SSH_USER_RC, &st) >= 0) { 1058 if (stat(SSH_USER_RC, &st) >= 0) {
1059 if (debug_flag) 1059 if (debug_flag)
1060 fprintf(stderr, "Running /bin/sh %s\n", SSH_USER_RC); 1060 fprintf(stderr, "Running "_PATH_BSHELL" %s\n", SSH_USER_RC);
1061 1061
1062 f = popen("/bin/sh " SSH_USER_RC, "w"); 1062 f = popen(_PATH_BSHELL " " SSH_USER_RC, "w");
1063 if (f) { 1063 if (f) {
1064 if (auth_proto != NULL && auth_data != NULL) 1064 if (auth_proto != NULL && auth_data != NULL)
1065 fprintf(f, "%s %s\n", auth_proto, auth_data); 1065 fprintf(f, "%s %s\n", auth_proto, auth_data);
@@ -1068,9 +1068,9 @@ do_child(const char *command, struct passwd * pw, const char *term,
1068 fprintf(stderr, "Could not run %s\n", SSH_USER_RC); 1068 fprintf(stderr, "Could not run %s\n", SSH_USER_RC);
1069 } else if (stat(SSH_SYSTEM_RC, &st) >= 0) { 1069 } else if (stat(SSH_SYSTEM_RC, &st) >= 0) {
1070 if (debug_flag) 1070 if (debug_flag)
1071 fprintf(stderr, "Running /bin/sh %s\n", SSH_SYSTEM_RC); 1071 fprintf(stderr, "Running "_PATH_BSHELL" %s\n", SSH_SYSTEM_RC);
1072 1072
1073 f = popen("/bin/sh " SSH_SYSTEM_RC, "w"); 1073 f = popen(_PATH_BSHELL " " SSH_SYSTEM_RC, "w");
1074 if (f) { 1074 if (f) {
1075 if (auth_proto != NULL && auth_data != NULL) 1075 if (auth_proto != NULL && auth_data != NULL)
1076 fprintf(f, "%s %s\n", auth_proto, auth_data); 1076 fprintf(f, "%s %s\n", auth_proto, auth_data);
@@ -1160,7 +1160,7 @@ do_child(const char *command, struct passwd * pw, const char *term,
1160 } else { 1160 } else {
1161 /* Launch login(1). */ 1161 /* Launch login(1). */
1162 1162
1163 execl("/usr/bin/login", "login", "-h", get_remote_ipaddr(), 1163 execl(LOGIN_PROGRAM, "login", "-h", get_remote_ipaddr(),
1164 "-p", "-f", "--", pw->pw_name, NULL); 1164 "-p", "-f", "--", pw->pw_name, NULL);
1165 1165
1166 /* Login couldn't be executed, die. */ 1166 /* Login couldn't be executed, die. */
diff --git a/sshconnect.c b/sshconnect.c
index 835ca7b3a..79b6856da 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -108,15 +108,15 @@ ssh_proxy_connect(const char *host, u_short port, uid_t original_real_uid,
108 108
109 /* Stderr is left as it is so that error messages get 109 /* Stderr is left as it is so that error messages get
110 printed on the user's terminal. */ 110 printed on the user's terminal. */
111 argv[0] = "/bin/sh"; 111 argv[0] = _PATH_BSHELL;
112 argv[1] = "-c"; 112 argv[1] = "-c";
113 argv[2] = command_string; 113 argv[2] = command_string;
114 argv[3] = NULL; 114 argv[3] = NULL;
115 115
116 /* Execute the proxy command. Note that we gave up any 116 /* Execute the proxy command. Note that we gave up any
117 extra privileges above. */ 117 extra privileges above. */
118 execv("/bin/sh", argv); 118 execv(_PATH_BSHELL, argv);
119 perror("/bin/sh"); 119 perror(_PATH_BSHELL);
120 exit(1); 120 exit(1);
121 } 121 }
122 /* Parent. */ 122 /* Parent. */