summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--system/nvi/APKBUILD17
-rw-r--r--system/unzip/10-unzip-handle-pkware-verify.patch21
-rw-r--r--system/unzip/20-unzip-uidgid-fix.patch29
-rw-r--r--system/unzip/APKBUILD31
-rw-r--r--system/unzip/unzip-6.0-heap-overflow-infloop.patch104
-rw-r--r--user/chntpw/APKBUILD40
-rw-r--r--user/chntpw/chntpw-080526-correct-test-for-failing-open-syscall.patch75
-rw-r--r--user/chntpw/chntpw-110511-detect-failure-to-write-key.patch19
-rw-r--r--user/chntpw/chntpw-110511-reged-no-deref-null.patch15
-rw-r--r--user/chntpw/chntpw-110511-robustness.patch39
-rw-r--r--user/chntpw/chntpw-140201-get_abs_path.patch10
-rw-r--r--user/chntpw/getopt-signed-char-return.patch37
-rw-r--r--user/chntpw/stdint.patch11
-rw-r--r--user/horizon/APKBUILD49
14 files changed, 325 insertions, 172 deletions
diff --git a/system/nvi/APKBUILD b/system/nvi/APKBUILD
index c0daf1a1e..a148971ea 100644
--- a/system/nvi/APKBUILD
+++ b/system/nvi/APKBUILD
@@ -2,7 +2,8 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=nvi
pkgver=1.81.6
-pkgrel=0
+_debver=15
+pkgrel=1
pkgdesc="Berkeley text editor"
url="https://sites.google.com/a/bostic.com/keithbostic/vi/"
arch="all"
@@ -11,12 +12,21 @@ license="BSD-4-Clause-UC"
depends=""
makedepends="db-dev ncurses-dev"
subpackages="$pkgname-doc"
-source="https://fossies.org/linux/privat/old/nvi-$pkgver.tar.gz
+source="http://deb.debian.org/debian/pool/main/n/nvi/nvi_$pkgver.orig.tar.gz
+ http://deb.debian.org/debian/pool/main/n/nvi/nvi_$pkgver-$_debver.debian.tar.xz
build-fix.patch
"
+# secfixes:
+# 1.81.6-r1:
+# - CVE-2001-1562
+
prepare() {
default_prepare
+ while read -r i; do
+ msg "$i"
+ patch -p1 -i "../debian/patches/$i"
+ done < ../debian/patches/series
cd "$builddir"/dist
chmod u+w config.sub
@@ -49,5 +59,6 @@ package() {
mv "$pkgdir"/usr/share/man/man1/view.1 "$pkgdir"/usr/share/man/man1/view.nvi.1
}
-sha512sums="1be798daf0cd05010ddaf0aa0510dc799708fd79d4b243e2700adff18e931ddd9d11621796fa8086088c3e93ba20f15ab86783732665169c52b73eaf587ff0b3 nvi-1.81.6.tar.gz
+sha512sums="1be798daf0cd05010ddaf0aa0510dc799708fd79d4b243e2700adff18e931ddd9d11621796fa8086088c3e93ba20f15ab86783732665169c52b73eaf587ff0b3 nvi_1.81.6.orig.tar.gz
+7756ca0ba9503516fcbf1a5fe51465bebf74bf107e040cea80de0dd501854fe0f25d67ddbd4142e58057ad015be12f8b711ef861fd6ad3f317bc619327579513 nvi_1.81.6-15.debian.tar.xz
b84cfb83ea5ed15f5c7d9e608771a2248531be388fa19340e90074d37e10f6f75c8b965a40f5288275973f23ed6fda54aa4ef990b43d4828d174b66fd3ced1e9 build-fix.patch"
diff --git a/system/unzip/10-unzip-handle-pkware-verify.patch b/system/unzip/10-unzip-handle-pkware-verify.patch
deleted file mode 100644
index b373ce07d..000000000
--- a/system/unzip/10-unzip-handle-pkware-verify.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-From: Steven Schweda
-Subject: Handle the PKWare verification bit of internal attributes
-Bug-Debian: http://bugs.debian.org/630078
-X-Debian-version: 6.0-5
-
---- a/process.c
-+++ b/process.c
-@@ -1729,6 +1729,13 @@
- else if (uO.L_flag > 1) /* let -LL force lower case for all names */
- G.pInfo->lcflag = 1;
-
-+ /* Handle the PKWare verification bit, bit 2 (0x0004) of internal
-+ attributes. If this is set, then a verification checksum is in the
-+ first 3 bytes of the external attributes. In this case all we can use
-+ for setting file attributes is the last external attributes byte. */
-+ if (G.crec.internal_file_attributes & 0x0004)
-+ G.crec.external_file_attributes &= (ulg)0xff;
-+
- /* do Amigas (AMIGA_) also have volume labels? */
- if (IS_VOLID(G.crec.external_file_attributes) &&
- (G.pInfo->hostnum == FS_FAT_ || G.pInfo->hostnum == FS_HPFS_ ||
diff --git a/system/unzip/20-unzip-uidgid-fix.patch b/system/unzip/20-unzip-uidgid-fix.patch
deleted file mode 100644
index 3a308990e..000000000
--- a/system/unzip/20-unzip-uidgid-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: sms
-Subject: Restore uid and gid information when requested
-Bug-Debian: http://bugs.debian.org/689212
-X-Debian-version: 6.0-8
-
---- a/process.c
-+++ b/process.c
-@@ -2904,7 +2904,7 @@
- #ifdef IZ_HAVE_UXUIDGID
- if (eb_len >= EB_UX3_MINLEN
- && z_uidgid != NULL
-- && (*((EB_HEADSIZE + 0) + ef_buf) == 1)
-+ && (*((EB_HEADSIZE + 0) + ef_buf) == 1))
- /* only know about version 1 */
- {
- uch uid_size;
-@@ -2916,10 +2916,10 @@
- flags &= ~0x0ff; /* ignore any previous UNIX field */
-
- if ( read_ux3_value((EB_HEADSIZE + 2) + ef_buf,
-- uid_size, z_uidgid[0])
-+ uid_size, &z_uidgid[0])
- &&
- read_ux3_value((EB_HEADSIZE + uid_size + 3) + ef_buf,
-- gid_size, z_uidgid[1]) )
-+ gid_size, &z_uidgid[1]) )
- {
- flags |= EB_UX2_VALID; /* signal success */
- }
diff --git a/system/unzip/APKBUILD b/system/unzip/APKBUILD
index e915966a0..ea8f7e6fa 100644
--- a/system/unzip/APKBUILD
+++ b/system/unzip/APKBUILD
@@ -4,7 +4,8 @@
pkgname=unzip
pkgver=6.0
_pkgver=$(printf '%s' "$pkgver" | tr -d .)
-pkgrel=3
+_debver=25
+pkgrel=4
pkgdesc="Extract PKZIP-compatible .zip files"
url="http://www.info-zip.org/UnZip.html"
arch="all"
@@ -12,12 +13,30 @@ license="Info-ZIP"
subpackages="$pkgname-doc"
# normally ftp://ftp.info-zip.org/pub/infozip/src/$pkgname$_pkgver.zip
source="$pkgname-$pkgver.tgz::https://distfiles.adelielinux.org/source/$pkgname$_pkgver.tgz
- 10-unzip-handle-pkware-verify.patch
- 20-unzip-uidgid-fix.patch
- unzip-6.0-heap-overflow-infloop.patch
+ http://deb.debian.org/debian/pool/main/u/unzip/unzip_$pkgver-$_debver.debian.tar.xz
"
builddir="$srcdir/$pkgname$_pkgver"
+# secfixes:
+# 6.0-r4:
+# - CVE-2014-8139
+# - CVE-2014-8140
+# - CVE-2014-8141
+# - CVE-2014-9636
+# - CVE-2014-9913
+# - CVE-2016-9844
+# - CVE-2018-18384
+# - CVE-2018-1000035
+# - CVE-2019-13232
+
+prepare() {
+ default_prepare
+ while read -r i; do
+ msg "$i"
+ patch -p1 -i "../debian/patches/$i"
+ done < ../debian/patches/series
+}
+
build() {
make -f unix/Makefile \
CC="${CHOST}-gcc" \
@@ -38,6 +57,4 @@ package() {
}
sha512sums="0694e403ebc57b37218e00ec1a406cae5cc9c5b52b6798e0d4590840b6cdbf9ddc0d9471f67af783e960f8fa2e620394d51384257dca23d06bcd90224a80ce5d unzip-6.0.tgz
-9d2914f22fb0075a2b6f72825c235f46eafd8d47b6fb6fcc8303fc69336e256b15923c002d2615bb6af733344c2315e4a8504d77bae301e10c11d4736faa2c81 10-unzip-handle-pkware-verify.patch
-57699582e9056af0817dcb67f8db67e6a1ff8208c137fbebcf559429e5f12b471b75d7e1ef938e5bbb5416074a51ac7342e4ce8057f4bbdcb0bf079b8d7832af 20-unzip-uidgid-fix.patch
-b1e3fac6a787828efaaef8ec7cc52e1573aea27a6f29830af37ec4ba8bcd2a6488c953ab10eee0561c78e82c7401833ef172bebee793405d93632ce788756301 unzip-6.0-heap-overflow-infloop.patch"
+13c16db420fa4a34be3090a9acdd79b01320da40ac5aa89a9dfca03e64b914b28eb72aff3882d02a8197457bcb8eeb9473c998cf6920e511883c9289a949fb21 unzip_6.0-25.debian.tar.xz"
diff --git a/system/unzip/unzip-6.0-heap-overflow-infloop.patch b/system/unzip/unzip-6.0-heap-overflow-infloop.patch
deleted file mode 100644
index 160c512f9..000000000
--- a/system/unzip/unzip-6.0-heap-overflow-infloop.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-From bdd4a0cecd745cb4825e4508b5bdf2579731086a Mon Sep 17 00:00:00 2001
-From: Petr Stodulka <pstodulk@redhat.com>
-Date: Mon, 14 Sep 2015 18:23:17 +0200
-Subject: [PATCH 1/3] upstream fix for heap overflow
-
-https://bugzilla.redhat.com/attachment.cgi?id=1073002
----
- crypt.c | 12 +++++++++++-
- 1 file changed, 11 insertions(+), 1 deletion(-)
-
-diff --git a/crypt.c b/crypt.c
-index 784e411..a8975f2 100644
---- a/crypt.c
-+++ b/crypt.c
-@@ -465,7 +465,17 @@ int decrypt(__G__ passwrd)
- GLOBAL(pInfo->encrypted) = FALSE;
- defer_leftover_input(__G);
- for (n = 0; n < RAND_HEAD_LEN; n++) {
-- b = NEXTBYTE;
-+ /* 2012-11-23 SMS. (OUSPG report.)
-+ * Quit early if compressed size < HEAD_LEN. The resulting
-+ * error message ("unable to get password") could be improved,
-+ * but it's better than trying to read nonexistent data, and
-+ * then continuing with a negative G.csize. (See
-+ * fileio.c:readbyte()).
-+ */
-+ if ((b = NEXTBYTE) == (ush)EOF)
-+ {
-+ return PK_ERR;
-+ }
- h[n] = (uch)b;
- Trace((stdout, " (%02x)", h[n]));
- }
---
-2.4.6
-
-
-From 4b48844661ff9569f2ecf582a387d46a5775b5d8 Mon Sep 17 00:00:00 2001
-From: Kamil Dudka <kdudka@redhat.com>
-Date: Mon, 14 Sep 2015 18:24:56 +0200
-Subject: [PATCH 2/3] fix infinite loop when extracting empty bzip2 data
-
-Bug: https://sourceforge.net/p/infozip/patches/23/
----
- extract.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/extract.c b/extract.c
-index 7134bfe..29db027 100644
---- a/extract.c
-+++ b/extract.c
-@@ -2733,6 +2733,12 @@ __GDEF
- int repeated_buf_err;
- bz_stream bstrm;
-
-+ if (G.incnt <= 0 && G.csize <= 0L) {
-+ /* avoid an infinite loop */
-+ Trace((stderr, "UZbunzip2() got empty input\n"));
-+ return 2;
-+ }
-+
- #if (defined(DLL) && !defined(NO_SLIDE_REDIR))
- if (G.redirect_slide)
- wsize = G.redirect_size, redirSlide = G.redirect_buffer;
---
-2.4.6
-
-
-From bd150334fb4084f5555a6be26b015a0671cb5b74 Mon Sep 17 00:00:00 2001
-From: Kamil Dudka <kdudka@redhat.com>
-Date: Tue, 22 Sep 2015 18:52:23 +0200
-Subject: [PATCH 3/3] extract: prevent unsigned overflow on invalid input
-
-Suggested-by: Stefan Cornelius
----
- extract.c | 11 ++++++++++-
- 1 file changed, 10 insertions(+), 1 deletion(-)
-
-diff --git a/extract.c b/extract.c
-index 29db027..b9ae667 100644
---- a/extract.c
-+++ b/extract.c
-@@ -1257,8 +1257,17 @@ static int extract_or_test_entrylist(__G__ numchunk,
- if (G.lrec.compression_method == STORED) {
- zusz_t csiz_decrypted = G.lrec.csize;
-
-- if (G.pInfo->encrypted)
-+ if (G.pInfo->encrypted) {
-+ if (csiz_decrypted <= 12) {
-+ /* handle the error now to prevent unsigned overflow */
-+ Info(slide, 0x401, ((char *)slide,
-+ LoadFarStringSmall(ErrUnzipNoFile),
-+ LoadFarString(InvalidComprData),
-+ LoadFarStringSmall2(Inflate)));
-+ return PK_ERR;
-+ }
- csiz_decrypted -= 12;
-+ }
- if (G.lrec.ucsize != csiz_decrypted) {
- Info(slide, 0x401, ((char *)slide,
- LoadFarStringSmall2(WrnStorUCSizCSizDiff),
---
-2.5.2
-
diff --git a/user/chntpw/APKBUILD b/user/chntpw/APKBUILD
new file mode 100644
index 000000000..a62408ce0
--- /dev/null
+++ b/user/chntpw/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor: CyberLeo <cyberleo@cyberleo.net>
+# Maintainer: CyberLeo <cyberleo@cyberleo.net>
+pkgname=chntpw
+pkgver=140201
+pkgrel=0
+pkgdesc="Change passwords in Windows SAM files"
+url="https://pogostick.net/~pnh/ntpasswd/"
+arch="all"
+options="!check" # No test suite.
+license="(LGPL-2.1-only AND GPL-2.0-only)"
+depends=""
+makedepends=""
+source="https://pogostick.net/~pnh/ntpasswd/$pkgname-source-$pkgver.zip
+ stdint.patch
+ chntpw-080526-correct-test-for-failing-open-syscall.patch
+ chntpw-110511-detect-failure-to-write-key.patch
+ chntpw-110511-reged-no-deref-null.patch
+ chntpw-110511-robustness.patch
+ chntpw-140201-get_abs_path.patch
+ getopt-signed-char-return.patch
+ "
+
+build() {
+ make CC="${CC:-gcc}" CFLAGS="$CFLAGS" \
+ chntpw cpnt reged
+}
+
+package() {
+ install -d "$pkgdir"/usr/bin
+ install chntpw cpnt reged "$pkgdir"/usr/bin/
+}
+
+sha512sums="a26d747f6e077d1bb3e9b8077781f8c37dd978e07b7426495862f15c9004572b706c34736fc4d1ed8856b1a43335d726b4d87c688f7f9a11fd6cc3a74d71a7fa chntpw-source-140201.zip
+3ed747119d125b3e4dc8dbb2a697d411ef2f4403ec84c60177d8e35389bc695bb0c65f7aa4314ca320ffceec87e60e2a0c81d52544b90463fe23aa7d4a50df67 stdint.patch
+1332407858eb20e0f1304472bc458789ef78638059137b91ff0b7bac9619740e8a608aace0330ace363853b5c02642fdbbc66bc47dac19f6807dae57cdaca4ca chntpw-080526-correct-test-for-failing-open-syscall.patch
+a570451f52943a2ccdced349c5fe4e82e1a338dd6d0067ddaf18dc328b2c3ee3976d08827eee866b4654ccbda93ad95dcbabaddd0b6487a1e4112b66fc63bde1 chntpw-110511-detect-failure-to-write-key.patch
+c61ea69ea1f039e470f501fddd1d3674ee7427e9084361a1aba03402d302a07efd1a2630e16f479bd3cef13b17e85c14cbfff53cb33bccb470465276b1b7ac22 chntpw-110511-reged-no-deref-null.patch
+bcc314545272b5be04612e435a2f9dd13cbf065cfbd80aed2ed57147ee9e73b2478cd18e95cbaa7ad3b5dfcf4788a3026b5ddd767f89ea9c80ba7a2efc7ea8c4 chntpw-110511-robustness.patch
+1bb5939d2cfd3718b9e630998b250c3c37d50d5769463f4f8456ede9fa4521e1bf9d9f05986883df36418d91bef591b34a81cd36bfacca053160e4d95c03cb4b chntpw-140201-get_abs_path.patch
+85bbe9c7f21362cdff6becd94fe402d051a770105ec2eeb61e1936693e0a39ee03b6e971843c251f7768499444711392d966227f6126c328f7f58055cafe38d7 getopt-signed-char-return.patch"
diff --git a/user/chntpw/chntpw-080526-correct-test-for-failing-open-syscall.patch b/user/chntpw/chntpw-080526-correct-test-for-failing-open-syscall.patch
new file mode 100644
index 000000000..3c68146b0
--- /dev/null
+++ b/user/chntpw/chntpw-080526-correct-test-for-failing-open-syscall.patch
@@ -0,0 +1,75 @@
+From jim@meyering.net Mon Jul 20 20:05:55 2009
+Return-Path: jim@meyering.net
+X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on amd.home.annexia.org
+X-Spam-Level:
+X-Spam-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,
+ UNPARSEABLE_RELAY autolearn=ham version=3.2.5
+Received: from mail.corp.redhat.com [10.5.5.51]
+ by amd.home.annexia.org with IMAP (fetchmail-6.3.8)
+ for <rjones@localhost> (single-drop); Mon, 20 Jul 2009 20:05:55 +0100 (BST)
+Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO
+ zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by
+ mail06.corp.redhat.com with LMTP; Mon, 20 Jul 2009 15:05:47 -0400 (EDT)
+Received: from localhost (localhost.localdomain [127.0.0.1])
+ by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 2C1134E4EB
+ for <rjones@redhat.com>; Mon, 20 Jul 2009 15:05:47 -0400 (EDT)
+Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+ by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+ with ESMTP id a7N9dvNRkYQB for <rjones@redhat.com>;
+ Mon, 20 Jul 2009 15:05:47 -0400 (EDT)
+Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26])
+ by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 034384E4D6
+ for <rjones@mail.corp.redhat.com>; Mon, 20 Jul 2009 15:05:46 -0400 (EDT)
+Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199])
+ by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n6KJ5kIt032703
+ for <rjones@int-mx2.corp.redhat.com>; Mon, 20 Jul 2009 15:05:46 -0400
+Received: from mx.meyering.net (sebastian-int.corp.redhat.com [172.16.52.221])
+ by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n6KJ5jf3021050
+ for <rjones@redhat.com>; Mon, 20 Jul 2009 15:05:45 -0400
+Received: by rho.meyering.net (Acme Bit-Twister, from userid 1000)
+ id D674638154; Mon, 20 Jul 2009 21:05:44 +0200 (CEST)
+From: Jim Meyering <jim@meyering.net>
+To: "Richard W. M. Jones" <rjones@redhat.com>
+Subject: chntpw [PATCH] correct test for failing "open" syscall
+Date: Mon, 20 Jul 2009 21:05:44 +0200
+Message-ID: <878wij899z.fsf@meyering.net>
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26
+Status: RO
+Content-Length: 1103
+Lines: 33
+
+This one is weird.
+It must be code that is never exercised,
+since the existing code is totally bogus.
+The condition, !open(...), will almost always be true.
+(sole exception is when starting a program with stdin
+initially closed)
+
+>From bc4cddb06cf13c189fbdc93e6962cad072779097 Mon Sep 17 00:00:00 2001
+From: Jim Meyering <meyering@redhat.com>
+Date: Mon, 20 Jul 2009 14:59:19 -0400
+Subject: [PATCH] correct test for failing "open" syscall
+
+* ntreg.c (writeHive): Test open() < 0, not !open().
+---
+ ntreg.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/ntreg.c b/ntreg.c
+index be6b680..21cd3e3 100644
+--- a/ntreg.c
++++ b/ntreg.c
+@@ -2765,7 +2765,7 @@ int writeHive(struct hive *hdesc)
+ if ( !(hdesc->state & HMODE_DIRTY)) return(0);
+
+ if ( !(hdesc->state & HMODE_OPEN)) { /* File has been closed */
+- if (!(hdesc->filedesc = open(hdesc->filename,O_RDWR))) {
++ if ((hdesc->filedesc = open(hdesc->filename,O_RDWR)) < 0) {
+ fprintf(stderr,"writeHive: open(%s) failed: %s, FILE NOT WRITTEN!\n",hdesc->filename,strerror(errno));
+ return(1);
+ }
+--
+1.6.2.5
+
diff --git a/user/chntpw/chntpw-110511-detect-failure-to-write-key.patch b/user/chntpw/chntpw-110511-detect-failure-to-write-key.patch
new file mode 100644
index 000000000..818639d83
--- /dev/null
+++ b/user/chntpw/chntpw-110511-detect-failure-to-write-key.patch
@@ -0,0 +1,19 @@
+diff -ur chntpw-110511.orig/ntreg.c chntpw-110511/ntreg.c
+--- chntpw-110511.orig/ntreg.c 2011-05-11 12:33:56.000000000 -0700
++++ chntpw-110511/ntreg.c 2011-11-01 13:45:02.550421729 -0700
+@@ -3389,7 +3389,14 @@
+
+ fprintf(file,"\r\n"); /* Must end file with an empty line, windows does that */
+
+- fclose(file);
++ if (ferror (file)) {
++ printf("failed to write file '%s'\n", filename);
++ fclose (file);
++ return;
++ }
++ if (fclose(file))
++ printf("failed to write file '%s': %s\n", filename,
++ strerror(errno));
+ }
+
+ /* ================================================================ */
diff --git a/user/chntpw/chntpw-110511-reged-no-deref-null.patch b/user/chntpw/chntpw-110511-reged-no-deref-null.patch
new file mode 100644
index 000000000..0193cd493
--- /dev/null
+++ b/user/chntpw/chntpw-110511-reged-no-deref-null.patch
@@ -0,0 +1,15 @@
+diff -ur chntpw-110511.orig/reged.c chntpw-110511/reged.c
+--- chntpw-110511.orig/reged.c 2011-05-11 12:33:56.000000000 -0700
++++ chntpw-110511/reged.c 2011-11-01 13:46:55.569625286 -0700
+@@ -167,6 +167,11 @@
+
+ if (edit) { /* Call editor. Rest of arguments are considered hives to load */
+ hivename = argv[optind+no_hives];
++ if (!hivename) {
++ fprintf(stderr,"with -e you must specify at least one hive file name\n");
++ usage();
++ exit(1);
++ }
+ do {
+ if (!(hive[no_hives] = openHive(hivename,
+ HMODE_RW|mode))) {
diff --git a/user/chntpw/chntpw-110511-robustness.patch b/user/chntpw/chntpw-110511-robustness.patch
new file mode 100644
index 000000000..ea2363f34
--- /dev/null
+++ b/user/chntpw/chntpw-110511-robustness.patch
@@ -0,0 +1,39 @@
+--- chntpw-110511.orig/ntreg.c 2011-05-11 12:33:56.000000000 -0700
++++ chntpw-110511/ntreg.c 2011-12-18 17:09:06.290818997 -0800
+@@ -190,14 +190,18 @@
+
+ int fmyinput(char *prmpt, char *ibuf, int maxlen)
+ {
+-
++ int len;
+ printf("%s",prmpt);
+
+ fgets(ibuf,maxlen+1,stdin);
++ len = strlen(ibuf);
+
+- ibuf[strlen(ibuf)-1] = 0;
++ if (len) {
++ ibuf[len-1] = 0;
++ --len;
++ }
+
+- return(strlen(ibuf));
++ return len;
+ }
+
+ /* Print len number of hexbytes */
+@@ -4119,6 +4123,14 @@
+ closeHive(hdesc);
+ return(NULL);
+ }
++
++ if (r < sizeof (*hdesc)) {
++ fprintf(stderr,
++ "file is too small; got %d bytes while expecting %d or more\n",
++ r, sizeof (*hdesc));
++ closeHive(hdesc);
++ return(NULL);
++ }
+
+ /* Now run through file, tallying all pages */
+ /* NOTE/KLUDGE: Assume first page starts at offset 0x1000 */
diff --git a/user/chntpw/chntpw-140201-get_abs_path.patch b/user/chntpw/chntpw-140201-get_abs_path.patch
new file mode 100644
index 000000000..c9f1a3dec
--- /dev/null
+++ b/user/chntpw/chntpw-140201-get_abs_path.patch
@@ -0,0 +1,10 @@
+--- chntpw-140201/ntreg.c.orig 2014-02-01 08:54:37.000000000 -0800
++++ chntpw-140201/ntreg.c 2018-07-02 16:10:39.625152640 -0700
+@@ -1511,6 +1511,7 @@
+ }
+
+ strncpy(tmp,path,ABSPATHLEN-1);
++ tmp[ABSPATHLEN-1] = '\0';
+
+ if (key->type & 0x20)
+ keyname = mem_str(key->keyname, key->len_name);
diff --git a/user/chntpw/getopt-signed-char-return.patch b/user/chntpw/getopt-signed-char-return.patch
new file mode 100644
index 000000000..6dc78c624
--- /dev/null
+++ b/user/chntpw/getopt-signed-char-return.patch
@@ -0,0 +1,37 @@
+diff -ur chntpw-140201.orig/chntpw.c chntpw-140201/chntpw.c
+--- chntpw-140201.orig/chntpw.c 2020-06-08 14:21:55.839494887 +0000
++++ chntpw-140201/chntpw.c 2020-06-08 14:22:29.922115922 +0000
+@@ -1026,7 +1026,8 @@
+ int mode = HMODE_INFO;
+ extern int /* opterr, */ optind;
+ extern char* optarg;
+- char *filename,c;
++ char *filename;
++ signed char c;
+ char *who = "Administrator";
+ char iwho[100];
+ FILE *ch; /* Write out names of touched files to this */
+diff -ur chntpw-140201.orig/sampasswd.c chntpw-140201/sampasswd.c
+--- chntpw-140201.orig/sampasswd.c 2020-06-08 14:21:49.661563576 +0000
++++ chntpw-140201/sampasswd.c 2020-06-08 14:22:21.009215027 +0000
+@@ -140,7 +140,7 @@
+ int first = 0;
+ int ret, wret, il;
+ char *hivename;
+- char c;
++ signed char c;
+ char *usr = NULL;
+
+ char *options = "rlHu:vNEthaf";
+diff -ur chntpw-140201.orig/samusrgrp.c chntpw-140201/samusrgrp.c
+--- chntpw-140201.orig/samusrgrp.c 2020-06-08 14:21:47.330589493 +0000
++++ chntpw-140201/samusrgrp.c 2020-06-08 14:22:19.218234941 +0000
+@@ -176,7 +176,7 @@
+ int human = 0;
+ int ret, wret, il;
+ char *hivename;
+- char c;
++ signed char c;
+ char *usr = NULL;
+ char *grp = NULL;
+
diff --git a/user/chntpw/stdint.patch b/user/chntpw/stdint.patch
new file mode 100644
index 000000000..841e25ed7
--- /dev/null
+++ b/user/chntpw/stdint.patch
@@ -0,0 +1,11 @@
+--- ./ntreg.h.orig
++++ ./ntreg.h
+@@ -25,6 +25,8 @@
+ #ifndef _INCLUDE_NTREG_H
+ #define _INCLUDE_NTREG_H 1
+
++#include <stdint.h>
++
+ #define SZ_MAX 4096 /* Max unicode strlen before we truncate */
+
+ #define KEY_ROOT 0x2c /* Type ID of ROOT key node */
diff --git a/user/horizon/APKBUILD b/user/horizon/APKBUILD
index 4d035e184..6c3278bc1 100644
--- a/user/horizon/APKBUILD
+++ b/user/horizon/APKBUILD
@@ -1,8 +1,8 @@
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=horizon
-pkgver=0.9.1
-pkgrel=1
+pkgver=0.9.2
+pkgrel=0
pkgdesc="Installation tools for Adélie Linux"
url="https://horizon.adelielinux.org/"
arch="all"
@@ -16,10 +16,8 @@ makedepends="bcnm-dev boost-dev cmake curl-dev eudev-dev libarchive-dev
libcap-dev libx11-dev libxkbfile-dev qt5-qtbase-dev"
subpackages="$pkgname-image $pkgname-dbg $pkgname-dev $pkgname-doc $pkgname-qt5
- $pkgname-tools $pkgname-wizard"
-source="https://distfiles.adelielinux.org/source/horizon-$pkgver.tar.xz
- fix-qt-runner.patch
- "
+ $pkgname-tools $pkgname-wizard $pkgname-boot"
+source="https://distfiles.adelielinux.org/source/horizon-$pkgver.tar.xz"
build() {
if [ "$CBUILD" != "$CHOST" ]; then
@@ -74,7 +72,9 @@ image() {
qt5() {
pkgdesc="Qt 5 installation wizard for Adélie Linux"
depends="horizon"
+ mkdir -p "$subpkgdir"/etc/horizon
mkdir -p "$subpkgdir"/usr/bin
+ mkdir -p "$subpkgdir"/var/log/horizon
for _bin in horizon-ppc64-detect horizon-qt5 horizon-run-qt5; do
mv "$pkgdir"/usr/bin/$_bin "$subpkgdir"/usr/bin/
@@ -99,5 +99,38 @@ wizard() {
rm -r "$subpkgdir"/usr/share
}
-sha512sums="fe8f58a232b7e577aeba62cecfd97bec4037d41dd179781af912c9974210ce4648b0c56bd84fbf78866698e91882b8f4b7168c22842bde1682ea118ca931832f horizon-0.9.1.tar.xz
-78d1a1bca7d12a189d506e1fcc42ea0ab968ed3cb9ada7e95fab6256ea2e0cb820d9b41cdd858e22da37a63f899918fe40c00bcd2d67dea81e3a9ce30570ad46 fix-qt-runner.patch"
+boot() {
+ pkgdesc="Boot to Horizon"
+ depends="horizon-qt5 horizon kwin qt5ct sddm
+ netsurf partitionmanager xterm"
+
+ mkdir -p "$subpkgdir"/etc/profile.d
+ mkdir -p "$subpkgdir"/etc/sddm.conf.d
+ mkdir -p "$subpkgdir"/etc/xdg/qt5ct
+ mkdir -p "$subpkgdir"/usr/bin
+ mkdir -p "$subpkgdir"/usr/share/qt5ct/qss
+ mkdir -p "$subpkgdir"/usr/share/xsessions
+
+ cat >"$subpkgdir"/etc/profile.d/horizon-qt5.sh <<PROFILE
+#!/bin/sh
+export QT_QUICK_BACKEND=software
+export QT_QPA_PLATFORMTHEME=qt5ct
+PROFILE
+ chmod 755 "$subpkgdir"/etc/profile.d/horizon-qt5.sh
+
+ install -D -m644 "$builddir"/boot/horizon.sddm.conf \
+ "$subpkgdir"/etc/sddm.conf.d/horizon.conf
+
+ install -D -m755 "$builddir"/boot/start-horizon-qt5 \
+ "$subpkgdir"/usr/bin/start-horizon-qt5
+
+ install -D -m644 "$builddir"/boot/qt5ct.conf \
+ "$subpkgdir"/etc/xdg/qt5ct/qt5ct.conf
+ install -D -m644 "$builddir"/boot/horizon.qss \
+ "$subpkgdir"/usr/share/qt5ct/qss/horizon.qss
+
+ install -D -m644 "$builddir"/boot/horizon-session.desktop \
+ "$subpkgdir"/usr/share/xsessions/horizon.desktop
+}
+
+sha512sums="ef7ad97508dd70bd8d179e844c8d619ff9802fbb4812bddd677fe5ed945cadad416667995a4a358dfe9b426b9c40f9b847ce5aa11e44357b7952fecbc37184fc horizon-0.9.2.tar.xz"