summaryrefslogtreecommitdiff
path: root/net/samba416/files/0004-On-FreeBSD-date-1-has-different-semantics-than-on-Li.patch
diff options
context:
space:
mode:
authorTimur I. Bakeyev <timur@FreeBSD.org>2022-10-17 01:06:57 +0200
committerTimur I. Bakeyev <timur@FreeBSD.org>2022-10-17 01:23:12 +0200
commit2daf87ac19838c9a36f56fb51b0678d193921771 (patch)
tree87a5f4c067f790a80182ab78a91be4695e030b8c /net/samba416/files/0004-On-FreeBSD-date-1-has-different-semantics-than-on-Li.patch
parentnet/samba413: Fix alignment of the WWW line. (diff)
net/samba416: New port for Samba 4.16
This is an initial attempt to add Samba to the FreeBSD after major rewrite of the VFS code in the upstream. Most of the port development is now carried in: https://gitlab.com/samba-freebsd Due to the way how new Samba VFS code is written there is a constrain that Samba 4.14+ can run only on FreeBSD 13.1+, as it requires support of the `nodup` option for the `fdesc` file system, as well as it's presence in the system in general. https://gitlab.com/samba-freebsd/-/wikis/The-New-VFS I'd like to thank CyberSecure Pty Ltd. company for their supoort of the port development and Andrew Walker from iXsystems Inc. for the patches he created and made available for the Samba4 on TrueNAS. PR: 263874
Diffstat (limited to 'net/samba416/files/0004-On-FreeBSD-date-1-has-different-semantics-than-on-Li.patch')
-rw-r--r--net/samba416/files/0004-On-FreeBSD-date-1-has-different-semantics-than-on-Li.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/net/samba416/files/0004-On-FreeBSD-date-1-has-different-semantics-than-on-Li.patch b/net/samba416/files/0004-On-FreeBSD-date-1-has-different-semantics-than-on-Li.patch
new file mode 100644
index 000000000000..4df0249fced2
--- /dev/null
+++ b/net/samba416/files/0004-On-FreeBSD-date-1-has-different-semantics-than-on-Li.patch
@@ -0,0 +1,38 @@
+From 0eb28116ceefee7bdafabac18a1763f13cb71883 Mon Sep 17 00:00:00 2001
+From: "Timur I. Bakeyev" <timur@FreeBSD.org>
+Date: Sun, 30 May 2021 03:42:31 +0200
+Subject: [PATCH 04/28] On FreeBSD `date(1)` has different semantics than on
+ Linux. Generate call parameter accordingly.
+
+FreeBSD: `date [[[[[cc]yy]mm]dd]HH]MM[.ss]`
+Linux: `date [mmddHHMM[[cc]yy][.ss]]`
+
+Signed-off-by: Timur I. Bakeyev <timur@FreeBSD.org>
+---
+ source3/utils/net_time.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/source3/utils/net_time.c b/source3/utils/net_time.c
+index d102f84614f..f679000a979 100644
+--- a/source3/utils/net_time.c
++++ b/source3/utils/net_time.c
+@@ -82,10 +82,15 @@ static const char *systime(time_t t)
+ if (!tm) {
+ return "unknown";
+ }
+-
++#if defined(FREEBSD)
++ return talloc_asprintf(talloc_tos(), "%04d%02d%02d%02d%02d.%02d",
++ tm->tm_year + 1900, tm->tm_mon+1, tm->tm_mday,
++ tm->tm_hour, tm->tm_min, tm->tm_sec);
++#else
+ return talloc_asprintf(talloc_tos(), "%02d%02d%02d%02d%04d.%02d",
+ tm->tm_mon+1, tm->tm_mday, tm->tm_hour,
+ tm->tm_min, tm->tm_year + 1900, tm->tm_sec);
++#endif
+ }
+
+ int net_time_usage(struct net_context *c, int argc, const char **argv)
+--
+2.37.1
+