On Tue, Aug 28 2018, Ian McWilliam <[email protected]> wrote:
> Hi,
>
>
> Thanks for this. All good from my end. Still has the printing of null objects 
> issue.
>
>
> Aug 28 14:58:25 ianm-openbsd smbd: vfprintf %s NULL in "Auth: [%s,%s] user 
> [%s]\\[%s] at [%s] with [%s] status [%s] workstation [%s] remote host [%s]%s 
> local host [%s] %s "
>
> Aug 28 14:58:26 ianm-openbsd smbd: vfprintf %s NULL in "sys_get_%s_quota() 
> failed for mntpath[%s] bdev[%s] qtype[%d] id[%d]: %s

Grrr, I forgot about those.  Here's an updated diff.  The
auth/auth_log.c diff will hopefully fix the first line and is based on
the behavior I can see at $DAYJOB.  For the second line I'd need to have
a look at your log.samba.


Index: Makefile
===================================================================
RCS file: /cvs/ports/net/samba/Makefile,v
retrieving revision 1.256
diff -u -p -r1.256 Makefile
--- Makefile    14 Aug 2018 10:35:00 -0000      1.256
+++ Makefile    26 Aug 2018 15:22:55 -0000
@@ -1,6 +1,6 @@
 # $OpenBSD: Makefile,v 1.256 2018/08/14 10:35:00 jca Exp $
 
-VERSION =              4.8.4
+VERSION =              4.8.5
 DISTNAME =             samba-${VERSION}
 
 COMMENT-main =         SMB and CIFS client and server for UNIX
@@ -17,10 +17,10 @@ PKGNAME-docs =              samba-docs-${VERSION}
 
 PKG_ARCH-docs =                *
 
-LDB_V =                        1.3.5
+LDB_V =                        1.3.6
 TEVENT_V =             0.9.36
 
-REVISION-tevent =      1
+REVISION-tevent =      2
 
 SHARED_LIBS =          asn1-samba4             0.0 \
                        com_err-samba4          0.0 \
@@ -36,13 +36,13 @@ SHARED_LIBS =               asn1-samba4             0.0 \
                        hx509-samba4            0.0 \
                        kdc-samba4              0.0 \
                        krb5-samba4             0.1 \
-                       ldb                     0.7 \
+                       ldb                     0.8 \
                        ndr                     0.3 \
                        ndr-krb5pac             0.1 \
                        ndr-nbt                 0.1 \
                        ndr-standard            3.0 \
                        netapi                  2.1 \
-                       pyldb-util              0.4 \
+                       pyldb-util              0.5 \
                        roken-samba4            0.0 \
                        samba-credentials       0.2 \
                        samba-errors            1.0 \
@@ -58,8 +58,8 @@ SHARED_LIBS =         asn1-samba4             0.0 \
                        tevent-util             1.0 \
                        wbclient                3.2 \
                        wind-samba4             0.0 \
-                       replace                 6.0 \
-                       util-setid              6.0
+                       replace                 7.0 \
+                       util-setid              7.0
 
 CATEGORIES =           net sysutils security
 
