5093e42eaa
- upgrade to 7.2p2 - changing license to 2-clause BSD to match source - enable trusted X11 forwarding by default [-X11_trusted_forwarding] - set UID for lastlog properly [-lastlog] - enable use of PAM by default [-enable_PAM_by_default] - copy command line arguments properly [-saveargv-fix] - do not use pthreads in PAM code [-dont_use_pthreads_in_PAM] - fix paths in documentation [-eal3] - prevent race consitions triggered by SIGALRM [-blocksigalrm] - do send and accept locale environment variables by default [-send_locale] - handle hostnames changes during X forwarding [-hostname_changes_when_forwarding_X] - try to remove xauth cookies on exit [-remove_xauth_cookies_on_exit] - properly format pts names for ?tmp? log files [-pts_names_formatting] - check locked accounts when using PAM [-pam_check_locks] - chenge default PermitRootLogin to 'yes' to prevent unwanted surprises on updates from older versions. See README.SUSE for details [-allow_root_password_login] - Disable DH parameters under 2048 bits by default and allow lowering the limit back to the RFC 4419 specified minimum through an option (bsc#932483, bsc#948902) [-disable_short_DH_parameters] - Add getuid() and stat() syscalls to the seccomp filter OBS-URL: https://build.opensuse.org/request/show/398802 OBS-URL: https://build.opensuse.org/package/show/network/openssh?expand=0&rev=103
49 lines
1.4 KiB
Diff
49 lines
1.4 KiB
Diff
# HG changeset patch
|
|
# Parent 94fb9a9ff763462af43304fc73c2913a07829226
|
|
# use same lines naming as utempter (prevents problems with using different
|
|
# formats in ?tmp? files)
|
|
|
|
diff --git a/openssh-7.2p2/loginrec.c b/openssh-7.2p2/loginrec.c
|
|
--- a/openssh-7.2p2/loginrec.c
|
|
+++ b/openssh-7.2p2/loginrec.c
|
|
@@ -541,17 +541,17 @@ getlast_entry(struct logininfo *li)
|
|
/*
|
|
* 'line' string utility functions
|
|
*
|
|
* These functions process the 'line' string into one of three forms:
|
|
*
|
|
* 1. The full filename (including '/dev')
|
|
* 2. The stripped name (excluding '/dev')
|
|
* 3. The abbreviated name (e.g. /dev/ttyp00 -> yp00
|
|
- * /dev/pts/1 -> ts/1 )
|
|
+ * /dev/pts/1 -> /1 )
|
|
*
|
|
* Form 3 is used on some systems to identify a .tmp.? entry when
|
|
* attempting to remove it. Typically both addition and removal is
|
|
* performed by one application - say, sshd - so as long as the choice
|
|
* uniquely identifies a terminal it's ok.
|
|
*/
|
|
|
|
|
|
@@ -602,16 +602,20 @@ line_abbrevname(char *dst, const char *s
|
|
/* Always skip prefix if present */
|
|
if (strncmp(src, "/dev/", 5) == 0)
|
|
src += 5;
|
|
|
|
#ifdef WITH_ABBREV_NO_TTY
|
|
if (strncmp(src, "tty", 3) == 0)
|
|
src += 3;
|
|
#endif
|
|
+ if (strncmp(src, "pts/", 4) == 0) {
|
|
+ src += 3;
|
|
+ if (strlen(src) > 4) src++;
|
|
+ }
|
|
|
|
len = strlen(src);
|
|
|
|
if (len > 0) {
|
|
if (((int)len - dstsize) > 0)
|
|
src += ((int)len - dstsize);
|
|
|
|
/* note: _don't_ change this to strlcpy */
|