diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-12-06 17:47:47 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-12-06 17:47:47 +0000 |
commit | 38b951cdb22cde13e1c625a85769be03e7d35b4d (patch) | |
tree | 0995adff1b2dd0b8c716792326f50f6ba96d25fa | |
parent | 4a4bd719ea926739cea6ec8704b2ecc60553e8bc (diff) |
- markus@cvs.openbsd.org 2001/12/01 21:41:48
[session.c sshd.8]
don't pass user defined variables to /usr/bin/login
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | session.c | 27 | ||||
-rw-r--r-- | sshd.8 | 5 |
3 files changed, 23 insertions, 14 deletions
@@ -44,6 +44,9 @@ | |||
44 | [ssh.c] | 44 | [ssh.c] |
45 | sscanf() length dependencies are clearer now; can also shrink proto | 45 | sscanf() length dependencies are clearer now; can also shrink proto |
46 | and data if desired, but i have not done that. ok markus@ | 46 | and data if desired, but i have not done that. ok markus@ |
47 | - markus@cvs.openbsd.org 2001/12/01 21:41:48 | ||
48 | [session.c sshd.8] | ||
49 | don't pass user defined variables to /usr/bin/login | ||
47 | 50 | ||
48 | 20011126 | 51 | 20011126 |
49 | - (tim) [contrib/cygwin/README, openbsd-compat/bsd-cygwin_util.c, | 52 | - (tim) [contrib/cygwin/README, openbsd-compat/bsd-cygwin_util.c, |
@@ -6966,4 +6969,4 @@ | |||
6966 | - Wrote replacements for strlcpy and mkdtemp | 6969 | - Wrote replacements for strlcpy and mkdtemp |
6967 | - Released 1.0pre1 | 6970 | - Released 1.0pre1 |
6968 | 6971 | ||
6969 | $Id: ChangeLog,v 1.1679 2001/12/06 17:45:19 mouring Exp $ | 6972 | $Id: ChangeLog,v 1.1680 2001/12/06 17:47:47 mouring Exp $ |
@@ -33,7 +33,7 @@ | |||
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include "includes.h" | 35 | #include "includes.h" |
36 | RCSID("$OpenBSD: session.c,v 1.108 2001/10/11 13:45:21 markus Exp $"); | 36 | RCSID("$OpenBSD: session.c,v 1.110 2001/12/01 21:41:48 markus Exp $"); |
37 | 37 | ||
38 | #include "ssh.h" | 38 | #include "ssh.h" |
39 | #include "ssh1.h" | 39 | #include "ssh1.h" |
@@ -1247,18 +1247,21 @@ do_child(Session *s, const char *command) | |||
1247 | child_set_env(&env, &envsize, "TZ", getenv("TZ")); | 1247 | child_set_env(&env, &envsize, "TZ", getenv("TZ")); |
1248 | 1248 | ||
1249 | /* Set custom environment options from RSA authentication. */ | 1249 | /* Set custom environment options from RSA authentication. */ |
1250 | while (custom_environment) { | 1250 | if (!options.use_login) { |
1251 | struct envstring *ce = custom_environment; | 1251 | while (custom_environment) { |
1252 | char *s = ce->s; | 1252 | struct envstring *ce = custom_environment; |
1253 | int i; | 1253 | char *s = ce->s; |
1254 | for (i = 0; s[i] != '=' && s[i]; i++); | 1254 | int i; |
1255 | if (s[i] == '=') { | 1255 | for (i = 0; s[i] != '=' && s[i]; i++) |
1256 | s[i] = 0; | 1256 | ; |
1257 | child_set_env(&env, &envsize, s, s + i + 1); | 1257 | if (s[i] == '=') { |
1258 | s[i] = 0; | ||
1259 | child_set_env(&env, &envsize, s, s + i + 1); | ||
1260 | } | ||
1261 | custom_environment = ce->next; | ||
1262 | xfree(ce->s); | ||
1263 | xfree(ce); | ||
1258 | } | 1264 | } |
1259 | custom_environment = ce->next; | ||
1260 | xfree(ce->s); | ||
1261 | xfree(ce); | ||
1262 | } | 1265 | } |
1263 | 1266 | ||
1264 | snprintf(buf, sizeof buf, "%.50s %d %d", | 1267 | snprintf(buf, sizeof buf, "%.50s %d %d", |
@@ -34,7 +34,7 @@ | |||
34 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 34 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
35 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 35 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
36 | .\" | 36 | .\" |
37 | .\" $OpenBSD: sshd.8,v 1.154 2001/11/07 22:12:01 markus Exp $ | 37 | .\" $OpenBSD: sshd.8,v 1.155 2001/12/01 21:41:48 markus Exp $ |
38 | .Dd September 25, 1999 | 38 | .Dd September 25, 1999 |
39 | .Dt SSHD 8 | 39 | .Dt SSHD 8 |
40 | .Os | 40 | .Os |
@@ -1014,6 +1014,9 @@ logging in using this key. | |||
1014 | Environment variables set this way | 1014 | Environment variables set this way |
1015 | override other default environment values. | 1015 | override other default environment values. |
1016 | Multiple options of this type are permitted. | 1016 | Multiple options of this type are permitted. |
1017 | This option is automatically disabled if | ||
1018 | .Cm UseLogin | ||
1019 | is enabled. | ||
1017 | .It Cm no-port-forwarding | 1020 | .It Cm no-port-forwarding |
1018 | Forbids TCP/IP forwarding when this key is used for authentication. | 1021 | Forbids TCP/IP forwarding when this key is used for authentication. |
1019 | Any port forward requests by the client will return an error. | 1022 | Any port forward requests by the client will return an error. |