From f75e51206f65c968daa8192c45432e2b79f750aa Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Sat, 27 Feb 2021 13:42:30 +0100 Subject: [PATCH] rediffed patches --- samba-bug-9816.patch | 3 ++- samba-lprng-no-dot-printers.patch | 10 +++++----- server-role.patch | 10 +++++----- unicodePwd-nthash-values-over-LDAP.patch | 2 +- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/samba-bug-9816.patch b/samba-bug-9816.patch index 5b16a6f..c965c2d 100644 --- a/samba-bug-9816.patch +++ b/samba-bug-9816.patch @@ -28,7 +28,7 @@ index 37edb31..00abad8 100644 #ifdef _WIN32 #define mkdir(d,m) _mkdir(d) #endif -@@ -898,5 +903,19 @@ int rep_usleep(useconds_t sec) +@@ -898,6 +903,20 @@ int rep_usleep(useconds_t sec) #ifndef HAVE_SETPROCTITLE void rep_setproctitle(const char *fmt, ...) { @@ -48,6 +48,7 @@ index 37edb31..00abad8 100644 +#endif } #endif + #ifndef HAVE_SETPROCTITLE_INIT -- 1.7.10.4 diff --git a/samba-lprng-no-dot-printers.patch b/samba-lprng-no-dot-printers.patch index 4ced815..35f5210 100644 --- a/samba-lprng-no-dot-printers.patch +++ b/samba-lprng-no-dot-printers.patch @@ -10,9 +10,9 @@ diff -ur samba-3.0.26a/source3/param/loadparm.c samba-3.0.26a-lprng/source3/para + return sDefault.printing; +} + - /******************************************************************* - Ensure we don't use sendfile if server smb signing is active. - ********************************************************************/ + static uint32_t spoolss_state; + + bool lp_disable_spoolss( void ) --- samba-3.6.0/source3/printing/print_standard.c~ 2011-08-09 13:17:47.000000000 +0200 +++ samba-3.6.0/source3/printing/print_standard.c 2011-10-17 21:15:15.693523176 +0200 @@ -64,6 +64,7 @@ bool std_pcap_cache_reload(const char *p @@ -21,11 +21,11 @@ diff -ur samba-3.0.26a/source3/param/loadparm.c samba-3.0.26a-lprng/source3/para bool print_warning = false; + enum printing_types printing = lp_defaultprinting(); - if ((pcap_file = x_fopen(pcap_name, O_RDONLY, 0)) == NULL) { + if ((pcap_file = fopen(pcap_name, "r")) == NULL) { DEBUG(0, ("Unable to open printcap file %s for read!\n", pcap_name)); @@ -77,6 +79,10 @@ - if (*pcap_line == '#' || *pcap_line == 0) continue; + } + /* skip .name in case of LPRng */ + if (printing == PRINT_LPRNG && *name == '.') diff --git a/server-role.patch b/server-role.patch index ea1ca81..2c2be36 100644 --- a/server-role.patch +++ b/server-role.patch @@ -6,18 +6,18 @@ EnvironmentFile=-@SYSCONFDIR@/sysconfig/samba +ExecStartPre=/bin/sh -c '[ "`samba-tool testparm --parameter-name="server role" 2>/dev/null | tail -1`" != "active directory domain controller" ]' ExecStart=@SBINDIR@/smbd --foreground --no-process-group $SMBDOPTIONS - ExecReload=/usr/bin/kill -HUP $MAINPID + ExecReload=/bin/kill -HUP $MAINPID LimitCORE=infinity --- samba-4.7.4/packaging/systemd/nmb.service.in.orig 2017-12-26 18:26:31.457609415 +0100 +++ samba-4.7.4/packaging/systemd/nmb.service.in 2017-12-26 18:27:32.350942051 +0100 @@ -7,6 +7,8 @@ - NotifyAccess=all + Type=notify PIDFile=@PIDDIR@/nmbd.pid EnvironmentFile=-@SYSCONFDIR@/sysconfig/samba +ExecStartPre=/bin/sh -c '[ "`samba-tool testparm --parameter-name="server role" 2>/dev/null | tail -1`" != "active directory domain controller" ]' +ExecStartPre=/bin/sh -c '[ "`testparm -s --parameter-name="disable netbios" 2>/dev/null`" != "Yes" ]' ExecStart=@SBINDIR@/nmbd --foreground --no-process-group $NMBDOPTIONS - ExecReload=/usr/bin/kill -HUP $MAINPID + ExecReload=/bin/kill -HUP $MAINPID LimitCORE=infinity --- samba-4.7.4/packaging/systemd/samba.service.in.orig 2017-12-26 18:26:31.457609415 +0100 +++ samba-4.7.4/packaging/systemd/samba.service.in 2017-12-26 18:27:52.774275149 +0100 @@ -27,5 +27,5 @@ EnvironmentFile=-@SYSCONFDIR@/sysconfig/samba +ExecStartPre=/bin/sh -c '[ "`samba-tool testparm --parameter-name="server role" 2>/dev/null | tail -1`" = "active directory domain controller" ]' ExecStart=@SBINDIR@/samba --foreground --no-process-group $SAMBAOPTIONS - ExecReload=/usr/bin/kill -HUP $MAINPID - + ExecReload=/bin/kill -HUP $MAINPID + @systemd_samba_extra@ diff --git a/unicodePwd-nthash-values-over-LDAP.patch b/unicodePwd-nthash-values-over-LDAP.patch index e7f7c42..5d50f43 100644 --- a/unicodePwd-nthash-values-over-LDAP.patch +++ b/unicodePwd-nthash-values-over-LDAP.patch @@ -10,8 +10,8 @@ Allow setting unicodePwd with NTHash vlue over LDAP - { DSDB_CONTROL_PASSWORD_HASH_VALUES_OID, NULL, NULL }, + { DSDB_CONTROL_PASSWORD_HASH_VALUES_OID, decode_flag_request, encode_flag_request }, { DSDB_CONTROL_PASSWORD_CHANGE_OID, NULL, NULL }, + { DSDB_CONTROL_PASSWORD_ACL_VALIDATION_OID, NULL, NULL }, { DSDB_CONTROL_APPLY_LINKS, NULL, NULL }, - { LDB_CONTROL_BYPASS_OPERATIONAL_OID, NULL, NULL }, --- samba-4.0.7/source4/dsdb/samdb/ldb_modules/password_hash.c~ 2013-07-02 20:01:42.731518064 +0200 +++ samba-4.0.7/source4/dsdb/samdb/ldb_modules/password_hash.c 2013-07-02 20:39:24.909757777 +0200 @@ -3386,10 +3386,29 @@ -- 2.43.0