Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package tinyssh for openSUSE:Factory checked in at 2022-12-13 18:55:37 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/tinyssh (Old) and /work/SRC/openSUSE:Factory/.tinyssh.new.1835 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "tinyssh" Tue Dec 13 18:55:37 2022 rev:5 rq:1042482 version:20220801 Changes: -------- --- /work/SRC/openSUSE:Factory/tinyssh/tinyssh.changes 2022-05-06 19:00:05.801406223 +0200 +++ /work/SRC/openSUSE:Factory/.tinyssh.new.1835/tinyssh.changes 2022-12-13 18:55:51.763329880 +0100 @@ -1,0 +2,10 @@ +Sun Dec 4 13:40:15 UTC 2022 - Dirk Müller <[email protected]> + +- update to 20220801: + * tinyssh/getln.c don't close fd in case of error + * use null fields in utmpx calls for logout + * do not reverse the argument order in LIBS + * fill utmp(x)'s ut_addr_v6 field when it exists + * updated crypto/crypto_onetimeauth_poly1305.c + +------------------------------------------------------------------- Old: ---- tinyssh-20220311.tar.gz New: ---- tinyssh-20220801.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ tinyssh.spec ++++++ --- /var/tmp/diff_new_pack.k6VAo1/_old 2022-12-13 18:55:52.327332890 +0100 +++ /var/tmp/diff_new_pack.k6VAo1/_new 2022-12-13 18:55:52.367333104 +0100 @@ -17,7 +17,7 @@ Name: tinyssh -Version: 20220311 +Version: 20220801 Release: 0 Summary: A minimalistic SSH server which implements only a subset of SSHv2 features License: CC0-1.0 ++++++ tinyssh-20220311.tar.gz -> tinyssh-20220801.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tinyssh-20220311/README.md new/tinyssh-20220801/README.md --- old/tinyssh-20220311/README.md 2022-03-10 21:48:55.000000000 +0100 +++ new/tinyssh-20220801/README.md 2022-07-17 09:30:14.000000000 +0200 @@ -56,6 +56,7 @@ EnvironmentFile=-/etc/default/tinysshd ExecStart=/usr/sbin/tinysshd ${TINYSSHDOPTS} -- /etc/tinyssh/sshkeydir KillMode=process + SuccessExitStatus=111 StandardInput=socket StandardError=journal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tinyssh-20220311/crypto/crypto_onetimeauth_poly1305.c new/tinyssh-20220801/crypto/crypto_onetimeauth_poly1305.c --- old/tinyssh-20220311/crypto/crypto_onetimeauth_poly1305.c 2022-03-10 21:48:55.000000000 +0100 +++ new/tinyssh-20220801/crypto/crypto_onetimeauth_poly1305.c 2022-07-17 09:30:14.000000000 +0200 @@ -1,5 +1,5 @@ /* -20180104 +20200202 */ /* Based on poly1305-donna (https://github.com/floodyberry/poly1305-opt/blob/master/extensions/poly1305_ref-32.c) @@ -8,14 +8,15 @@ #include "crypto_onetimeauth_poly1305.h" -static unsigned long unpack(const unsigned char *x) { +/* clang-format off */ +static inline unsigned long unpack32(const unsigned char *x) { return (unsigned long) (x[0]) \ | (((unsigned long) (x[1])) << 8) \ | (((unsigned long) (x[2])) << 16) \ | (((unsigned long) (x[3])) << 24); } -static void pack(unsigned char *x, unsigned long u) { +static inline void pack32(unsigned char *x, unsigned long u) { x[0] = u; u >>= 8; x[1] = u; u >>= 8; x[2] = u; u >>= 8; @@ -34,11 +35,11 @@ /* r &= 0xffffffc0ffffffc0ffffffc0fffffff */ - r0 = (unpack(k + 0) ) & 0x3ffffff; - r1 = (unpack(k + 3) >> 2) & 0x3ffff03; - r2 = (unpack(k + 6) >> 4) & 0x3ffc0ff; - r3 = (unpack(k + 9) >> 6) & 0x3f03fff; - r4 = (unpack(k + 12) >> 8) & 0x00fffff; + r0 = (unpack32(k + 0) ) & 0x3ffffff; + r1 = (unpack32(k + 3) >> 2) & 0x3ffff03; + r2 = (unpack32(k + 6) >> 4) & 0x3ffc0ff; + r3 = (unpack32(k + 9) >> 6) & 0x3f03fff; + r4 = (unpack32(k + 12) >> 8) & 0x00fffff; s1 = r1 * 5; s2 = r2 * 5; @@ -48,26 +49,28 @@ /* h = 0 */ h0 = h1 = h2 = h3 = h4 = 0; - while ((long long)n > 0) { - + while (n > 0) { /* h += m[i] */ if (n >= 16) { - h0 += (unpack(m ) ) & 0x3ffffff; - h1 += (unpack(m + 3) >> 2) & 0x3ffffff; - h2 += (unpack(m + 6) >> 4) & 0x3ffffff; - h3 += (unpack(m + 9) >> 6) & 0x3ffffff; - h4 += (unpack(m + 12) >> 8) | 16777216; + h0 += (unpack32(m ) ) & 0x3ffffff; + h1 += (unpack32(m + 3) >> 2) & 0x3ffffff; + h2 += (unpack32(m + 6) >> 4) & 0x3ffffff; + h3 += (unpack32(m + 9) >> 6) & 0x3ffffff; + h4 += (unpack32(m + 12) >> 8) | 16777216; + m += 16; + n -= 16; } else { unsigned char mm[16]; for (i = 0; i < 16; ++i) mm[i] = 0; for (i = 0; i < n; ++i) mm[i] = m[i]; mm[i] = 1; - h0 += (unpack(mm ) ) & 0x3ffffff; - h1 += (unpack(mm + 3) >> 2) & 0x3ffffff; - h2 += (unpack(mm + 6) >> 4) & 0x3ffffff; - h3 += (unpack(mm + 9) >> 6) & 0x3ffffff; - h4 += (unpack(mm + 12) >> 8); + h0 += (unpack32(mm ) ) & 0x3ffffff; + h1 += (unpack32(mm + 3) >> 2) & 0x3ffffff; + h2 += (unpack32(mm + 6) >> 4) & 0x3ffffff; + h3 += (unpack32(mm + 9) >> 6) & 0x3ffffff; + h4 += (unpack32(mm + 12) >> 8); + n = 0; } /* h *= r */ @@ -85,9 +88,6 @@ d4 += c; c = (unsigned long)(d4 >> 26); h4 = (unsigned long)d4 & 0x3ffffff; h0 += c * 5; c = (h0 >> 26); h0 = h0 & 0x3ffffff; h1 += c; - - m += 16; - n -= 16; } @@ -127,15 +127,15 @@ h3 = ((h3 >> 18) | (h4 << 8)) & 0xffffffff; /* mac = (h + pad) % (2^128) */ - f = (unsigned long long)h0 + unpack(k + 16) ; h0 = (unsigned long)f; - f = (unsigned long long)h1 + unpack(k + 20) + (f >> 32); h1 = (unsigned long)f; - f = (unsigned long long)h2 + unpack(k + 24) + (f >> 32); h2 = (unsigned long)f; - f = (unsigned long long)h3 + unpack(k + 28) + (f >> 32); h3 = (unsigned long)f; - - pack(o + 0, h0); - pack(o + 4, h1); - pack(o + 8, h2); - pack(o + 12, h3); + f = (unsigned long long)h0 + unpack32(k + 16) ; h0 = (unsigned long)f; + f = (unsigned long long)h1 + unpack32(k + 20) + (f >> 32); h1 = (unsigned long)f; + f = (unsigned long long)h2 + unpack32(k + 24) + (f >> 32); h2 = (unsigned long)f; + f = (unsigned long long)h3 + unpack32(k + 28) + (f >> 32); h3 = (unsigned long)f; + + pack32(o + 0, h0); + pack32(o + 4, h1); + pack32(o + 8, h2); + pack32(o + 12, h3); return 0; } @@ -151,3 +151,4 @@ for (i = 0; i < 16; ++i) d |= correct[i] ^ h[i]; return (1 & ((d - 1) >> 8)) - 1; } +/* clang-format on */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tinyssh-20220311/make-tinyssh.sh new/tinyssh-20220801/make-tinyssh.sh --- old/tinyssh-20220311/make-tinyssh.sh 2022-03-10 21:48:55.000000000 +0100 +++ new/tinyssh-20220801/make-tinyssh.sh 2022-07-17 09:30:14.000000000 +0200 @@ -120,7 +120,7 @@ for i in ${LIBS}; do echo 'int main(void) { return 0; }' > try.c ${compiler} ${i} -o try try.c || { log2 "${i} failed"; continue; } - syslibs="${i} ${syslibs}" + syslibs="${syslibs} ${i}" log2 "${i} ok" done echo ${syslibs} > syslibs @@ -171,8 +171,8 @@ log2 "libtinysshcrypto.a ok" log1 "finishing" -origlibs="${origlibs} ${lib}/libtinysshcrypto.a" -libs="${libs} ${lib}/libtinysshcrypto.a" +origlibs="${lib}/libtinysshcrypto.a ${origlibs}" +libs="${lib}/libtinysshcrypto.a ${libs}" log1 "starting crypto headers" rm -rf "${work}" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tinyssh-20220311/make-tinysshcc.sh new/tinyssh-20220801/make-tinysshcc.sh --- old/tinyssh-20220311/make-tinysshcc.sh 2022-03-10 21:48:55.000000000 +0100 +++ new/tinyssh-20220801/make-tinysshcc.sh 2022-07-17 09:30:14.000000000 +0200 @@ -187,8 +187,8 @@ log2 "libtinysshcrypto.a ok" log1 "finishing" -origlibs="${origlibs} ${lib}/libtinysshcrypto.a" -libs="${libs} ${lib}/libtinysshcrypto.a" +origlibs="${lib}/libtinysshcrypto.a ${origlibs}" +libs="${lib}/libtinysshcrypto.a ${libs}" log1 "starting crypto headers" rm -rf "${work}" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tinyssh-20220311/man/tinysshd.8 new/tinyssh-20220801/man/tinysshd.8 --- old/tinyssh-20220311/man/tinysshd.8 2022-03-10 21:48:55.000000000 +0100 +++ new/tinyssh-20220801/man/tinysshd.8 2022-07-17 09:30:14.000000000 +0200 @@ -133,6 +133,7 @@ EnvironmentFile=\-/etc/default/tinysshd ExecStart=/usr/sbin/tinysshd ${TINYSSHDOPTS} \-\- /etc/tinyssh/sshkeydir KillMode=process +SuccessExitStatus=111 StandardInput=socket StandardError=journal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tinyssh-20220311/sysdep/hasutmpaddrv6.h-yes.c new/tinyssh-20220801/sysdep/hasutmpaddrv6.h-yes.c --- old/tinyssh-20220311/sysdep/hasutmpaddrv6.h-yes.c 1970-01-01 01:00:00.000000000 +0100 +++ new/tinyssh-20220801/sysdep/hasutmpaddrv6.h-yes.c 2022-07-17 09:30:14.000000000 +0200 @@ -0,0 +1,11 @@ +/* Public domain. */ +#include <time.h> +#include <sys/time.h> +#include <utmp.h> + +int main(void) { + + struct utmp ut; + int x[sizeof(ut.ut_addr_v6) < 16 ? -1 : 1] = {0}; + return x[0]; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tinyssh-20220311/sysdep/hasutmpaddrv6.h-yes.out new/tinyssh-20220801/sysdep/hasutmpaddrv6.h-yes.out --- old/tinyssh-20220311/sysdep/hasutmpaddrv6.h-yes.out 1970-01-01 01:00:00.000000000 +0100 +++ new/tinyssh-20220801/sysdep/hasutmpaddrv6.h-yes.out 2022-07-17 09:30:14.000000000 +0200 @@ -0,0 +1 @@ +#define HASUTMPADDRV6 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tinyssh-20220311/sysdep/hasutmpxaddrv6.h-yes.c new/tinyssh-20220801/sysdep/hasutmpxaddrv6.h-yes.c --- old/tinyssh-20220311/sysdep/hasutmpxaddrv6.h-yes.c 1970-01-01 01:00:00.000000000 +0100 +++ new/tinyssh-20220801/sysdep/hasutmpxaddrv6.h-yes.c 2022-07-17 09:30:14.000000000 +0200 @@ -0,0 +1,11 @@ +/* Public domain. */ +#include <time.h> +#include <sys/time.h> +#include <utmpx.h> + +int main(void) { + + struct utmpx utx; + int x[sizeof(utx.ut_addr_v6) < 16 ? -1 : 1] = {0}; + return x[0]; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tinyssh-20220311/sysdep/hasutmpxaddrv6.h-yes.out new/tinyssh-20220801/sysdep/hasutmpxaddrv6.h-yes.out --- old/tinyssh-20220311/sysdep/hasutmpxaddrv6.h-yes.out 1970-01-01 01:00:00.000000000 +0100 +++ new/tinyssh-20220801/sysdep/hasutmpxaddrv6.h-yes.out 2022-07-17 09:30:14.000000000 +0200 @@ -0,0 +1 @@ +#define HASUTMPXADDRV6 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tinyssh-20220311/sysdep/list new/tinyssh-20220801/sysdep/list --- old/tinyssh-20220311/sysdep/list 2022-03-10 21:48:55.000000000 +0100 +++ new/tinyssh-20220801/sysdep/list 2022-07-17 09:30:14.000000000 +0200 @@ -27,6 +27,8 @@ echo 'hasutmpxupdwtmpx.h default.h-no' echo 'hasutmpxsyslen.h hasutmpxsyslen.h-yes' echo 'hasutmpxsyslen.h default.h-no' +echo 'hasutmpxaddrv6.h hasutmpxaddrv6.h-yes' +echo 'hasutmpxaddrv6.h default.h-no' #utmp echo 'hasutmp.h hasutmp.h-yes' @@ -49,6 +51,8 @@ echo 'hasutmplogwtmp.h default.h-no' echo 'hasutmploginlogout.h hasutmploginlogout.h-yes' echo 'hasutmploginlogout.h default.h-no' +echo 'hasutmpaddrv6.h hasutmpaddrv6.h-yes' +echo 'hasutmpaddrv6.h default.h-no' #limits echo 'haslimits.h haslimits.h-yes' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tinyssh-20220311/tinyssh/getln.c new/tinyssh-20220801/tinyssh/getln.c --- old/tinyssh-20220311/tinyssh/getln.c 2022-03-10 21:48:55.000000000 +0100 +++ new/tinyssh-20220801/tinyssh/getln.c 2022-07-17 09:30:14.000000000 +0200 @@ -48,7 +48,7 @@ for (;;) { if (xlen >= xmax - 1) { x[xmax - 1] = 0; errno = ENOMEM; return -1; } r = getch(fd, &ch); - if (r != 1) { close(fd); fd = -1; break; } + if (r != 1) break; if (ch == 0) ch = '\n'; x[xlen++] = ch; if (ch == '\n') break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tinyssh-20220311/tinyssh/logsys.c new/tinyssh-20220801/tinyssh/logsys.c --- old/tinyssh-20220311/tinyssh/logsys.c 2022-03-10 21:48:55.000000000 +0100 +++ new/tinyssh-20220801/tinyssh/logsys.c 2022-07-17 09:30:14.000000000 +0200 @@ -23,6 +23,7 @@ #include <time.h> #include <sys/time.h> #include <paths.h> +#include <arpa/inet.h> #include "hasutilh.h" #ifdef HASUTILH @@ -35,6 +36,7 @@ #endif #include "hasutmpxupdwtmpx.h" #include "hasutmpxsyslen.h" +#include "hasutmpxaddrv6.h" #include "hasutmp.h" #ifdef HASUTMP @@ -49,6 +51,7 @@ #include "hasutmpuser.h" #include "hasutmplogwtmp.h" #include "hasutmploginlogout.h" +#include "hasutmpaddrv6.h" #include "str.h" #include "byte.h" @@ -69,15 +72,25 @@ str_copyn(ut.ut_line, sizeof ut.ut_line, name); /* host */ - str_copyn(ut.ut_host, sizeof ut.ut_host, host); + if (flaglogin) + str_copyn(ut.ut_host, sizeof ut.ut_host, host); + else + byte_zero(ut.ut_host, sizeof ut.ut_host); #ifdef HASUTMPXSYSLEN ut.ut_syslen = str_len(ut.ut_host) + 1; #endif +#ifdef HASUTMPXADDRV6 + if (inet_pton(AF_INET6, ut.ut_host, &ut.ut_addr_v6) <= 0) + inet_pton(AF_INET, ut.ut_host, &ut.ut_addr_v6[0]) ; +#endif + /* user */ - str_copyn(ut.ut_user, sizeof ut.ut_user, user); + if (flaglogin) + str_copyn(ut.ut_user, sizeof ut.ut_user, user); + else + byte_zero(ut.ut_user, sizeof ut.ut_user); - /* time */ gettimeofday(&tv, 0); ut.ut_tv.tv_sec = tv.tv_sec; ut.ut_tv.tv_usec = tv.tv_usec; @@ -96,8 +109,12 @@ endutxent(); /* update wtmpx */ -#if defined(_PATH_WTMPX) && defined(HASUTMPXUPDWTMPX) +#ifdef HASUTMPXUPDWTMPX +#if defined(_PATH_WTMPX) updwtmpx(_PATH_WTMPX, &ut); +#elif defined (WTMPX_FILE) + updwtmpx(WTMPX_FILE, &ut); +#endif #endif #endif @@ -120,6 +137,10 @@ /* host */ #ifdef HASUTMPHOST str_copyn(ut.ut_host, sizeof ut.ut_host, host); +# ifdef HASUTMPADDRV6 + if (inet_pton(AF_INET6, ut.ut_host, &ut.ut_addr_v6) <= 0) + inet_pton(AF_INET, ut.ut_host, &ut.ut_addr_v6[0]) ; +# endif #endif /* user */
