From 59e2830c5eec39e3c6622424b755d472bb1cd08d Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Thu, 27 Nov 2008 21:19:30 +0000 Subject: [PATCH] Remove unused patches and fix the one we still want to carry on --- samba-3.0.13-smbclient.patch | 22 ---- samba-3.0.21pre1-smbspool.patch | 11 -- samba-3.0.23-logfiles.patch | 52 -------- samba-3.0.8-non-ascii-domain.patch | 115 ------------------ samba-3.2.0pre1-winbindd-padding.patch | 26 ---- ...notifiy.patch => samba-3.2.5-inotify.patch | 4 +- samba.spec | 15 +-- 7 files changed, 6 insertions(+), 239 deletions(-) delete mode 100644 samba-3.0.13-smbclient.patch delete mode 100644 samba-3.0.21pre1-smbspool.patch delete mode 100644 samba-3.0.23-logfiles.patch delete mode 100644 samba-3.0.8-non-ascii-domain.patch delete mode 100644 samba-3.2.0pre1-winbindd-padding.patch rename samba-3.0.25rc1-inotifiy.patch => samba-3.2.5-inotify.patch (86%) diff --git a/samba-3.0.13-smbclient.patch b/samba-3.0.13-smbclient.patch deleted file mode 100644 index 564c98a..0000000 --- a/samba-3.0.13-smbclient.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- samba-3.0.13/source/client/client.c.smbclient 2005-04-05 13:51:47.000000000 -0400 -+++ samba-3.0.13/source/client/client.c 2005-04-05 13:52:46.000000000 -0400 -@@ -3177,6 +3177,7 @@ - else but port 139... */ - - cli_cm_shutdown(); -+ port = 139; - cli_cm_set_port( 139 ); - cli = cli_cm_open(query_host, "IPC$", True); - } -@@ -3339,8 +3340,9 @@ - name_type = 0x03; - cli_cm_set_dest_name_type( name_type ); - pstrcpy(desthost,poptGetOptArg(pc)); -- if( !port ) -- cli_cm_set_port( 139 ); -+ if ( port != 139 ) -+ port = 139; -+ cli_cm_set_port ( 138); - message = True; - break; - case 'I': diff --git a/samba-3.0.21pre1-smbspool.patch b/samba-3.0.21pre1-smbspool.patch deleted file mode 100644 index c947ee0..0000000 --- a/samba-3.0.21pre1-smbspool.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- samba-3.0.21pre1/source/client/smbspool.c.smbspool 2005-10-17 22:45:07.000000000 -0400 -+++ samba-3.0.21pre1/source/client/smbspool.c 2005-10-18 23:46:53.000000000 -0400 -@@ -165,7 +165,7 @@ - } - else - { -- username = null_str; -+ username = "dummy"; - password = null_str; - server = uri + 6; - } diff --git a/samba-3.0.23-logfiles.patch b/samba-3.0.23-logfiles.patch deleted file mode 100644 index 0503a95..0000000 --- a/samba-3.0.23-logfiles.patch +++ /dev/null @@ -1,52 +0,0 @@ ---- samba-3.0.23rc2/source/lib/popt_common.c.logfiles 2006-06-09 15:30:31.000000000 -0400 -+++ samba-3.0.23rc2/source/lib/popt_common.c 2006-06-14 12:20:02.000000000 -0400 -@@ -54,7 +54,7 @@ - else - pname++; - -- pstr_sprintf(logfile, "%s/log.%s", arg, pname); -+ pstr_sprintf(logfile, "%s/%s.log", arg, pname); - lp_set_logfile(logfile); - } - ---- samba-3.0.8pre1/source/nmbd/nmbd.c.logfiles 2004-09-22 08:42:14.000000000 -0400 -+++ samba-3.0.8pre1/source/nmbd/nmbd.c 2004-09-27 14:16:59.000000000 -0400 -@@ -626,7 +626,7 @@ - sys_srandom(time(NULL) ^ sys_getpid()); - - if (!override_logfile) { -- slprintf(logfile, sizeof(logfile)-1, "%s/log.nmbd", dyn_LOGFILEBASE); -+ slprintf(logfile, sizeof(logfile)-1, "%s/nmbd.log", dyn_LOGFILEBASE); - lp_set_logfile(logfile); - } - ---- samba-3.0.8pre1/source/nsswitch/winbindd.c.logfiles 2004-09-22 08:42:13.000000000 -0400 -+++ samba-3.0.8pre1/source/nsswitch/winbindd.c 2004-09-27 14:17:35.000000000 -0400 -@@ -856,7 +856,7 @@ - } - - if (!override_logfile) { -- pstr_sprintf(logfile, "%s/log.winbindd", dyn_LOGFILEBASE); -+ pstr_sprintf(logfile, "%s/winbindd.log", dyn_LOGFILEBASE); - lp_set_logfile(logfile); - } - setup_logging("winbindd", log_stdout); ---- samba-3.0.11/packaging/Fedora/samba.log.logfiles 2005-02-03 22:07:48.000000000 -0500 -+++ samba-3.0.11/packaging/Fedora/samba.log 2005-02-04 16:17:00.000000000 -0500 -@@ -1,4 +1,4 @@ --/var/log/samba/*.log /var/log/samba/log.smbd /var/log/samba/log.nmbd { -+/var/log/samba/*.log { - notifempty - missingok - sharedscripts ---- samba-3.0.23/packaging/Fedora/smb.conf.logfiles 2006-07-11 11:23:52.000000000 -0400 -+++ samba-3.0.23/packaging/Fedora/smb.conf 2006-07-11 11:27:00.000000000 -0400 -@@ -63,7 +63,7 @@ - - # this tells Samba to use a separate log file for each machine - # that connects -- log file = /usr/local/samba/var/log.%m -+ log file = /var/log/samba/%m.log - - # Put a capping on the size of the log files (in Kb). - max log size = 50 diff --git a/samba-3.0.8-non-ascii-domain.patch b/samba-3.0.8-non-ascii-domain.patch deleted file mode 100644 index 4626b80..0000000 --- a/samba-3.0.8-non-ascii-domain.patch +++ /dev/null @@ -1,115 +0,0 @@ ---- samba-3.0.8pre2/source/libsmb/clispnego.c 2004-10-25 17:05:00.000000000 -0400 -+++ samba-3.0.8pre2-saved/source/libsmb/clispnego.c 2004-10-28 18:26:47.000000000 -0400 -@@ -130,6 +130,8 @@ - int i; - BOOL ret; - ASN1_DATA data; -+ char *tmp_ptr; -+ char *tmp_ptr2; - - asn1_load(&data, blob); - -@@ -152,7 +154,13 @@ - asn1_start_tag(&data, ASN1_CONTEXT(3)); - asn1_start_tag(&data, ASN1_SEQUENCE(0)); - asn1_start_tag(&data, ASN1_CONTEXT(0)); -- asn1_read_GeneralString(&data,principal); -+ tmp_ptr = NULL; -+ asn1_read_GeneralString(&data,&tmp_ptr); -+ convert_string_allocate ( 0, CH_MS_ANSI, CH_UTF8, tmp_ptr, 1 + strlen ( tmp_ptr ), &tmp_ptr2, False ); -+ free ( tmp_ptr ); -+ *principal = strdup ( tmp_ptr2 ); -+ SAFE_FREE ( tmp_ptr2 ); -+ - asn1_end_tag(&data); - asn1_end_tag(&data); - asn1_end_tag(&data); ---- samba-3.0.8pre2/source/libads/ldap.c 2004-10-29 15:24:12.000000000 -0400 -+++ samba-3.0.8pre2-saved/source/libads/ldap.c 2004-10-28 17:04:40.000000000 -0400 -@@ -2408,7 +2408,8 @@ - SAFE_FREE(ads->config.realm); - SAFE_FREE(ads->config.bind_path); - -- ads->config.realm = strdup(p+2); -+ convert_string_allocate(0, CH_MS_ANSI, CH_UTF8, -+ p+2, 1+strlen(p+2), (void**)&(ads->config.realm), False); - ads->config.bind_path = ads_build_dn(ads->config.realm); - - DEBUG(3,("got ldap server name %s@%s, using bind path: %s\n", ---- samba-3.0.8pre2/source/lib/charcnv.c 2004-10-25 17:05:00.000000000 -0400 -+++ samba-3.0.8pre2-saved/source/lib/charcnv.c 2004-10-28 16:29:25.000000000 -0400 -@@ -61,6 +61,7 @@ - else if (ch == CH_DOS) ret = lp_dos_charset(); - else if (ch == CH_DISPLAY) ret = lp_display_charset(); - else if (ch == CH_UTF8) ret = "UTF8"; -+ else if ( ch == CH_MS_ANSI ) ret = "CP1252"; - - #if defined(HAVE_NL_LANGINFO) && defined(CODESET) - if (ret && !strcmp(ret, "LOCALE")) { ---- samba-3.0.8pre2/source/include/charset.h 2004-10-25 17:05:06.000000000 -0400 -+++ samba-3.0.8pre2-saved/source/include/charset.h 2004-10-28 16:37:03.000000000 -0400 -@@ -20,9 +20,9 @@ - */ - - /* this defines the charset types used in samba */ --typedef enum {CH_UCS2=0, CH_UNIX=1, CH_DISPLAY=2, CH_DOS=3, CH_UTF8=4} charset_t; -+typedef enum {CH_UCS2=0, CH_UNIX=1, CH_DISPLAY=2, CH_DOS=3, CH_UTF8=4,CH_MS_ANSI=5} charset_t; - --#define NUM_CHARSETS 5 -+#define NUM_CHARSETS 6 - - /* - * for each charset we have a function that pushes from that charset to a ucs2 -diff -u -r samba-3.0.8pre2/source/include/config.h samba-3.0.8pre2-saved/source/include/config.h -diff -u -r samba-3.0.8pre2/source/utils/ntlm_auth.c samba-3.0.8pre2-nonascii/source/utils/ntlm_auth.c ---- samba-3.0.8pre2/source/utils/ntlm_auth.c 2004-11-03 15:02:20.000000000 -0500 -+++ samba-3.0.8pre2-nonascii/source/utils/ntlm_auth.c 2004-11-03 10:01:09.000000000 -0500 -@@ -1156,6 +1156,7 @@ - return False; - } - -+#if 0 - principal = malloc(spnego.negTokenInit.mechListMIC.length+1); - - if (principal == NULL) { -@@ -1166,6 +1167,11 @@ - memcpy(principal, spnego.negTokenInit.mechListMIC.data, - spnego.negTokenInit.mechListMIC.length); - principal[spnego.negTokenInit.mechListMIC.length] = '\0'; -+#else -+ convert_string_allocate(0, CH_MS_ANSI, CH_UTF8, -+spnego.negTokenInit.mechListMIC.data, spnego.negTokenInit.mechListMIC.length -+, (void**)&(principal), False); -+#endif - - retval = cli_krb5_get_ticket(principal, 0, &tkt, &session_key_krb5); - ---- samba-3.0.8/source/libads/kerberos.c.non-ascii-domain 2004-11-08 11:24:12.000000000 -0500 -+++ samba-3.0.8/source/libads/kerberos.c 2004-11-08 11:34:47.000000000 -0500 -@@ -319,6 +319,7 @@ - krb5_data in_data; - krb5_auth_context auth_context = NULL; - krb5_error_code err = 0; -+ memset(&creds, '\0', sizeof(creds)); - - asprintf(&machine_account, "%s$@%s", global_myname(), lp_realm()); - if (machine_account == NULL) { -@@ -329,9 +330,8 @@ - goto out; - } - if ((err = kerberos_kinit_password(machine_account, password, 0, NULL, LIBADS_CCACHE_NAME)) != 0) { -- DEBUG(0,("get_service_ticket: kerberos_kinit_password %s@%s failed: %s\n", -+ DEBUG(0,("get_service_ticket: kerberos_kinit_password %s failed: %s\n", - machine_account, -- lp_realm(), - error_message(err))); - goto out; - } -@@ -340,7 +340,6 @@ - ticket to ourselves. */ - - /* Set up the enctype and client and server principal fields for krb5_get_credentials. */ -- memset(&creds, '\0', sizeof(creds)); - kerberos_set_creds_enctype(&creds, enctype); - - if ((err = krb5_cc_get_principal(ctx, ccache, &creds.client))) { diff --git a/samba-3.2.0pre1-winbindd-padding.patch b/samba-3.2.0pre1-winbindd-padding.patch deleted file mode 100644 index 4eeff15..0000000 --- a/samba-3.2.0pre1-winbindd-padding.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- source/winbindd/winbindd.c 2007-09-24 00:01:39 +0000 -+++ source/winbindd/winbindd.c 2007-10-17 07:58:37 +0000 -@@ -532,8 +532,8 @@ - } - - if (*(uint32 *)(&state->request) != sizeof(state->request)) { -- DEBUG(0,("request_len_recv: Invalid request size received: %d\n", -- *(uint32 *)(&state->request))); -+ DEBUG(0,("request_len_recv: Invalid request size received: %d (expected %d)\n", -+ *(uint32 *)(&state->request), sizeof(state->request))); - state->finished = True; - return; - } - ---- source/nsswitch/winbind_struct_protocol.h 2007-04-20 23:12:49 +0000 -+++ source/nsswitch/winbind_struct_protocol.h 2007-10-17 07:58:37 +0000 -@@ -326,7 +326,7 @@ - The size is the sizeof the union without the padding aligned on - an 8 byte boundary. --jerry */ - -- char padding[1560]; -+ char padding[1800]; - } data; - union { - SMB_TIME_T padding; - diff --git a/samba-3.0.25rc1-inotifiy.patch b/samba-3.2.5-inotify.patch similarity index 86% rename from samba-3.0.25rc1-inotifiy.patch rename to samba-3.2.5-inotify.patch index f5a6ebb..2448479 100644 --- a/samba-3.0.25rc1-inotifiy.patch +++ b/samba-3.2.5-inotify.patch @@ -5,7 +5,7 @@ struct sys_notify_context *ctx; int fd; struct inotify_watch_context *watches; -+ BOOL broken_inotify; /* Late stop for broken SELinux policy */ ++ bool broken_inotify; /* Late stop for broken system */ }; struct inotify_watch_context { @@ -18,7 +18,7 @@ + + if ((ioctl(in->fd, FIONREAD, &bufsize) != 0) && (errno == EACCES)) { + /* -+ * Workaround for broken SELinux policies on Fedora ++ * Workaround for broken system (SELinux policy bug fixed since long but it is always better not to loop on EACCES) + */ + TALLOC_FREE(fde); + in->broken_inotify = True; diff --git a/samba.spec b/samba.spec index cbab0e6..ed1abe2 100644 --- a/samba.spec +++ b/samba.spec @@ -1,11 +1,11 @@ -%define main_release 23 +%define main_release 24 %define samba_version 3.2.5 %define tdb_version 1.1.1 %define talloc_version 1.2.0 %define samba_release 0.%{main_release}%{?dist} -Summary: The Samba Suite of programs +Summary: Server and Client software to interoperate with Windows machines Name: samba Epoch: 0 Version: 3.2.5 @@ -38,14 +38,10 @@ Source999: filter-requires-samba.sh # generic patches Patch102: samba-3.2.0pre1-pipedir.patch -#Patch103: samba-3.0.23-logfiles.patch Patch104: samba-3.0.0rc3-nmbd-netbiosname.patch # The passwd part has been applied, but not the group part Patch107: samba-3.2.0pre1-grouppwd.patch -#Patch108: samba-3.0.8-non-ascii-domain.patch -Patch110: samba-3.0.21pre1-smbspool.patch -Patch111: samba-3.0.13-smbclient.patch -Patch200: samba-3.0.25rc1-inotifiy.patch +Patch200: samba-3.2.5-inotify.patch Patch201: samba-3.2.4-build.patch Requires(pre): samba-common = %{epoch}:%{version}-%{release} @@ -249,10 +245,7 @@ cp %{SOURCE11} packaging/Fedora/ #%patch103 -p1 -b .logfiles #%patch104 -p1 -b .nmbd-netbiosname # FIXME: does not apply %patch107 -p1 -b .grouppwd -#%patch108 -p1 -b .non-ascii-domain -#%patch110 -p1 -b .smbspool # FIXME: does not apply -#%patch111 -p1 -b .smbclient # FIXME: does not apply -#%patch200 -p0 -b .inotify # FIXME: does not compile +%patch200 -p0 -b .inotify %patch201 -p1 -b .build mv source/VERSION source/VERSION.orig