Index: distinfo
===================================================================
RCS file: /cvs/ports/net/samba/distinfo,v
retrieving revision 1.70
diff -u -p -r1.70 distinfo
--- distinfo    14 Aug 2018 10:35:00 -0000      1.70
+++ distinfo    25 Aug 2018 17:49:27 -0000
@@ -1,2 +1,2 @@
-SHA256 (samba-4.8.4.tar.gz) = 9QRNFJ4BiUoIsdEUuLaa7XgXGnuxlgi9H9dxRTuaVAY=
-SIZE (samba-4.8.4.tar.gz) = 17700008
+SHA256 (samba-4.8.5.tar.gz) = 5Y7msSYtQSi4kyzu5Z1fCwqbvgBUfrPMTEFVLeGmUVU=
+SIZE (samba-4.8.5.tar.gz) = 17715401
Index: patches/patch-auth_auth_log_c
===================================================================
RCS file: patches/patch-auth_auth_log_c
diff -N patches/patch-auth_auth_log_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-auth_auth_log_c       28 Aug 2018 12:04:54 -0000
@@ -0,0 +1,48 @@
+$OpenBSD$
+
+Avoid printf("%s", NULL);
+
+Index: auth/auth_log.c
+--- auth/auth_log.c.orig
++++ auth/auth_log.c
+@@ -716,7 +716,8 @@ static void log_authentication_event_human_readable(
+                       ui->netlogon_trust_account.account_name);
+               nl = talloc_asprintf(frame,
+                       " NETLOGON computer [%s] trust account [%s]",
+-                      trust_computer_name, trust_account_name);
++                      trust_computer_name, trust_account_name  ?
++                      trust_account_name : "(NULL)");
+       }
+ 
+       remote = tsocket_address_string(ui->remote_host, frame);
+@@ -735,8 +736,10 @@ static void log_authentication_event_human_readable(
+               logon_line = talloc_asprintf(
+                               frame,
+                               " mapped to [%s]\\[%s].",
+-                              log_escape(frame, ui->mapped.domain_name),
+-                              log_escape(frame, ui->mapped.account_name));
++                              log_escape(frame, ui->mapped.domain_name ?
++                                  ui->mapped.domain_name : "(NULL)"),
++                              log_escape(frame, ui->mapped.account_name ?
++                                  ui->mapped.account_name : "(NULL)"));
+       }
+ 
+       DEBUGC(DBGC_AUTH_AUDIT, debug_level,
+@@ -747,12 +750,14 @@ static void log_authentication_event_human_readable(
+               " %s\n",
+               ui->service_description,
+               ui->auth_description,
+-              log_escape(frame, ui->client.domain_name),
++              log_escape(frame, ui->client.domain_name ?
++                  ui->client.domain_name : "(NULL)"),
+               log_escape(frame, ui->client.account_name),
+               ts,
+-              password_type,
++              password_type ? password_type : "(NULL)",
+               nt_errstr(status),
+-              log_escape(frame, ui->workstation_name),
++              log_escape(frame, ui->workstation_name ?
++                  ui->workstation_name : "(NULL)"),
+               remote,
+               logon_line,
+               local,
Index: patches/patch-buildtools_wafsamba_samba_autoconf_py
===================================================================
RCS file: 
/cvs/ports/net/samba/patches/patch-buildtools_wafsamba_samba_autoconf_py,v
retrieving revision 1.8
diff -u -p -r1.8 patch-buildtools_wafsamba_samba_autoconf_py
--- patches/patch-buildtools_wafsamba_samba_autoconf_py 11 Jun 2018 11:59:51 
-0000      1.8
+++ patches/patch-buildtools_wafsamba_samba_autoconf_py 25 Aug 2018 17:49:55 
-0000
@@ -7,7 +7,7 @@ $OpenBSD: patch-buildtools_wafsamba_samb
 Index: buildtools/wafsamba/samba_autoconf.py
 --- buildtools/wafsamba/samba_autoconf.py.orig
 +++ buildtools/wafsamba/samba_autoconf.py
-@@ -815,6 +815,27 @@ def ADD_LDFLAGS(conf, flags, testflags=False):
+@@ -825,6 +825,27 @@ def ADD_LDFLAGS(conf, flags, testflags=False):
      if not 'EXTRA_LDFLAGS' in conf.env:
          conf.env['EXTRA_LDFLAGS'] = []
      conf.env['EXTRA_LDFLAGS'].extend(TO_LIST(flags))
@@ -35,7 +35,7 @@ Index: buildtools/wafsamba/samba_autocon
      return flags
  
  
-@@ -878,10 +899,9 @@ def SETUP_CONFIGURE_CACHE(conf, enable):
+@@ -888,10 +909,9 @@ def SETUP_CONFIGURE_CACHE(conf, enable):
  def SAMBA_CHECK_UNDEFINED_SYMBOL_FLAGS(conf):
      # we don't want any libraries or modules to rely on runtime
      # resolution of symbols
Index: patches/patch-lib_ldb_wscript
===================================================================
RCS file: /cvs/ports/net/samba/patches/patch-lib_ldb_wscript,v
retrieving revision 1.8
diff -u -p -r1.8 patch-lib_ldb_wscript
--- patches/patch-lib_ldb_wscript       11 Jun 2018 11:59:51 -0000      1.8
+++ patches/patch-lib_ldb_wscript       25 Aug 2018 17:49:55 -0000
@@ -14,8 +14,8 @@ Index: lib/ldb/wscript
 +    conf.env.standalone_ldb = True
  
      if not conf.env.standalone_ldb:
-         if conf.env.disable_python:
-@@ -107,8 +108,7 @@ def configure(conf):
+         max_ldb_version = [int(x) for x in VERSION.split(".")]
+@@ -119,8 +120,7 @@ def configure(conf):
  
          # we don't want any libraries or modules to rely on runtime
          # resolution of symbols
Index: patches/patch-source4_dsdb_samdb_ldb_modules_acl_c
===================================================================
RCS file: patches/patch-source4_dsdb_samdb_ldb_modules_acl_c
diff -N patches/patch-source4_dsdb_samdb_ldb_modules_acl_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-source4_dsdb_samdb_ldb_modules_acl_c  28 Aug 2018 12:04:54 
-0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: source4/dsdb/samdb/ldb_modules/acl.c
+--- source4/dsdb/samdb/ldb_modules/acl.c.orig
++++ source4/dsdb/samdb/ldb_modules/acl.c
+@@ -631,7 +631,7 @@ fail:
+                     "nbname[%s] ntds[%s] forest[%s] domain[%s]\n",
+                     spn_value, (unsigned)userAccountControl,
+                     samAccountName, dnsHostName,
+-                    netbios_name, ntds_guid,
++                    netbios_name, ntds_guid ? ntds_guid : "(NULL)",
+                     forest_name, base_domain);
+       return LDB_ERR_CONSTRAINT_VIOLATION;
+ 
Index: pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/net/samba/pkg/PLIST-main,v
retrieving revision 1.43
diff -u -p -r1.43 PLIST-main
--- pkg/PLIST-main      14 Aug 2018 10:35:00 -0000      1.43
+++ pkg/PLIST-main      26 Aug 2018 15:09:27 -0000
@@ -857,6 +857,8 @@ lib/samba/idmap/rfc2307.so
 lib/samba/idmap/rid.so
 lib/samba/idmap/script.so
 lib/samba/idmap/tdb2.so
+lib/samba/krb5/
+lib/samba/krb5/winbind_krb5_locator.so
 lib/samba/ldb/acl.so
 lib/samba/ldb/aclread.so
 lib/samba/ldb/anr.so
@@ -1084,7 +1086,6 @@ lib/samba/vfs/virusfilter.so
 lib/samba/vfs/worm.so
 lib/samba/vfs/xattr_tdb.so
 lib/security/pam_winbind.so
-lib/winbind_krb5_locator.so
 ${P5SITE}/Parse/
 ${P5SITE}/Parse/Pidl/
 ${P5SITE}/Parse/Pidl.pm
@@ -1164,7 +1165,6 @@ libexec/samba/
 @man man/man7/samba.7
 @man man/man7/traffic_learner.7
 @man man/man7/traffic_replay.7
-@man man/man7/winbind_krb5_locator.7
 @man man/man8/cifsdd.8
 @man man/man8/eventlogadm.8
 @man man/man8/idmap_ad.8
@@ -1233,6 +1233,7 @@ libexec/samba/
 @man man/man8/vfs_virusfilter.8
 @man man/man8/vfs_worm.8
 @man man/man8/vfs_xattr_tdb.8
+@man man/man8/winbind_krb5_locator.8
 @man man/man8/winbindd.8
 @bin sbin/nmbd
 @bin sbin/samba

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to