security/cfs: Improve statvfs handling and add patch comments
It is necessary to use statvfs instead of statfs on NetBSD; simplify how that is done. Explain most patches much better and add notes to file most upstream.
This commit is contained in:
parent
768add5005
commit
04710e3bb7
|
@ -1,10 +1,11 @@
|
|||
# $NetBSD: Makefile,v 1.41 2022/12/20 00:32:35 gdt Exp $
|
||||
# $NetBSD: Makefile,v 1.42 2023/03/11 01:54:01 gdt Exp $
|
||||
|
||||
VERSION= 1.5.0
|
||||
VERSION_SUFFIX_DIST= .beta
|
||||
VERSION_SUFFIX_PKG= b
|
||||
DISTNAME= cfs-${VERSION}${VERSION_SUFFIX_DIST}
|
||||
PKGNAME= cfs-${VERSION}${VERSION_SUFFIX_PKG}
|
||||
PKGREVISION= 1
|
||||
CATEGORIES= security
|
||||
MASTER_SITES= https://www.bayofrum.net/dist/cfs/
|
||||
#OLD_MASTER_SITES= https://www.mattblaze.org/software/cfs-1.4.1.tar.gz
|
||||
|
@ -14,7 +15,7 @@ HOMEPAGE= https://www.mattblaze.org/software/
|
|||
#HOMEPAGE+= https://www.bayofrum.net/cgi-bin/fossil/cfs/index
|
||||
COMMENT= Encrypting file system, using NFS as its interface
|
||||
# The LICENSE is clearly free, and like mit, with minor differences in
|
||||
# keeping the license in derived works. \todo resolve
|
||||
# keeping the license in derived works. \todo Resolve.
|
||||
#LICENSE= mit-very-close
|
||||
|
||||
# Thanks to crees@FreeBSD.org for a continuation fork.
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
$NetBSD: distinfo,v 1.17 2022/12/19 23:18:36 gdt Exp $
|
||||
$NetBSD: distinfo,v 1.18 2023/03/11 01:54:01 gdt Exp $
|
||||
|
||||
BLAKE2s (cfs-1.5.0.beta.tar.gz) = 92d58624292cecaa6c76d079914a7936d7847696e7a229876e2a17de5f35076d
|
||||
SHA512 (cfs-1.5.0.beta.tar.gz) = 2c4c91a357f845b9db0365c1f580dc1e267a51dc63690e7a389090fc9d937ee859025c680fa0fb490a7904c686c2fc05d10d81bae732478d4de869b0ec10fefe
|
||||
Size (cfs-1.5.0.beta.tar.gz) = 108992 bytes
|
||||
SHA1 (patch-aa) = ae76f3cfc4e6f45c6e468b724c8d33e003bf2f57
|
||||
SHA1 (patch-ab) = e1b0f40fea62ba4ea5f4d284e8e6b33626b1ab78
|
||||
SHA1 (patch-af) = 4d58687bf1f12caf63f8b501806c3e973fbf3c3b
|
||||
SHA1 (patch-cfs__attach.c) = 19318ac7832c2c49d8b0a6ab357726cd38139691
|
||||
SHA1 (patch-cfs__fh.c) = 365bc16161c9633fc17cb0188212175112cbcc25
|
||||
SHA1 (patch-aa) = f160b243b6722d14d451eaf725a6ca707e4e95ba
|
||||
SHA1 (patch-ab) = dac917a40e5db080cb526b9d0ffe2dd63857c313
|
||||
SHA1 (patch-af) = 16dce5ba66737f2222526b3cd689e1381d75c663
|
||||
SHA1 (patch-cfs__attach.c) = 6a7908a2051304daaac1d90c115dd06246ab3fc0
|
||||
SHA1 (patch-cfs__fh.c) = 36ff93e28fdfbe30b79d80c32fd866494b01d285
|
||||
SHA1 (patch-getpass.h) = dbc8174b4ec173ad9c5734a1f22488e7608960fc
|
||||
|
|
|
@ -1,4 +1,14 @@
|
|||
$NetBSD: patch-aa,v 1.7 2022/12/19 23:18:37 gdt Exp $
|
||||
$NetBSD: patch-aa,v 1.8 2023/03/11 01:54:01 gdt Exp $
|
||||
|
||||
Add stanza for modern NetBSD. \todo Send upstream.
|
||||
|
||||
Adjust Makefile for pkgsrc norms:
|
||||
|
||||
- Use PREFIX
|
||||
- Comment out FreeBSD
|
||||
- Uncomment the "fail if not configured" line
|
||||
- Change installation to use INSTALL_PROGRAM
|
||||
\todo Evaluate PROGRAM vs SCRIPT; this is carried from before.
|
||||
|
||||
--- Makefile.orig 2022-12-19 22:46:57.638664951 +0000
|
||||
+++ Makefile
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
$NetBSD: patch-ab,v 1.4 2022/12/19 23:18:37 gdt Exp $
|
||||
$NetBSD: patch-ab,v 1.5 2023/03/11 01:54:01 gdt Exp $
|
||||
|
||||
Part of not using internal getpassword.
|
||||
|
||||
--- getpass.c.orig 2013-05-15 16:50:30.000000000 +0000
|
||||
+++ getpass.c
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
$NetBSD: patch-af,v 1.3 2022/12/19 23:18:37 gdt Exp $
|
||||
$NetBSD: patch-af,v 1.4 2023/03/11 01:54:01 gdt Exp $
|
||||
|
||||
\todo Understand and probably delete. First hunk is carried over from
|
||||
before without adequate thought. Second hunk appears to be declaring
|
||||
things declared elsewhere.
|
||||
|
||||
--- cfs.h.orig 2013-05-15 16:50:30.000000000 +0000
|
||||
+++ cfs.h
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
$NetBSD: patch-cfs__attach.c,v 1.1 2022/12/19 23:18:37 gdt Exp $
|
||||
$NetBSD: patch-cfs__attach.c,v 1.2 2023/03/11 01:54:01 gdt Exp $
|
||||
|
||||
For NetBSD, use statvfs.
|
||||
|
||||
\todo Send upstream.
|
||||
|
||||
--- cattach.c.orig 2022-12-19 22:34:48.224422733 +0000
|
||||
--- cattach.c.orig 2013-05-15 16:50:30.000000000 +0000
|
||||
+++ cattach.c
|
||||
@@ -83,8 +83,12 @@ main(int argc, char *argv[])
|
||||
struct fs_data sfb;
|
||||
#define f_blocks fd_req.btot
|
||||
#else
|
||||
+#if defined(__NetBSD_Version__) && __NetBSD_Version__ >= 299000900
|
||||
+ struct statvfs sfb;
|
||||
+#else
|
||||
struct statfs sfb;
|
||||
@@ -59,6 +59,12 @@
|
||||
your solaris configuration */
|
||||
#define statfs statvfs
|
||||
#endif
|
||||
+#ifdef NetBSD
|
||||
+/*
|
||||
+ * Strictly, NetBSD >= 3.0.
|
||||
+ */
|
||||
+#define statfs statvfs
|
||||
+#endif
|
||||
char *flg;
|
||||
int ciph;
|
||||
FILE *fp;
|
||||
|
||||
#ifndef TMOUT /* default timeout; override in makefile */
|
||||
#define TMOUT 0
|
||||
|
|
|
@ -1,4 +1,13 @@
|
|||
$NetBSD: patch-cfs__fh.c,v 1.1 2022/12/19 23:18:37 gdt Exp $
|
||||
$NetBSD: patch-cfs__fh.c,v 1.2 2023/03/11 01:54:01 gdt Exp $
|
||||
|
||||
If a file was opened for reading, do not open the ciphertext in RW
|
||||
mode. While in many filesystems, opening a file for writing and not
|
||||
writing does not result in a modification, coda does a writeback in
|
||||
that case. Plus, as a general matter, reads should only lead to
|
||||
reads. Details available at
|
||||
https://gnats.netbsd.org/28479
|
||||
|
||||
\todo File and discuss upstream.
|
||||
|
||||
--- cfs_fh.c.orig 2013-05-15 16:50:30.000000000 +0000
|
||||
+++ cfs_fh.c
|
||||
|
|
Loading…
Reference in New Issue