diff --git a/Makefile b/Makefile deleted file mode 100644 index 8dd83a1..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: samba -# $Id$ -NAME := samba -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attempt a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/README.dc b/README.dc new file mode 100644 index 0000000..b690f28 --- /dev/null +++ b/README.dc @@ -0,0 +1,20 @@ +MIT Kerberos 5 Support +======================= + +Fedora is using MIT Kerberos implementation as its Kerberos infrastructure of +choice. Samba 4 build in Fedora is using MIT Kerberos implementation in order +to allow system-wide interoperability between both desktop and server +applications running on the same machine. + +At the moment Samba 4 Active Directory Domain Controller implementation is not +available with MIT Kereberos. FreeIPA and Samba Team members are currently +working on Samba 4 MIT Kerberos support as this is a requirement for a +GNU/Linux distribution integration of Samba 4 AD DC features. + +We have just finished migrating the file server and all client utilities to MIT +Kerberos. The result of this work is available in samba4-* packages in Fedora. +We'll provide Samba 4 AD DC functionality as soon as its support of MIT +Kerberos KDC will be ready. + +In case of further questions do not hesitate to send your inquiries to +samba4-owner@fedoraproject.org diff --git a/README.downgrade b/README.downgrade new file mode 100644 index 0000000..5cb0aaa --- /dev/null +++ b/README.downgrade @@ -0,0 +1,29 @@ +Downgrading Samba +================= + +Short version: data-preserving downgrades between Samba versions are not supported + +Long version: +With Samba development there are cases when on-disk database format evolves. +In general, Samba Team attempts to maintain forward compatibility and +automatically upgrade databases during runtime when requires. +However, when downgrade is required Samba will not perform downgrade to +existing databases. It may be impossible if new features that caused database +upgrade are in use. Thus, one needs to consider a downgrade procedure before +actually downgrading Samba setup. + +Please always perform back up prior both upgrading and downgrading across major +version changes. Restoring database files is easiest and simplest way to get to +previously working setup. + +Easiest way to downgrade is to remove all created databases and start from scratch. +This means losing all authentication and domain relationship data, as well as +user databases (in case of tdb storage), printers, registry settings, and winbindd +caches. + +Remove databases in following locations: +/var/lib/samba/*.tdb +/var/lib/samba/private/*.tdb + +In particular, registry settings are known to prevent running downgraded versions +(Samba 4 to Samba 3) as registry format has changed between Samba 3 and Samba 4. diff --git a/nmb.init b/nmb.init deleted file mode 100644 index 6234ff9..0000000 --- a/nmb.init +++ /dev/null @@ -1,114 +0,0 @@ -#!/bin/sh -# -# chkconfig: - 91 35 -# description: Starts and stops the Samba smbd and nmbd daemons \ -# used to provide SMB network services. -# -# pidfile: /var/run/samba/nmbd.pid -# config: /etc/samba/smb.conf - - -# Source function library. -if [ -f /etc/init.d/functions ] ; then - . /etc/init.d/functions -elif [ -f /etc/rc.d/init.d/functions ] ; then - . /etc/rc.d/init.d/functions -else - exit 1 -fi - -# Avoid using root's TMPDIR -unset TMPDIR - -# Source networking configuration. -. /etc/sysconfig/network - -if [ -f /etc/sysconfig/samba ]; then - . /etc/sysconfig/samba -fi - -# Check that networking is up. -[ ${NETWORKING} = "no" ] && exit 1 - -# Check that smb.conf exists. -[ -f /etc/samba/smb.conf ] || exit 6 - -RETVAL=0 - - -start() { - KIND="NMB" - echo -n $"Starting $KIND services: " - daemon nmbd $NMBDOPTIONS - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/nmb || \ - RETVAL=1 - return $RETVAL -} - -stop() { - KIND="NMB" - echo -n $"Shutting down $KIND services: " - killproc nmbd - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/nmb - return $RETVAL -} - -restart() { - stop - start -} - -reload() { - echo -n $"Reloading smb.conf file: " - killproc nmbd -HUP - RETVAL=$? - echo - return $RETVAL -} - -rhstatus() { - status -l nmb nmbd - return $? -} - - -# Allow status as non-root. -if [ "$1" = status ]; then - rhstatus - exit $? -fi - -# Check that we can write to it... so non-root users stop here -[ -w /etc/samba/smb.conf ] || exit 4 - - - -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - restart - ;; - reload) - reload - ;; - status) - rhstatus - ;; - condrestart) - [ -f /var/lock/subsys/nmb ] && restart || : - ;; - *) - echo $"Usage: $0 {start|stop|restart|reload|status|condrestart}" - exit 2 -esac - -exit $? diff --git a/samba-3.0.0rc3-nmbd-netbiosname.patch b/samba-3.0.0rc3-nmbd-netbiosname.patch deleted file mode 100644 index 31f82b2..0000000 --- a/samba-3.0.0rc3-nmbd-netbiosname.patch +++ /dev/null @@ -1,90 +0,0 @@ -diff -ur samba-3.0.0rc3/source/lib/popt_common.c samba-3.0.0rc3-lhh/source/lib/popt_common.c ---- samba-3.0.0rc3/source/lib/popt_common.c 2003-09-10 13:57:00.000000000 -0400 -+++ samba-3.0.0rc3-lhh/source/lib/popt_common.c 2003-09-11 13:49:24.000000000 -0400 -@@ -87,7 +87,7 @@ - - case 'n': - if (arg) { -- set_global_myname(arg); -+ set_global_myname_override(arg); - } - break; - -diff -ur samba-3.0.0rc3/source/lib/util.c samba-3.0.0rc3-lhh/source/lib/util.c ---- samba-3.0.0rc3/source/lib/util.c 2003-09-08 12:04:35.000000000 -0400 -+++ samba-3.0.0rc3-lhh/source/lib/util.c 2003-09-11 13:47:18.000000000 -0400 -@@ -84,6 +84,7 @@ - ***********************************************************************/ - - static char *smb_myname; -+static char *smb_myname_override; - static char *smb_myworkgroup; - static char *smb_scope; - static int smb_num_netbios_names; -@@ -108,6 +109,27 @@ - return smb_myname; - } - -+ -+/*********************************************************************** -+ Allocate and set override for myname. Ensure upper case. -+***********************************************************************/ -+ -+BOOL set_global_myname_override(const char *myname) -+{ -+ SAFE_FREE(smb_myname_override); -+ smb_myname_override = strdup(myname); -+ if (!smb_myname_override) -+ return False; -+ strupper_m(smb_myname_override); -+ return True; -+} -+ -+const char *global_myname_override(void) -+{ -+ return smb_myname_override; -+} -+ -+ - /*********************************************************************** - Allocate and set myworkgroup. Ensure upper case. - ***********************************************************************/ -diff -ur samba-3.0.0rc3/source/nmbd/nmbd.c samba-3.0.0rc3-lhh/source/nmbd/nmbd.c ---- samba-3.0.0rc3/source/nmbd/nmbd.c 2003-09-10 13:57:00.000000000 -0400 -+++ samba-3.0.0rc3-lhh/source/nmbd/nmbd.c 2003-09-11 14:05:21.000000000 -0400 -@@ -608,6 +608,7 @@ - {"hosts", 'H', POPT_ARG_STRING, dyn_LMHOSTSFILE, 'H', "Load a netbios hosts file"}, - {"port", 'p', POPT_ARG_INT, &global_nmb_port, NMB_PORT, "Listen on the specified port" }, - POPT_COMMON_SAMBA -+ POPT_COMMON_CONNECTION - { NULL } - }; - -diff -ur samba-3.0.0rc3/source/param/loadparm.c samba-3.0.0rc3-lhh/source/param/loadparm.c ---- samba-3.0.0rc3/source/param/loadparm.c 2003-09-08 12:04:35.000000000 -0400 -+++ samba-3.0.0rc3-lhh/source/param/loadparm.c 2003-09-11 14:00:51.000000000 -0400 -@@ -1327,7 +1327,10 @@ - */ - string_set(&Globals.szPasswdChat, DEFAULT_PASSWD_CHAT); - -- set_global_myname(myhostname()); -+ if (!global_myname_override()) -+ set_global_myname(myhostname()); -+ else -+ set_global_myname(global_myname_override()); - string_set(&Globals.szNetbiosName,global_myname()); - - set_global_myworkgroup(WORKGROUP); -@@ -2698,6 +2701,12 @@ - BOOL ret; - pstring netbios_name; - -+ if (global_myname_override()) { -+ DEBUG(4, ("handle_netbios_name: ignoring netbios name " -+ "parameter")); -+ return True; -+ } -+ - pstrcpy(netbios_name, pszParmValue); - - standard_sub_basic(current_user_info.smb_name, netbios_name,sizeof(netbios_name)); diff --git a/samba-3.2.0pre1-grouppwd.patch b/samba-3.2.0pre1-grouppwd.patch deleted file mode 100644 index 12c9e80..0000000 --- a/samba-3.2.0pre1-grouppwd.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- samba-3.2.0pre1/source3/winbindd/winbindd_group.c.star 2007-10-03 17:40:31.000000000 -0400 -+++ samba-3.2.0pre1/source3/winbindd/winbindd_group.c 2007-10-03 17:40:46.000000000 -0400 -@@ -215,7 +215,7 @@ - /* Group name and password */ - - safe_strcpy(gr->gr_name, full_group_name, sizeof(gr->gr_name) - 1); -- safe_strcpy(gr->gr_passwd, "x", sizeof(gr->gr_passwd) - 1); -+ safe_strcpy(gr->gr_passwd, "*", sizeof(gr->gr_passwd) - 1); - - return True; - } diff --git a/samba-3.2.0pre1-pipedir.patch b/samba-3.2.0pre1-pipedir.patch deleted file mode 100644 index 9fa13ea..0000000 --- a/samba-3.2.0pre1-pipedir.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- samba-3.2.0pre1/nsswitch/winbind_struct_protocol.h.pipedir 2007-10-03 15:32:23.000000000 -0400 -+++ samba-3.2.0pre1/nsswitch/winbind_struct_protocol.h 2007-10-03 15:33:13.000000000 -0400 -@@ -24,7 +24,7 @@ - * is needed for launchd support -- jpeach. - */ - #ifndef WINBINDD_SOCKET_DIR --#define WINBINDD_SOCKET_DIR "/tmp/.winbindd" /* Name of PF_UNIX dir */ -+#define WINBINDD_SOCKET_DIR "/var/run/winbindd" /* Name of PF_UNIX dir */ - #endif - - /* diff --git a/samba-3.2.5-inotify.patch b/samba-3.2.5-inotify.patch deleted file mode 100644 index 31b8952..0000000 --- a/samba-3.2.5-inotify.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- source3/smbd/notify_inotify.c.inotify 2009-12-15 09:25:26.000000000 +0100 -+++ source3/smbd/notify_inotify.c 2009-12-17 18:42:06.000000000 +0100 -@@ -75,6 +75,7 @@ - struct sys_notify_context *ctx; - int fd; - struct inotify_watch_context *watches; -+ bool broken_inotify; /* Late stop for broken system */ - }; - - struct inotify_watch_context { -@@ -239,8 +240,15 @@ - filenames, and thus can't know how much to allocate - otherwise - */ -- if (ioctl(in->fd, FIONREAD, &bufsize) != 0 || -- bufsize == 0) { -+ if ((ioctl(in->fd, FIONREAD, &bufsize) != 0) && (errno == EACCES)) { -+ /* -+ * 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; -+ return; -+ } -+ if (bufsize == 0) { - DEBUG(0,("No data on inotify fd?!\n")); - TALLOC_FREE(fde); - return; -@@ -297,6 +305,7 @@ - } - in->ctx = ctx; - in->watches = NULL; -+ in->broken_inotify = False; - - ctx->private_data = in; - talloc_set_destructor(in, inotify_destructor); -@@ -391,6 +400,10 @@ - - in = talloc_get_type(ctx->private_data, struct inotify_private); - -+ if (in->broken_inotify) { -+ return NT_STATUS_OK; -+ } -+ - mask = inotify_map(e); - if (mask == 0) { - /* this filter can't be handled by inotify */ diff --git a/samba-3.6.4-krb5_locate_kdc.patch b/samba-3.6.4-krb5_locate_kdc.patch deleted file mode 100644 index cfe23b0..0000000 --- a/samba-3.6.4-krb5_locate_kdc.patch +++ /dev/null @@ -1,251 +0,0 @@ -From 2464a7b0ddb556bed86a845c9400e26c4d7f584a Mon Sep 17 00:00:00 2001 -From: Andreas Schneider -Date: Wed, 30 Nov 2011 17:58:30 +0100 -Subject: [PATCH] s3-libsmb: Remove obsolete smb_krb5_locate_kdc. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Günther Deschner - -Autobuild-User: Günther Deschner -Autobuild-Date: Thu Feb 9 14:58:57 CET 2012 on sn-devel-104 ---- - source3/configure.in | 1 - - source3/include/krb5_protos.h | 4 -- - source3/libsmb/clikrb5.c | 89 ----------------------------------------- - source3/wscript | 2 +- - 4 files changed, 1 insertions(+), 95 deletions(-) - -diff --git a/source3/configure.in b/source3/configure.in -index 298fe1b..1ce1a5b 100644 ---- a/source3/configure.in -+++ b/source3/configure.in -@@ -3860,7 +3860,6 @@ if test x"$with_ads_support" != x"no"; then - AC_CHECK_FUNC_EXT(krb5_string_to_key_salt, $KRB5_LIBS) - AC_CHECK_FUNC_EXT(krb5_auth_con_setkey, $KRB5_LIBS) - AC_CHECK_FUNC_EXT(krb5_auth_con_setuseruserkey, $KRB5_LIBS) -- AC_CHECK_FUNC_EXT(krb5_locate_kdc, $KRB5_LIBS) - AC_CHECK_FUNC_EXT(krb5_get_permitted_enctypes, $KRB5_LIBS) - AC_CHECK_FUNC_EXT(krb5_get_default_in_tkt_etypes, $KRB5_LIBS) - AC_CHECK_FUNC_EXT(krb5_free_data_contents, $KRB5_LIBS) -diff --git a/source3/include/krb5_protos.h b/source3/include/krb5_protos.h -index 32f995c..f16cafd 100644 ---- a/source3/include/krb5_protos.h -+++ b/source3/include/krb5_protos.h -@@ -67,10 +67,6 @@ bool setup_kaddr( krb5_address *pkaddr, struct sockaddr_storage *paddr); - int create_kerberos_key_from_string(krb5_context context, krb5_principal host_princ, krb5_data *password, krb5_keyblock *key, krb5_enctype enctype, bool no_salt); - bool get_auth_data_from_tkt(TALLOC_CTX *mem_ctx, DATA_BLOB *auth_data, krb5_ticket *tkt); - krb5_const_principal get_principal_from_tkt(krb5_ticket *tkt); --krb5_error_code smb_krb5_locate_kdc(krb5_context ctx, const krb5_data *realm, struct sockaddr **addr_pp, int *naddrs, int get_masters); --#if defined(HAVE_KRB5_LOCATE_KDC) --krb5_error_code krb5_locate_kdc(krb5_context ctx, const krb5_data *realm, struct sockaddr **addr_pp, int *naddrs, int get_masters); --#endif - krb5_error_code get_kerberos_allowed_etypes(krb5_context context, krb5_enctype **enctypes); - bool get_krb5_smb_session_key(TALLOC_CTX *mem_ctx, - krb5_context context, -diff --git a/source3/libsmb/clikrb5.c b/source3/libsmb/clikrb5.c -index 9af3e49..8cea29c 100644 ---- a/source3/libsmb/clikrb5.c -+++ b/source3/libsmb/clikrb5.c -@@ -488,95 +488,6 @@ - #endif - } - --#if !defined(HAVE_KRB5_LOCATE_KDC) -- --/* krb5_locate_kdc is an internal MIT symbol. MIT are not yet willing to commit -- * to a public interface for this functionality, so we have to be able to live -- * without it if the MIT libraries are hiding their internal symbols. -- */ -- --#if defined(KRB5_KRBHST_INIT) --/* Heimdal */ -- krb5_error_code smb_krb5_locate_kdc(krb5_context ctx, const krb5_data *realm, struct sockaddr **addr_pp, int *naddrs, int get_masters) --{ -- krb5_krbhst_handle hnd; -- krb5_krbhst_info *hinfo; -- krb5_error_code rc; -- int num_kdcs, i; -- struct sockaddr *sa; -- struct addrinfo *ai; -- -- *addr_pp = NULL; -- *naddrs = 0; -- -- rc = krb5_krbhst_init(ctx, realm->data, KRB5_KRBHST_KDC, &hnd); -- if (rc) { -- DEBUG(0, ("smb_krb5_locate_kdc: krb5_krbhst_init failed (%s)\n", error_message(rc))); -- return rc; -- } -- -- for ( num_kdcs = 0; (rc = krb5_krbhst_next(ctx, hnd, &hinfo) == 0); num_kdcs++) -- ; -- -- krb5_krbhst_reset(ctx, hnd); -- -- if (!num_kdcs) { -- DEBUG(0, ("smb_krb5_locate_kdc: zero kdcs found !\n")); -- krb5_krbhst_free(ctx, hnd); -- return -1; -- } -- -- sa = SMB_MALLOC_ARRAY( struct sockaddr, num_kdcs ); -- if (!sa) { -- DEBUG(0, ("smb_krb5_locate_kdc: malloc failed\n")); -- krb5_krbhst_free(ctx, hnd); -- naddrs = 0; -- return -1; -- } -- -- memset(sa, '\0', sizeof(struct sockaddr) * num_kdcs ); -- -- for (i = 0; i < num_kdcs && (rc = krb5_krbhst_next(ctx, hnd, &hinfo) == 0); i++) { -- --#if defined(HAVE_KRB5_KRBHST_GET_ADDRINFO) -- rc = krb5_krbhst_get_addrinfo(ctx, hinfo, &ai); -- if (rc) { -- DEBUG(0,("krb5_krbhst_get_addrinfo failed: %s\n", error_message(rc))); -- continue; -- } --#endif -- if (hinfo->ai && hinfo->ai->ai_family == AF_INET) -- memcpy(&sa[i], hinfo->ai->ai_addr, sizeof(struct sockaddr)); -- } -- -- krb5_krbhst_free(ctx, hnd); -- -- *naddrs = num_kdcs; -- *addr_pp = sa; -- return 0; --} -- --#else /* ! defined(KRB5_KRBHST_INIT) */ -- -- krb5_error_code smb_krb5_locate_kdc(krb5_context ctx, const krb5_data *realm, -- struct sockaddr **addr_pp, int *naddrs, int get_masters) --{ -- DEBUG(0, ("unable to explicitly locate the KDC on this platform\n")); -- return KRB5_KDC_UNREACH; --} -- --#endif /* KRB5_KRBHST_INIT */ -- --#else /* ! HAVE_KRB5_LOCATE_KDC */ -- -- krb5_error_code smb_krb5_locate_kdc(krb5_context ctx, const krb5_data *realm, -- struct sockaddr **addr_pp, int *naddrs, int get_masters) --{ -- return krb5_locate_kdc(ctx, realm, addr_pp, naddrs, get_masters); --} -- --#endif /* HAVE_KRB5_LOCATE_KDC */ -- - #if !defined(HAVE_KRB5_FREE_UNPARSED_NAME) - void krb5_free_unparsed_name(krb5_context context, char *val) - { -diff --git a/source3/wscript b/source3/wscript -index 901d2b6..40b2cde 100644 ---- a/source3/wscript -+++ b/source3/wscript -@@ -639,7 +639,7 @@ - krb5_set_real_time krb5_set_default_in_tkt_etypes krb5_set_default_tgs_enctypes - krb5_set_default_tgs_ktypes krb5_principal2salt krb5_use_enctype - krb5_string_to_key krb5_get_pw_salt krb5_string_to_key_salt krb5_auth_con_setkey --krb5_auth_con_setuseruserkey krb5_locate_kdc krb5_get_permitted_enctypes -+krb5_auth_con_setuseruserkey krb5_get_permitted_enctypes - krb5_get_default_in_tkt_etypes krb5_free_data_contents - krb5_principal_get_comp_string krb5_free_unparsed_name - krb5_free_keytab_entry_contents krb5_kt_free_entry krb5_krbhst_init --- -1.7.7.6 - -From 419e92b1499c77ddf3648d6b99ed482a57b3e713 Mon Sep 17 00:00:00 2001 -From: Andreas Schneider -Date: Wed, 30 Nov 2011 17:39:22 +0100 -Subject: [PATCH] s3-net: Don't use an internal krb5 for kdc lookup. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This replaces the use of the internal krb5_locate_kdc() function with -our own get_kdc_list() function. - -Signed-off-by: Günther Deschner ---- - source3/utils/net_lookup.c | 42 +++++++++++++++++++++++------------------- - 1 files changed, 23 insertions(+), 19 deletions(-) - -diff --git a/source3/utils/net_lookup.c b/source3/utils/net_lookup.c -index febf481..7b2a214 100644 ---- a/source3/utils/net_lookup.c -+++ b/source3/utils/net_lookup.c -@@ -276,10 +276,11 @@ static int net_lookup_kdc(struct net_context *c, int argc, const char **argv) - #ifdef HAVE_KRB5 - krb5_error_code rc; - krb5_context ctx; -- struct sockaddr_in *addrs; -- int num_kdcs,i; -- krb5_data realm; -- char **realms; -+ struct ip_service *kdcs; -+ const char *realm; -+ int num_kdcs = 0; -+ int i; -+ NTSTATUS status; - - initialize_krb5_error_table(); - rc = krb5_init_context(&ctx); -@@ -289,34 +290,37 @@ static int net_lookup_kdc(struct net_context *c, int argc, const char **argv) - return -1; - } - -- if (argc>0) { -- realm.data = CONST_DISCARD(char *, argv[0]); -- realm.length = strlen(argv[0]); -+ if (argc > 0) { -+ realm = argv[0]; - } else if (lp_realm() && *lp_realm()) { -- realm.data = lp_realm(); -- realm.length = strlen((const char *)realm.data); -+ realm = lp_realm(); - } else { -+ char **realms; -+ - rc = krb5_get_host_realm(ctx, NULL, &realms); - if (rc) { - DEBUG(1,("krb5_gethost_realm failed (%s)\n", - error_message(rc))); - return -1; - } -- realm.data = (char *) *realms; -- realm.length = strlen((const char *)realm.data); -+ realm = (const char *) *realms; - } - -- rc = smb_krb5_locate_kdc(ctx, &realm, (struct sockaddr **)(void *)&addrs, &num_kdcs, 0); -- if (rc) { -- DEBUG(1, ("smb_krb5_locate_kdc failed (%s)\n", error_message(rc))); -+ status = get_kdc_list(realm, NULL, &kdcs, &num_kdcs); -+ if (!NT_STATUS_IS_OK(status)) { -+ DEBUG(1,("get_kdc_list failed (%s)\n", nt_errstr(status))); - return -1; - } -- for (i=0;i +Date: Thu, 13 Sep 2012 17:52:13 +0200 +Subject: [PATCH] docs: Fix generating idmap manpages. + + +Signed-off-by: Andreas Schneider +--- + docs-xml/wscript_build | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/docs-xml/wscript_build b/docs-xml/wscript_build +index 14fa152..9a17be3 100644 +--- a/docs-xml/wscript_build ++++ b/docs-xml/wscript_build +@@ -6,6 +6,14 @@ manpages=''' + manpages/libsmbclient.7 + manpages/lmhosts.5 + manpages/log2pcap.1 ++ manpages/idmap_ad.8 ++ manpages/idmap_autorid.8 ++ manpages/idmap_hash.8 ++ manpages/idmap_ldap.8 ++ manpages/idmap_nss.8 ++ manpages/idmap_rid.8 ++ manpages/idmap_tdb.8 ++ manpages/idmap_tdb2.8 + manpages/net.8 + manpages/nmbd.8 + manpages/nmblookup.1 +-- +1.7.12 + diff --git a/samba-4.0.0rc2-create_smbldaphelper.patch b/samba-4.0.0rc2-create_smbldaphelper.patch new file mode 100644 index 0000000..5f728c6 --- /dev/null +++ b/samba-4.0.0rc2-create_smbldaphelper.patch @@ -0,0 +1,84 @@ +commit be7a856f5bd251dc84a72eb56cf011facd10988f +Author: Alexander Bokovoy +AuthorDate: Thu Sep 13 15:40:31 2012 +0300 +Commit: Alexander Bokovoy +CommitDate: Thu Sep 13 17:36:07 2012 +0200 + + s3: make ldapsam-related functions a smbldaphelper subsystem + + Since these functions are used in pdb_ldap and idmap_ldap, and + pdb_ldap might be statically linked to libpdb (default), it is + better to keep them as separate subsystem to avoid polluting libpdb + namespace. + + This is first step in refactoring libpdb. Right now I cannot move + these functions into proper libsmbldaphelper as it uses more of + libpdb-included functions and linking pdb_ldap against libsmbldaphelper + library would have created a loop if pdb_ldap is included into libpdb. + + Autobuild-User(master): Alexander Bokovoy + Autobuild-Date(master): Thu Sep 13 17:36:07 CEST 2012 on sn-devel-104 +--- + source3/passdb/wscript_build | 4 ++-- + source3/winbindd/wscript_build | 2 +- + source3/wscript_build | 5 ++++- + 3 files changed, 7 insertions(+), 4 deletions(-) + +diff --git a/source3/passdb/wscript_build b/source3/passdb/wscript_build +index 1dfdfd0..d26afc2 100644 +--- a/source3/passdb/wscript_build ++++ b/source3/passdb/wscript_build +@@ -1,7 +1,7 @@ + #!/usr/bin/env python + + PDB_TDBSAM_SRC = 'pdb_tdb.c' +-PDB_LDAP_SRC = 'pdb_ldap.c pdb_nds.c pdb_ipa.c pdb_ldap_util.c' ++PDB_LDAP_SRC = 'pdb_ldap.c pdb_nds.c pdb_ipa.c' + PDB_SMBPASSWD_SRC = 'pdb_smbpasswd.c' + PDB_WBC_SAM_SRC = 'pdb_wbc_sam.c' + +@@ -15,7 +15,7 @@ bld.SAMBA3_MODULE('pdb_tdbsam', + + bld.SAMBA3_MODULE('pdb_ldap', + subsystem='pdb', +- deps='smbldap', ++ deps='smbldap smbldaphelper', + source=PDB_LDAP_SRC, + init_function='', + internal_module=bld.SAMBA3_IS_STATIC_MODULE('pdb_ldap'), +diff --git a/source3/winbindd/wscript_build b/source3/winbindd/wscript_build +index 9f11aff..af3741b 100644 +--- a/source3/winbindd/wscript_build ++++ b/source3/winbindd/wscript_build +@@ -62,7 +62,7 @@ bld.SAMBA3_MODULE('idmap_passdb', + bld.SAMBA3_MODULE('idmap_ldap', + subsystem='idmap', + source=IDMAP_LDAP_SRC, +- deps='smbldap', ++ deps='smbldap smbldaphelper', + init_function='', + internal_module=bld.SAMBA3_IS_STATIC_MODULE('idmap_ldap'), + enabled=bld.SAMBA3_IS_ENABLED_MODULE('idmap_ldap') and bld.env.HAVE_LDAP) +diff --git a/source3/wscript_build b/source3/wscript_build +index c7395e7..c534ae6 100755 +--- a/source3/wscript_build ++++ b/source3/wscript_build +@@ -215,7 +215,6 @@ PASSDB_SRC = '''${PASSDB_GET_SET_SRC} passdb/passdb.c + passdb/account_pol.c ${PRIVILEGES_SRC} + lib/util_nscd.c lib/winbind_util.c + passdb/pdb_util.c passdb/pdb_interface.c +- passdb/pdb_ldap_schema.c + passdb/pdb_secrets.c + passdb/pdb_unixid.c''' + #FIXME: lib/winbind_util.c probably is not part of PASSDB_SRC +@@ -733,6 +732,10 @@ bld.SAMBA3_LIBRARY('pdb', + vnum='0', + vars=locals()) + ++bld.SAMBA3_SUBSYSTEM('smbldaphelper', ++ source='passdb/pdb_ldap_schema.c passdb/pdb_ldap_util.c', ++ deps='smbldap secrets3 pdb') ++ + bld.SAMBA3_SUBSYSTEM('SERVER_MUTEX', + source=SERVER_MUTEX_SRC, + deps='talloc') diff --git a/samba-4.0.0rc2-fix_panic_action.patch b/samba-4.0.0rc2-fix_panic_action.patch new file mode 100644 index 0000000..dc28abb --- /dev/null +++ b/samba-4.0.0rc2-fix_panic_action.patch @@ -0,0 +1,42 @@ +commit 2a7484eb7286a6896826ad1ed15aa7b1760a451c +Author: Matthieu Patou +AuthorDate: Mon Sep 17 16:51:02 2012 -0700 +Commit: Stefan Metzmacher +CommitDate: Tue Sep 18 06:12:00 2012 +0200 + + panic action is defined as GLOBAL_VAR(szPanicAction) not GLOBAL_VAR(panic_action) + + Signed-off-by: Stefan Metzmacher + + Autobuild-User(master): Stefan Metzmacher + Autobuild-Date(master): Tue Sep 18 06:12:00 CEST 2012 on sn-devel-104 +--- + lib/param/loadparm.c | 2 +- + source3/param/loadparm.c | 1 - + 2 files changed, 1 insertion(+), 2 deletions(-) + +diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c +index 990dd29..b2e4218 100644 +--- a/lib/param/loadparm.c ++++ b/lib/param/loadparm.c +@@ -2295,7 +2295,7 @@ static bool lpcfg_update(struct loadparm_context *lp_ctx) + return true; + } + +- panic_action = lp_ctx->globals->panic_action; ++ panic_action = lp_ctx->globals->szPanicAction; + + reload_charcnv(lp_ctx); + +diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c +index f1999ad..61606ce 100644 +--- a/source3/param/loadparm.c ++++ b/source3/param/loadparm.c +@@ -131,7 +131,6 @@ static bool defaults_saved = false; + char *tls_cafile; \ + char *tls_crlfile; \ + char *tls_dhpfile; \ +- char *panic_action; \ + int bPreferredMaster; + + #include "param/param_global.h" diff --git a/samba-4.0.0rc2-fix_smb.conf_manpage_build.patch b/samba-4.0.0rc2-fix_smb.conf_manpage_build.patch new file mode 100644 index 0000000..15824d5 --- /dev/null +++ b/samba-4.0.0rc2-fix_smb.conf_manpage_build.patch @@ -0,0 +1,155 @@ +commit 73ed1533105ac3f90813e5a0e7888a095eff4b75 +Author: Alexander Bokovoy +AuthorDate: Mon Sep 17 13:07:26 2012 +0300 +Commit: Alexander Bokovoy +CommitDate: Mon Sep 17 14:18:31 2012 +0200 + + docs-xml: convert smb.conf.5 build to waf + + smb.conf(5) is different from other manpages because before it is + built, it gets merged together from a number of smaller files, one + per parameter. So we first create a parameters.all.xml file that + references all these files and then include it into master smb.conf.5.xml + + One small issue is how to handle generated files in WAF build + from xi:include perspective as the files are generated in bin/default/docs-xml + rather than in docs-xml. We solve this by further expanding use of XML catalogs + and rewriting virtual path http://www.samba.org/samba/smbdotconf/ to proper + location. + + Both docs-xml autoconf and waf builds work correctly now. + + Autobuild-User(master): Alexander Bokovoy + Autobuild-Date(master): Mon Sep 17 14:18:31 CEST 2012 on sn-devel-104 +--- + buildtools/wafsamba/wafsamba.py | 6 ++++-- + docs-xml/build/catalog.xml.in | 7 +++++-- + docs-xml/manpages/smb.conf.5.xml | 5 ++++- + docs-xml/wscript_build | 25 +++++++++++++++++++++++-- + wscript_build | 6 ++++-- + 5 files changed, 40 insertions(+), 9 deletions(-) + +diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py +index 1f71bd3..50bd4fa 100644 +--- a/buildtools/wafsamba/wafsamba.py ++++ b/buildtools/wafsamba/wafsamba.py +@@ -789,14 +789,16 @@ def SAMBAMANPAGES(bld, manpages): + '''build and install manual pages''' + bld.env.SAMBA_EXPAND_XSL = bld.srcnode.abspath() + '/docs-xml/xslt/expand-sambadoc.xsl' + bld.env.SAMBA_MAN_XSL = bld.srcnode.abspath() + '/docs-xml/xslt/man.xsl' +- os.environ["XML_CATALOG_FILES"] = 'file:///etc/xml/catalog file://' + bld.srcnode.abspath() + '/bin/default/docs-xml/build/catalog.xml' ++ bld.env.SAMBA_CATALOGS = 'file:///etc/xml/catalog file://' + bld.srcnode.abspath() + '/bin/default/docs-xml/build/catalog.xml' + for m in manpages.split(): + source = m + '.xml' + bld.SAMBA_GENERATOR(m, + source=source, + target=m, + group='final', +- rule='${XSLTPROC} --xinclude --stringparam noreference 0 -o ${TGT}.xml --nonet ${SAMBA_EXPAND_XSL} ${SRC} && ${XSLTPROC} --nonet -o ${TGT} ${SAMBA_MAN_XSL} ${TGT}.xml' ++ rule='''export XML_CATALOG_FILES="${SAMBA_CATALOGS}" ++ ${XSLTPROC} --xinclude --stringparam noreference 0 -o ${TGT}.xml --nonet ${SAMBA_EXPAND_XSL} ${SRC} ++ ${XSLTPROC} --nonet -o ${TGT} ${SAMBA_MAN_XSL} ${TGT}.xml''' + ) + bld.INSTALL_FILES('${MANDIR}/man%s' % m[-1], m, flat=True) + Build.BuildContext.SAMBAMANPAGES = SAMBAMANPAGES +diff --git a/docs-xml/build/catalog.xml.in b/docs-xml/build/catalog.xml.in +index 4b99cf5..56d13a6 100644 +--- a/docs-xml/build/catalog.xml.in ++++ b/docs-xml/build/catalog.xml.in +@@ -6,9 +6,12 @@ + + ++ rewritePrefix="file://@abs_top_srcdir@/build/DTD/"/> + + ++ rewritePrefix="file://@abs_top_srcdir@/Samba3-ByExample/"/> ++ + +diff --git a/docs-xml/manpages/smb.conf.5.xml b/docs-xml/manpages/smb.conf.5.xml +index e09eee0..a73382f 100644 +--- a/docs-xml/manpages/smb.conf.5.xml ++++ b/docs-xml/manpages/smb.conf.5.xml +@@ -757,7 +757,10 @@ chmod 1770 /usr/local/samba/lib/usershares + EXPLANATION OF EACH PARAMETER + + +- ++ ++ ++ ++ + + + +diff --git a/docs-xml/wscript_build b/docs-xml/wscript_build +index 011854b..c5d5839 100644 +--- a/docs-xml/wscript_build ++++ b/docs-xml/wscript_build +@@ -1,5 +1,5 @@ + #!/usr/bin/env python +- ++from samba_utils import save_file + manpages=''' + manpages/eventlogadm.8 + manpages/findsmb.1 +@@ -23,7 +23,6 @@ manpages=''' + manpages/rpcclient.1 + manpages/samba.7 + manpages/sharesec.1 +- manpages/smb.conf.5 + manpages/smbcacls.1 + manpages/smbclient.1 + manpages/smbcontrol.1 +@@ -87,8 +86,30 @@ pam_winbind_manpages = ''' + + krb5_locator_manpages = 'manpages/winbind_krb5_locator.7' + ++def smbdotconf_generate_parameter_list(task): ++ parameter_all = task.outputs[0].bldpath(task.env) ++ articles = task.inputs ++ ++ t = '
\n' ++ for article in articles: ++ t += "\n" ++ t += "
\n" ++ save_file(parameter_all, t , create_dir=True) ++ return 0 ++ ++def SMBDOTCONF_MANPAGE(bld, target): ++ ''' assemble and build smb.conf.5 manual page''' ++ articles = bld.path.ant_glob("smbdotconf/**/*.xml") ++ parameter_all = 'smbdotconf/parameters.all.xml' ++ bld.SAMBA_GENERATOR(parameter_all, ++ source=articles, ++ target=parameter_all, ++ rule=smbdotconf_generate_parameter_list) ++ bld.SAMBAMANPAGES(target) ++ + if ('XSLTPROC_MANPAGES' in bld.env and bld.env['XSLTPROC_MANPAGES']): + ++ SMBDOTCONF_MANPAGE(bld, 'manpages/smb.conf.5') + bld.SAMBAMANPAGES(manpages) + + if bld.CONFIG_SET('WITH_PAM_MODULES') and bld.CONFIG_SET('HAVE_PAM_START'): +diff --git a/wscript_build b/wscript_build +index 5434056..0098036 100755 +--- a/wscript_build ++++ b/wscript_build +@@ -144,7 +144,9 @@ bld.RECURSE('testsuite/headers') + bld.SYMBOL_CHECK() + bld.DUP_SYMBOL_CHECK() + +-bld.env.ABS_TOP_BUILDDIR = bld.srcnode.abspath() + '/docs-xml' ++bld.env.ABS_TOP_SRCDIR = bld.srcnode.abspath() + '/docs-xml' ++bld.env.ABS_TOP_BUILDDIR = bld.srcnode.abspath() + '/bin/default/docs-xml' + bld.CONFIGURE_FILE('docs-xml/build/catalog.xml', +- ABS_TOP_BUILDDIR = bld.env.ABS_TOP_BUILDDIR) ++ ABS_TOP_BUILDDIR = bld.env.ABS_TOP_BUILDDIR, ++ ABS_TOP_SRCDIR=bld.env.ABS_TOP_SRCDIR) + bld.RECURSE('docs-xml') diff --git a/samba-4.0.0rc2-fix_smbldaphelper_without_ldap.patch b/samba-4.0.0rc2-fix_smbldaphelper_without_ldap.patch new file mode 100644 index 0000000..dabbc4a --- /dev/null +++ b/samba-4.0.0rc2-fix_smbldaphelper_without_ldap.patch @@ -0,0 +1,26 @@ +commit 35a4a1ed1f0fc6f1cbccd31bb7db9431b2518a5b +Author: Andrew Bartlett +AuthorDate: Fri Sep 14 11:58:02 2012 -0700 +Commit: Andrew Bartlett +CommitDate: Fri Sep 14 22:53:30 2012 +0200 + + build: Fix build on systems without ldap development headers + + Autobuild-User(master): Andrew Bartlett + Autobuild-Date(master): Fri Sep 14 22:53:30 CEST 2012 on sn-devel-104 +--- + source3/wscript_build | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/source3/wscript_build b/source3/wscript_build +index 60965ef..7e39ec3 100755 +--- a/source3/wscript_build ++++ b/source3/wscript_build +@@ -740,6 +740,7 @@ bld.SAMBA3_LIBRARY('smbldaphelper', + source='passdb/pdb_ldap_schema.c passdb/pdb_ldap_util.c', + deps='smbldap secrets3', + allow_undefined_symbols=True, ++ enabled=bld.env.HAVE_LDAP, + private_library=True) + + bld.SAMBA3_SUBSYSTEM('SERVER_MUTEX', diff --git a/samba-4.0.0rc2-make_smbldaphelper_lib.patch b/samba-4.0.0rc2-make_smbldaphelper_lib.patch new file mode 100644 index 0000000..88eca27 --- /dev/null +++ b/samba-4.0.0rc2-make_smbldaphelper_lib.patch @@ -0,0 +1,112 @@ +commit 86a4ca28649141f77556208b833db2e076c0125d +Author: Alexander Bokovoy +AuthorDate: Thu Sep 13 20:29:25 2012 +0300 +Commit: Alexander Bokovoy +CommitDate: Fri Sep 14 01:02:21 2012 +0200 + + s3: make smbldaphelper subsystem an internal library + + Break pdb_ldap -> smbldaphelper -> pdb -> pdb_ldap loop by + making smbldaphelp intentionally underlinked internal library. + + It means that libsmbldaphelp is not usable unless its user is + also linked to libpdb (that is the case for both its users, + idmap_ldap and pdb_ldap, already) but gives us a break of + the circular dependency in case pdb_ldap statically linked + into pdb (default). + + This should solve case when idmap_ldap and pdb_ldap are dynamically + loaded modules + + Autobuild-User(master): Alexander Bokovoy + Autobuild-Date(master): Fri Sep 14 01:02:21 CEST 2012 on sn-devel-104 +--- + source3/passdb/ABI/pdb-0.sigs | 7 ------- + source3/winbindd/wscript_build | 2 +- + source3/wscript_build | 12 +++++++++--- + 3 files changed, 10 insertions(+), 11 deletions(-) + +diff --git a/source3/passdb/ABI/pdb-0.sigs b/source3/passdb/ABI/pdb-0.sigs +index 2b57301..bc82ff3 100644 +--- a/source3/passdb/ABI/pdb-0.sigs ++++ b/source3/passdb/ABI/pdb-0.sigs +@@ -16,19 +16,14 @@ algorithmic_pdb_rid_is_user: bool (uint32_t) + algorithmic_pdb_uid_to_user_rid: uint32_t (uid_t) + algorithmic_pdb_user_rid_to_uid: uid_t (uint32_t) + algorithmic_rid_base: int (void) +-attrib_map_to_delete_v30: {attrib = 5, name = 0xXXXX "sambaPwdLastSet"}, {attrib = 6, name = 0xXXXX "sambaPwdCanChange"}, {attrib = 7, name = 0xXXXX "sambaPwdMustChange"}, {attrib = 8, name = 0xXXXX "sambaLogonTime"}, {attrib = 9, name = 0xXXXX "sambaLogoffTime"}, {attrib = 10, name = 0xXXXX "sambaKickoffTime"}, {attrib = 12, name = 0xXXXX "displayName"}, {attrib = 29, name = 0xXXXX "sambaHomeDrive"}, {attrib = 13, name = 0xXXXX "sambaHomePath"}, {attrib = 14, name = 0xXXXX "sambaLogonScript"}, {attrib = 15, name = 0xXXXX "sambaProfilePath"}, {attrib = 17, name = 0xXXXX "sambaUserWorkstations"}, {attrib = 18, name = 0xXXXX "sambaSID"}, {attrib = 19, name = 0xXXXX "sambaPrimaryGroupSID"}, {attrib = 21, name = 0xXXXX "sambaLMPassword"}, {attrib = 22, name = 0xXXXX "sambaNTPassword"}, {attrib = 23, name = 0xXXXX "sambaDomainName"}, {attrib = 25, name = 0xXXXX "sambaAcctFlags"}, {attrib = 37, name = 0xXXXX "sambaMungedDial"}, {attrib = 35, name = 0xXXXX "sambaBadPasswordCount"}, {attrib = 38, name = 0xXXXX "sambaBadPasswordTime"}, {attrib = 39, name = 0xXXXX "sambaPasswordHistory"}, {attrib = 42, name = 0xXXXX "sambaLogonHours"}, {attrib = 0, name = 0xXXXX} +-attrib_map_v30: {attrib = 1, name = 0xXXXX "uid"}, {attrib = 2, name = 0xXXXX "uidNumber"}, {attrib = 3, name = 0xXXXX "gidNumber"}, {attrib = 4, name = 0xXXXX "homeDirectory"}, {attrib = 5, name = 0xXXXX "sambaPwdLastSet"}, {attrib = 6, name = 0xXXXX "sambaPwdCanChange"}, {attrib = 7, name = 0xXXXX "sambaPwdMustChange"}, {attrib = 8, name = 0xXXXX "sambaLogonTime"}, {attrib = 9, name = 0xXXXX "sambaLogoffTime"}, {attrib = 10, name = 0xXXXX "sambaKickoffTime"}, {attrib = 11, name = 0xXXXX "cn"}, {attrib = 44, name = 0xXXXX "sn"}, {attrib = 12, name = 0xXXXX "displayName"}, {attrib = 29, name = 0xXXXX "sambaHomeDrive"}, {attrib = 13, name = 0xXXXX "sambaHomePath"}, {attrib = 14, name = 0xXXXX "sambaLogonScript"}, {attrib = 15, name = 0xXXXX "sambaProfilePath"}, {attrib = 16, name = 0xXXXX "description"}, {attrib = 17, name = 0xXXXX "sambaUserWorkstations"}, {attrib = 18, name = 0xXXXX "sambaSID"}, {attrib = 19, name = 0xXXXX "sambaPrimaryGroupSID"}, {attrib = 21, name = 0xXXXX "sambaLMPassword"}, {attrib = 22, name = 0xXXXX "sambaNTPassword"}, {attrib = 23, name = 0xXXXX "sambaDomainName"}, {attrib = 24, name = 0xXXXX "objectClass"}, {attrib = 25, name = 0xXXXX "sambaAcctFlags"}, {attrib = 37, name = 0xXXXX "sambaMungedDial"}, {attrib = 35, name = 0xXXXX "sambaBadPasswordCount"}, {attrib = 38, name = 0xXXXX "sambaBadPasswordTime"}, {attrib = 39, name = 0xXXXX "sambaPasswordHistory"}, {attrib = 41, name = 0xXXXX "modifyTimestamp"}, {attrib = 42, name = 0xXXXX "sambaLogonHours"}, {attrib = 0, name = 0xXXXX} + builtin_domain_name: const char *(void) + cache_account_policy_get: bool (enum pdb_policy_type, uint32_t *) + cache_account_policy_set: bool (enum pdb_policy_type, uint32_t) + create_builtin_administrators: NTSTATUS (const struct dom_sid *) + create_builtin_users: NTSTATUS (const struct dom_sid *) + decode_account_policy_name: const char *(enum pdb_policy_type) +-dominfo_attr_list: {attrib = 23, name = 0xXXXX "sambaDomainName"}, {attrib = 34, name = 0xXXXX "sambaNextRid"}, {attrib = 26, name = 0xXXXX "sambaNextUserRid"}, {attrib = 27, name = 0xXXXX "sambaNextGroupRid"}, {attrib = 28, name = 0xXXXX "sambaSID"}, {attrib = 33, name = 0xXXXX "sambaAlgorithmicRidBase"}, {attrib = 24, name = 0xXXXX "objectClass"}, {attrib = 0, name = 0xXXXX} + get_account_pol_db: struct db_context *(void) + get_account_policy_attr: const char *(enum pdb_policy_type) +-get_attr_key2string: const char *(ATTRIB_MAP_ENTRY *, int) +-get_attr_list: const char **(TALLOC_CTX *, ATTRIB_MAP_ENTRY *) + get_domain_group_from_sid: bool (struct dom_sid, GROUP_MAP *) + get_primary_group_sid: NTSTATUS (TALLOC_CTX *, const char *, struct passwd **, struct dom_sid **) + get_privileges_for_sid_as_set: NTSTATUS (TALLOC_CTX *, PRIVILEGE_SET **, struct dom_sid *) +@@ -42,7 +37,6 @@ grant_all_privileges: bool (const struct dom_sid *) + grant_privilege_by_name: bool (const struct dom_sid *, const char *) + grant_privilege_set: bool (const struct dom_sid *, struct lsa_PrivilegeSet *) + groupdb_tdb_init: const struct mapping_backend *(void) +-idpool_attr_list: {attrib = 2, name = 0xXXXX "uidNumber"}, {attrib = 3, name = 0xXXXX "gidNumber"}, {attrib = 24, name = 0xXXXX "objectClass"}, {attrib = 0, name = 0xXXXX} + init_account_policy: bool (void) + init_buffer_from_samu: uint32_t (uint8_t **, struct samu *, bool) + init_samu_from_buffer: bool (struct samu *, uint32_t, uint8_t *, uint32_t) +@@ -272,7 +266,6 @@ sid_check_is_wellknown_builtin: bool (const struct dom_sid *) + sid_check_is_wellknown_domain: bool (const struct dom_sid *, const char **) + sid_to_gid: bool (const struct dom_sid *, gid_t *) + sid_to_uid: bool (const struct dom_sid *, uid_t *) +-sidmap_attr_list: {attrib = 32, name = 0xXXXX "sambaSID"}, {attrib = 2, name = 0xXXXX "uidNumber"}, {attrib = 3, name = 0xXXXX "gidNumber"}, {attrib = 24, name = 0xXXXX "objectClass"}, {attrib = 0, name = 0xXXXX} + sids_to_unixids: bool (const struct dom_sid *, uint32_t, struct unixid *) + smb_add_user_group: int (const char *, const char *) + smb_create_group: int (const char *, gid_t *) +diff --git a/source3/winbindd/wscript_build b/source3/winbindd/wscript_build +index af3741b..302b9ee 100644 +--- a/source3/winbindd/wscript_build ++++ b/source3/winbindd/wscript_build +@@ -62,7 +62,7 @@ bld.SAMBA3_MODULE('idmap_passdb', + bld.SAMBA3_MODULE('idmap_ldap', + subsystem='idmap', + source=IDMAP_LDAP_SRC, +- deps='smbldap smbldaphelper', ++ deps='smbldap smbldaphelper pdb', + init_function='', + internal_module=bld.SAMBA3_IS_STATIC_MODULE('idmap_ldap'), + enabled=bld.SAMBA3_IS_ENABLED_MODULE('idmap_ldap') and bld.env.HAVE_LDAP) +diff --git a/source3/wscript_build b/source3/wscript_build +index c534ae6..60965ef 100755 +--- a/source3/wscript_build ++++ b/source3/wscript_build +@@ -710,7 +710,11 @@ private_pdb_match.append('!idmap_xids_to_sids') + + # ldap module is actually three modules merged together: ldapsam, ipa, and nds + static_pdb_match = static_pdb_match + ['ldap', 'ipa', 'nds'] +-ldapsam_pdb_match = ['!priv2ld', '!smbldap_search_domain_info', '!ldapsam_*', '!groupmap_attr_list*', '!get_userattr_list'] ++ldapsam_pdb_match = ['!priv2ld', '!smbldap_search_domain_info', ++ '!ldapsam_*', '!groupmap_attr_list*', '!get_userattr_list', ++ '!dominfo_attr_list', '!get_attr_key2string', ++ '!sidmap_attr_list', '!attrib_map_*', '!idpool_attr_list', ++ '!get_attr_list'] + private_pdb_match.append('!pdb_nds_*') + private_pdb_match.append('!pdb_init_ldapsam') + private_pdb_match = private_pdb_match + ldapsam_pdb_match +@@ -732,9 +736,11 @@ bld.SAMBA3_LIBRARY('pdb', + vnum='0', + vars=locals()) + +-bld.SAMBA3_SUBSYSTEM('smbldaphelper', ++bld.SAMBA3_LIBRARY('smbldaphelper', + source='passdb/pdb_ldap_schema.c passdb/pdb_ldap_util.c', +- deps='smbldap secrets3 pdb') ++ deps='smbldap secrets3', ++ allow_undefined_symbols=True, ++ private_library=True) + + bld.SAMBA3_SUBSYSTEM('SERVER_MUTEX', + source=SERVER_MUTEX_SRC, diff --git a/samba-4.0.0rc2-use_smb_man_style.patch b/samba-4.0.0rc2-use_smb_man_style.patch new file mode 100644 index 0000000..73dc3cf --- /dev/null +++ b/samba-4.0.0rc2-use_smb_man_style.patch @@ -0,0 +1,30 @@ +commit e7a58bc251bd74c3c7c64ee4f5cb85ec76852a8d +Author: Alexander Bokovoy +AuthorDate: Mon Sep 17 19:09:35 2012 +0300 +Commit: Alexander Bokovoy +CommitDate: Mon Sep 17 19:52:53 2012 +0200 + + docs-xml: fix build of winbindd- and krb5 locator-related manpages + + These manpages depend on docs-xml infrastructure (samba DTDs) + + Autobuild-User(master): Alexander Bokovoy + Autobuild-Date(master): Mon Sep 17 19:52:53 CEST 2012 on sn-devel-104 +--- + docs-xml/wscript_build | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/docs-xml/wscript_build b/docs-xml/wscript_build +index c5d5839..32cf9be 100644 +--- a/docs-xml/wscript_build ++++ b/docs-xml/wscript_build +@@ -113,7 +113,7 @@ if ('XSLTPROC_MANPAGES' in bld.env and bld.env['XSLTPROC_MANPAGES']): + bld.SAMBAMANPAGES(manpages) + + if bld.CONFIG_SET('WITH_PAM_MODULES') and bld.CONFIG_SET('HAVE_PAM_START'): +- bld.MANPAGES(pam_winbind_manpages) ++ bld.SAMBAMANPAGES(pam_winbind_manpages) + + if bld.CONFIG_SET('HAVE_KRB5_LOCATE_PLUGIN_H'): +- bld.MANPAGES(krb5_locator_manpages) ++ bld.SAMBAMANPAGES(krb5_locator_manpages) diff --git a/samba.conf.tmp b/samba.conf.tmp index 8a29577..2d6d626 100644 --- a/samba.conf.tmp +++ b/samba.conf.tmp @@ -1 +1,2 @@ d /var/run/samba 755 root root +d /var/run/winbindd 755 root root diff --git a/samba.spec b/samba.spec index b3463b4..bb2b8ec 100644 --- a/samba.spec +++ b/samba.spec @@ -1,124 +1,286 @@ -%define main_release 94 -%define samba_version 3.6.7 -%define tdb_version 1.2.9 -%define talloc_version 2.0.5 -#%define pre_release rc3 -%define pre_release %nil +%define main_release 95 -%define samba_release %{main_release}%{pre_release}%{?dist} +%define samba_version 4.0.0 +%define talloc_version 2.0.7 +%define ntdb_version 0.9 +%define tdb_version 1.2.10 +%define tevent_version 0.9.17 +%define ldb_version 1.1.12 +%define pre_release rc1 -%define samba_source source3 -Summary: Server and Client software to interoperate with Windows machines -Name: samba -Epoch: 2 -Version: %{samba_version} -Release: %{samba_release}.2 -License: GPLv3+ and LGPLv3+ -Group: System Environment/Daemons -URL: http://www.samba.org/ +%define samba_release %{main_release}%{?dist}.%{pre_release} -Source: http://www.samba.org/samba/ftp/%{name}-%{samba_version}%{pre_release}.tar.gz +%global with_libsmbclient 1 +%global with_libwbclient 1 + +%global with_pam_smbpass 0 +%global with_talloc 0 +%global with_tevent 0 +%global with_tdb 0 +%global with_ntdb 1 +%global with_ldb 0 + +%global with_mitkrb5 1 +%global with_dc 0 + +%global with_clustering_support 1 + +%{!?python_libdir: %define python_libdir %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1,1)")} +%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} + +Name: samba +Version: %{samba_version} +Release: %{samba_release} + +%if 0%{?rhel} +Epoch: 0 +%else +Epoch: 2 +%endif + +%if 0%{?epoch} > 0 +%define samba_depver %{epoch}:%{version}-%{release} +%define samba_conflict_ver %{epoch}:3.9.9 +%else +%define samba_depver %{version}-%{release} +%define samba_conflict_ver 3.9.9 +%endif + +Summary: Server and Client software to interoperate with Windows machines +License: GPLv3+ and LGPLv3+ +Group: System Environment/Daemons +URL: http://www.samba.org/ + +Source0: samba-%{version}%{pre_release}.tar.bz2 # Red Hat specific replacement-files Source1: samba.log Source2: samba.xinetd Source3: swat.desktop -Source4: samba.sysconfig -Source5: smb.service +Source4: smb.conf.default +Source5: pam_winbind.conf Source6: samba.pamd -Source7: smbprint -Source8: winbind.service -Source9: smb.conf.default -Source10: nmb.service -Source11: pam_winbind.conf -Source12: samba.conf.tmp +Source7: samba.conf.tmp -# Don't depend on Net::LDAP -Source999: filter-requires-samba.sh +Source200: README.dc +Source201: README.downgrade -# upstream patches. Applied first so that they'll break our patches rather -# than the other way around -# (none right now) +Patch1: samba-4.0.0rc2-build_idmap_manpages.patch +Patch2: samba-4.0.0rc2-create_smbldaphelper.patch +Patch3: samba-4.0.0rc2-make_smbldaphelper_lib.patch +Patch4: samba-4.0.0rc2-fix_smbldaphelper_without_ldap.patch +Patch5: samba-4.0.0rc2-fix_smb.conf_manpage_build.patch +Patch6: samba-4.0.0rc2-use_smb_man_style.patch +Patch7: samba-4.0.0rc2-fix_panic_action.patch -# generic patches -Patch102: samba-3.2.0pre1-pipedir.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 -Patch200: samba-3.2.5-inotify.patch -Patch201: samba-3.6.4-krb5_locate_kdc.patch +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) -Requires(pre): samba-common = %{epoch}:%{samba_version}-%{release} -Requires: pam >= 0:0.64 -Requires: logrotate >= 0:3.4 -Requires(post): systemd-sysv +Requires(pre): /usr/sbin/groupadd Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units -BuildRequires: systemd-units, gettext -BuildRequires: pam-devel, readline-devel, ncurses-devel, libacl-devel, krb5-devel, openldap-devel, openssl-devel, cups-devel, ctdb-devel -BuildRequires: autoconf, gawk, popt-devel, gtk2-devel, libcap-devel, libuuid-devel, quota-devel -BuildRequires: libtalloc-devel, libtdb-devel, iniparser-devel -# Working around perl dependency problem from docs -%define __perl_requires %{SOURCE999} +Requires(pre): %{name}-common = %{samba_depver} +Requires: %{name}-libs = %{samba_depver} +Requires: logrotate +Requires: pam +Requires: perl(Parse::Yapp) + +Obsoletes: samba4 +Provides: samba4 + +BuildRequires: autoconf +%if %with_clustering_support +BuildRequires: ctdb-devel +%endif +BuildRequires: cups-devel +BuildRequires: docbook-style-xsl +BuildRequires: e2fsprogs-devel +BuildRequires: gawk +BuildRequires: iniparser-devel +BuildRequires: krb5-devel +BuildRequires: libacl-devel +BuildRequires: libaio-devel +BuildRequires: libattr-devel +BuildRequires: libcap-devel +BuildRequires: libuuid-devel +BuildRequires: libxslt +BuildRequires: ncurses-devel +BuildRequires: openldap-devel +BuildRequires: pam-devel +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Parse::Yapp) +BuildRequires: popt-devel +BuildRequires: python-devel +BuildRequires: python-tevent +BuildRequires: quota-devel +BuildRequires: readline-devel +BuildRequires: sed +BuildRequires: zlib-devel >= 1.2.3 +BuildRequires: libbsd-devel + +%if ! %with_talloc +%global libtalloc_version 2.0.7 + +BuildRequires: libtalloc-devel >= %{libtalloc_version} +BuildRequires: pytalloc-devel >= %{libtalloc_version} +%endif + +%if ! %with_tevent +%global libtevent_version 0.9.17 + +BuildRequires: libtevent-devel >= %{libtevent_version} +BuildRequires: python-tevent >= %{libtevent_version} +%endif + +%if ! %with_ldb +%global libldb_version 1.1.11 + +BuildRequires: libldb-devel >= %{libldb_version} +BuildRequires: pyldb-devel >= %{libldb_version} +%endif + +%if ! %with_tdb +%global libtdb_version 1.2.10 + +BuildRequires: libtdb-devel >= %{libtdb_version} +BuildRequires: python-tdb >= %{libtdb_version} +%endif + +# UGLY HACK: Fix 'Provides' for libsmbclient and libwbclient +%if ! %with_libsmbclient && ! %with_libwbclient +%{?filter_setup: +%filter_from_provides /libsmbclient.so.0()/d; /libwbclient.so.0()/d +%filter_setup +} +%endif %description - -Samba is the suite of programs by which a lot of PC-related machines -share files, printers, and other information (such as lists of -available files and printers). The Windows NT, OS/2, and Linux -operating systems support this natively, and add-on packages can -enable the same thing for DOS, Windows, VMS, UNIX of all kinds, MVS, -and more. This package provides an SMB/CIFS server that can be used to -provide network services to SMB/CIFS clients. -Samba uses NetBIOS over TCP/IP (NetBT) protocols and does NOT -need the NetBEUI (Microsoft Raw NetBIOS frame) protocol. - +Samba is the standard Windows interoperability suite of programs for Linux and Unix. %package client Summary: Samba client programs Group: Applications/System -Requires: samba-common = %{epoch}:%{samba_version}-%{release} +Requires: %{name}-common = %{samba_depver} +Requires: %{name}-libs = %{samba_depver} + +Obsoletes: samba4-client +Provides: samba4-client %description client -The samba-client package provides some SMB/CIFS clients to complement +The samba4-client package provides some SMB/CIFS clients to complement the built-in SMB/CIFS filesystem in Linux. These clients allow access of SMB/CIFS shares and printing to SMB/CIFS printers. +%package libs +Summary: Samba libraries +Group: Applications/System +%if %with_libwbclient +Requires: libwbclient +%endif + +Obsoletes: samba4-libs +Provides: samba4-libs + +%description libs +The samba4-libs package contains the libraries needed by programs that +link against the SMB, RPC and other protocols provided by the Samba suite. + +%package python +Summary: Samba Python libraries +Group: Applications/System +Requires: %{name} = %{samba_depver} +Requires: %{name}-libs = %{samba_depver} + +Obsoletes: samba4-python +Provides: samba4-python + +%description python +The samba4-python package contains the Python libraries needed by programs +that use SMB, RPC and other Samba provided protocols in Python programs. + +%package devel +Summary: Developer tools for Samba libraries +Group: Development/Libraries +Requires: %{name}-common = %{samba_depver} +Requires: %{name}-libs = %{samba_depver} +Requires: %{name}-test = %{samba_depver} + +Obsoletes: samba4-devel +Provides: samba4-devel + +%description devel +The samba4-devel package contains the header files for the libraries +needed to develop programs that link against the SMB, RPC and other +libraries in the Samba suite. + +%package pidl +Summary: Perl IDL compiler +Group: Development/Tools +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) + +Obsoletes: samba4-pidl +Provides: samba4-pidl + +%description pidl +The samba4-pidl package contains the Perl IDL compiler used by Samba +and Wireshark to parse IDL and similar protocols + %package common Summary: Files used by both Samba servers and clients -Requires: libtdb >= 0:%{tdb_version} -Requires: libtalloc >= 0:%{talloc_version} Group: Applications/System -Requires(pre): /usr/sbin/groupadd -Requires(post): coreutils +Requires: %{name}-libs = %{samba_depver} Requires(post): systemd +Obsoletes: samba4-common +Provides: samba4-common + %description common -Samba-common provides files necessary for both the server and client +samba4-common provides files necessary for both the server and client packages of Samba. +%package test +Summary: Testing tools for Samba servers and clients +Group: Applications/System +Requires: %{name} = %{samba_depver} +Requires: %{name}-common = %{samba_depver} +Requires: %{name}-dc = %{samba_depver} +Requires: %{name}-libs = %{samba_depver} +Requires: %{name}-winbind = %{samba_depver} + +Obsoletes: samba4-test +Provides: samba4-test + +%description test +samba4-test provides testing tools for both the server and client +packages of Samba. %package winbind Summary: Samba winbind Group: Applications/System -Requires: samba-common = %{epoch}:%{samba_version}-%{release} -Requires: samba-winbind-clients = %{epoch}:%{samba_version}-%{release} -Requires(pre): /usr/sbin/groupadd -Requires(post): coreutils +Requires: %{name}-common = %{samba_depver} +Requires: %{name}-libs = %{samba_depver} + +Obsoletes: samba4-winbind +Provides: samba4-winbind %description winbind -The samba-winbind package provides the winbind daemon and some client tools. -Winbind enables Linux to be a full member in Windows domains and to use -Windows user and group accounts on Linux. - +The samba-winbind package provides the winbind NSS library, and some +client tools. Winbind enables Linux to be a full member in Windows +domains and to use Windows user and group accounts on Linux. %package winbind-krb5-locator Summary: Samba winbind krb5 locator -Requires: samba-winbind-clients = %{epoch}:%{samba_version}-%{release} Group: Applications/System +%if %with_libwbclient +Requires: libwbclient +%else +Requires: %{name}-libs = %{samba_depver} +%endif + +Obsoletes: samba4-winbind-krb5-locator +Provides: samba4-winbind-krb5-locator %description winbind-krb5-locator The winbind krb5 locator is a plugin for the system kerberos library to allow @@ -127,403 +289,318 @@ the local kerberos library to use the same KDC as samba and winbind use %package winbind-clients Summary: Samba winbind clients Group: Applications/System +Requires: %{name}-common = %{samba_depver} +Requires: %{name}-libs = %{samba_depver} +%if %with_libwbclient +Requires: libwbclient +%endif + +Obsoletes: samba4-winbind-clients +Provides: samba4-winbind-clients %description winbind-clients The samba-winbind-clients package provides the NSS library and a PAM module necessary to communicate to the Winbind Daemon -%package winbind-devel -Summary: Developer tools for the winbind library -Group: Development -Requires: samba-winbind = %{epoch}:%{samba_version}-%{release} - -%description winbind-devel -The samba-winbind package provides developer tools for the wbclient library. - - %package swat Summary: The Samba SMB server Web configuration program Group: Applications/System -Requires: samba = %{epoch}:%{samba_version}-%{release}, xinetd +Requires: %{name} = %{samba_depver} +Requires: %{name}-common = %{samba_depver} +Requires: %{name}-libs = %{samba_depver} +Requires: xinetd + +Obsoletes: samba4-swat +Provides: samba4-swat %description swat The samba-swat package includes the new SWAT (Samba Web Administration Tool), for remotely managing Samba's smb.conf file using your favorite Web browser. - -%package doc -Summary: Documentation for the Samba suite -Group: Documentation -Requires: samba-common = %{epoch}:%{samba_version}-%{release} - -%description doc -The samba-doc package includes all the non-manpage documentation for the -Samba suite. - - -%package domainjoin-gui -Summary: Domainjoin GUI -Group: Applications/System -Requires: samba-common = %{epoch}:%{samba_version}-%{release}, gtk2 - -%description domainjoin-gui -The samba-domainjoin-gui package includes a domainjoin gtk application. - - +%if %with_libsmbclient %package -n libsmbclient Summary: The SMB client library Group: Applications/System +Requires: %{name}-common = %{samba_depver} %description -n libsmbclient The libsmbclient contains the SMB client library from the Samba suite. - %package -n libsmbclient-devel Summary: Developer tools for the SMB client library -Group: Development -Requires: libsmbclient = %{epoch}:%{samba_version}-%{release} +Group: Development/Libraries +Requires: libsmbclient = %{samba_depver} %description -n libsmbclient-devel The libsmbclient-devel package contains the header files and libraries needed to develop programs that link against the SMB client library in the Samba suite. +%endif # with_libsmbclient +%if %with_libwbclient %package -n libwbclient -Summary: The Winbind client library +Summary: The winbind client library Group: Applications/System %description -n libwbclient -The libwbclient contains the Winbind client library from the Samba suite. +The libwbclient package contains the winbind client library from the Samba suite. %package -n libwbclient-devel -Summary: Developer tools for the Winbind client library -Group: Development -Requires: libwbclient = %{epoch}:%{samba_version}-%{release} - -Obsoletes: samba-winbind-devel -Provides: samba-winbind-devel = %{epoch}:%{samba_version}-%{release} +Summary: Developer tools for the winbind library +Group: Development/Libraries +Requires: libwbclient = %{samba_depver} %description -n libwbclient-devel -The libwbclient-devel package contains the header files and libraries needed to -develop programs that link against the Winbind client library in the Samba suite. +The libwbclient-devel package provides developer tools for the wbclient library. +%endif # with_libwbclient + +%package dc +Summary: Samba AD Domain Controller +Group: Applications/System +Requires: %{name}-libs = %{samba_depver} +Requires: %{name}-dc-libs = %{samba_depver} +Requires: %{name}-python = %{samba_depver} + +Obsoletes: samba4-dc +Provides: samba4-dc + +%description dc +The samba-dc package provides AD Domain Controller functionality + +%package dc-libs +Summary: Samba AD Domain Controller Libraries +Group: Applications/System +Requires: %{name}-common = %{samba_depver} +Requires: %{name}-libs = %{samba_depver} + +Obsoletes: samba4-dc-libs +Provides: samba4-dc-libs + +%description dc-libs +The samba4-dc-libs package contains the libraries needed by the DC to +link against the SMB, RPC and other protocols. %prep -# TAG: change for non-pre -%setup -q -n %{name}-%{samba_version}%{pre_release} -#%setup -q - -# copy Red Hat specific scripts -mkdir packaging/Fedora -cp packaging/RHEL/setup/smbusers packaging/Fedora/ -cp %{SOURCE5} packaging/Fedora/ -cp %{SOURCE6} packaging/Fedora/ -cp %{SOURCE7} packaging/Fedora/ -cp %{SOURCE8} packaging/Fedora/winbind.service -cp %{SOURCE9} packaging/Fedora/ -cp %{SOURCE10} packaging/Fedora/ -cp %{SOURCE11} packaging/Fedora/ - -# Upstream patches -#(none) -# generic patches -%patch102 -p1 -b .pipedir -#%patch103 -p1 -b .logfiles -#%patch104 -p1 -b .nmbd-netbiosname # FIXME: does not apply -%patch107 -p1 -b .grouppwd -%patch200 -p0 -b .inotify -%patch201 -p1 -b .krb5_locate_kdc - -mv %samba_source/VERSION %samba_source/VERSION.orig -sed -e 's/SAMBA_VERSION_VENDOR_SUFFIX=$/&\"%{samba_release}\"/' < %samba_source/VERSION.orig > %samba_source/VERSION -cd %samba_source -script/mkversion.sh -cd .. - -#Remove smbldap-tools, they are already packaged separately in Fedora -rm -fr examples/LDAP/smbldap-tools-*/ +%setup -q -n samba-%{version}%{pre_release} +%patch1 -p1 -b .build_idmap_manpages +%patch2 -p1 -b .create_smbldaphelper +%patch3 -p1 -b .smbldaphelper_lib +%patch4 -p1 -b .smbldaphed_without_ldap +%patch5 -p1 -b .smb.conf_manpage +%patch6 -p1 -b .smb_man_style +%patch7 -p1 -b .fix_panic_action %build -cd %samba_source -sh autogen.sh -%ifarch i386 sparc -RPM_OPT_FLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64" +%global _talloc_lib ,talloc,pytalloc,pytalloc-util +%global _tevent_lib ,tevent,pytevent +%global _tdb_lib ,tdb,pytdb +%global _ldb_lib ,ldb,pyldb + +%if ! %{with_talloc} +%global _talloc_lib ,!talloc,!pytalloc,!pytalloc-util %endif -%ifarch ia64 -#libtoolize --copy --force # get it to recognize IA-64 -#autoheader -#autoconf -EXTRA="-D_LARGEFILE64_SOURCE" + +%if ! %{with_tevent} +%global _tevent_lib ,!tevent,!pytevent %endif -CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -DLDAP_DEPRECATED" %configure \ - --with-dnsupdate \ - --with-ads \ - --with-acl-support \ - --with-automount \ - --with-dnsupdate \ - --with-libsmbclient \ - --with-libsmbsharemodes \ - --with-mmap \ - --with-pam \ - --with-pam_smbpass \ - --with-quotas \ - --with-sendfile-support \ - --with-syslog \ - --with-utmp \ - --with-vfs \ - --with-winbind \ - --without-smbwrapper \ - --with-lockdir=/var/lib/samba \ - --with-piddir=/run \ - --with-mandir=%{_mandir} \ - --with-privatedir=/var/lib/samba/private \ - --with-logfilebase=/var/log/samba \ - --with-libdir=%{_libdir} \ - --with-modulesdir=%{_libdir}/samba \ - --with-configdir=%{_sysconfdir}/samba \ - --with-pammodulesdir=%{_lib}/security \ - --with-swatdir=%{_datadir}/swat \ - --with-shared-modules=idmap_ad,idmap_rid,idmap_adex,idmap_hash,idmap_tdb2 \ - --with-cluster-support=auto \ - --with-libtalloc=no \ - --enable-external-libtalloc=yes \ - --with-libtdb=no \ - --with-nmbdsocketdir=/var/run/nmbd -# --enable-external-libtdb=yes \ -# --with-aio-support \ +%if ! %{with_tdb} +%global _tdb_lib ,!tdb,!pytdb +%endif -make samba3-idl +%if ! %{with_ldb} +%global _ldb_lib ,!ldb,!pyldb +%endif -make pch +%global _samba4_libraries heimdal,!zlib,!popt%{_talloc_lib}%{_tevent_lib}%{_tdb_lib}%{_ldb_lib} -make LD_LIBRARY_PATH=$RPM_BUILD_DIR/%{name}-%{samba_version}%{pre_release}/%samba_source/bin \ - %{?_smp_mflags} \ - all ../nsswitch/libnss_wins.so modules test_pam_modules test_nss_modules test_shlibs +%global _samba4_idmap_modules idmap_ad,idmap_rid,idmap_adex,idmap_hash,idmap_tdb2 +%global _samba4_pdb_modules pdb_tdbsam,pdb_ldap,pdb_ads,pdb_smbpasswd,pdb_wbc_sam,pdb_samba4 +%global _samba4_auth_modules auth_sam,auth_unix,auth_winbind,auth_wbc,auth_server,auth_builtin,auth_netlogond,auth_script,auth_samba4 +# auth_domain needs to be static -make LD_LIBRARY_PATH=$RPM_BUILD_DIR/%{name}-%{samba_version}%{pre_release}/%samba_source/bin \ - %{?_smp_mflags} \ - -C lib/netapi/examples +%global _samba4_modules %{_samba4_idmap_modules},%{_samba4_pdb_modules},%{_samba4_auth_modules} -make debug2html smbfilter +%global _libsmbclient %nil +%global _libwbclient %nil +%if ! %with_libsmbclient +%global _libsmbclient smbclient,smbsharemodes, +%endif + +%if ! %with_libwbclient +%global _libwbclient wbclient, +%endif + +%global _samba4_private_libraries %{_libsmbclient}%{_libwbclient} + +%configure \ + --enable-fhs \ + --with-piddir=/run \ + --with-sockets-dir=/run/samba \ + --with-modulesdir=%{_libdir}/samba \ + --with-pammodulesdir=%{_libdir}/security \ + --with-lockdir=/var/lib/samba \ + --disable-gnutls \ + --disable-rpath-install \ + --with-shared-modules=%{_samba4_modules} \ + --builtin-libraries=ccan \ + --bundled-libraries=%{_samba4_libraries} \ + --disable-ntdb \ +%if (! %with_libsmbclient) || (! %with_libwbclient) + --private-libraries=%{_samba4_private_libraries} \ +%endif +%if %with_mitkrb5 + --with-system-mitkrb5 \ +%endif +%if ! %with_dc + --without-ad-dc \ +%endif +%if %with_clustering_support + --with-cluster-support \ +%endif +%if ! %with_pam_smbpass + --without-pam_smbpass +%endif + +export WAFCACHE=/tmp/wafcache +mkdir -p $WAFCACHE +make %{?_smp_mflags} + +# Build PIDL for installation into vendor directories before +# 'make proto' gets to it. +(cd pidl && %{__perl} Makefile.PL INSTALLDIRS=vendor ) %install -mkdir -p $RPM_BUILD_ROOT/sbin -mkdir -p $RPM_BUILD_ROOT/usr/{sbin,bin} -mkdir -p $RPM_BUILD_ROOT/%{_unitdir} -mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/{pam.d,logrotate.d,security} -mkdir -p $RPM_BUILD_ROOT/%{_lib}/security -mkdir -p $RPM_BUILD_ROOT/var/lib/samba -mkdir -p $RPM_BUILD_ROOT/var/lib/samba/private -mkdir -p $RPM_BUILD_ROOT/var/lib/samba/winbindd_privileged -mkdir -p $RPM_BUILD_ROOT/var/lib/samba/scripts -mkdir -p $RPM_BUILD_ROOT/var/log/samba/old -mkdir -p $RPM_BUILD_ROOT/var/spool/samba -mkdir -p $RPM_BUILD_ROOT/%{_datadir}/swat/using_samba -mkdir -p $RPM_BUILD_ROOT/var/run/nmbd -mkdir -p $RPM_BUILD_ROOT/var/run/winbindd -mkdir -p $RPM_BUILD_ROOT/%{_libdir}/samba -mkdir -p $RPM_BUILD_ROOT/%{_libdir}/pkgconfig +rm -rf %{buildroot} +make install DESTDIR=%{buildroot} -cd %samba_source +install -d -m 0755 %{buildroot}/usr/{sbin,bin} +install -d -m 0755 %{buildroot}%{_sysconfdir}/{pam.d,logrotate.d,security} +install -d -m 0755 %{buildroot}%{_libdir}/security +install -d -m 0755 %{buildroot}/var/lib/samba +install -d -m 0755 %{buildroot}/var/lib/samba/private +install -d -m 0755 %{buildroot}/var/lib/samba/winbindd_privileged +install -d -m 0755 %{buildroot}/var/lib/samba/scripts +install -d -m 0755 %{buildroot}/var/lib/samba/sysvol +install -d -m 0755 %{buildroot}/var/log/samba/old +install -d -m 0755 %{buildroot}/var/spool/samba +install -d -m 0755 %{buildroot}/%{_datadir}/swat/using_samba +install -d -m 0755 %{buildroot}/var/run/samba +install -d -m 0755 %{buildroot}/var/run/winbindd +install -d -m 0755 %{buildroot}/%{_libdir}/samba +install -d -m 0755 %{buildroot}/%{_libdir}/pkgconfig -%makeinstall \ - BINDIR=$RPM_BUILD_ROOT%{_bindir} \ - BASEDIR=$RPM_BUILD_ROOT%{_prefix} \ - SBINDIR=$RPM_BUILD_ROOT%{_sbindir} \ - DATADIR=$RPM_BUILD_ROOT%{_datadir} \ - LOCKDIR=$RPM_BUILD_ROOT/var/lib/samba \ - PRIVATEDIR=$RPM_BUILD_ROOT%{_sysconfdir}/samba \ - LIBDIR=$RPM_BUILD_ROOT%{_libdir}/ \ - MODULESDIR=$RPM_BUILD_ROOT%{_libdir}/samba \ - CONFIGDIR=$RPM_BUILD_ROOT%{_sysconfdir}/samba \ - PAMMODULESDIR=$RPM_BUILD_ROOT/%{_lib}/security \ - MANDIR=$RPM_BUILD_ROOT%{_mandir} \ - VARDIR=$RPM_BUILD_ROOT/var/log/samba \ - CODEPAGEDIR=$RPM_BUILD_ROOT%{_libdir}/samba \ - SWATDIR=$RPM_BUILD_ROOT%{_datadir}/swat \ - SAMBABOOK=$RPM_BUILD_ROOT%{_datadir}/swat/using_samba \ - PIDDIR=$RPM_BUILD_ROOT/var/run \ - NMBDSOCKETDIR=$RPM_BUILD_ROOT/var/run/nmbd +# Undo the PIDL install, we want to try again with the right options. +rm -rf %{buildroot}/%{_libdir}/perl5 +rm -rf %{buildroot}/%{_datadir}/perl5 -cd .. - -# Install other stuff -install -m644 packaging/Fedora/smb.conf.default $RPM_BUILD_ROOT%{_sysconfdir}/samba/smb.conf -install -m755 %samba_source/script/mksmbpasswd.sh $RPM_BUILD_ROOT%{_bindir} -install -m644 packaging/Fedora/smbusers $RPM_BUILD_ROOT%{_sysconfdir}/samba/smbusers -install -m755 packaging/Fedora/smbprint $RPM_BUILD_ROOT%{_bindir} -install -m644 packaging/Fedora/smb.service $RPM_BUILD_ROOT%{_unitdir}/smb.service -install -m644 packaging/Fedora/nmb.service $RPM_BUILD_ROOT%{_unitdir}/nmb.service -install -m644 packaging/Fedora/winbind.service $RPM_BUILD_ROOT%{_unitdir}/winbind.service -install -m644 packaging/Fedora/pam_winbind.conf $RPM_BUILD_ROOT%{_sysconfdir}/security -#ln -s ../..%{_initrddir}/smb $RPM_BUILD_ROOT%{_sbindir}/samba -install -m644 packaging/Fedora/samba.pamd $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/samba -install -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/samba -echo 127.0.0.1 localhost > $RPM_BUILD_ROOT%{_sysconfdir}/samba/lmhosts -mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/openldap/schema -install -m644 examples/LDAP/samba.schema $RPM_BUILD_ROOT%{_sysconfdir}/openldap/schema/samba.schema - -install -d -m 0755 %{buildroot}%{_sysconfdir}/tmpfiles.d/ -install -m644 %{SOURCE12} %{buildroot}%{_sysconfdir}/tmpfiles.d/samba.conf +# Install PIDL. +( cd pidl && make install PERL_INSTALL_ROOT=%{buildroot} ) # winbind -mkdir -p $RPM_BUILD_ROOT%{_libdir} -install -m 755 nsswitch/libnss_winbind.so $RPM_BUILD_ROOT/%{_lib}/libnss_winbind.so.2 -ln -sf /%{_lib}/libnss_winbind.so.2 $RPM_BUILD_ROOT%{_libdir}/libnss_winbind.so -install -m 755 nsswitch/libnss_wins.so $RPM_BUILD_ROOT/%{_lib}/libnss_wins.so.2 -ln -sf /%{_lib}/libnss_wins.so.2 $RPM_BUILD_ROOT%{_libdir}/libnss_wins.so +ln -sf %{_libdir}/libnss_winbind.so.2 %{buildroot}%{_libdir}/libnss_winbind.so +ln -sf %{_libdir}/libnss_wins.so.2 %{buildroot}%{_libdir}/libnss_wins.so -# winbind krb5 locator -#mkdir -p $RPM_BUILD_ROOT%{_libdir}/krb5/plugins/libkrb5 -install -d -m 0755 %{buildroot}%{_libdir}/krb5/plugins/libkrb5 -install -m 755 source3/bin/winbind_krb5_locator.so $RPM_BUILD_ROOT/%{_libdir}/krb5/plugins/libkrb5/winbind_krb5_locator.so +# Install other stuff +install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/samba +install -m 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/samba/smb.conf +install -m 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/security/pam_winbind.conf +install -m 0644 %{SOURCE6} %{buildroot}%{_sysconfdir}/pam.d/samba -# libraries { -mkdir -p $RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_includedir} -build_libdir="$RPM_BUILD_ROOT%{_libdir}" +echo 127.0.0.1 localhost > %{buildroot}%{_sysconfdir}/samba/lmhosts -# make install puts libraries in the wrong place -# (but at least gets the versioning right now) +install -d -m 0755 %{buildroot}%{_sysconfdir}/openldap/schema +install -m644 examples/LDAP/samba.schema %{buildroot}%{_sysconfdir}/openldap/schema/samba.schema -list="smbclient smbsharemodes netapi talloc tdb wbclient" -for i in $list; do - install -m 644 %samba_source/pkgconfig/$i.pc $build_libdir/pkgconfig/ || true +install -d -m 0755 %{buildroot}%{_sysconfdir}/xinetd.d +install -m644 %{SOURCE2} %{buildroot}%{_sysconfdir}/xinetd.d/swat + +install -d -m 0755 %{buildroot}%{_sysconfdir}/tmpfiles.d/ +install -m644 %{SOURCE7} %{buildroot}%{_sysconfdir}/tmpfiles.d/samba.conf + +install -d -m 0755 %{buildroot}%{_sysconfdir}/sysconfig +install -m 0644 packaging/systemd/samba.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/samba + +install -d -m 0755 %{buildroot}%{_defaultdocdir}/%{name} +install -m 0644 %{SOURCE201} %{buildroot}%{_defaultdocdir}/%{name}/README.downgrade + +%if ! %with_dc +install -m 0644 %{SOURCE200} %{buildroot}%{_defaultdocdir}/%{name}/README.dc +install -m 0644 %{SOURCE200} %{buildroot}%{_defaultdocdir}/%{name}/README.dc-libs +%endif + +install -d -m 0755 %{buildroot}%{_unitdir} +for i in nmb smb winbind ; do + cat packaging/systemd/$i.service | sed -e 's@Type=forking@Type=forking\nEnvironment=KRB5CCNAME=/run/samba/krb5cc_samba@g' >tmp$i.service + install -m 0644 tmp$i.service %{buildroot}%{_unitdir}/$i.service done +# winbind krb5 locator +install -d -m 0755 %{buildroot}%{_libdir}/krb5/plugins/libkrb5 +install -m 755 %{buildroot}/%{_libdir}/winbind_krb5_locator.so %{buildroot}/%{_libdir}/krb5/plugins/libkrb5/winbind_krb5_locator.so +rm -f %{buildroot}/%{_libdir}/winbind_krb5_locator.so -/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}/ +# cleanup stuff that does not belong here +rm -f %{buildroot}/%{_mandir}/man3/ldb.3* +rm -f %{buildroot}/%{_mandir}/man3/talloc.3* -# } +# Clean out crap left behind by the PIDL install. +find %{buildroot} -type f -name .packlist -exec rm -f {} \; +rm -f %{buildroot}%{perl_vendorlib}/wscript_build +rm -rf %{buildroot}%{perl_vendorlib}/Parse/Yapp -mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d -install -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/swat +# This makes the right links, as rpmlint requires that +# the ldconfig-created links be recorded in the RPM. +/sbin/ldconfig -N -n %{buildroot}%{_libdir} -mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig -install -m644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/samba +# Fix up permission on perl install. +%{_fixperms} %{buildroot}%{perl_vendorlib} -install -m 755 %samba_source/lib/netapi/examples/bin/netdomjoin-gui $RPM_BUILD_ROOT/%{_sbindir}/netdomjoin-gui -mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps/%{name} -install -m 644 %samba_source/lib/netapi/examples/netdomjoin-gui/samba.ico $RPM_BUILD_ROOT/%{_datadir}/pixmaps/%{name}/samba.ico -install -m 644 %samba_source/lib/netapi/examples/netdomjoin-gui/logo.png $RPM_BUILD_ROOT/%{_datadir}/pixmaps/%{name}/logo.png -install -m 644 %samba_source/lib/netapi/examples/netdomjoin-gui/logo-small.png $RPM_BUILD_ROOT/%{_datadir}/pixmaps/%{name}/logo-small.png - -rm -f $RPM_BUILD_ROOT/%{_mandir}/man1/editreg.1* -rm -f $RPM_BUILD_ROOT%{_mandir}/man1/log2pcap.1* -rm -f $RPM_BUILD_ROOT%{_mandir}/man1/smbsh.1* -#rm -f $RPM_BUILD_ROOT%{_mandir}/man1/smbget.1* -rm -f $RPM_BUILD_ROOT%{_mandir}/man5/smbgetrc.5* -rm -f $RPM_BUILD_ROOT%{_mandir}/man1/vfstest.1* -rm -f $RPM_BUILD_ROOT%{_mandir}/man1/testprns.1* -rm -f $RPM_BUILD_ROOT%{_mandir}/man8/smbmount.8* -rm -f $RPM_BUILD_ROOT%{_mandir}/man8/smbmnt.8* -rm -f $RPM_BUILD_ROOT%{_mandir}/man8/smbumount.8* -rm -f $RPM_BUILD_ROOT%{_mandir}/man8/{u,}mount.cifs.8* -rm -f $RPM_BUILD_ROOT%{_mandir}/man8/{u,}cifs.upcall.8* - -rm -f $RPM_BUILD_ROOT%{_sbindir}/{u,}mount.cifs -rm -f $RPM_BUILD_ROOT%{_sbindir}/cifs.upcall - -#rm -f $RPM_BUILD_ROOT%{_libdir}/libtalloc.so.* -#rm -f $RPM_BUILD_ROOT%{_includedir}/talloc.h -#rm -f $RPM_BUILD_ROOT%{_libdir}/libtalloc.so -#rm -f $RPM_BUILD_ROOT%{_libdir}/pkgconfig/talloc.pc - -#rm -f $RPM_BUILD_ROOT%{_libdir}/libtdb.so.* -#rm -f $RPM_BUILD_ROOT%{_includedir}/tdb.h -#rm -f $RPM_BUILD_ROOT%{_libdir}/libtdb.so -#rm -f $RPM_BUILD_ROOT%{_libdir}/pkgconfig/tdb.pc -rm -f $RPM_BUILD_ROOT%{_bindir}/tdbbackup -rm -f $RPM_BUILD_ROOT%{_bindir}/tdbdump -rm -f $RPM_BUILD_ROOT%{_bindir}/tdbtool -rm -f $RPM_BUILD_ROOT%{_bindir}/tdbrestore -rm -f $RPM_BUILD_ROOT%{_mandir}/man8/tdbbackup.8* -rm -f $RPM_BUILD_ROOT%{_mandir}/man8/tdbdump.8* -rm -f $RPM_BUILD_ROOT%{_mandir}/man8/tdbtool.8* - -rm -f $RPM_BUILD_ROOT%{_mandir}/man1/ldbadd.1* -rm -f $RPM_BUILD_ROOT%{_mandir}/man1/ldbdel.1* -rm -f $RPM_BUILD_ROOT%{_mandir}/man1/ldbedit.1* -rm -f $RPM_BUILD_ROOT%{_mandir}/man1/ldbmodify.1* -rm -f $RPM_BUILD_ROOT%{_mandir}/man1/ldbsearch.1* -rm -f $RPM_BUILD_ROOT%{_mandir}/man1/ldbrename.1* - -%find_lang net -%find_lang pam_winbind +# Remove stuff the buildsystem did not handle correctly +rm -f %{buildroot}%{_libdir}/security/pam_smbpass.so +rm -f %{buildroot}%{python_sitelib}/tevent.py %post -if [ $1 -eq 1 ] ; then - # Initial installation - /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || : -fi +%systemd_post smb.service +%systemd_post nmb.service %preun -if [ $1 -eq 0 ] ; then - # Package removal, not upgrade - /usr/bin/systemctl --no-reload disable smb.service > /dev/null 2>&1 || : - /usr/bin/systemctl --no-reload disable nmb.service > /dev/null 2>&1 || : - /usr/bin/systemctl stop smb.service > /dev/null 2>&1 || : - /usr/bin/systemctl stop nmb.service > /dev/null 2>&1 || : -fi +%systemd_preun smb.service +%systemd_preun nmb.service %postun -/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -ge 1 ] ; then - # Package upgrade, not uninstall - /usr/bin/systemctl try-restart smb.service >/dev/null 2>&1 || : - /usr/bin/systemctl try-restart nmb.service >/dev/null 2>&1 || : -fi +%systemd_postun_with_restart smb.service +%systemd_postun_with_restart nmb.service -%triggerun -- samba < 1:3.6.0-72 -# Save the current service runlevel info -# User must manually run -# systemd-sysv-convert --apply smb -# systemd-sysv-convert --apply nmb -# to migrate them to systemd targets -/usr/bin/systemd-sysv-convert --save smb >/dev/null 2>&1 ||: -/usr/bin/systemd-sysv-convert --save nmb >/dev/null 2>&1 ||: +%post libs -p /sbin/ldconfig -# Run these because the SysV package being removed won't do them -/usr/sbin/chkconfig --del smb >/dev/null 2>&1 || : -/usr/sbin/chkconfig --del nmb >/dev/null 2>&1 || : -/usr/bin/systemctl try-restart smb.service >/dev/null 2>&1 || : -/usr/bin/systemctl try-restart nmb.service >/dev/null 2>&1 || : +%postun libs -p /sbin/ldconfig + +%if %with_dc +%post dc-libs -p /sbin/ldconfig + +%postun dc-libs -p /sbin/ldconfig +%endif # with_dc + +%post test -p /sbin/ldconfig + +%postun test -p /sbin/ldconfig %pre winbind /usr/sbin/groupadd -g 88 wbpriv >/dev/null 2>&1 || : %post winbind -if [ $1 -eq 1 ] ; then - # Initial installation - /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || : -fi +%systemd_post winbind.service %preun winbind -if [ $1 -eq 0 ] ; then - # Package removal, not upgrade - /usr/bin/systemctl --no-reload disable winbind.service > /dev/null 2>&1 || : - /usr/bin/systemctl stop winbind.service > /dev/null 2>&1 || : -fi +%systemd_preun winbind.service %postun winbind -/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -ge 1 ] ; then - # Package upgrade, not uninstall - /usr/bin/systemctl try-restart winbind.service >/dev/null 2>&1 || : -fi - -%triggerun winbind -- samba-winbind < 1:3.6.0-72 -# Save the current service runlevel info -# User must manually run -# systemd-sysv-convert --apply winbind -# to migrate them to systemd targets -/usr/bin/systemd-sysv-convert --save winbind >/dev/null 2>&1 ||: - -# Run these because the SysV package being removed won't do them -/usr/sbin/chkconfig --del winbind >/dev/null 2>&1 || : -/usr/bin/systemctl try-restart winbind.service >/dev/null 2>&1 || : +%systemd_postun_with_restart smb.service +%systemd_postun_with_restart nmb.service %post common /sbin/ldconfig @@ -531,183 +608,658 @@ fi %postun common -p /sbin/ldconfig - %post winbind-clients -p /sbin/ldconfig %postun winbind-clients -p /sbin/ldconfig +%if %with_libsmbclient %post -n libsmbclient -p /sbin/ldconfig %postun -n libsmbclient -p /sbin/ldconfig +%endif # with_libsmbclient +%if %with_libwbclient %post -n libwbclient -p /sbin/ldconfig %postun -n libwbclient -p /sbin/ldconfig +%endif # with_libwbclient + +%clean +rm -rf %{buildroot} %files -%{_sbindir}/smbd -%{_sbindir}/nmbd -%{_bindir}/mksmbpasswd.sh +%defattr(-,root,root,-) +%doc COPYING %{_bindir}/smbstatus %{_bindir}/eventlogadm -%config(noreplace) %{_sysconfdir}/samba/smbusers -%{_unitdir}/smb.service +%{_sbindir}/nmbd +%{_sbindir}/smbd +%{_libdir}/samba/libsmbd_base.so +%{_libdir}/samba/libsmbd_conn.so +%{_libdir}/samba/auth +%{_libdir}/samba/vfs %{_unitdir}/nmb.service +%{_unitdir}/smb.service %config(noreplace) %{_sysconfdir}/logrotate.d/samba %config(noreplace) %{_sysconfdir}/pam.d/samba -%{_mandir}/man7/samba.7* -%{_mandir}/man8/nmbd.8* -%{_mandir}/man8/smbd.8* -%{_mandir}/man8/eventlogadm.8* -%{_mandir}/man8/vfs_*.8* -%{_libdir}/samba/vfs -%{_libdir}/samba/auth -%{_libdir}/samba/charset +%attr(0700,root,root) %dir /var/log/samba +%attr(0700,root,root) %dir /var/log/samba/old %attr(1777,root,root) %dir /var/spool/samba %dir %{_sysconfdir}/openldap/schema %{_sysconfdir}/openldap/schema/samba.schema -%ghost %dir /var/run/nmbd +%doc %{_defaultdocdir}/%{name}/README.downgrade +%{_mandir}/man1/smbstatus.1* +%{_mandir}/man8/eventlogadm.8* +%{_mandir}/man8/smbd.8* +%{_mandir}/man8/nmbd.8* +%{_mandir}/man8/vfs_*.8* -%doc examples/autofs examples/LDAP examples/libsmbclient examples/misc examples/printer-accounting -%doc examples/printing +%files libs +%defattr(-,root,root) +%{_libdir}/libdcerpc-atsvc.so.* +%{_libdir}/libdcerpc-binding.so.* +%{_libdir}/libdcerpc-samr.so.* +%{_libdir}/libdcerpc.so.* +%{_libdir}/libgensec.so.* +%{_libdir}/libndr-krb5pac.so.* +%{_libdir}/libndr-nbt.so.* +%{_libdir}/libndr-standard.so.* +%{_libdir}/libndr.so.* +%{_libdir}/libregistry.so.* +%{_libdir}/libsamba-credentials.so.* +%{_libdir}/libsamba-hostconfig.so.* +%{_libdir}/libsamba-policy.so.* +%{_libdir}/libsamba-util.so.* +%{_libdir}/libsamdb.so.* +%{_libdir}/libsmbclient-raw.so.* +%{_libdir}/libsmbconf.so.* +%{_libdir}/libtevent-util.so.* +%{_libdir}/libpdb.so.* +%{_libdir}/libsmbldap.so.* -%files swat -%config(noreplace) %{_sysconfdir}/xinetd.d/swat -%{_datadir}/swat -%{_sbindir}/swat -%{_mandir}/man8/swat.8* -%attr(755,root,root) %{_libdir}/samba/*.msg +# libraries needed by the public libraries +%{_libdir}/samba/libCHARSET3.so +%{_libdir}/samba/libMESSAGING.so +%{_libdir}/samba/libLIBWBCLIENT_OLD.so +%{_libdir}/samba/libaddns.so +%{_libdir}/samba/libads.so +%{_libdir}/samba/libasn1util.so +%{_libdir}/samba/libauth4.so +%{_libdir}/samba/libauth_sam_reply.so +%{_libdir}/samba/libauth_unix_token.so +%{_libdir}/samba/libauthkrb5.so +%{_libdir}/samba/libcli-ldap-common.so +%{_libdir}/samba/libcli-ldap.so +%{_libdir}/samba/libcli-nbt.so +%{_libdir}/samba/libcli_cldap.so +%{_libdir}/samba/libcli_smb_common.so +%{_libdir}/samba/libcli_spoolss.so +%{_libdir}/samba/libcliauth.so +#%{_libdir}/samba/libclidns.so +%{_libdir}/samba/libcluster.so +%{_libdir}/samba/libcmdline-credentials.so +%{_libdir}/samba/libdbwrap.so +%{_libdir}/samba/libdcerpc-samba.so +%{_libdir}/samba/libdcerpc-samba4.so +%{_libdir}/samba/liberrors.so +%{_libdir}/samba/libevents.so +%{_libdir}/samba/libflag_mapping.so +%{_libdir}/samba/libgpo.so +%{_libdir}/samba/libgse.so +%{_libdir}/samba/libinterfaces.so +%{_libdir}/samba/libkrb5samba.so +%{_libdir}/samba/libldbsamba.so +%{_libdir}/samba/liblibcli_lsa3.so +%{_libdir}/samba/liblibcli_netlogon3.so +%{_libdir}/samba/liblibsmb.so +%{_libdir}/samba/libsmb_transport.so +%{_libdir}/samba/libmsrpc3.so +%{_libdir}/samba/libndr-samba.so +%{_libdir}/samba/libndr-samba4.so +%{_libdir}/samba/libnet_keytab.so +%{_libdir}/samba/libnetif.so +%{_libdir}/samba/libnpa_tstream.so +%{_libdir}/samba/libreplace.so +%{_libdir}/samba/libsamba-modules.so +%{_libdir}/samba/libsamba-net.so +%{_libdir}/samba/libsamba-security.so +%{_libdir}/samba/libsamba-sockets.so +%{_libdir}/samba/libsamba_python.so +%{_libdir}/samba/libsamdb-common.so +%{_libdir}/samba/libsecrets3.so +%{_libdir}/samba/libserver-role.so +%{_libdir}/samba/libshares.so +%{_libdir}/samba/libsamba3-util.so +%{_libdir}/samba/libsmbd_shim.so +%{_libdir}/samba/libsmbldaphelper.so +%{_libdir}/samba/libsmbpasswdparser.so +%{_libdir}/samba/libsmbregistry.so +%{_libdir}/samba/libtdb-wrap.so +%{_libdir}/samba/libtdb_compat.so +%{_libdir}/samba/libtrusts_util.so +%{_libdir}/samba/libutil_cmdline.so +#%{_libdir}/samba/libutil_ntdb.so +%{_libdir}/samba/libutil_reg.so +%{_libdir}/samba/libutil_setid.so +%{_libdir}/samba/libutil_tdb.so +%{_libdir}/samba/libxattr_tdb.so -%files client -%{_bindir}/rpcclient -%{_bindir}/smbcacls -%{_bindir}/findsmb -%{_bindir}/smbget -%{_bindir}/nmblookup -%{_bindir}/smbclient -%{_bindir}/smbprint -%{_bindir}/smbspool -%{_bindir}/smbtar -%{_bindir}/smbtree -%{_bindir}/sharesec -%{_bindir}/smbta-util -%{_mandir}/man1/findsmb.1* -%{_mandir}/man1/nmblookup.1* -%{_mandir}/man1/rpcclient.1* -%{_mandir}/man1/smbcacls.1* -%{_mandir}/man1/smbclient.1* -%{_mandir}/man1/smbtar.1* -%{_mandir}/man1/smbtree.1* -%{_mandir}/man1/smbget.1* -%{_mandir}/man1/sharesec.1* -%{_mandir}/man8/smbspool.8* -%{_mandir}/man8/smbta-util.8* +%if %with_dc +%{_libdir}/samba/libdb-glue.so +%{_libdir}/samba/libHDB_SAMBA4.so +%{_libdir}/samba/libasn1-samba4.so.8 +%{_libdir}/samba/libasn1-samba4.so.8.0.0 +%{_libdir}/samba/libgssapi-samba4.so.2 +%{_libdir}/samba/libgssapi-samba4.so.2.0.0 +%{_libdir}/samba/libhcrypto-samba4.so.5 +%{_libdir}/samba/libhcrypto-samba4.so.5.0.1 +%{_libdir}/samba/libhdb-samba4.so.11 +%{_libdir}/samba/libhdb-samba4.so.11.0.2 +%{_libdir}/samba/libheimbase-samba4.so.1 +%{_libdir}/samba/libheimbase-samba4.so.1.0.0 +%{_libdir}/samba/libhx509-samba4.so.5 +%{_libdir}/samba/libhx509-samba4.so.5.0.0 +%{_libdir}/samba/libkrb5-samba4.so.26 +%{_libdir}/samba/libkrb5-samba4.so.26.0.0 +%{_libdir}/samba/libroken-samba4.so.19 +%{_libdir}/samba/libroken-samba4.so.19.0.1 +%{_libdir}/samba/libwind-samba4.so.0 +%{_libdir}/samba/libwind-samba4.so.0.0.0 +%endif -%files common -f net.lang -%attr(755,root,root) /%{_lib}/security/pam_smbpass.so +%if %{with_ldb} +%{_libdir}/samba/libldb.so.1 +%{_libdir}/samba/libldb.so.%{ldb_version} +%{_libdir}/samba/libpyldb-util.so.1 +%{_libdir}/samba/libpyldb-util.so.%{ldb_version} +%endif +%if %{with_talloc} +%{_libdir}/samba/libtalloc.so.2 +%{_libdir}/samba/libtalloc.so.%{talloc_version} +%{_libdir}/samba/libpytalloc-util.so.2 +%{_libdir}/samba/libpytalloc-util.so.%{talloc_version} +%endif +%if %{with_tevent} +%{_libdir}/samba/libtevent.so.0 +%{_libdir}/samba/libtevent.so.%{tevent_version} +%endif +%if %{with_tdb} +%{_libdir}/samba/libtdb.so.1 +%{_libdir}/samba/libtdb.so.%{tdb_version} +%endif +## we don't build it for now +#%if %{with_ntdb} +#%{_libdir}/samba/libntdb.so.0 +#%{_libdir}/samba/libntdb.so.%{ntdb_version} +#%endif + +%if ! %with_libsmbclient +%{_libdir}/samba/libsmbclient.so.* +%{_libdir}/samba/libsmbsharemodes.so.* +%{_mandir}/man7/libsmbclient.7* +%endif # ! with_libsmbclient + +%if ! %with_libwbclient +%{_libdir}/samba/libwbclient.so.* +%{_libdir}/samba/libwinbind-client.so +%endif # ! with_libwbclient + +%files common +%defattr(-,root,root) +#%{_libdir}/samba/charset ??? %{_sysconfdir}/tmpfiles.d/samba.conf -%dir %{_libdir}/samba -%{_libdir}/samba/lowcase.dat -%{_libdir}/samba/upcase.dat -%{_libdir}/samba/valid.dat -%{_libdir}/libnetapi.so -%attr(755,root,root) %{_libdir}/libnetapi.so.* -%{_includedir}/netapi.h -%{_libdir}/pkgconfig/netapi.pc %{_bindir}/net -%{_bindir}/testparm -%{_bindir}/smbpasswd %{_bindir}/pdbedit %{_bindir}/profiles -%{_bindir}/smbcquotas %{_bindir}/smbcontrol -%dir /var/lib/samba +%{_bindir}/testparm +%{_libdir}/libnetapi.so.* +%{_libdir}/samba/libprinting_migrate.so +%{_datadir}/samba/codepages +%ghost %dir /var/run/samba +%ghost %dir /var/run/winbindd %attr(700,root,root) %dir /var/lib/samba/private -%dir /var/lib/samba/scripts +%attr(755,root,root) %dir %{_sysconfdir}/samba %config(noreplace) %{_sysconfdir}/samba/smb.conf %config(noreplace) %{_sysconfdir}/samba/lmhosts %config(noreplace) %{_sysconfdir}/sysconfig/samba -%dir %{_sysconfdir}/samba -%attr(0700,root,root) %dir /var/log/samba -%attr(0700,root,root) %dir /var/log/samba/old %{_mandir}/man1/profiles.1* -%{_mandir}/man1/smbcquotas.1* %{_mandir}/man1/smbcontrol.1* -#%{_mandir}/man1/vfstest.1* %{_mandir}/man1/testparm.1* -%{_mandir}/man1/smbstatus.1* -%{_mandir}/man5/smbpasswd.5* -%{_mandir}/man5/smb.conf.5* %{_mandir}/man5/lmhosts.5* -%{_mandir}/man8/smbpasswd.8* -%{_mandir}/man8/pdbedit.8* +%{_mandir}/man5/smb.conf.5* +%{_mandir}/man5/smbpasswd.5* +%{_mandir}/man7/samba.7* %{_mandir}/man8/net.8* +%{_mandir}/man8/pdbedit.8* -%doc README COPYING Manifest -%doc WHATSNEW.txt Roadmap +# common libraries +%{_libdir}/samba/libauth.so +%{_libdir}/samba/libpopt_samba3.so +%{_libdir}/samba/pdb -%files winbind -f pam_winbind.lang -%{_bindir}/ntlm_auth -%{_bindir}/wbinfo +%if %with_pam_smbpass +%{_libdir}/security/pam_smbpass.so +%endif + +%files dc +%defattr(-,root,root) +%{_bindir}/samba-dig +%{_libdir}/samba/ldb +%{_libdir}/samba/libdfs_server_ad.so +%{_libdir}/samba/libdsdb-module.so + +%if %with_dc +%{_bindir}/samba-tool +%{_sbindir}/samba +%{_sbindir}/samba_kcc +%{_sbindir}/samba_dnsupdate +%{_sbindir}/samba_spnupdate +%{_sbindir}/samba_upgradedns +%{_sbindir}/samba_upgradeprovision +%{_libdir}/mit_samba.so +%{_libdir}/samba/bind9/dlz_bind9.so +%{_libdir}/samba/libheimntlm-samba4.so.1 +%{_libdir}/samba/libheimntlm-samba4.so.1.0.1 +%{_libdir}/samba/libkdc-samba4.so.2 +%{_libdir}/samba/libkdc-samba4.so.2.0.0 +%{_libdir}/samba/libpac.so +%{_libdir}/samba/gensec +%dir /var/lib/samba/sysvol +%{_datadir}/samba/setup +%{_mandir}/man8/samba.8.gz +%else # with_dc +%doc %{_defaultdocdir}/%{name}/README.dc +%endif # with_dc + +%files dc-libs +%defattr(-,root,root) +%if %with_dc +%{_libdir}/samba/libprocess_model.so +%{_libdir}/samba/libservice.so +%{_libdir}/samba/process_model +%{_libdir}/samba/service +%{_libdir}/libdcerpc-server.so.* +%{_libdir}/samba/libntvfs.so +%{_libdir}/samba/libposix_eadb.so +%{_libdir}/samba/bind9/dlz_bind9_9.so +%else +%doc %{_defaultdocdir}/%{name}/README.dc-libs +%endif # with_dc + +%files winbind +%defattr(-,root,root) +#%{_bindir}/wbinfo3 %{_libdir}/samba/idmap %{_libdir}/samba/nss_info +%{_libdir}/samba/libnss_info.so +%{_libdir}/samba/libidmap.so %{_sbindir}/winbindd -%ghost %dir /var/run/winbindd %attr(750,root,wbpriv) %dir /var/lib/samba/winbindd_privileged %config(noreplace) %{_sysconfdir}/security/pam_winbind.conf %{_unitdir}/winbind.service -%{_mandir}/man1/ntlm_auth.1* %{_mandir}/man1/wbinfo.1* %{_mandir}/man5/pam_winbind.conf.5* %{_mandir}/man8/pam_winbind.8* %{_mandir}/man8/winbindd.8* %{_mandir}/man8/idmap_*.8* +#%{_datadir}/locale/*/LC_MESSAGES/pam_winbind.mo %files winbind-krb5-locator -%{_mandir}/man7/winbind_krb5_locator.7* +%defattr(-,root,root) %{_libdir}/krb5/plugins/libkrb5/winbind_krb5_locator.so +%{_mandir}/man7/winbind_krb5_locator.7* %files winbind-clients -%{_libdir}/libnss_winbind.so -/%{_lib}/libnss_winbind.so.2 -%{_libdir}/libnss_wins.so -/%{_lib}/libnss_wins.so.2 -/%{_lib}/security/pam_winbind.so +%defattr(-,root,root) +%{_bindir}/ntlm_auth +%{_bindir}/ntlm_auth3 +%{_bindir}/wbinfo +%{_libdir}/libnss_winbind.so* +%{_libdir}/libnss_wins.so* +%{_libdir}/security/pam_winbind.so +%{_mandir}/man1/ntlm_auth.1.gz -%files doc -%doc docs/Samba3-Developers-Guide.pdf docs/Samba3-ByExample.pdf -%doc docs/Samba3-HOWTO.pdf -%doc docs/htmldocs +%files client +%defattr(-,root,root) +%{_bindir}/cifsdd +%{_bindir}/dbwrap_tool +%{_bindir}/debug2html +%{_bindir}/log2pcap +%{_bindir}/nmblookup +%{_bindir}/nmblookup4 +%{_bindir}/oLschema2ldif +%{_bindir}/regdiff +%{_bindir}/regpatch +%{_bindir}/regshell +%{_bindir}/regtree +%{_bindir}/rpcclient +%{_bindir}/sharesec +%{_bindir}/smbcacls +%{_bindir}/smbclient +%{_bindir}/smbclient4 +%{_bindir}/smbcquotas +%{_bindir}/smbfilter +%{_bindir}/smbget +#%{_bindir}/smbiconv +%{_bindir}/smbpasswd +%{_bindir}/smbspool +%{_bindir}/smbta-util +%{_bindir}/smbtree +%{_bindir}/split_tokens +%{_libdir}/samba/libldb-cmdline.so +%{_mandir}/man1/nmblookup.1* +%{_mandir}/man1/oLschema2ldif.1* +%{_mandir}/man1/regdiff.1* +%{_mandir}/man1/regpatch.1* +%{_mandir}/man1/regshell.1* +%{_mandir}/man1/regtree.1* +%exclude %{_mandir}/man1/findsmb.1* +%{_mandir}/man1/log2pcap.1* +%{_mandir}/man1/nmblookup4.1* +%{_mandir}/man1/rpcclient.1* +%{_mandir}/man1/sharesec.1* +%{_mandir}/man1/smbcacls.1* +%{_mandir}/man1/smbclient.1* +%{_mandir}/man1/smbcquotas.1* +%{_mandir}/man1/smbget.1* +%{_mandir}/man5/smbgetrc.5* +%exclude %{_mandir}/man1/smbtar.1* +%{_mandir}/man1/smbtree.1* +%{_mandir}/man8/smbpasswd.8* +%{_mandir}/man8/smbspool.8* +%{_mandir}/man8/smbta-util.8* +## we don't build it for now +#%if %{with_ntdb} +#%{_bindir}/ntdbbackup +#%{_bindir}/ntdbdump +#%{_bindir}/ntdbrestore +#%{_bindir}/ntdbtool +#%endif + +%if %{with_tdb} +%{_bindir}/tdbbackup +%{_bindir}/tdbdump +%{_bindir}/tdbrestore +%{_bindir}/tdbtool +%{_mandir}/man8/tdbbackup.8.gz +%{_mandir}/man8/tdbdump.8.gz +%{_mandir}/man8/tdbrestore.8.gz +%{_mandir}/man8/tdbtool.8.gz +%endif + +%if %with_ldb +%{_bindir}/ldbadd +%{_bindir}/ldbdel +%{_bindir}/ldbedit +%{_bindir}/ldbmodify +%{_bindir}/ldbrename +%{_bindir}/ldbsearch +%{_mandir}/man1/ldbadd.1.gz +%{_mandir}/man1/ldbdel.1.gz +%{_mandir}/man1/ldbedit.1.gz +%{_mandir}/man1/ldbmodify.1.gz +%{_mandir}/man1/ldbrename.1.gz +%{_mandir}/man1/ldbsearch.1.gz +%endif + +%files test +%defattr(-,root,root) +%{_bindir}/asystest +%{_bindir}/dbwrap_torture +%{_bindir}/gentest +%{_bindir}/locktest +%{_bindir}/locktest2 +%{_bindir}/locktest3 +%{_bindir}/masktest +%{_bindir}/masktest3 +%{_bindir}/msgtest +%{_bindir}/ndrdump +%{_bindir}/nsstest +%{_bindir}/pdbtest +%{_bindir}/pthreadpooltest +%{_bindir}/rpc_open_tcp +%{_bindir}/smbconftort +%{_bindir}/smbtorture +%{_bindir}/smbtorture3 +%{_bindir}/test_lp_load +%{_bindir}/timelimit +%{_bindir}/versiontest +%{_bindir}/vfstest +%{_bindir}/vlp +%{_libdir}/libtorture.so.* +%{_libdir}/samba/libsubunit.so +%if %with_dc +%{_libdir}/samba/libdlz_bind9_for_torture.so +%endif +%{_mandir}/man1/gentest.1* +%{_mandir}/man1/locktest.1* +%{_mandir}/man1/masktest.1* +%{_mandir}/man1/ndrdump.1* +%{_mandir}/man1/smbtorture.1* +%{_mandir}/man1/vfstest.1* + +%files devel +%defattr(-,root,root) +%{_includedir}/samba-4.0/charset.h +%{_includedir}/samba-4.0/core/doserr.h +%{_includedir}/samba-4.0/core/error.h +%{_includedir}/samba-4.0/core/ntstatus.h +%{_includedir}/samba-4.0/core/werror.h +%{_includedir}/samba-4.0/credentials.h +%{_includedir}/samba-4.0/dcerpc.h +%{_includedir}/samba-4.0/dlinklist.h +%{_includedir}/samba-4.0/domain_credentials.h +%{_includedir}/samba-4.0/gen_ndr/atsvc.h +%{_includedir}/samba-4.0/gen_ndr/auth.h +%{_includedir}/samba-4.0/gen_ndr/dcerpc.h +%{_includedir}/samba-4.0/gen_ndr/epmapper.h +%{_includedir}/samba-4.0/gen_ndr/krb5pac.h +%{_includedir}/samba-4.0/gen_ndr/lsa.h +%{_includedir}/samba-4.0/gen_ndr/mgmt.h +%{_includedir}/samba-4.0/gen_ndr/misc.h +%{_includedir}/samba-4.0/gen_ndr/nbt.h +%{_includedir}/samba-4.0/gen_ndr/drsblobs.h +%{_includedir}/samba-4.0/gen_ndr/drsuapi.h +%{_includedir}/samba-4.0/gen_ndr/ndr_drsblobs.h +%{_includedir}/samba-4.0/gen_ndr/ndr_drsuapi.h +%{_includedir}/samba-4.0/gen_ndr/ndr_atsvc.h +%{_includedir}/samba-4.0/gen_ndr/ndr_atsvc_c.h +%{_includedir}/samba-4.0/gen_ndr/ndr_dcerpc.h +%{_includedir}/samba-4.0/gen_ndr/ndr_epmapper.h +%{_includedir}/samba-4.0/gen_ndr/ndr_epmapper_c.h +%{_includedir}/samba-4.0/gen_ndr/ndr_krb5pac.h +%{_includedir}/samba-4.0/gen_ndr/ndr_mgmt.h +%{_includedir}/samba-4.0/gen_ndr/ndr_mgmt_c.h +%{_includedir}/samba-4.0/gen_ndr/ndr_misc.h +%{_includedir}/samba-4.0/gen_ndr/ndr_nbt.h +%{_includedir}/samba-4.0/gen_ndr/ndr_samr.h +%{_includedir}/samba-4.0/gen_ndr/ndr_samr_c.h +%{_includedir}/samba-4.0/gen_ndr/ndr_svcctl.h +%{_includedir}/samba-4.0/gen_ndr/ndr_svcctl_c.h +%{_includedir}/samba-4.0/gen_ndr/netlogon.h +%{_includedir}/samba-4.0/gen_ndr/samr.h +%{_includedir}/samba-4.0/gen_ndr/security.h +%{_includedir}/samba-4.0/gen_ndr/server_id.h +%{_includedir}/samba-4.0/gen_ndr/svcctl.h +%{_includedir}/samba-4.0/gensec.h +%{_includedir}/samba-4.0/ldap-util.h +%{_includedir}/samba-4.0/ldap_errors.h +%{_includedir}/samba-4.0/ldap_message.h +%{_includedir}/samba-4.0/ldap_ndr.h +%{_includedir}/samba-4.0/ldb_wrap.h +%{_includedir}/samba-4.0/lookup_sid.h +%{_includedir}/samba-4.0/machine_sid.h +%{_includedir}/samba-4.0/ndr.h +%{_includedir}/samba-4.0/ndr/ndr_drsblobs.h +%{_includedir}/samba-4.0/ndr/ndr_drsuapi.h +%{_includedir}/samba-4.0/ndr/ndr_svcctl.h +%{_includedir}/samba-4.0/ndr/ndr_nbt.h +%{_includedir}/samba-4.0/netapi.h +%{_includedir}/samba-4.0/param.h +%{_includedir}/samba-4.0/passdb.h +%{_includedir}/samba-4.0/policy.h +%{_includedir}/samba-4.0/read_smb.h +%{_includedir}/samba-4.0/registry.h +%{_includedir}/samba-4.0/roles.h +%{_includedir}/samba-4.0/rpc_common.h +%{_includedir}/samba-4.0/samba/session.h +%{_includedir}/samba-4.0/samba/version.h +%{_includedir}/samba-4.0/share.h +%{_includedir}/samba-4.0/smb2.h +%{_includedir}/samba-4.0/smb2_constants.h +%{_includedir}/samba-4.0/smb2_create_blob.h +%{_includedir}/samba-4.0/smb2_signing.h +%{_includedir}/samba-4.0/smb_cli.h +%{_includedir}/samba-4.0/smb_cliraw.h +%{_includedir}/samba-4.0/smb_common.h +%{_includedir}/samba-4.0/smb_composite.h +%{_includedir}/samba-4.0/smbconf.h +%{_includedir}/samba-4.0/smb_constants.h +%{_includedir}/samba-4.0/smb_ldap.h +%{_includedir}/samba-4.0/smbldap.h +%{_includedir}/samba-4.0/smb_raw.h +%{_includedir}/samba-4.0/smb_raw_interfaces.h +%{_includedir}/samba-4.0/smb_raw_signing.h +%{_includedir}/samba-4.0/smb_raw_trans2.h +%{_includedir}/samba-4.0/smb_request.h +%{_includedir}/samba-4.0/smb_seal.h +%{_includedir}/samba-4.0/smb_signing.h +%{_includedir}/samba-4.0/smb_unix_ext.h +%{_includedir}/samba-4.0/smb_util.h +%{_includedir}/samba-4.0/tdr.h +%{_includedir}/samba-4.0/torture.h +%{_includedir}/samba-4.0/tsocket.h +%{_includedir}/samba-4.0/tsocket_internal.h +%{_includedir}/samba-4.0/samba_util.h +%{_includedir}/samba-4.0/util/attr.h +%{_includedir}/samba-4.0/util/byteorder.h +%{_includedir}/samba-4.0/util/data_blob.h +%{_includedir}/samba-4.0/util/debug.h +%{_includedir}/samba-4.0/util/memory.h +%{_includedir}/samba-4.0/util/safe_string.h +%{_includedir}/samba-4.0/util/string_wrappers.h +%{_includedir}/samba-4.0/util/talloc_stack.h +%{_includedir}/samba-4.0/util/tevent_ntstatus.h +%{_includedir}/samba-4.0/util/tevent_unix.h +%{_includedir}/samba-4.0/util/tevent_werror.h +%{_includedir}/samba-4.0/util/time.h +%{_includedir}/samba-4.0/util/xfile.h +%{_includedir}/samba-4.0/util_ldb.h +%{_libdir}/libdcerpc-atsvc.so +%{_libdir}/libdcerpc-binding.so +%{_libdir}/libdcerpc-samr.so +%{_libdir}/libdcerpc.so +%{_libdir}/libgensec.so +%{_libdir}/libndr-krb5pac.so +%{_libdir}/libndr-nbt.so +%{_libdir}/libndr-standard.so +%{_libdir}/libndr.so +%{_libdir}/libnetapi.so +%{_libdir}/libregistry.so +%{_libdir}/libsamba-credentials.so +%{_libdir}/libsamba-hostconfig.so +%{_libdir}/libsamba-policy.so +%{_libdir}/libsamba-util.so +%{_libdir}/libsamdb.so +%{_libdir}/libsmbclient-raw.so +%{_libdir}/libsmbconf.so +%{_libdir}/libtevent-util.so +%{_libdir}/libtorture.so +%{_libdir}/pkgconfig/dcerpc.pc +%{_libdir}/pkgconfig/dcerpc_atsvc.pc +%{_libdir}/pkgconfig/dcerpc_samr.pc +%{_libdir}/pkgconfig/gensec.pc +%{_libdir}/pkgconfig/ndr.pc +%{_libdir}/pkgconfig/ndr_krb5pac.pc +%{_libdir}/pkgconfig/ndr_nbt.pc +%{_libdir}/pkgconfig/ndr_standard.pc +%{_libdir}/pkgconfig/netapi.pc +%{_libdir}/pkgconfig/registry.pc +%{_libdir}/pkgconfig/samba-credentials.pc +%{_libdir}/pkgconfig/samba-hostconfig.pc +%{_libdir}/pkgconfig/samba-policy.pc +%{_libdir}/pkgconfig/samba-util.pc +%{_libdir}/pkgconfig/samdb.pc +%{_libdir}/pkgconfig/smbclient-raw.pc +%{_libdir}/pkgconfig/torture.pc +%{_libdir}/libpdb.so +%{_libdir}/libsmbldap.so + +%if %with_dc +%{_includedir}/samba-4.0/dcerpc_server.h +%{_libdir}/libdcerpc-server.so +%{_libdir}/pkgconfig/dcerpc_server.pc +%endif + +%if %with_talloc +%{_includedir}/samba-4.0/pytalloc.h +%endif + +%if ! %with_libsmbclient +%{_includedir}/samba-4.0/libsmbclient.h +%{_includedir}/samba-4.0/smb_share_modes.h +%endif # ! with_libsmbclient + +%if ! %with_libwbclient +%{_libdir}/samba/libwbclient.so +%{_includedir}/samba-4.0/wbclient.h +%endif # ! with_libwbclient + +%files python +%defattr(-,root,root,-) +%{python_sitearch}/* + +%files pidl +%defattr(-,root,root,-) +%{perl_vendorlib}/Parse/Pidl* +%{_mandir}/man1/pidl* +%{_mandir}/man3/Parse::Pidl* +%attr(755,root,root) %{_bindir}/pidl + +%files swat +%defattr(-,root,root) +%config(noreplace) %{_sysconfdir}/xinetd.d/swat +%{_datadir}/samba/swat +%{_sbindir}/swat +%{_mandir}/man8/swat.8* +#%attr(755,root,root) %{_libdir}/samba/*.msg + +%if %with_libsmbclient %files -n libsmbclient +%defattr(-,root,root) %attr(755,root,root) %{_libdir}/libsmbclient.so.* %attr(755,root,root) %{_libdir}/libsmbsharemodes.so.* %files -n libsmbclient-devel -%{_includedir}/libsmbclient.h -%{_includedir}/smb_share_modes.h +%defattr(-,root,root) +%{_includedir}/samba-4.0/libsmbclient.h +%{_includedir}/samba-4.0/smb_share_modes.h %{_libdir}/libsmbclient.so %{_libdir}/libsmbsharemodes.so %{_libdir}/pkgconfig/smbclient.pc %{_libdir}/pkgconfig/smbsharemodes.pc %{_mandir}/man7/libsmbclient.7* +%endif # with_libsmbclient +%if %with_libwbclient %files -n libwbclient -%attr(755,root,root) %{_libdir}/libwbclient.so.* +%defattr(-,root,root) +%{_libdir}/libwbclient.so.* +%{_libdir}/samba/libwinbind-client.so %files -n libwbclient-devel -%{_includedir}/wbclient.h +%defattr(-,root,root) +%{_includedir}/samba-4.0/wbclient.h %{_libdir}/libwbclient.so %{_libdir}/pkgconfig/wbclient.pc - -%files domainjoin-gui -%{_sbindir}/netdomjoin-gui -%dir %{_datadir}/pixmaps/samba -%{_datadir}/pixmaps/samba/samba.ico -%{_datadir}/pixmaps/samba/logo.png -%{_datadir}/pixmaps/samba/logo-small.png +%endif # with_libwbclient %changelog +* Wed Sep 26 2012 - Andreas Schneider - 2:4.0.0-95.rc1 +- Update to 4.0.0rc1. + * Mon Aug 20 2012 Guenther Deschner - 2:3.6.7-94.2 - Update to 3.6.7 diff --git a/samba.sysconfig b/samba.sysconfig deleted file mode 100644 index 5950b13..0000000 --- a/samba.sysconfig +++ /dev/null @@ -1,14 +0,0 @@ -## Path: Network/Samba -## Description: Samba process options -## Type: string -## Default: "" -## ServiceRestart: smb -SMBDOPTIONS="" -## Type: string -## Default: "" -## ServiceRestart: nmb -NMBDOPTIONS="" -## Type: string -## Default: "" -## ServiceRestart: winbind -WINBINDOPTIONS="" diff --git a/smb.init b/smb.init deleted file mode 100644 index f9fec26..0000000 --- a/smb.init +++ /dev/null @@ -1,114 +0,0 @@ -#!/bin/sh -# -# chkconfig: - 91 35 -# description: Starts and stops the Samba smbd daemon \ -# used to provide SMB network services. -# -# pidfile: /var/run/samba/smbd.pid -# config: /etc/samba/smb.conf - - -# Source function library. -if [ -f /etc/init.d/functions ] ; then - . /etc/init.d/functions -elif [ -f /etc/rc.d/init.d/functions ] ; then - . /etc/rc.d/init.d/functions -else - exit 1 -fi - -# Avoid using root's TMPDIR -unset TMPDIR - -# Source networking configuration. -. /etc/sysconfig/network - -if [ -f /etc/sysconfig/samba ]; then - . /etc/sysconfig/samba -fi - -# Check that networking is up. -[ ${NETWORKING} = "no" ] && exit 1 - -# Check that smb.conf exists. -[ -f /etc/samba/smb.conf ] || exit 6 - -RETVAL=0 - - -start() { - KIND="SMB" - echo -n $"Starting $KIND services: " - daemon smbd $SMBDOPTIONS - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/smb || \ - RETVAL=1 - return $RETVAL -} - -stop() { - KIND="SMB" - echo -n $"Shutting down $KIND services: " - killproc smbd - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/smb - return $RETVAL -} - -restart() { - stop - start -} - -reload() { - echo -n $"Reloading smb.conf file: " - killproc smbd -HUP - RETVAL=$? - echo - return $RETVAL -} - -rhstatus() { - status -l smb smbd - return $? -} - - -# Allow status as non-root. -if [ "$1" = status ]; then - rhstatus - exit $? -fi - -# Check that we can write to it... so non-root users stop here -[ -w /etc/samba/smb.conf ] || exit 4 - - - -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - restart - ;; - reload) - reload - ;; - status) - rhstatus - ;; - condrestart) - [ -f /var/lock/subsys/smb ] && restart || : - ;; - *) - echo $"Usage: $0 {start|stop|restart|reload|status|condrestart}" - exit 2 -esac - -exit $? diff --git a/sources b/sources index 5b8f01b..ed94bb0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b23be56c15dd52f64eb7ba54c0ea1ed5 samba-3.6.7.tar.gz +9fd5a6ac70f724a66c6fa53b9161ea06 samba-4.0.0rc1.tar.bz2 diff --git a/winbind.init b/winbind.init deleted file mode 100644 index 88ce028..0000000 --- a/winbind.init +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/sh -# -# chkconfig: - 27 73 -# description: Starts and stops the Samba winbind daemon -# # -# pidfile: /var/run/winbindd.pid -# config: /etc/samba/smb.conf - - -# Source function library. -. /etc/rc.d/init.d/functions - -# Avoid using root's TMPDIR -unset TMPDIR - -# Source networking configuration. -. /etc/sysconfig/network - -# Check that networking is up. -[ ${NETWORKING} = "no" ] && exit 1 - -# Check that smb.conf exists. -[ -f /etc/samba/smb.conf ] || exit 6 - -[ -f /etc/sysconfig/samba ] && . /etc/sysconfig/samba - -RETVAL=0 - - -start() { - KIND="Winbind" - echo -n $"Starting $KIND services: " - daemon winbindd "$WINBINDOPTIONS" - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/winbindd || RETVAL=1 - return $RETVAL -} - -stop() { - echo - KIND="Winbind" - echo -n $"Shutting down $KIND services: " - killproc winbindd - RETVAL=$? - [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/winbindd - echo "" - return $RETVAL -} - -restart() { - stop - start -} - -reload() { - echo -n $"Reloading smb.conf file: " - killproc winbindd -HUP - RETVAL=$? - echo - return $RETVAL -} - -rhstatus() { - status winbindd - return $? -} - -# Allow status as non-root. -if [ "$1" = status ]; then - rhstatus - exit $? -fi - -# Check that we can write to it... so non-root users stop here -[ -w /etc/samba/smb.conf ] || exit 4 - -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - restart - ;; - reload) - reload - ;; - status) - rhstatus - ;; - condrestart) - [ -f /var/lock/subsys/winbindd ] && restart || : - ;; - *) - echo $"Usage: $0 {start|stop|restart|reload|status|condrestart}" - exit 2 -esac - -exit $?