Test Execution Status | Statistics |
---|---|
Passed | 0.000% (0/10) |
Incident | 0.000% (0/10) |
Skipped | 0.000% (0/10) |
Failed | 0.000% (0/10) |
Requires Manual Checking | 0.000% (0/10) |
Unknown | 0.000% (0/10) |
All | 0.000% (0/10) |
Category | Removed Lines | Inserted Lines | Total |
---|---|---|---|
Modified lines executed: | 0.000% (0/16) | 0.000% (0/33) | 0.000% (0/49) |
Modified lines not executed: | 87.500% (14/16) | 72.727% (24/33) | 77.551% (38/49) |
Source code lines not instrumented: | 12.500% (2/16) | 27.273% (9/33) | 22.449% (11/49) |
Execution Name | State |
---|
Line | Tests | Difference Output |
---|---|---|
diff --git a/clientloop.c b/clientloop.c | ||
index ad35cb7b..8d312cda 100644 | ||
--- a/clientloop.c | ||
+++ b/clientloop.c | ||
@@ -1,4 +1,4 @@ | ||
1 | - No equivalent source code line in the reference code can be identified. | -/* $OpenBSD: clientloop.c,v 1.317 2018/07/11 18:53:29 markus Exp $ */ |
1 | - | +/* $OpenBSD: clientloop.c,v 1.318 2018/09/21 12:46:22 djm Exp $ */ |
2 | /* | |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | |
@@ -279,7 +279,7 @@ client_x11_get_proto(struct ssh *ssh, const char *display, | ||
279 | const char *xauth_path, u_int trusted, u_int timeout, | |
280 | char **_proto, char **_data) | |
281 | { | |
282 | 0 | - char cmd[1024], line[512], xdisplay[512]; |
282 | 0 | + char *cmd, line[512], xdisplay[512]; |
283 | char xauthfile[PATH_MAX], xauthdir[PATH_MAX]; | |
284 | static char proto[512], data[512]; | |
285 | FILE *f; | |
@@ -343,19 +343,30 @@ client_x11_get_proto(struct ssh *ssh, const char *display, | ||
343 | return -1; | |
344 | } | |
345 | ||
346 | 0 | - if (timeout >= UINT_MAX - X11_TIMEOUT_SLACK) |
347 | 0 | - x11_timeout_real = UINT_MAX; |
348 | 0 | - else |
349 | 0 | - x11_timeout_real = timeout + X11_TIMEOUT_SLACK; |
350 | 0 | - if ((r = snprintf(cmd, sizeof(cmd), |
351 | 0 | - "%s -f %s generate %s " SSH_X11_PROTO |
352 | 0 | - " untrusted timeout %u 2>" _PATH_DEVNULL, |
353 | 0 | - xauth_path, xauthfile, display, |
354 | 0 | - x11_timeout_real)) < 0 || |
355 | 0 | - (size_t)r >= sizeof(cmd)) |
356 | 0 | - fatal("%s: cmd too long", __func__); |
346 | 0 | + if (timeout == 0) { |
347 | - | + /* auth doesn't time out */ |
348 | 0 | + xasprintf(&cmd, "%s -f %s generate %s %s " |
349 | 0 | + "untrusted 2>%s", |
350 | 0 | + xauth_path, xauthfile, display, |
351 | 0 | + SSH_X11_PROTO, _PATH_DEVNULL); |
352 | 0 | + } else { |
353 | 0 | + /* Add some slack to requested expiry */ |
354 | 0 | + if (timeout < UINT_MAX - X11_TIMEOUT_SLACK) |
355 | 0 | + x11_timeout_real = timeout + |
356 | 0 | + X11_TIMEOUT_SLACK; |
357 | - | + else { |
358 | 0 | + /* Don't overflow on long timeouts */ |
359 | 0 | + x11_timeout_real = UINT_MAX; |
360 | 0 | + } |
361 | 0 | + xasprintf(&cmd, "%s -f %s generate %s %s " |
362 | 0 | + "untrusted timeout %u 2>%s", |
363 | 0 | + xauth_path, xauthfile, display, |
364 | 0 | + SSH_X11_PROTO, x11_timeout_real, |
365 | 0 | + _PATH_DEVNULL); |
366 | 0 | + } |
357 ➡ 367 | debug2("%s: %s", __func__, cmd); | |
358 | 0 | - if (x11_refuse_time == 0) { |
368 | - | + |
369 | 0 | + if (timeout != 0 && x11_refuse_time == 0) { |
359 ➡ 370 | now = monotime() + 1; | |
360 ➡ 371 | if (UINT_MAX - timeout < now) | |
361 ➡ 372 | x11_refuse_time = UINT_MAX; | |
@@ -366,6 +377,7 @@ client_x11_get_proto(struct ssh *ssh, const char *display, | ||
366 ➡ 377 | } | |
367 ➡ 378 | if (system(cmd) == 0) | |
368 ➡ 379 | generated = 1; | |
380 | 0 | + free(cmd); |
369 ➡ 381 | } | |
370 ➡ 382 | ||
371 ➡ 383 | /* | |
@@ -374,7 +386,7 @@ client_x11_get_proto(struct ssh *ssh, const char *display, | ||
374 ➡ 386 | * above. | |
375 ➡ 387 | */ | |
376 ➡ 388 | if (trusted || generated) { | |
377 | 0 | - snprintf(cmd, sizeof(cmd), |
389 | 0 | + xasprintf(&cmd, |
378 ➡ 390 | "%s %s%s list %s 2>" _PATH_DEVNULL, | |
379 ➡ 391 | xauth_path, | |
380 ➡ 392 | generated ? "-f " : "" , | |
@@ -387,6 +399,7 @@ client_x11_get_proto(struct ssh *ssh, const char *display, | ||
387 ➡ 399 | got_data = 1; | |
388 ➡ 400 | if (f) | |
389 ➡ 401 | pclose(f); | |
402 | 0 | + free(cmd); |
390 ➡ 403 | } | |
391 ➡ 404 | } | |
392 ➡ 405 |
Line | Tests | Difference Output |
---|---|---|
diff --git a/ssh_config.5 b/ssh_config.5 | ||
index 2df1165f..27136dbd 100644 | ||
--- a/ssh_config.5 | ||
+++ b/ssh_config.5 | ||
@@ -33,7 +33,7 @@ | ||
33 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | |
34 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
35 | .\" | |
36 | - No equivalent source code line in the reference code can be identified. | -.\" $OpenBSD: ssh_config.5,v 1.284 2018/09/21 03:11:36 djm Exp $ |
36 | - | +.\" $OpenBSD: ssh_config.5,v 1.285 2018/09/21 12:46:22 djm Exp $ |
37 | .Dd $Mdocdate: September 21 2018 $ | |
38 | .Dt SSH_CONFIG 5 | |
39 | .Os | |
@@ -686,6 +686,10 @@ section of | ||
686 | X11 connections received by | |
687 | .Xr ssh 1 | |
688 | after this time will be refused. | |
689 | - | +Setting |
690 | - | +.Cm ForwardX11Timeout |
691 | - | +to zero will disable the timeout and permit X11 forwarding for the life |
692 | - | +of the connection. |
689 ➡ 693 | The default is to disable untrusted X11 forwarding after twenty minutes has | |
690 ➡ 694 | elapsed. | |
691 ➡ 695 | .It Cm ForwardX11Trusted |