diff options
Diffstat (limited to 'packaging')
203 files changed, 18412 insertions, 0 deletions
diff --git a/packaging/Debian/README b/packaging/Debian/README new file mode 100644 index 00000000000..95c75d5fc51 --- /dev/null +++ b/packaging/Debian/README @@ -0,0 +1,79 @@ +Building Samba Packages for Debian GNU/Linux +-------------------------------------------- + +Building Debian packages is not as hard as some people might think. +The following instructions will allow you to build your own Samba +Debian packages. These instructions and the files in packaging/Debian/ +are current as of Samba 3.0.0, and allow you to build Debian packages +for Debian unstable (so you need some development packages available +only in Debian unstable.) If you are using something newer than 3.0.0 +you might want to try to follow the instructions to see if patches +apply cleanly. If some patches don't apply cleanly please e-mail +samba@packages.debian.org since we might have fixed patches that we have +not yet integrated into upstream Samba. + +We try to maintain as much compatibility with previous releases +of Debian as possible, so it is possible that the files in +packaging/Debian/ can also be used to build Samba Debian packages for +other Debian releases. However, sometimes this is just not possible +because we need to use stuff that is only available on Debian unstable. + +Instructions +------------ + +If you want to build Samba packages for Debian and you just want to use +upstream sources, i.e. you don't want to wait for us to put official +packages out, or you want packages for a Debian version for which we +don't provide deb's, or you don't want to use official packages, or +you want to add --this-cool-switch to configure, or whatever, follow +these instructions: + +0) Make sure you have the following packages installed (in addition +to the normal Debian development packages -- dpkg-dev, libc6-dev, +devscripts, etc.): + + autoconf + debhelper + libpam0g-dev + libreadline4-dev + libcupsys2-dev + libacl1-dev, libacl1 (>= 2.2.11-1) + libkrb5-dev + libldap2-dev + po-debconf + python2.3-dev + + Notes regarding the packages required to build Samba Debian packages: + + * The libcupsys2-dev is not available in Debian Potato (Debian 2.2). + That's fine; the configure script won't detect CUPS support and the + resulting binaries won't support CUPS. + + * The list above is current as of samba-3.0.0rc2, but it can get + out of date. The best way to check what packages are required to + build the samba packages on Debian is to look for the Build-Depends: + field in the file debian/control. + +1) cd samba[-<version>]. For example, "cd samba-3.0.0rc2". +2) cp -a packaging/Debian/debian/ debian + It's important that you copy instead of symlink because the build + tools in Potato have a problem that prevents the build to work with + a symlink. +3) dch -i (this is completely optional - only do it if you understand + Debian version numbers! Don't complain later if you can't upgrade + to official versions of the Samba packages for Debian.) + - Edit the changelog and make sure the version is right. For example, + for Samba 3.0.0beta3, the version number should something like + 3.0.0beta3-0.1. +4) Run 'debian/rules binary'. + - It is better that you prefix the above command with 'fakeroot'. + If you have problems you might try building as root. +5) That's it. Your new packages should be in ../. Install with dpkg. + +Please e-mail samba@packages.debian.org with comments, questions or +suggestions. Please talk to us and not to the Samba Team. They have +better things to do and know nothing about the Debian packaging system. + +Eloy A. Paris <peloy@debian.org> +Steve Langasek <vorlon@debian.org> + diff --git a/packaging/Debian/debian/README.build b/packaging/Debian/debian/README.build new file mode 100644 index 00000000000..0a11a1f6ea6 --- /dev/null +++ b/packaging/Debian/debian/README.build @@ -0,0 +1,397 @@ +From: Steve Langasek <vorlon@netexpress.net> +To: "Eloy A. Paris" <eloy.paris@usa.net> +Date: Thu, 23 Aug 2001 21:20:05 -0500 (CDT) +Subject: Re: autobuilder failure on arm for samba-2.2.1a-3 +In-Reply-To: <20010823100906.A1092@antenas> +Message-ID: <Pine.LNX.4.30.0108231744090.11071-100000@tennyson.netexpress.net> +MIME-Version: 1.0 +Content-Type: TEXT/PLAIN; charset=US-ASCII + +On Thu, 23 Aug 2001, Eloy A. Paris wrote: + +> On Wed, Aug 22, 2001 at 03:01:01PM -0500, Steve Langasek wrote: + +> > Hmm. Maybe the thing to do is to focus on getting config.cache (not log, +> > cache) support into the package. Issues like this are frequent enough with +> > Samba, and the configure tests add enough time to the build process, that I +> > think there'd be much benefit in being able to step past a lot of these. + +> Uhhmmm... I don't know, I guess I don't like much the idea of +> maintaining a config.cache. It looks like extra work plus a +> compilation process that is "synthetic" or atificial. What happens if +> the Samba Team adds a new test, or modifies the configure script, will +> the config.cache pick those up? + +> In any case, you are the expert, so if you think that's the way to go, +> and the burden far exceeds the problems we have right now I say let's +> go for it. I am not well versed on autoconf and the configure process, +> that's all... + +Well, I'll attach my work to the bottom of this message and let you judge it +for yourself. + +The config.cache I'm trying to generate here is not equivalent to what +a configure script outputs. The only values I'm including are those which 1) +are no-brainers on any glibc-based platform, 2) are questions we need to force +a particular value for regardless of the kernel being built against, or 3) are +questions about specific bizarre features of proprietary Unices that we'll +always get an answer of 'no' to. + +I've removed all of the config.cache variables related to headers, or to +checks for particular libraries; I think it's pretty safe to assert that glibc +provides basic C functions like select(), setenv(), and waitpid() on all our +build targets, but I think it's less safe to assert that they'll always be +provided by particular header files. + +So the config.cache won't automatically be updated with answers to new +configure tests, but it also doesn't need to in order to be useful. There's +really only a handful of variables in there that we /need/ in order to +guarantee correctly-built packages, and if you want to leave out everything +else, that's perfectly ok too. Everything from the fifth stanza on down is +just a build-time speed-up for some of the slower architectures. Well, it +also has the fringe benefit that the packages will FAIL to build if someone +tries rebuilding for a really bizarre (non-Linux, non-glibc) architecture. I +see that as a plus :), you may disagree, but in any case my next trick would +be to add a global variable developers can set to bypass the provided +config.cache. + + +It is a little artificial, but the whole point of .debs is to be able to build +binaries in a controlled environment. Right now, we don't really have control +over what happens in the autobuilders. We have even /less/ control over what +happens in a stable release: it's been two weeks now since I built binaries +for bug #94380, and they haven't been uploaded to security.d.o yet. I'm +guessing they won't be uploaded until Wichert is back from vacation, either -- +which is fine, but it would be nice if we didn't have to worry about +mis-builds by the security team, or about putting the security team to extra +trouble after the fact to get packages fixed. + +With a pre-loaded config.cache, we can ensure that bugs of this kind don't +happen in woody. We can take the arm autobuilder problem into our own hands, +and not have to worry about quirkiness in the build environment. We can even +close bug #109773, since we no longer have to worry about detecting the +setuid() routines. + + +So to me, it definitely seems worth it. But you're the maintainer, and I +won't ask you to put anything in the package that you're not comfortable with. + + +> By the way, I think I remember someone was able to build 2.2.x succesfully on +> the ARM. If this is the case, could it be that there's something weird +> with Phillip's setup? + +It could be. There are arm packages for 2.2.1a-1, so at /some/ point the +autobuilder was able to pass the locking test. + + +> P.S. How did you know about the ARM build problems? I don't see any +> bugs about this... + +<http://ftp-master.debian.org/testing/>, follow the links for samba... The +exact reference for the arm autobuilder is at +<http://buildd.armlinux.org/~buildd/build.php?pkg=samba&ver=2.2.1a-4&arch=arm>. + +Regards, +Steve Langasek +postmodern programmer + + +diff -uNrw samba-2.2.1a-bak/debian/changelog samba-2.2.1a/debian/changelog +--- samba-2.2.1a-bak/debian/changelog Thu Aug 23 10:27:54 2001 ++++ samba-2.2.1a/debian/changelog Thu Aug 23 10:28:08 2001 +@@ -1,3 +1,12 @@ ++samba (2.2.1a-4.1) unstable; urgency=low ++ ++ * Fix up the build system to avoid needing to run configure as root to ++ answer questions we already know the answers to. ++ * In the process, make surprising progress towards being able to ++ cross-compile the samba packages. ++ ++ -- Steve Langasek <vorlon@debian.org> Wed, 22 Aug 2001 23:35:00 -0500 ++ + samba (2.2.1a-4) unstable; urgency=low + + * Fixed typo in smbmount's mount page. +diff -uNrw samba-2.2.1a-bak/debian/config.cache samba-2.2.1a/debian/config.cache +--- samba-2.2.1a-bak/debian/config.cache Wed Dec 31 18:00:00 1969 ++++ samba-2.2.1a/debian/config.cache Thu Aug 23 10:28:08 2001 +@@ -0,0 +1,231 @@ ++# ++# 22 August 2001 Steve Langasek <vorlon@debian.org> ++# ++# This file is a shell script that caches the results of configure ++# tests run on this system so they can be shared between configure ++# scripts and configure runs. It is not useful on other systems. ++# If it contains results you don't want to keep, you may remove or edit it. ++# ++# By default, configure uses ./config.cache as the cache file, ++# creating it if it does not exist already. You can give configure ++# the --cache-file=FILE option to use a different cache file; that is ++# what configure does when it calls configure scripts in ++# subdirectories, so they share the cache. ++# Giving --cache-file=/dev/null disables caching, for debugging configure. ++# config.status only pays attention to the cache file if you give it the ++# --recheck option to rerun configure. ++# ++# ++# This config.cache file contains a list of acceptable autoconf ++# values which can be used in compiling Samba for Debian woody/sid. ++# ++# Autoconf sorts options alphabetically in its output. This file ++# groups options logically. ++ ++ ++# Load any architecture-specific settings ++if [ -n "$DEB_HOST_GNU_TYPE" \ ++ -a -f ../debian/config.cache.${DEB_HOST_GNU_TYPE} ]; then ++ . ../debian/config.cache.${DEB_HOST_GNU_TYPE} ++fi ++ ++ ++# This is at the top because it's most in need of regular tweaking. ++# These are options which are supported on 2.4 kernels, but not on 2.2 ++# kernels. ++ ++samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=${samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no} ++samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=${samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no} ++samba_cv_HAVE_KERNEL_SHARE_MODES=${samba_cv_HAVE_KERNEL_SHARE_MODES=no} ++ ++ ++# These are present in 2.2 kernels, but not in 2.0... ++ ++samba_cv_have_setresuid=${samba_cv_have_setresuid=yes} ++samba_cv_have_setresgid=${samba_cv_have_setresgid=yes} ++samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=yes} ++ ++ ++# POSIX ACL support not present in Linux 2.2; not allowed in the ++# Debian packages, even if present on the build machine. ++ ++ac_cv_header_sys_acl_h=${ac_cv_header_sys_acl_h=no} ++ ++ ++# Various basic libc/compiler stuff that it's blindingly obvious that ++# Linux supports (now watch me get bitten for saying that) ++ ++ac_cv_c_const=${ac_cv_c_const=yes} ++ac_cv_c_inline=${ac_cv_c_inline=inline} ++samba_cv_volatile=${samba_cv_volatile=yes} ++ac_cv_dirent_d_off=${ac_cv_dirent_d_off=yes} ++ac_cv_func_bzero=${ac_cv_func_bzero=yes} ++ac_cv_func_chmod=${ac_cv_func_chmod=yes} ++ac_cv_func_chown=${ac_cv_func_chown=yes} ++ac_cv_func_chroot=${ac_cv_func_chroot=yes} ++ac_cv_func_connect=${ac_cv_func_connect=yes} ++ac_cv_func_dup2=${ac_cv_func_dup2=yes} ++ac_cv_func_execl=${ac_cv_func_execl=yes} ++ac_cv_func_fchmod=${ac_cv_func_fchmod=yes} ++ac_cv_func_fchown=${ac_cv_func_fchown=yes} ++ac_cv_func_fstat=${ac_cv_func_fstat=yes} ++ac_cv_func_fsync=${ac_cv_func_fsync=yes} ++ac_cv_func_ftruncate=${ac_cv_func_ftruncate=yes} ++ac_cv_func_getcwd=${ac_cv_func_getcwd=yes} ++ac_cv_func_getgrent=${ac_cv_func_getgrent=yes} ++ac_cv_func_getgrnam=${ac_cv_func_getgrnam=yes} ++ac_cv_func_getspnam=${ac_cv_func_getspnam=yes} ++ac_cv_func_glob=${ac_cv_func_glob=yes} ++ac_cv_func_grantpt=${ac_cv_func_grantpt=yes} ++ac_cv_func_initgroups=${ac_cv_func_initgroups=yes} ++ac_cv_func_llseek=${ac_cv_func_llseek=yes} ++ac_cv_func_memcmp_clean=${ac_cv_func_memcmp_clean=yes} ++ac_cv_func_memmove=${ac_cv_func_memmove=yes} ++ac_cv_func_memset=${ac_cv_func_memset=yes} ++ac_cv_func_mktime=${ac_cv_func_mktime=yes} ++ac_cv_func_pipe=${ac_cv_func_pipe=yes} ++ac_cv_func_poll=${ac_cv_func_poll=yes} ++ac_cv_func_pread=${ac_cv_func_pread=yes} ++ac_cv_func_pwrite=${ac_cv_func_pwrite=yes} ++ac_cv_func_rand=${ac_cv_func_rand=yes} ++ac_cv_func_random=${ac_cv_func_random=yes} ++ac_cv_func_readlink=${ac_cv_func_readlink=yes} ++ac_cv_func_rename=${ac_cv_func_rename=yes} ++ac_cv_func_select=${ac_cv_func_select=yes} ++ac_cv_func_setenv=${ac_cv_func_setenv=yes} ++ac_cv_func_setgroups=${ac_cv_func_setgroups=yes} ++ac_cv_func_setsid=${ac_cv_func_setsid=yes} ++ac_cv_func_sigaction=${ac_cv_func_sigaction=yes} ++ac_cv_func_sigblock=${ac_cv_func_sigblock=yes} ++ac_cv_func_sigprocmask=${ac_cv_func_sigprocmask=yes} ++ac_cv_func_snprintf=${ac_cv_func_snprintf=yes} ++ac_cv_func_srand=${ac_cv_func_srand=yes} ++ac_cv_func_srandom=${ac_cv_func_srandom=yes} ++ac_cv_func_strcasecmp=${ac_cv_func_strcasecmp=yes} ++ac_cv_func_strchr=${ac_cv_func_strchr=yes} ++ac_cv_func_strdup=${ac_cv_func_strdup=yes} ++ac_cv_func_strerror=${ac_cv_func_strerror=yes} ++ac_cv_func_strftime=${ac_cv_func_strftime=yes} ++ac_cv_func_strpbrk=${ac_cv_func_strpbrk=yes} ++ac_cv_func_strtoul=${ac_cv_func_strtoul=yes} ++ac_cv_func_symlink=${ac_cv_func_symlink=yes} ++ac_cv_func_usleep=${ac_cv_func_usleep=yes} ++ac_cv_func_utime=${ac_cv_func_utime=yes} ++ac_cv_func_utimes=${ac_cv_func_utimes=yes} ++ac_cv_func_vsnprintf=${ac_cv_func_vsnprintf=yes} ++ac_cv_func_waitpid=${ac_cv_func_waitpid=yes} ++ac_cv_type_ino_t=${ac_cv_type_ino_t=yes} ++ac_cv_type_mode_t=${ac_cv_type_mode_t=yes} ++ac_cv_type_pid_t=${ac_cv_type_pid_t=yes} ++ac_cv_type_size_t=${ac_cv_type_size_t=yes} ++ac_cv_type_uid_t=${ac_cv_type_uid_t=yes} ++samba_cv_socklen_t=${samba_cv_socklen_t=yes} ++ ++# Yes, we know Linux supports fcntl locking. Just ignore ++# any errors caused by building on an NFS mount. ++samba_cv_HAVE_FCNTL_LOCK=${samba_cv_HAVE_FCNTL_LOCK=yes} ++ ++ ++# smbwrapper doesn't work because the glibc maintainers don't want ++# to support transparent userland VFS. We might as well preempt ++# any checks for shadowed symbols that are only useful for smbwrapper. ++ ++ac_cv_func___acl=${ac_cv_func___acl=no} ++ac_cv_func__acl=${ac_cv_func__acl=no} ++ac_cv_func___chdir=${ac_cv_func___chdir=no} ++ac_cv_func__chdir=${ac_cv_func__chdir=no} ++ac_cv_func___close=${ac_cv_func___close=no} ++ac_cv_func__close=${ac_cv_func__close=no} ++ac_cv_func___closedir=${ac_cv_func___closedir=no} ++ac_cv_func__closedir=${ac_cv_func__closedir=no} ++ac_cv_func___dup=${ac_cv_func___dup=no} ++ac_cv_func__dup=${ac_cv_func__dup=no} ++ac_cv_func___dup2=${ac_cv_func___dup2=no} ++ac_cv_func__dup2=${ac_cv_func__dup2=no} ++ac_cv_func___facl=${ac_cv_func___facl=no} ++ac_cv_func__facl=${ac_cv_func__facl=no} ++ac_cv_func___fchdir=${ac_cv_func___fchdir=no} ++ac_cv_func__fchdir=${ac_cv_func__fchdir=no} ++ac_cv_func___fcntl=${ac_cv_func___fcntl=no} ++ac_cv_func__fcntl=${ac_cv_func__fcntl=no} ++ac_cv_func___fork=${ac_cv_func___fork=no} ++ac_cv_func__fork=${ac_cv_func__fork=no} ++ac_cv_func___fstat=${ac_cv_func___fstat=no} ++ac_cv_func__fstat=${ac_cv_func__fstat=no} ++ac_cv_func___fstat64=${ac_cv_func___fstat64=no} ++ac_cv_func__fstat64=${ac_cv_func__fstat64=no} ++ac_cv_func___fxstat=${ac_cv_func___fxstat=no} ++ac_cv_func___getcwd=${ac_cv_func___getcwd=no} ++ac_cv_func__getcwd=${ac_cv_func__getcwd=no} ++ac_cv_func___getdents=${ac_cv_func___getdents=no} ++ac_cv_func__getdents=${ac_cv_func__getdents=no} ++ac_cv_func___llseek=${ac_cv_func___llseek=no} ++ac_cv_func___sys_llseek=${ac_cv_func___sys_llseek=no} ++ac_cv_func__llseek=${ac_cv_func__llseek=no} ++ac_cv_func___lseek=${ac_cv_func___lseek=no} ++ac_cv_func__lseek=${ac_cv_func__lseek=no} ++ac_cv_func___lstat=${ac_cv_func___lstat=no} ++ac_cv_func__lstat=${ac_cv_func__lstat=no} ++ac_cv_func___lstat64=${ac_cv_func___lstat64=no} ++ac_cv_func__lstat64=${ac_cv_func__lstat64=no} ++ac_cv_func___lxstat=${ac_cv_func___lxstat=no} ++ac_cv_func___open=${ac_cv_func___open=no} ++ac_cv_func__open=${ac_cv_func__open=no} ++ac_cv_func___open64=${ac_cv_func___open64=no} ++ac_cv_func__open64=${ac_cv_func__open64=no} ++ac_cv_func___opendir=${ac_cv_func___opendir=no} ++ac_cv_func__opendir=${ac_cv_func__opendir=no} ++ac_cv_func___pread=${ac_cv_func___pread=no} ++ac_cv_func__pread=${ac_cv_func__pread=no} ++ac_cv_func___pread64=${ac_cv_func___pread64=no} ++ac_cv_func__pread64=${ac_cv_func__pread64=no} ++ac_cv_func___pwrite=${ac_cv_func___pwrite=no} ++ac_cv_func__pwrite=${ac_cv_func__pwrite=no} ++ac_cv_func___pwrite64=${ac_cv_func___pwrite64=no} ++ac_cv_func__pwrite64=${ac_cv_func__pwrite64=no} ++ac_cv_func___read=${ac_cv_func___read=no} ++ac_cv_func__read=${ac_cv_func__read=no} ++ac_cv_func___readdir=${ac_cv_func___readdir=no} ++ac_cv_func__readdir=${ac_cv_func__readdir=no} ++ac_cv_func___readdir64=${ac_cv_func___readdir64=no} ++ac_cv_func__readdir64=${ac_cv_func__readdir64=no} ++ac_cv_func___seekdir=${ac_cv_func___seekdir=no} ++ac_cv_func__seekdir=${ac_cv_func__seekdir=no} ++ac_cv_func___stat=${ac_cv_func___stat=no} ++ac_cv_func__stat=${ac_cv_func__stat=no} ++ac_cv_func___stat64=${ac_cv_func___stat64=no} ++ac_cv_func__stat64=${ac_cv_func__stat64=no} ++ac_cv_func___telldir=${ac_cv_func___telldir=no} ++ac_cv_func__telldir=${ac_cv_func__telldir=no} ++ac_cv_func___write=${ac_cv_func___write=no} ++ac_cv_func__write=${ac_cv_func__write=no} ++ac_cv_func___xstat=${ac_cv_func___xstat=no} ++ ++ ++ ++# Miscellaneous stuff that isn't, and shouldn't be, available ++# in Debian. Those interested in building debs for other systems may ++# need to remove some of these defines. ++ ++ac_cv_func_bigcrypt=${ac_cv_func_bigcrypt=no} ++ac_cv_func_crypt16=${ac_cv_func_crypt16=no} ++ac_cv_func_getauthuid=${ac_cv_func_getauthuid=no} ++ac_cv_func_getprpwnam=${ac_cv_func_getprpwnam=no} ++ac_cv_func_getpwanam=${ac_cv_func_getpwanam=no} ++ac_cv_func_putprpwnam=${ac_cv_func_putprpwnam=no} ++ac_cv_func_rdchk=${ac_cv_func_rdchk=no} ++ac_cv_func_set_auth_parameters=${ac_cv_func_set_auth_parameters=no} ++ac_cv_func_setgidx=${ac_cv_func_setgidx=no} ++ac_cv_func_setluid=${ac_cv_func_setluid=no} ++ac_cv_func_setpriv=${ac_cv_func_setpriv=no} ++ac_cv_func_setuidx=${ac_cv_func_setuidx=no} ++ac_cv_lib_sec_bigcrypt=${ac_cv_lib_sec_bigcrypt=no} ++ac_cv_lib_sec_getprpwnam=${ac_cv_lib_sec_getprpwnam=no} ++ac_cv_lib_sec_getspnam=${ac_cv_lib_sec_getspnam=no} ++ac_cv_lib_sec_putprpwnam=${ac_cv_lib_sec_putprpwnam=no} ++ac_cv_lib_sec_set_auth_parameters=${ac_cv_lib_sec_set_auth_parameters=no} ++ac_cv_lib_security_bigcrypt=${ac_cv_lib_security_bigcrypt=no} ++ac_cv_lib_security_getprpwnam=${ac_cv_lib_security_getprpwnam=no} ++ac_cv_lib_security_getspnam=${ac_cv_lib_security_getspnam=no} ++ac_cv_lib_security_putprpwnam=${ac_cv_lib_security_putprpwnam=no} ++ac_cv_lib_security_set_auth_parameters=${ac_cv_lib_security_set_auth_parameters=no} +diff -uNrw samba-2.2.1a-bak/debian/config.cache.alpha-linux samba-2.2.1a/debian/config.cache.alpha-linux +--- samba-2.2.1a-bak/debian/config.cache.alpha-linux Wed Dec 31 18:00:00 1969 ++++ samba-2.2.1a/debian/config.cache.alpha-linux Thu Aug 23 10:28:08 2001 +@@ -0,0 +1,12 @@ ++# 22 Aug 2001 Steve Langasek <vorlon@debian.org> ++ ++# This file contains autoconf settings specific to the alpha-linux ++# platform that should be preloaded when building for this architecture. ++ ++ ++# Linux 2.2 on Alpha doesn't have a functional setresgid() call, but ++# Linux 2.4 does. Ensure that packages compiled for woody remain ++# compatible with 2.2 kernels, even if the build machine is running 2.4. ++samba_cv_have_setresgid=${samba_cv_have_setresgid=no} ++samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=no} ++samba_cv_USE_SETREUID=${samba_cv_USE_SETREUID=yes} +diff -uNrw samba-2.2.1a-bak/debian/rules samba-2.2.1a/debian/rules +--- samba-2.2.1a-bak/debian/rules Thu Aug 23 10:27:54 2001 ++++ samba-2.2.1a/debian/rules Thu Aug 23 10:28:08 2001 +@@ -15,6 +15,14 @@ + # This has to be exported to make some magic below work. + export DH_OPTIONS + ++# Set the host and build architectures for use with config.cache loading, ++# cross-building, etc. ++DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) ++DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) ++ ++export DEB_HOST_GNU_TYPE ++export DEB_BUILD_GNU_TYPE ++ + BVARS = SMBLOGFILE=/var/log/smb NMBLOGFILE=/var/log/nmb + + DESTDIR=`pwd`/debian/samba +@@ -48,8 +56,11 @@ + # ./configure --with-fhs --prefix=/usr --sysconfdir=/etc \ + # --localstatedir=/var + ++ if [ -f debian/config.cache ]; then \ ++ cp -f debian/config.cache source/config.cache; \ ++ fi + # [ -f source/Makefile ] || (cd source && ./configure --with-fhs --prefix=/usr --exec-prefix=/usr --with-netatalk --with-smbmount --with-pam --with-syslog --with-sambabook --with-utmp) +- [ -f source/Makefile ] || (cd source && ./configure --with-fhs --prefix=/usr --sysconfdir=/etc --with-privatedir=/etc/samba --with-lockdir=/var/state/samba --localstatedir=/var --with-netatalk --with-smbmount --with-pam --with-syslog --with-sambabook --with-utmp --with-readline --with-pam_smbpass) ++ [ -f source/Makefile ] || (cd source && ./configure --host=$(DEB_HOST_GNU_TYPE)-gnu --build=$(DEB_BUILD_GNU_TYPE)-gnu --with-fhs --prefix=/usr --sysconfdir=/etc --with-privatedir=/etc/samba --with-lockdir=/var/state/samba --localstatedir=/var --with-netatalk --with-smbmount --with-pam --with-syslog --with-sambabook --with-utmp --with-readline --with-pam_smbpass) + + touch configure-stamp + diff --git a/packaging/Debian/debian/README.build-upstream b/packaging/Debian/debian/README.build-upstream new file mode 100644 index 00000000000..95c75d5fc51 --- /dev/null +++ b/packaging/Debian/debian/README.build-upstream @@ -0,0 +1,79 @@ +Building Samba Packages for Debian GNU/Linux +-------------------------------------------- + +Building Debian packages is not as hard as some people might think. +The following instructions will allow you to build your own Samba +Debian packages. These instructions and the files in packaging/Debian/ +are current as of Samba 3.0.0, and allow you to build Debian packages +for Debian unstable (so you need some development packages available +only in Debian unstable.) If you are using something newer than 3.0.0 +you might want to try to follow the instructions to see if patches +apply cleanly. If some patches don't apply cleanly please e-mail +samba@packages.debian.org since we might have fixed patches that we have +not yet integrated into upstream Samba. + +We try to maintain as much compatibility with previous releases +of Debian as possible, so it is possible that the files in +packaging/Debian/ can also be used to build Samba Debian packages for +other Debian releases. However, sometimes this is just not possible +because we need to use stuff that is only available on Debian unstable. + +Instructions +------------ + +If you want to build Samba packages for Debian and you just want to use +upstream sources, i.e. you don't want to wait for us to put official +packages out, or you want packages for a Debian version for which we +don't provide deb's, or you don't want to use official packages, or +you want to add --this-cool-switch to configure, or whatever, follow +these instructions: + +0) Make sure you have the following packages installed (in addition +to the normal Debian development packages -- dpkg-dev, libc6-dev, +devscripts, etc.): + + autoconf + debhelper + libpam0g-dev + libreadline4-dev + libcupsys2-dev + libacl1-dev, libacl1 (>= 2.2.11-1) + libkrb5-dev + libldap2-dev + po-debconf + python2.3-dev + + Notes regarding the packages required to build Samba Debian packages: + + * The libcupsys2-dev is not available in Debian Potato (Debian 2.2). + That's fine; the configure script won't detect CUPS support and the + resulting binaries won't support CUPS. + + * The list above is current as of samba-3.0.0rc2, but it can get + out of date. The best way to check what packages are required to + build the samba packages on Debian is to look for the Build-Depends: + field in the file debian/control. + +1) cd samba[-<version>]. For example, "cd samba-3.0.0rc2". +2) cp -a packaging/Debian/debian/ debian + It's important that you copy instead of symlink because the build + tools in Potato have a problem that prevents the build to work with + a symlink. +3) dch -i (this is completely optional - only do it if you understand + Debian version numbers! Don't complain later if you can't upgrade + to official versions of the Samba packages for Debian.) + - Edit the changelog and make sure the version is right. For example, + for Samba 3.0.0beta3, the version number should something like + 3.0.0beta3-0.1. +4) Run 'debian/rules binary'. + - It is better that you prefix the above command with 'fakeroot'. + If you have problems you might try building as root. +5) That's it. Your new packages should be in ../. Install with dpkg. + +Please e-mail samba@packages.debian.org with comments, questions or +suggestions. Please talk to us and not to the Samba Team. They have +better things to do and know nothing about the Debian packaging system. + +Eloy A. Paris <peloy@debian.org> +Steve Langasek <vorlon@debian.org> + diff --git a/packaging/Debian/debian/README.debian b/packaging/Debian/debian/README.debian new file mode 100644 index 00000000000..3802e329e53 --- /dev/null +++ b/packaging/Debian/debian/README.debian @@ -0,0 +1,163 @@ +Samba for Debian +---------------- + +This package was built by Eloy Paris <peloy@debian.org> and Steve Langasek +<vorlon@debian.org>, current maintainers of the Samba packages for Debian, +based on previous work from Bruce Perens <Bruce@Pixar.com>, Andrew +Howell <andrew@it.com.au>, Klee Dienes <klee@debian.org> and Michael +Meskes <meskes@topsystem.de>, all previous maintainers of the packages +samba and sambades (merged together for longer than we can remember.) + +Contents of this README file: + +1. Notes +2. Upgrading from Samba 2.2 +3. Packages Generated from the Samba Sources +4. Support for NT Domains +5. Reporting bugs + + +1. Notes +-------- + +- As of Samba 2.0.6-1, the Debian version of Samba is compiled with + Pluggable Authentication Modules (PAM) support. PAM support was + discontinued during the libc5 -> libc6 migration process and I never + brought it back until 2.0.6-1. + +- The smbfs package does not support the 2.0.x Linux kernels anymore. + This has been the case since the very first packages of the CVS sources + that eventually became Samba 2.2. To use the smbfs package you need to + run a 2.2.x kernel or later. + +- Starting with the Debian packages for Samba 2.2, the Samba log files (for + nmbd and smbd) have been moved to a new location: /var/log/samba/. The + files also have new names: log.nmbd and log.smbd. The old files + (/var/log/{nmb,smb} were moved to the new location. + + +2. Upgrading from Samba 2.2 +--------------------------- + +Samba 3.0 provides greatly improved support for modern Windows systems, +including support for Unicode and LDAP. In the process, Samba 3.0 +necessarily also breaks backward compatiblity with past releases. These +issues are documented herein; if you are aware of other problems related +to upgrading from Samba 2.2, please let us know at +<samba@packages.debian.org>. + +Samba and LDAP +-------------- +Starting with Samba 2.999+3.0cvs20020723-1 we are building Samba with +LDAP support. However, the LDAP schema for Samba 3.0 differs +substantially from the schema used by many sites with Samba 2.2 (not +enabled in the Debian packages). If upgrading from an LDAP-enabled 2.2, +you will need to run the convertSambaAccount script found in +/usr/share/doc/samba-doc/examples/LDAP. A copy of the schema itself can +also be found at /usr/share/doc/samba-doc/examples/LDAP/samba.schema. + +Character Sets +-------------- +Samba 3.0 introduces support for negotiating Unicode (UCS-2LE) with +Windows clients. Owing to the close similarity between Windows and Unix +NLS charsets, in the past, many users were able to pass filenames +containing non-ASCII characters between clients and servers without +configuring Samba to know what character set was in use. Now, Samba +must be able to convert Unix filenames to Unicode before sending to the +client, so Samba must know what character set the filenames are being +converted from. If you will be sharing files with non-ASCII names, and +the filenames are not encoded with UTF-8, you will need to tell Samba +which character set to use with the 'unix charset' option. + +If you had previously specified 'character set' and 'client code page' +options under 2.2, these settings should be automatically converted for +you. + + +3. Packages Generated from the Samba Sources +-------------------------------------------- + +Currently, the Samba sources produce the following binary packages: + +samba: A LanManager like file and printer server for Unix. +samba-common: Samba common files used by both the server and the client. +smbclient: A LanManager like simple client for Unix. +swat: Samba Web Administration Tool +samba-doc: Samba documentation. +smbfs: Mount and umount commands for the smbfs (works with 2.2.x and + above kernels, not with 2.0.x kernels.) +libpam-smbpass: pluggable authentication module for SMB password + database. +libsmbclient: Shared library that allows applications to talk to SMB servers. +libsmbclient-dev: libsmbclient shared libraries. +winbind: Service to resolve user and group information from a Windows NT + server. +python2.2-samba: Python bindings that allow access to various aspects of + Samba. + +Please note that the package smbwrapper (a shared library that provides +SMB client services that existed between Samba 2.0.0-1 and Samba-2.0.5a-4 +does not exist any more. The reason is that starting with Samba 2.0.6-1, that +code does not even compile, and the upstream author (Andrew Tridgell) +recommended to disable the compilation of smbwrapper until some issues +with glibc2.1 get cleared out (the problem is with glibc, not with Samba +itself). + + +4. Support for NT Domains +------------------------- + +Samba 2.2 includes preliminary support for NT domains. A Samba server +can now be part of a Windows NT domain whose Primary Domain Controller +is a Windows NT server. This feature is supposed to be stable although I +haven't tried it myself. Read the documentation in the samba-doc package +for help on how to do this (hint: "security = domain" in the smb.conf +file). + +Samba 2.2 has also experimental support for Primary Domain +Controller. This means that a Samba server can act now as a PDC. There +are no special flags needed to compile Samba with NT domain PDC +support. Please read the NTDOM PDC FAQ at www.samba.org (Documentation +section). + +Please note that NT domain PDC support is far from complete and is still +experimental. + + +5. Reporting Bugs +----------------- + +If you believe you have found a bug please make sure the possible bug +also exists in the latest version of Samba that is available for the +unstable Debian distribution. If you are running Debian stable this +means that you will probably have to build your own packages. And if the +problem does not exist in the latest version of Samba we have packaged it +means that you will have to run the version of Samba you built yourself +since it is not easy to upload new packages to the stable distribution, +unless they fix critical security problems. + +If you can reproduce the problem in the latest version of Samba then +it is likely to be a real bug. Your best shot is to search the Samba +mailing lists to see if it is something that has already been reported +and fixed - if it is a simple fix we can add the patch to our packages +without waiting for a new Samba release. + +If you decide that your problem deserves to be submitted to the Debian +Bug Tracking System (BTS) we expect you to be responsive if we request +more information. If we request more information and do not receive +any in a reasonable time frame expect to see your bug closed without +explanation - we can't fix bugs we can't reproduce, and most of the +time we need more information to be able to reproduce them. + +When submitting a bug to the Debian BTS please include the version of +the Debian package you are using as well as the Debian distribution you +are using. Think _twice_ about the severity you assign to the bug: we +are _very_ sensitive about bug severities; the fact that it doesn't +work for you doesn't mean that the severity must be such that it holds +a major Debian release. In fact, that it doesn't work for you it +doesn't mean that it doesn't work for others. So again: think _twice_. + + +Eloy A. Paris <peloy@debian.org> +Steve Langasek <vorlon@debian.org> + diff --git a/packaging/Debian/debian/TODO b/packaging/Debian/debian/TODO new file mode 100644 index 00000000000..5883f72a92b --- /dev/null +++ b/packaging/Debian/debian/TODO @@ -0,0 +1,4 @@ +Nothing in our list right now. + +Debian Samba Maintainers.- +Sun Apr 6 01:34:21 EST 2003 diff --git a/packaging/Debian/debian/changelog b/packaging/Debian/debian/changelog new file mode 100644 index 00000000000..0561f063fa6 --- /dev/null +++ b/packaging/Debian/debian/changelog @@ -0,0 +1,2266 @@ +samba (3.0.0-1) unstable; urgency=low + + * Local build. + + -- Debian User <somebody@somewhere.com> Tue, 23 Sep 2003 21:50:26 -0400 + +samba (3.0.0beta2+3.0.0rc4-1) unstable; urgency=low + + * New upstream version. + + -- Eloy A. Paris <peloy@debian.org> Sat, 13 Sep 2003 08:47:56 -0400 + +samba (3.0.0beta2+3.0.0rc3-1) unstable; urgency=low + + * New upstream release. Last Release Candidate according to the + Samba Team. Samba 3.0.0 is around the corner, in a week or so. + - Fixes use of non-PIC code in nss shared libraries (closes: #208773) + - 'unix password sync' option now runs the unix password program as + root again (closes: #209739). + * One-line patch to make packages buildable with distcc (closes: #210227) + + -- Eloy A. Paris <peloy@debian.org> Tue, 9 Sep 2003 07:57:16 -0400 + +samba (3.0.0beta2+3.0.0rc2-1) unstable; urgency=low + + * New upstream release. + * Incorporate Dutch debconf translations; thanks to Bart Cornelis + <cobaco@linux.be>. (closes: #207824) + * Link against libgnutls7 instead of libgnutls5. (closes: #208151) + + -- Eloy A. Paris <peloy@debian.org> Tue, 2 Sep 2003 21:37:13 -0400 + +samba (3.0.0beta2+3.0.0rc1-1) unstable; urgency=low + + * New upstream version (skipped samba 3.0.0beta3 due to time + constraints.) This ugly version number will go away when the final + Samba 3.0.0 is released. + * Drag new unpackaged tools into the packages: smbcquotas (smbclient), + vfs modules (samba), smbtree(1) manpage (smbclient), tdbbackup(8) + manpage (samba). (closes: #151158) + * Switch to DH_COMPAT level 4: + - no explicit conffile listings needed + - the postinst for libsmbclient is now completely autogenerated + - use the default init script handling (with support for + invoke-rc.d) in debhelper, instead of the currently buggy upgrade + path (closes: #185439) + - add support for ${misc:Depends} in control for those packages with + init scripts + * Add versioned dependency on libpam-runtime and change + /etc/pam.d/samba to use the new common PAM config blocks. + * New python2.3-samba package (old python2.2-samba is no more.) + (closes: #206171) + + -- Eloy A. Paris <peloy@debian.org> Mon, 25 Aug 2003 17:05:14 -0400 + +samba (3.0.0beta2-1) unstable; urgency=low + + * New upstream release + - The smb.conf(5) manpage documents config options again + (closes: #197963). + - Handling of winbind/idmap has been restructured; domain members + should be able to map domain accounts to local accounts again + (closes: #196815). + - Use the locale charset for 'display charset' by default + (closes: #194406). + - Fix for segfault in smbclient when using the -b option + (closes: #196833). + - Handle an empty 'passdb backend' list gracefully (closes: #193946). + * Don't set 'display charset' anymore on upgrade, since this is now + grabbed from the locale by default -- a much better option. + * Removed time.c.patch which is now in the upstream sources. + * Update FHS patch for two new tdb files (netsamlogon_cache.tdb, + privilege.tdb). + * Remove python-linker.patch, since the Kerberos package has been + fixed to no longer use rpath + * Remove configure.patch: the hppa glibc bug this was added for is + long since fixed, and upstream isn't interested in supporting this + kludge. + * Update references to missing documentation in sample smb.conf file + (closes: #187632). + * Fix handling of krb5 link line, building on a patch from Stefan + Metzmacher <metze@metzemix.de>. + * Add patch so smbclient's tar support works with popt + (closes: #194921). + + -- Steve Langasek <vorlon@debian.org> Wed, 2 Jul 2003 20:59:09 -0500 + +samba (3.0.0beta1-2) unstable; urgency=low + + * Update build-deps to libacl1-dev (>= 2.2.11-1), libacl1 (>= 2.2.11-1) + to make sure we get the right shlib dependencies (closes: #193149). + * Update the dhcp config hooks so they're suitable for sourcing (i.e., + don't call "exit") (closes: #196477). + * Bring package into line with current policy by adding support for + the DEB_BUILD_OPTIONS flag, and enabling debugging symbols (-gstabs) + by default + * Make sure libpam-smbpass is a self-contained DSO. + * Fix a typo in samba-common.dhcp that caused us to spuriously rewrite + the server list. + * Fix python install script to ignore -Wl linker flags, as seen in the + output from the latest krb5-config. + * Add LDAP and Unicode information about upgrading from 2.2 to + README.debian. + * Remove dangerous and confusing browse options from the default + smb.conf (closes: #198804). + * Reorder smb.conf options for clearer grouping, and clarify the + comments. + * Add a default [print$] share to the sample smb.conf, and create the + necessary tree under /var/lib/samba/printers. (closes: #168173) + * s/winbind/idmap/ in smb.conf, since the option names have changed. + * Fix the patch for postexec handling, so that we chdir("/") at the + right time. + + -- Steve Langasek <vorlon@debian.org> Thu, 12 Jun 2003 15:02:00 -0500 + +samba (3.0.0beta1-1) unstable; urgency=low + + * New upstream version. + - fix for empty browselist bug (closes: #194553) + - fix for tab completion segfault in smbclient (closes: #194776) + - Samba now works as a domain member again without segfaulting + (closes: #194134, #194394, #194775) + - WinXP machines can join a Samba-controlled domain again + (closes: #195362) + * Build-depend on python-dev >= 2.2 instead of on just python-dev + (without version). + * Added Vorlon'n patch to source/lib/time.c to fix #194075. + (closes: #194075) + + -- Eloy A. Paris <peloy@debian.org> Sun, 8 Jun 2003 22:26:43 -0400 + +samba (2.999+3.0.alpha24-3) unstable; urgency=low + + * Make sure Samba DSOs are compiled with -fPIC. (closes: #194324) + * Rebuild against pristine Kerberos libs, to squelch warnings about + versioned symbols. (closes: #194431, #194396) + + -- Steve Langasek <vorlon@debian.org> Thu, 22 May 2003 15:32:00 -0500 + +samba (2.999+3.0.alpha24-2) unstable; urgency=low + + * Fixed description of the smbfs package. (closes: #194183) + * Negate the sense of the unixsam check when upgrading. (closes: #194234) + + -- Steve Langasek <vorlon@debian.org> Wed, 21 May 2003 12:21:53 -0400 + +samba (2.999+3.0.alpha24-1) unstable; urgency=low + + * New upstream version. (closes: #189354) + + -- Eloy A. Paris <peloy@debian.org> Tue, 20 May 2003 13:55:57 -0400 + +samba (2.999+3.0.alpha23-5) unstable; urgency=low + + * Move the python package from section "net" to section "python". + * Make sure we use PIC code for python on all platforms. + * French translation of an additional debconf template, courtesy of + Christian Perrier <bubulle@debian.org>. (closes: #188832) + * Updated Brazilian Portuguese translation from André LuÃs Lopes + <andrelop@ig.com.br>. + * s/unixsam/guest/ everywhere, since the unixsam backend is now + deprecated. (closes: #190095) + * Create our temp config file as /etc/samba/smb.conf.dpkg-tmp; not + only does using /tmp violate SELinux policies, it introduces the + possibility of data loss during the final copy if /tmp is a separate + filesystem. (closes: #189823) + * Pull in fix for SWAT, so that logins work again + (closes: #188255, #192077). + * Move passdb.tdb into /var/lib/samba, since it's not user-editable. + * Make sure with don't ship any .cvsignore files. + * Don't ship examples for python2.2-samba and samba-doc in an + "examples" directory inside another "examples" directory. + + -- Eloy A. Paris <peloy@debian.org> Tue, 6 May 2003 12:05:46 -0400 + +samba (2.999+3.0.alpha23-4) unstable; urgency=low + + * Instead of s/LPT1:/LPT:/, we need to do s/LPT:/LPT1:/ -- now all + non-RPC printing clients are working again. + * Change shlibs to 0 instead of 0.1. The library already in the + archive is using this soname, and there are no packages depending + on libsmbclient, so skip changing the package name for now. + (closes: #188661) + + -- Steve Langasek <vorlon@debian.org> Fri, 11 Apr 2003 14:42:00 -0500 + +samba (2.999+3.0.alpha23-3) unstable; urgency=low + + * Put the Samba Python modules in /usr/lib/python2.2/site-packages/, + not in /usr/lib/python2.2/lib-dynload/. + + -- Eloy A. Paris <peloy@debian.org> Wed, 9 Apr 2003 19:49:25 -0400 + +samba (2.999+3.0.alpha23-2) unstable; urgency=low + + * New package python2.2-samba that includes the Python modules + included in the Samba sources. Feedback on these modules and the new + package is welcome, as we (Debian Samba maintainers) don't use them. + (closes: #170731, #173322) + * Move libsmbclient-dev from section "devel" to "libdevel". + * Fix panic action script to give a sensible error message instead of + an empty backtrace when we don't have permission to attach to the + process. (closes: #188164) + * Fix libpam-smbpass so that it really does something. (closes: #178245) + * Apply patch to fix printing-related segfaults. (closes: #188076) + + -- Eloy A. Paris <peloy@debian.org> Sun, 6 Apr 2003 21:40:33 -0400 + +samba (2.999+3.0.alpha23-1) unstable; urgency=high + + * new upstream release, includes security fix for DSA-262 + * tweak the debconf templates to avoid references to specific + front-ends (closes: #183718) + + -- Steve Langasek <vorlon@debian.org> Sun, 9 Mar 2003 14:58:00 -0600 + +samba (2.999+3.0.alpha21-5) unstable; urgency=low + + * touch up the package descriptions a little bit (caps, punctuation) + * remove addtosmbpass, which snuck back in when we weren't looking + * reverse the position of the wins server tag, after looking more + closely at the code (closes: #183061) + * fix a glitch in the Spanish .po that rendered it invalid, plus a typo + * updated Brazilian Portuguese templates (closes: #183295) + * fix a typo in upstream manpage (s/shave/share/) (closes: #180546) + * run sed before we run sed, to deal with crazybad special chars + in the workgroup name (!) (closes: #176717) + + -- Steve Langasek <vorlon@debian.org> Sat, 1 Mar 2003 15:14:00 -0600 + +samba (2.999+3.0.alpha21-4) unstable; urgency=low + + * add scripts to samba-common to grab the netbios-name-servers options + if we're running a DHCP client (closes: #38413) + * major rearrangement of build scripts: install target now operates on + debian/tmp, not debian/samba, so we can see when new files are + added and decide where to put them; several files that should have + been in samba-common but were in samba (for the above reason) -- + smbcacls, -- have been moved, with a replaces: added. + * Fix rc script so that whitespace is consistent between inetd and + daemon modes (closes: #174677). + * smbclient -M must always connect to port 139, because port 445 + doesn't support messaging and we can't do the port 135 stuff yet + (closes: #175292, #167859). + * Import the diff from upstream CVS, which has fixed a few bugs + (closes: #178219, #177583, #181467, #181487, #181603, #175864). + Remove a few patches of ours which are now superseded. + * Add po-debconf support to the tree, for better i18n. + * Install the libsmbclient.so symlink in the libsmbclient-dev package, + per policy (closes: #181466). + + -- Steve Langasek <vorlon@debian.org> Fri, 27 Dec 2002 00:37:00 -0600 + +samba (2.999+3.0.alpha21-3) unstable; urgency=low + + * Drop --with-ldapsam from the configure options, since this no longer + means what we thought it did. Revert patch for changing the 'passdb + backend' defaults. + * Add patch from CVS HEAD to fix pdbedit segfault; postinst script + should work better now. (Closes: #173936) + + -- Steve Langasek <vorlon@debian.org> Sun, 22 Dec 2002 13:29:00 -0600 + +samba (2.999+3.0.alpha21-2) unstable; urgency=low + + * add CONFIGDIR to the set of directories exported in the install + target, so we don't try to write to /etc/ on the autobuilders. + * Reset the default 'passdb backend' value to something sensible, so + that we don't unnecessarily break upgrading systems (closes: #173731). + + -- Steve Langasek <vorlon@debian.org> Fri, 20 Dec 2002 09:13:00 -0600 + +samba (2.999+3.0.alpha21-1) unstable; urgency=low + + * new upstream release, many patches now incorporated upstream + + -- Steve Langasek <vorlon@debian.org> Mon, 16 Dec 2002 23:39:00 -0600 + +samba (2.999+3.0.alpha20-4) unstable; urgency=low + + * Remove obsolete comments about non-existant LDAP support in the + Debian Samba packages. (Closes: #165035) + * Apply patch for segfault in pam_smbpass when using the unixsam + backend. + * Drop support for nmbd in inetd, since it's not supported by + upstream and is reported to cause problems (closes: #23243, #137726, + 165037). + * Clarify example printing configs in smb.conf (closes: #168174). + * Make sure nmbd still responds to SIGTERM if it has no interfaces to + listen on (closes: #168079). + * Fix to get samba working again on 64-bit archs, after a + pointer<->int size mismatch bug. Already fixed in upstream CVS. + * Merge fix from CVS for broken libsmbclient.h references to internal + structures (closes: #162956). + * Add a default 'panic action' for Samba that will give us genuinely + useful debugging information after a crash. + * Fixed correct patch to example configurations in the libpam-smbpass + packages (closes: #169350). + * acl-dev is not in sid anymore; Build-Depend on libacl1-dev instead + (closes: #169682). + * Only ask the user for permission to edit if there's a chance of us + damaging something. + + -- Steve Langasek <vorlon@debian.org> Mon, 18 Nov 2002 19:53:00 -0500 + +samba (2.999+3.0.alpha20-3) unstable; urgency=low + + * Make sure smbstatus behavior is sane when Samba *has* been started, + as well as when it has not (closes: #164179). Thank to Robbert Kouprie + <robbert@radium.jvb.tudelft.nl> for this patch. + * Not using 'killall' in any of the maintainer scripts (the last one + remaining was winbind.logrotate.) We now just use 'kill' to send + a SIGHUP to a specific PID (which is stored in a file in + /var/run/samba.) + * Do not depend on procps because we're not using killall anymore. + + -- Eloy A. Paris <peloy@debian.org> Tue, 15 Oct 2002 22:15:57 -0400 + +samba (2.999+3.0.alpha20-2) unstable; urgency=low + + * fix an off-by-one error in smbd/lanman.c, which should shut off the + flood of log messages (closes: #157432) + * add a --config-cache option to the configure invocation, since + autoconf 2.5 doesn't load config.cache by default (closes: #163504) + + -- Steve Langasek <vorlon@debian.org> Sat, 5 Oct 2002 01:40:00 -0500 + +samba (2.999+3.0.alpha20-1) unstable; urgency=low + + * new upstream release + - non-primary groups appear to work again (closes: #161271) + * the official beginning of the upstream 3.0 branch + * exit without error from smbstatus when no connections have + been seen yet (closes: #161489) + + -- Steve Langasek <vorlon@debian.org> Wed, 2 Oct 2002 19:02:00 -0500 + +samba (2.999+3.0cvs20020906-1) unstable; urgency=low + + * CVS update + - domain authentication works again (closes: #158698) + * Factor out common code in samba-common.config + * Handle character set settings in smb.conf on upgrade + (closes: #153913, #158770) + * Don't use killall in logrotate script; there are better ways + (closes: #160076) + * Ignore value of 'hostname lookups' for hosts allow/hosts deny + (closes: #154376) + + -- Steve Langasek <vorlon@debian.org> Sat, 7 Sep 2002 11:46:00 -0500 + +samba (2.999+3.0cvs20020829-1) unstable; urgency=low + + * CVS update. + * Move the smb.conf manpage to the samba-common package (closes: #159572) + + -- Steve Langasek <vorlon@debian.org> Thu, 29 Aug 2002 17:53:25 -0500 + +samba (2.999+3.0cvs20020827-1) unstable; urgency=low + + * CVS update. (Closes: #158508) + * Part 1 of 3 of the library separation patch that Vorlon wrote has + gone upstream - removed the patch from our patches/ directory. + * Debconf note to warn users that their smb.conf will be re-written + and changed if they use Swat to maintain it. (Closes: #158479) + * Fixed typo in samba.prerm. + + -- Eloy A. Paris <peloy@debian.org> Tue, 27 Aug 2002 15:23:23 -0400 + +samba (2.999+3.0cvs20020825-2) unstable; urgency=low + + * scale back the tdbsam migration support, because of undesirable + side-effects; now always defaults to 'no'. + * strip out hyperactive library dependencies that are only needed by + smbd (closes: #155156). + * nuke any broken registry.tdb files left by previous CVS snapshots. + * support rolling back the smbpasswd->tdbsam conversion on downgrade, + since many people are likely to need to downgrade for a while. + * remove postrm handling of legacy directories, and add handling of + current ones. + + -- Steve Langasek <vorlon@debian.org> Sun, 28 Jul 2002 09:44:24 -0500 + +samba (2.999+3.0cvs20020825-1) unstable; urgency=low + + * CVS update. These packages are based on Samba 3.0alpha19 + any + code commited after 3.0alpha19 was released. + + -- Eloy A. Paris <peloy@debian.org> Sun, 25 Aug 2002 14:56:46 -0400 + +samba (2.999+3.0cvs20020723-1) unstable; urgency=medium + + * remove spurious line from samba.config + * migrate from smbpasswd to tdbsam + * re-add the pdbedit util and manpage + * compile in ldapsam support (closes: #146935) + * add PRIVATEDIR to the list of vars we override for the install + target, so Samba doesn't try to create /etc/samba (closes: #153746). + * fix makefile handling of LOGBASEDIR, so that logs always end up in + the right place (closes: 153727). + * Fixed bug in the FHS migration path that causes nmbd to read its + state from one location, but write it out to another. (closes: #154210) + * Make sure nmbd is always looking for wins.tdb in the same place. + + -- Steve Langasek <vorlon@debian.org> Fri, 19 Jul 2002 21:38:54 -0500 + +samba (2.99.cvs.20020713-1) unstable; urgency=low + + * first attempt for 3.0pre. + * only post a debconf note about moving logfiles if we're upgrading + from a version that had the logfiles in the old location + (closes: #152924). + + -- Steve Langasek <vorlon@debian.org> Sat, 13 Jul 2002 12:54:25 -0500 + +samba (2.2.5-2) unstable; urgency=low + + * No longer ship make_printerdef, which is deprecated. (closes: #63059) + * Clean up some empty directories from the samba package. + * Add call to dh_installinit for winbind rc.x symlinks (closes: #151860). + * Clean up per-package documentation lists, to reduce clutter + (closes: #147638). + * Make sure we don't ship pdbedit's man page since we are still using + smbpasswd passwords. (closes: #152208) + * move libnss_wins.so to libnss_wins.so.2, where glibc expects to find + it (closes: #148586). + * reorder postinst, so that installing samba-common from scratch loads + the debconf answers properly (closes: #151985). + * add lintian overrides for winbind, to eliminate some noise. + * rename pam_smbpass changelog to comply with policy. + + -- Steve Langasek <vorlon@debian.org> Sun, 23 Jun 2002 22:45:04 -0500 + +samba (2.2.5-1) unstable; urgency=low + + * New upstream release. + + -- Eloy A. Paris <peloy@debian.org> Sun, 9 Jun 2002 15:49:21 -0400 + +samba (2.2.4+2.2.5pre1-1) experimental; urgency=low + + * Getting ready for Samba 2.2.5. + * Remove patches/parse_spoolss.patch, now included upstream. + * Fixed thinko WRT POSIX ACL support, which we "half-enabled" in + 2.2.4-1. We don't use POSIX ACL support ourselves, so we'd + appreciate reports from those using this feature so we can + be sure this works. + * Fix the filename-matching algorithm used for smbtar's 'exclude' + functionality. (closes: #131571) + * Look for secrets.tdb in /var/lib/samba, and handle in the postinst. + This is not really a config file, because users don't edit it. + (closes: #147429) + * Doxygen fix for libsmbclient.h, thanks to Tommi Komulainen + <Tommi.Komulainen@iki.fi> for the patch. (closes: #144847) + + -- Eloy A. Paris <peloy@debian.org> Tue, 28 May 2002 11:33:51 -0400 + +samba (2.2.4-1) unstable; urgency=low + + * New upstream release (closes: #144713) + * Building with POSIX ACL support (closes: #137819) + * Include samples, exclude INSTALL from libpam-smbpass (closes: #145055) + * Compile with --with-automount, for NIS homedir support (closes: #123396) + * Add a proper 'flags' field to the mount entry we write to /etc/mtab; + fixes a display bug with mount (closes: #140397) + * Added logic to /etc/init.d/samba so a help message is printed out + when Samba is running from inetd _and_ we are not booting, i.e. the + user called the init script manually. Thanks to Francesco + Potorti <pot@gnu.org> for the suggestion on how to implement this. + (Closes: #139807, #140204) + * samba.postinst: added logic so we don't call /etc/init.d/samba if + we are running from inetd (this prevents the stupid help message + to be printed during package upgrades if we are running from inetd.) + * samba.prerm: idem. + * /etc/init.d/samba: delete stale PID files after nmbd and smbd are + stopped. This prevents start-stop-daemon from printing an ugly + error message when called from '/etc/init.d/samba stop'. I prefer + this than running start-stop-daemon with --oknodo because + start-stop-daemon might print other important error messages that with + --oknodo it would otherwise not print. (Closes: #102187, #109301) + * Patch from jerry@samba.org to fix parsing of spoolss structures. + + -- Eloy A. Paris <peloy@debian.org> Thu, 23 May 2002 23:16:52 -0400 + +samba (2.2.3a-7) unstable; urgency=medium + + * More README.debian updates. + * Neutralize the smb.conf 'lock dir' directive, which doesn't mean + what the FHS says it should, and causes us no end of grief. + (Closes: #122299) + * LPRng-handling patch so that jobs printed to recent versions of + LPRng show up properly as 'done' instead of 'paused' in the Windows + print queue. Thanks to Jaroslav Serdula <serdula_jaroslav@vse.sk> + for this patch. (Closes: #139458) + * Applied patch from Urban Widmark <urban@teststation.com> + (smbfs upstream maintainer) to add a '-n' option to smbmount + that does the same as mount's '-n'. (Closes: #139590) + * Minor tweak to unpatch-source so we unpatch sources in the + reverse order we patched them. + * Don't depend on grep in samba.prerm to determine if Samba was + running before the upgrade starts. + * Tweak the wording of debconf templates. + * Incorporate debconf translations for French, Spanish and Portuguese; + thanks to Carlos Valdivia Yagüe <valyag@hotpop.com> (es), + Andre Luis Lopes <andrelop@ig.com.br> (pt_BR), and Philippe + Batailler and Denis Barbier <barbier@debian.org> (fr). + (closes: #142657, #142659, #141551, #141699, #141682) + * Fixed symlinks in the swat package so the point to /usr/share/doc/ + instead of /usr/doc/. Added note to the description of the + swat packages that says that samba-doc must be installed for + the on-line documentation to work. Thanks to Torne Wuff + <torne@wolfpuppy.org.uk>. (Closes: #95437) + * 'dh_installinit -n' gives us no initscript handling -- we need to + handle all starting and stopping of daemons ourselves, which wasn't + happening in the {pre,post}rm scripts. + * Vary the priority of the debconf question "Do you want to generate + /etc/samba/smbpassd?" depending on whether the file already exists. + File exists -> priority 'medium', file does not exist -> priority + 'low'. Changed priorities of all other questions from 'high' to 'medium'. + + -- Steve Langasek <vorlon@debian.org> Sat, 20 Apr 2002 17:48:27 -0400 + +samba (2.2.3a-6) unstable; urgency=low + + * Call db_stop as soon as we're done with debconf in the postinst, to + avoid hanging bugs (closes: #137813) + * Ony call 'update-inetd --add' on first installation, just as we only + call 'update-inetd --remove' on package purge. + * Bring our shipped smb.conf closer in line with the upstream + defaults: don't twiddle the send/recv buffer sizes, since the Linux + kernel already provides a much better default setting + (closes: #80966, #80934, #137415, #133477) + * Added libnss_wins.so to the winbind package (closes: #137201) + * Updates to README.debian. + + -- Eloy A. Paris <peloy@debian.org> Tue, 12 Mar 2002 10:57:40 -0500 + +samba (2.2.3a-5) unstable; urgency=low + + * Having multiple workgroup lines in your smb.conf, though wacky, is + perfectly valid. Account for this in samba-common.config. + (closes: #137157) + + -- Steve Langasek <vorlon@debian.org> Sun, 10 Mar 2002 21:52:51 -0600 + +samba (2.2.3a-4) unstable; urgency=low + + * Fixed typo in samba.postinst. Cosmetic fixes there as well. + * Fix to improper usage of /usr/bin/tr in samba-common config script + (closes: #137744) + + -- Steve Langasek <vorlon@debian.org> Sat, 9 Mar 2002 14:14:02 -0500 + +samba (2.2.3a-3) unstable; urgency=medium + + * Make sure /etc/init.d/samba is executable before calling it + in the postinst. Quickly checked all other maintainer scripts + to make sure we are not calling an init script if it is not + executable. (closes: #137321) + * Fix up maintainer scripts to detect if samba was not running before + an upgrade. (closes: #33520, #130534) + * Make sure /etc/samba/ is included in the samba-common package. + Closes: #137157 + + -- Steve Langasek <vorlon@debian.org> Fri, 8 Mar 2002 11:13:21 -0500 + +samba (2.2.3a-2) unstable; urgency=low + + * merge in debconf support: + - Moved all smb.conf-related questions to samba-common (smb.conf + is part of the samba-common package, not the samba package.) + - smb.conf is not a samba-common conffile anymore since it is + being managed by debconf. It is ABSOLUTELY necessary to make + sure /etc/samba/smb.conf _NEVER_ gets overwritten by changes + made via debconf. In other words, any changes made by the user + should be honored by the debconf interface. + - samba.postinst now moves old log files from /var/log/ to + /var/log/samba/. There's a Debconf note that informs the user + the log files are stored now in a new location. + - debian/control: + + Make samba depend on debconf. + - New file debian/samba.templates. + - New file debian/samba.config. + - Re-worked debian/samba.postinst. + + Got rid of all /etc/samba/debian_config sillyness. + - remove /usr/sbin/sambaconfig; "dpkg-reconfigure samba" replaces + it. + - Removed debian/samba.prerm. + - Cleaned up /etc/init.d/samba. + + Added infrastructure for debconf. + + Got rid of all /etc/samba/debian_config sillyness. + + Got rid of /etc/samba/smbpasswd conversion stuff for + compatibility with versions of Samba < 2.0.0final-2. + (closes: #127959, #34408, #113594) + * make samba.postinst ignore the absence of /var/log/{s,n}mb*; + makes for a clean upgrade path. + * Building with MSDFS support (closes: #116793) + + -- Steve Langasek <vorlon@debian.org> Tue, 5 Mar 2002 14:14:33 -0600 + +samba (2.2.3a-1) unstable; urgency=low + + * New upstream version (closes: #135001) + * Potato builds were failing because debian/rules was not creating + debian/winbind/etc/logrotate.d/. A user having problems creating + Potato packages brought this to my attention. dh_installlogrotate + takes care of creating the directory for us, that's why we didn't + notice. + * Removed code that converts /etc/samba/smbpasswd from an ancient + format to the new format of Samba 2.0.0 and later. + Closes: #134375 - samba: postinst failed due to missing + /usr/bin/convert_smbpasswd. + * Re-organized FHS migration code in samba.postinst. Make sure we + don't fail when we move files that don't exist. + Closes: #133813 - samba: Install failed. + * Adding docs. to the libpam-smbpass package. + * Remove man pages for findsmb because we are not providing this + script. + Closes: #134181 - findsmb referenced, but not included. + * Removed replace.patch because it is now present upstream. + * Added patch from Jerry Carter to fix a problem when saving + document preferences for printing from NT clients. + * The real winbindd daemon is a forked process so we can't use + --make-pidfile when calling start-stop-daemon. Fixed + /etc/init.d/winbind to work around the issue. Thanks to + Lin Li <linl@xandros.com> for the patience and for reporting + the problems. Hopefully I got it right this time. + + -- Eloy A. Paris <peloy@debian.org> Wed, 20 Feb 2002 18:39:03 -0500 + +samba (2.2.3-6) unstable; urgency=low + + * Make sure there are actual files in /var/state/samba before trying + to move them (Closes: #133534, #133510). + * Fix up the 2.2.3 makefile so that pam_smbpass builds correctly + again. + + -- Steve Langasek <vorlon@debian.org> Tue, 12 Feb 2002 09:19:29 -0600 + +samba (2.2.3-5) unstable; urgency=low + + * Whoops, missed a spot on the samba.postinst -- will fail badly if + /var/state/samba/ no longer exists. Better get this fix into the + next upload. ;) (Closes: #133088) + * Regenerate configure only if it is older than configure.in. + * Fix smbd handling of network neighborhood lists, which was missed + in the FHS conversion (Closes: #133091) + + -- Eloy A. Paris <peloy@debian.org> Sat, 9 Feb 2002 16:37:57 -0500 + +samba (2.2.3-4) unstable; urgency=low + + * FHS cleanup; files in /var are now properly sorted according to + their nature. (Closes: #102101) + * Remove patches to source/configure, since we now call autoconf to + regenerate this file cleanly. + * lintian fixes: + - Create winbind.conffiles and add /etc/logrotate.d/winbind and + /etc/init.d/winbind to it. + - Use a relative symlink for /usr/lib/cups/backend/smb. + - Removal of a .cvsignore file in the samba-doc package. + * winbind.init fixes: + - Corrected name of the pid file (Steve) + - Make start-stop-daemon create a pid file for winbindd since it + does not create one on his own. + * #DEBHELPER# is not needed in samba.postinst because we are adding + manually everything that debhelper adds automatically. In fact, + since we are calling update-rc.d without standard paramaters I + think we can't use #DEBHELPER#. + * Fix fatal syntax error in samba.prerm. + + -- Steve Langasek <vorlon@debian.org> Thu, 7 Feb 2002 13:12:08 -0500 + +samba (2.2.3-3) unstable; urgency=low + + * work on lintian-cleanness in the package (wrong permissions, + maintainer scripts in need of debhelpering) + * /lib/security/pam_smbpass.so is now being included in the + libpam-smbpass package only, and not in both the libpam-smbpass and + samba packages (which was the case prior to 2.2.3-3.) + * Instead of making our patch scripts executable in the rules file + we run them through /bin/sh. + * New 'winbind' package that has all the winbind stuff that was in the + samba package in 2.2.3-2 and before. + * Added replace.patch: patch from Jeremy Allison to fix problems when + replacing or overwriting files in a Samba share. Patch was sent to + the samba mailing list. + + -- Eloy A. Paris <peloy@debian.org> Tue, 5 Feb 2002 21:12:48 -0500 + +samba (2.2.3-2) unstable; urgency=low + + * add support to debian/scripts/{patch-source,unpatch-source} for + automatic updating and cleaning of <version.h>. This was a request + from the Samba Team: they wanted us to clearly mark our packages + so it is always known a user is running Samba with (possibly) + Debian-specific patches. + * Change init.d killscript link to K19samba, so we stop before autofs + (closes: 117327) + * Make our patch scripts executable in the rules file -- dpkg won't do + this for us (closes: #132415). + + -- Steve Langasek <vorlon@debian.org> Mon, 4 Feb 2002 09:51:00 -0600 + +samba (2.2.3-1) unstable; urgency=low + + * New upstream release (closes: #131228). + * Restructured build system that provides DBS-like separation of + patches + * Fix typo in smbfs description (closes: #116209). + * Use killall -q in logrotate.d script, to avoid spurious cron + emails (closes: #130100). + + -- Steve Langasek <vorlon@debian.org> Sat, 2 Feb 2002 19:56:18 -0500 + +samba (2.2.2-12) unstable; urgency=high + + * (Steve) Patch for source/client/client.c. + Closes: #86438 smbclient: Transfering several GB causes the average + speed to be messed up. + * Uploading with urgency=high to expedite the move from unstable + to testing because of the security problem fixed in -11. + + -- Eloy A. Paris <peloy@debian.org> Fri, 25 Jan 2002 22:31:12 -0500 + +samba (2.2.2-11) unstable; urgency=low + + * Building with --with-libsmbclient. We have created two new + packages: libsmbclient and libsmbclient-dev. Hopefully this + will help some people that want to add the capability of + speaking SMB to their applications. + Closes: #117132 - libsmbclient support library? + * (Steve) Make swat do the right thing when reading (parsing) + the saved preferences in smb.conf. + Closes: #55617 swat mutilates the linpopup message command. + * Updated README.Debian. Updated descriptions in debian/control. + * Remembered to bump up version number in source/include/version.h + (need to automate this or else I'll keep forgetting.) + * (Steve) one liner for source/web/diagnose.c. + Closes: #106976 - smbd/nmbd not running message with swat/linuxconf. + * Added '|| true' to the post-rotate script so logrotate doesn't + fail if either nmbd or smbd is not running. + Closes: #127897 - /etc/logrotate.d/samba fails if there is no smbd process. + * Fixed incorrect file locations in swat's man page and added a + Debian-specific note to /usr/share/doc/swat/README. + Closes: #71586 swat: needs documentation fixes for debian. + * smbmount in the smbfs package does not have the setuid bit set. + Apparently, smbmount uses libsmb without checking the environment. + Thanks to Christian Jaeger <christian.jaeger@sl.ethz.ch> for + finding the local root exploit. + * Applied old patch from Jerry) Carter" <jerry@samba.org> to correct + the following two problems in Samba 2.2.2: + - %U and %G could not be used in services names + in smb.conf. + - %G would fail to be expanded in an "include = ..." + line. + + -- Eloy A. Paris <peloy@debian.org> Sat, 19 Jan 2002 21:35:26 -0500 + +samba (2.2.2-10) unstable; urgency=low + + * (Steve) Add missing manual pages. + Closes: Bug#128928: missing manpages in smbfs. + + -- Eloy A. Paris <peloy@debian.org> Sun, 13 Jan 2002 14:39:55 -0500 + +samba (2.2.2-9) unstable; urgency=low + + * (Steve) Fix broken URL's in HTML docs. + Closes: Bug#17741: bad links in html docs (at last!!!) + + -- Eloy A. Paris <peloy@debian.org> Fri, 11 Jan 2002 13:37:07 -0500 + +samba (2.2.2-8) unstable; urgency=low + + * Added "Replaces: samba (<= 2.2.2-5)" to the smbclient section in + debian/control so rpcclient.1, which was in samba-2.2.2-5, does not + cause problems now that it is part of smbclient (>= 2.2.2-6). Closes: + Closes: Bug#128684: error upgrading smbclient in sid. + + -- Eloy A. Paris <peloy@debian.org> Fri, 11 Jan 2002 11:42:40 -0500 + +samba (2.2.2-7) unstable; urgency=low + + * (Steve) Patch to make behavior honor what the docs. say about "hosts allow" + taking precedence over "hosts deny". + Closes: Bug#49249: swat: error with host deny ?! + + -- Eloy A. Paris <peloy@debian.org> Thu, 10 Jan 2002 12:36:58 -0500 + +samba (2.2.2-6) unstable; urgency=low + + * (Steve) Adds manpage for rpcclient to the proper file, + removes smbtorture from the distro because this tool isn't intended for + widespread consumption. + Closes: #63057 - no manual page for smbtorture. + * (Steve) Removed -gnu from the configure arguments (--build, --host) in + debian/rules so config.sub is able to properly create the host and target + tuples. + + -- Eloy A. Paris <peloy@debian.org> Wed, 9 Jan 2002 14:39:51 -0500 + +samba (2.2.2-5) unstable; urgency=low + + * Fixes from vorlon: + * Use /usr/bin/pager instead of more. + Closes: #125603: smbclient violates pager policy. + * Make /etc/logrotate.d/samba a conffile, send smbd and nmbd + a SIGHUP to have the log files reopened, fixes to + /etc/logrotate.d/samba. + Closes: #127897: log file rotation. + Closes: #118277: /etc/logrotate.d/samba not listed in conffiles. + * s/covert/convert/. + Closes: #121653 probable typo in install message. + + -- Eloy A. Paris <peloy@debian.org> Sun, 6 Jan 2002 03:14:58 -0500 + +samba (2.2.2-4) unstable; urgency=low + + * Applied patch from Steve to work around problem in glibc that affects the + HPPA architecure. The patch detects the error condition at configure time + and compiles without LFS support if necessary. + Closes: Bug#126763: samba completely broken on hppa. + * Including unicode_map.1251. + Closes: Bug#126719: samba-common: unicode_map.1251 missing. + * Updated smbd daemon version to match Debian package version. + Closes: Bug#127199: Package version and smbd daemon version don't match. + + -- Eloy A. Paris <peloy@debian.org> Mon, 31 Dec 2001 14:32:47 -0500 + +samba (2.2.2-3) unstable; urgency=low + + * Added some spaces in package description in debian/control. + Closes: #120730 - missing spaces in package description for nice + alignment. + * Spelling fixes. + Closes: #125328, #125329, #125330, #125367, #125365, #125403. + * Steve Langasek <vorlon@debian.org> is the co-maintainer of the Debian + Samba packages!!! Added him to the uploaders field in debian/control. + + -- Eloy A. Paris <peloy@debian.org> Tue, 18 Dec 2001 00:54:25 -0500 + +samba (2.2.2-2) unstable; urgency=low + + * Backed out changes to source/filename.c per Andrew Tridgell's request. + This changes were introduced in 2.2.1a-7 as an attempt to fix #47493. + Tridge found out that they break smbd. + * Changed version number in source/includes/version.h so it is clear that + this is a version of Samba packaged for Debian. This is another request from + Tridge and will help the Samba Team to get bogus bug reports. + * Added Samba-HOWTO-Collection.pdf and other README files to the + /usr/share/doc/<package>/ directories. + * Installing libnss_winbind.so and pam_winbind.so. + Closes: #116790: nss and pam modules for winbind missing. + * Removed user-emacs-settings from changelog. + + -- Eloy A. Paris <peloy@debian.org> Mon, 29 Oct 2001 19:16:26 -0500 + +samba (2.2.2-1) unstable; urgency=low + + * New upstream version. + * Temporary fix for #113763 (Steve Langasek) + * Quick hack to avoid smbmount reveal password length. Please note + that even with this hack there is a small window when password is + completely visible with 'ps aux'. There are other methods that should + be used to automate mounting of SMB shares. + Closes: #112195: smbmount-2.2.x reveals password length. + * Applied patch from Steve Langasek <vorlon@debian.org> to prevent + forcing use of setresuid() in Sparc. + Closes: #112779: samba build forces use of setresuid, which causes + smbd to fail on Sparc. + + -- Eloy A. Paris <peloy@debian.org> Mon, 15 Oct 2001 10:26:10 -0400 + +samba (2.2.1a-9) unstable; urgency=low + + * Replaced $(LD) with $(CC) all the way through source/Makefile. + Closes: #111036: ld shouldn't be used to link shlibs. + * s/\/bin\/mail/\/usr\/bin\/mail/ in smb.conf's man page (HTML and + sgml as well.) + Closes: #110963: smb.conf: mail should be /usr/bin/mail. + * Documented better smbclient's -W behavior. Patch from Steve + Langasek. + Closes: #53672: smbclient: -W flag is interpreted as domain, not + workgroup. + + -- Eloy A. Paris <peloy@debian.org> Tue, 4 Sep 2001 23:10:41 -0400 + +samba (2.2.1a-8) unstable; urgency=low + + * Set some reasonable default perms for the samba logdir (again, + thanks to vorlon :-) + Closes: #72529: insecure permissions on log files. + + -- Eloy A. Paris <peloy@debian.org> Sun, 26 Aug 2001 15:40:47 -0400 + +samba (2.2.1a-7) unstable; urgency=low + + * Another attempt at fixing #47493. Patch from Steve Langasek + <vorlon@netexpress.net>. Let's keep our fingers crossed Steve! + + -- Eloy A. Paris <peloy@debian.org> Sun, 26 Aug 2001 13:37:06 -0400 + +samba (2.2.1a-6) unstable; urgency=low + + * Backed out fix to #47493 introduced in 2.2.1a-4 as it is causing + smbd to die with signal 11 under some unidentified situations. + Closes: #109774: Latest debian version breaks printer driver download. + Closes: #109946: not all files appear in samba-exported directories. + * Another patch from Steve Langasek. This one adds quotes around + printer names for print systems it's reasonable for Debian to + support. Together with the patch in #29957 (see changelog for + 2.2.1a-4), this should take care of the problems with multi-word + printer names in Samba. + + -- Eloy A. Paris <peloy@debian.org> Fri, 24 Aug 2001 21:12:27 -0400 + +samba (2.2.1a-5) unstable; urgency=low + + * Important changes that affect how Samba is built on Debian + machines are implemented in this release. All of this changes + were suggested by the energetic Steve Langasek <vorlon@debian.org>, + and his arguments were so sound and reasonable that I decided + to implement them. Here's Steve's original changelog: + + * Fix up the build system to avoid needing to run configure + as root to answer questions we already know the answers to. + * In the process, make surprising progress towards being able to + cross-compile the samba packages. + + -- Eloy A. Paris <peloy@debian.org> Fri, 24 Aug 2001 01:08:06 -0400 + +samba (2.2.1a-4) unstable; urgency=low + + * Fixed typo in smbmount's mount page. + Closes: #109317: smbfs: mistype in smbmount manpage. + * Included symlink to smbspool to better support CUPS printing. + Closes: #109509: include symlink for cups samba support. + * Applied patch from Steve Langasek <vorlon@netexpress.net> to + fix bug #29957. + Closes: #29957: samba strips trailing " from strings in smb.conf. + * First attempt at fixing #47493. Another patch from Steve "I want + a bug-free Samba" Langasek. + Closes: #47493: Samba doesn't handle ':' in dir names right. + + -- Eloy A. Paris <peloy@debian.org> Tue, 21 Aug 2001 23:26:38 -0400 + +samba (2.2.1a-3) unstable; urgency=low + + * Steve Langasek <vorlon@netexpress.net> has been hard at work in + the last few days looking at the long list of open bugs filed + against the Samba packages. I don't know how to thank him. It's been + a pleasure working with Steve, and all the fixes, patches, etc. in + this release come from him. The bug list is greatly reduced thanks + to Steve's efforts. + * Steve's additions/modifications/patches/etc. are: + - New package that (libpam-smbpass) provides pam_smbpass. Before, this + was provided in another package but now the sources are part of + the Samba sources so we can start providing it from here. + Closes: #107043 - pam_smbpass now present in Samba source, + should be built from there + - Patch to source/smbd/service.c that allows admins to call + /bin/umount from the root postexec of a Samba share. + Closes: #40561 - samba pre/postexec commands do not work. + - Clear TMPDIR before starting smbd in /etc/init.d/samba. + Closes: #51295 - Problems with Samba and TMPDIR. + - Correction to documentation of "guest only". + Closes #38282 - "guest only" share still requires a password. + * Applied patch from Santiago Vila <sanvila@unex.es> to convert + /usr/sbin/mksmbpasswd from a shell script into a real awk script. + Sorry it took so long, Santiago; I hadn't realized you even + provided a patch :-) + Closes: #77891 - mksmbpasswd could be a real awk script. + * Updated description of the smbfs and smbclient packages. Also have + each package recommend the other. + Closes: #108650: Should suggest or recommend smbfs. + + -- Eloy A. Paris <peloy@debian.org> Mon, 13 Aug 2001 22:21:55 -0400 + +samba (2.2.1a-2) unstable; urgency=low + + * Build-depends: depend on debhelper (>=2.0.103). + Closes: #105795: Build-Depends are wrong. + * Run samba's preinst and postinst scripts without -e so failed commands + do not abort installation. + Closes: #106384: postinstall crashes abnormally. (And really closes + #104471.) + + -- Eloy A. Paris <peloy@debian.org> Thu, 26 Jul 2001 00:30:37 -0400 + +samba (2.2.1a-1) unstable; urgency=low + + * New upstream version. + * Make sure samba's postinst script exits with a zero status. + Closes: #104471: Samba postinst problem. + + -- Eloy A. Paris <peloy@debian.org> Thu, 12 Jul 2001 21:55:21 -0400 + +samba (2.2.1-1) unstable; urgency=low + + * New upstream version. + Closes: #103339: config.guess and config.sub update required. + Closes: #98518: Samba 2.2 can't act as PDC for NT4/W2K due to + incompatibility with PAM. + Closes: #97447: nmbd crashes due to bugs in DAVE 2.5.2. + Closes: #95777: Samba 2.2 is unable to join or authenticate against + Samba 2.2 PDC domain. + Closes: #68842: samba should use PAM for password changing (I + haven't personally tried this one, but it's been + advertised this works.) + Closes: #102506: PAM account checking fails. + Closes: #102518: Complains about unknown paramter "obey pam + restrictions" + Closes: #94774: Build failure on PARISC machines. + * Moved away from /etc/cron.weekly/samba for log file rotation. + Now using logrotate. + Closes: #95548: typo in /etc/cron.weekly/samba. + Closes: #74951: nmbd does not rename its log file. + * Removed Debian-specific addtosmbpass.8 man page since this script + is not longer provided upstream. Users should use the smbpasswd + program instead. + * Updated sample /etc/samba/smb.conf to reflect the recent changes + affecting handling of PAM authentication. Also updated + /etc/pam.d/samba. + + -- Eloy A. Paris <peloy@debian.org> Wed, 11 Jul 2001 00:44:14 -0400 + +samba (2.2.0.final.a-1) unstable; urgency=high + + * New upstream version (contains security fix from DSA-065-1.) + Closes: #97241: samba 2.2.0 fails to process hostnames in + "hosts allow" config line. + * Removed Debian-specific addtosmbpass.8 man page since this script + is not longer provided upstream. Users should use the smbpasswd + program instead. + Closes: #98365: addtosmbpass is missing from 2.2.0.final-2. + * Updated sample /etc/samba/smb.conf to reflect the recent changes + affecting handling of PAM authentication. Also updated + /etc/pam.d/samba. + + -- Eloy A. Paris <peloy@debian.org> Sun, 24 Jun 2001 11:11:59 -0400 + +samba (2.2.0.final-2) unstable; urgency=low + + * Added libcupsys2-dev to Build-Depends. + * Samba depends now (again) on netbase so update-inetd is always + available for the Samba maintainer scripts. + Closes: #86063: Fails to uninstall if inetd is not installed. + * Updated source/config.{sub,guess} so ARM built doesn't fail. + Closes: #94480: config.sub out of date; can't build on arm. + Closes: #85801: config.sub/guess out of date. + * Not using brace expansion, i.e. {foo,bar} in any of the maintainers + scripts nor in debian/rules. + Closes: #88007: samba postrm has is not POSIX sh compliant. + + -- Eloy A. Paris <peloy@debian.org> Sat, 21 Apr 2001 17:27:18 -0400 + +samba (2.2.0.final-1) unstable; urgency=low + + * New upstream release. Lots of new things. See WHATSNEW.txt. + * Goofy version number because of my stupidity when assigning version + numbers to the CVS packages I have been uploading to experimental. + Will be fixed when 2.2.1 is released. I've no doubts a 2.2.1 release + will follow soon. + + -- Eloy A. Paris <peloy@debian.org> Tue, 17 Apr 2001 22:58:14 -0400 + +samba (2.2.0.cvs20010416-1) experimental; urgency=low + + * CVS update. + + -- Eloy A. Paris <peloy@debian.org> Mon, 16 Apr 2001 21:25:15 -0400 + +samba (2.2.0.cvs20010410-1) experimental; urgency=low + + * CVS update. + * Added libreadline4-dev to Build-Depends. + + -- Eloy A. Paris <peloy@debian.org> Tue, 10 Apr 2001 16:53:45 -0400 + +samba (2.2.0.cvs20010407-1) experimental; urgency=low + + * CVS update. Includes what is in 2.2.0alpha3. + + -- Eloy A. Paris <peloy@debian.org> Sat, 7 Apr 2001 16:00:33 -0400 + +samba (2.2.0.cvs20010316-1) experimental; urgency=low + + * Started working on Samba 2.2.0. Using the SAMBA_2_2_0 branch + from Samba CVS. + * Not compiling rpctorture as it has compile errors. Change in + debian/rules. + * Removed Linux kernel 2.0.x and smbfs compatibility baggage. Now + the smbfs does not support 2.0.x kernels; a kernel > 2.2.x is + needed to use smbfs. Updated debian/control, debian/rules and + README.Debian to reflect this change. + * Added to swat a versioned dependency on samba (so a user is forced to + install a new version of swat each time a new version of samba is + installed.) + + -- Eloy A. Paris <peloy@debian.org> Sun, 18 Mar 2001 14:21:14 -0500 + +samba (2.0.7-5) unstable; urgency=medium + + * Transition from suidmanager to dpkg-statoverride. + + -- Eloy A. Paris <peloy@debian.org> Thu, 18 Jan 2001 23:51:56 -0500 + +samba (2.0.7-4) unstable; urgency=medium + + * Applied Urban Widmark <urban@teststation.com> fixes to smbmount. Urban + is the maintainer of the smbfs in the kernel and of the userland + utilities. + * Links to HTML documents are correct now. + Closes: #69439: swat: Broken help file symlinks + Closes: #72615: samba-doc directory changed: removed htmldocs from path + Closes: #75847: swat: Wrong symlink + Closes: #66857: Wrong links to html documents. + Closes: #77912: misplaced documentation symlinks for swat + * Building Samba with CUPS support. For this I reverted the change to + source/configure.in that I did in 2.0.7-3 and re-ran autoconf. + Closes: #59038: samba: not compiled with cups support. + * Fix against previous known/unknown user time difference patch to swat + (make username / password lookups take the same time.) Remove CGI + logging code in Swat. + Closes: #76341 - Security holes in swat + * Updated Build-depends. + * Updated debian/copyright to refer to the correct location of the GPL. + * debian/rules: changed DESTDIR to `pwd`/debian/samba (was + `pwd`/debian/tmp.) + * debian/rules: added '--sourcedir=debian/samba' to dh_movefiles (for some + strange reason dh_installdirs is not creating debian/tmp/ so I needed + to tweak everything to install stuff in debian/samba rather than in + debian/tmp.) + * debian/control: changed section of samba-docs to 'doc' (was 'docs') + * Using relative symlinks in /usr/share/samba/swat/ (changed debian/rules + and source/scripts/installswat.sh.) + * Fixed (by tweaking debian/rules) + /usr/bin/{smbmnt,smbumount-2.*,smbmount-2.*} to be suid. + * Added "Provides: samba-client" to smbclient's section in control. + Closes: #71143: smbclient: Smbclient should provide samba-client. + * Fix for desired_access being zero in map_share_mode() (patch to + source/smbd/nttrans.c.) Thanks to Gary Wilson + <wilsong@sergievsky.cpmc.columbia.edu> for bringing this patch to my + attention. + * Hacked source/lib/util_sec.c so smbd works fine in both 2.0.x and + 2.2.x kernels even when the build is done in a system running + a 2.2.x kernel. + Closes: #78858: samba-common: samba2.0.7 needs kernel 2.2.x but + doesnt depend on it. + Closes: #72758: README.Debian should comment on 2.0.x kernels. + Closes: #56935: Samba 2.0.6 and Kernel 2.0.x. + Closes: #58126: Samba 2.0.6 and Kernel 2.0.x -- more info. + Closes: #60580: samba: failed to set gid. + Closes: #64280: Samba panics, can't set gid. + Closes: #66816: Must deal with brokenness under 2.0.x. + Closes: #67682: potatoe samba 2.0.7-3 out of order, 2.0.5a-1 OK. + Closes: #69735: PANIC: failed to set gid + Closes: #66122: "smbclient -L localhost -U%" returns with "tree + connect failed: code 0". + Closes: #57637: Samba says tree connect error. + Closes: #58015: potato samba wins support is broken. + * Fixed comments in sample smb.conf to point to the correct location. + Closes: #69578: comments in smb.conf points to wrong path. + * Move codepages from /etc/samba/codepages/ to + /usr/share/samba/codepages/. + Closes: #63813: samba; codepages should go in /usr/lib. + * Moved /var/samba/ to /var/state/samba/. + Closes: #49011: samba package not FHS compliant. + * Hacked source/configure.in (and re-ran autoconf) so yp_get_default_domain() + is found. + Closes: #44558: netgroup support missing in samba 2.0.5a-1. + * /etc/init.d/samba was calling start-stop-daemon with both --pidfile and + --exec. Got rid of --exec so --pidfile works. + + -- Eloy A. Paris <peloy@debian.org> Thu, 11 Jan 2001 00:15:57 -0500 + +samba (2.0.7-3) frozen unstable; urgency=high + + * Release manager: this closes a RC bug. + * Commented out the section in source/configure.in that auto-detects + CUPS support and then ran autoconf to generate a new configure + script. This was done to prevent machines that have libcupsys-dev + installed from detecting CUPS support and adding an unwanted + dependency on libcupsys. This way the whole printing system + won't break on upgrades. CUPS support should be added after + Potato is released. + Closes: #65185: samba-common: Upgrading removes printing system. + Closes: #64496: smbfs: smbfs on powerpc has a dependency on cupsys. + * Updated README.debian. + Closes: #64594: Old README.Debian in /usr/share/doc/samba. + + -- Eloy A. Paris <peloy@debian.org> Tue, 20 Jun 2000 19:16:04 -0400 + +samba (2.0.7-2) frozen unstable; urgency=high + + * Release manager: this closes RC bug #63839 that prevents Samba + to be built from source. + * Fixed a stupid typo in debian/rules that was preventing Samba + to be built from source. + Closes: #63839: samba_2.0.7-1(frozen): build error (SAMBABOOK dir) + * I forgot to mention that O'Reilly's book "Using Samba" was donated + to the Open Source community. The book was included in Samba 2.0.7 + in HTML format and is part of the Debian Samba package since + Samba 2.0.7-1. + * In Samba 2.0.7-1, the "Using Samba" book and a number of HTML help + files were supposed to be provided in both the swat and the samba-doc + packages. This duplication was a waste of space. Starting with + Samba 2.0.7-2, swat recommends samba-doc and the book and the HTML + files are included only in samba-doc, and are accessed via symlinks + from within swat. + Closes: #58810: superfluous files in swat? + * Added a 'echo "."' to /etc/init.d/samba in the reload) section. + Closes: #63394: "echo ." missing in reload section of init.d script + * Fixed typo in docs/htmldocs/using_samba/ch06_05.html. + Closes: #64344: typo "encrypted passwords" + * Cleaned up samba's postrm script so important common files aren't + deleted when samba is purged. Created a samba-common.postrm script. + Closes: #62675: purging samba removes /etc/samba/smb.conf. + Closes: #63386: samba --purge removes /etc/samba dir even though + smbclient/smbfs/samba-common packages are still installed + + -- Eloy A. Paris <peloy@debian.org> Wed, 3 May 2000 02:42:07 -0400 + +samba (2.0.7-1) frozen unstable; urgency=low + + * New upstream version. Dear Release Manager: please allow this + package to go to frozen as it contains fixes to a _lot_ of problems. + You can take a look at all the problems fixed by this release in + the official upstream announcement at + http://us1.samba.org/samba/whatsnew/samba-2.0.7.html. + * Added --with-utmp to add utmp support to smbd (this is new in Samba + 2.0.7) + * Closes: #62148 - samba not rotating filled logs. + * Closes: #56711: Samba doesn't manage well long share name (please note + that it's possible to connect to shares with names longer than + 14 characters but the share will be listed with a name truncated to + 13 characters.) + * Closes: #51752 - NT DOMAIN - NET USE * /HOME not mapping (error 67). + Closes: #50907 - logon path not working. + This is not a bug, it's just Samba doing the same thing an NT server + does. See WHATSNEW.txt and smb.conf's man page for details. + * Closes: #48497 - error executing smbsh in debian-potato. (smbwrapper + is not supported anymore.) + * Closes: #58994 swat: typo in swat description. + * Closes: #45931 - Samba dies with SIGILL on startup. (Hardware + problems, person that reported the bug never came back.) + Closes: #54398 - smbadduser fails, looks for ypcat. + * Fixed swat's man page to include Debian specific installation + instructions. There's not necessary to edit /etc/services or + /etc/inetd.conf. + (Closes: #58616 - incomplete install config && incorrect installation + instructions.) + * s/SBINDIR/\"/usr/sbin\"/g in source/web/startstop.c to prevent swat + to look for smbd and nmbd in the wrong place when requested to start or + stop smbd or nmbd. + (Closes: #55028 - swat can't start samba servers.) + * Closes: #37274: smbclient does not honour pot. (Tested and seems to be + working now.) + * Not confirmed, but should fix #56699, #62185, #56247, #52218, #43492, + #50479, #39818, #54383, #59411. + (please re-open any of this if the problem still exists - I was unable + to confirm any of this because I could never reproduce them.) + Closes: #56699 - Samba's nmbd causes random kernel oops several + times in a row. + Closes: #62185 - nmbd's forking until no more file descriptors are + available. + Closes: #56247 - session setup failed: ERRSRV - ERRbadpw. + Closes: #52218 - Either wins proxy does not work, or I don't understand + it. + Closes: #43492 - intermittent problem changing password. + Closes: #50479 - Can't access windows 2000 shares with samba. + Closes: #39818 - samba-common: Upgrading Samba from the Slink version. + Closes: #54383 - samba-common: Missing /etc/smb.conf. + Closes: #59411 - smbclient: cannot browse Win2k shares. + + -- Eloy A. Paris <peloy@debian.org> Thu, 27 Apr 2000 16:07:45 -0400 + +samba (2.0.6-5) frozen unstable; urgency=low + + * Oppsss! samba-common doesn't depend on libcupsys1 so the binaries + in this package are broken unless libcupsys1 is installed. + samba-common has a "grave" bug because of this. Instead of adding + libcupsys1 to the Depends: list of each package in debian/control + I investigated why dh_shlibs was not picking the dependency + automatically. It turns out that it's probably a bug in libcupsys1 + because the format of its shlibs file is not correct. I fixed that + file (/var/lib/dpkg/info/libcupsys1.shlibs) and now dependencies are + picked correctly. I'll talk to the libcupsys1 maintainer. + + I think the addition of CUPS support to Samba is a big change that + should not go into Frozen. So, I decided to back up the addition + of CUPS support I did in 2.0.6-4 to minimize problems. I'll add + CUPS support again when I start working on Samba for Woody. + (Closes: #59337 - samba-common has a missing dependency) + + -- Eloy A. Paris <peloy@debian.org> Wed, 1 Mar 2000 08:40:02 -0500 + +samba (2.0.6-4) frozen unstable; urgency=low + + * It seems that sometimes nmbd or smbd are not killed when upgrading. + I think it is because in samba's prerm script I was calling + start-stop-daemon with the --pidfile switch and in old versions of + Samba the nmbd and smbd daemons did not store their PIDs in a file in + /var/samba/. I changed debian/samba.prerm so the existence of the + PID files is checked before calling "start-stop-daemon --pidfile ..." + If the PID files do not exist then start-stop-daemon is called + without the --pidfile parameter. + (Closes: #58058 - upgrade from slink went badly) + * Fixed typo in description of swat package in debian/control. + * Installed libcupsys1-dev so the configure script picks up CUPS + and Samba is compiled with CUPS support. Also added libcupsys1 to + the Depends: list of package samba in debian/control. + (Closes: #59038 - samba not compiled with cups support) + * Added a small paragraph to debian/README.debian warning about possible + problems with the WINS code in Samba 2.0.6. + + -- Eloy A. Paris <peloy@debian.org> Mon, 28 Feb 2000 14:00:42 -0500 + +samba (2.0.6-3) frozen unstable; urgency=low + + * Applied patch posted by Jeremy Allison to the samba mailing list + that should take care of the internal errors reported in bug #52698 + (release-critical). Wichert: please test as I never could reproduce + it here. + (Closes: #52698 - samba gets interbal errors) + * Moved samba-docs to the 'docs' section. + (Closes: #51077 - samba-doc: wrong section) + * Added reload capability to /etc/init.d/samba (only for smbd because + nmbd does not support reloading after receiving a signal). + (Closes: #50954 - patch to add reload support to /etc/init.d/samba) + * Corrected "passwd chat" parameter in sample /etc/samba/smb.conf so + Unix password syncronization works with the passwd program currently + in Potato. Thanks to Augustin Luton <aluton@hybrigenics.fr> for + the correct chat script. + * Stole source/lib/util_sec.c from the CVS tree of what will become + Samba 2.0.7 or whatever so we can use the same binaries under + both 2.0.x and 2.2.x kernels. + (Closes: #51331 - PANIC: failed to set gid) + * smbadduser is now provided as an example and it's customized for Debian. + I am not providing this script in /usr/sbin/ because then I would need + a dependency on csh, something that I don't want to do. + (Closes: #51697, #54052) + * Fixed the short description of the smbfs package in debian/control. + (Closes: 53534 - one-line description out of date). + + -- Eloy A. Paris <peloy@debian.org> Tue, 23 Nov 1999 16:32:12 -0500 + +samba (2.0.6-2) unstable; urgency=low + + * samba-common now depends on libpam-modules (not on libpam-pwdb, which + I have been told is obsolete). I modified /etc/pam.d/samba accordingly + to reflect the change. + (Closes: Bug#50722: pam pwdb dependence?). + * The old /etc/pam.d/samba file which had references to pam_pwdb caused + smbd to die with a signal 11. The new /etc/pam.d/samba file fixes + this problem. + (Closes: #50876, #50838, #50698) + * Compiled with syslog support (use at your own risk: syslog support + is still experimental in Samba). I added the parameters "syslog = 0" + and "syslog only = no" to the sample smb.conf to avoid pestering + users that do not want Samba to log through syslog. + (Closes: Bug#50703 - syslog only option doesn't work) + * Removed the stupid code in the smbmount wrapper script that tries + to load the smbfs module if smbfs is not listed in /proc/filesystems. + (Closes: Bug#50759 - Non-root can't run smbmount if SMBFS is compiled + as a module in the kernel) + * Added /bin/mount.smb as a symlink pointing to /usr/bin/smbmount so + 'mount -t smb ...' works just as 'mount -t smbfs ...'. + (Closes: Bug#50763 - 'mount -t smb' doesn't work) + + -- Eloy A. Paris <peloy@debian.org> Sat, 20 Nov 1999 18:53:35 -0500 + +samba (2.0.6-1) unstable; urgency=low + + * Samba 2.0.6 has been released. This is the first try of the Debian + Samba packages. I know for sure that smbd won't work properly on + 2.0.x kernels because the patch that Wichert sent me does not apply + to the new source/lib/util_sec.c in Samba 2.0.6. That file was + completely re-written by Tridge. + * Updated README.Debian. + * A new client utility called smbspool appeared in Samba 2.0.6. I added + this utility to the smbclient package, although I haven't tried it yet. + * Added the symlink /sbin/mount.smbfs that points to /usr/bin/smbmount. + This is to be able to type "mouont -t smbfs ...". This symlink goes + in the smbfs package, of course. + * This new release should close the following bugs (some of these + are fixed for sure in this new upstream release, some others I could + not reproduce but I believe they are fixed if they were real bugs. + As always, please feel free to re-open the bugs if the problem is not + solved). + Closes: Bug#33240: icmp mask needs a bug workaround. + Closes: Bug#37692: samba: Has problems detecting interfaces. + Closes: Bug#38988: samba: Truly bizzare behavour from nmbd. + Closes: Bug#46432: samba-2.0.5a-2: nmbd does not appear to broadcast + properly. + Closes: Bug#44131: smbfs: no longer possible to set file and + directory-modes. + Closes: Bug#46992: smbmount-2.2.x manpage wrong. + Closes: Bug#42335: smbfs: missing options from the new 2.2.x commandline. + Closes: Bug#46605: smbmnt segfaults. + Closes: Bug#48186: smbmount. + Closes: Bug#38040: smbfs: Please add /sbin/mount.smb [included]. + Closes: Bug#47332: smbmount: could -f and -P be added back? + * Samba has been compiled with PAM support (closes: Bug#39512 - samba PAM + module). To succesfully add PAM support, I created /etc/pam.d/samba and + added this file as a conffile for the samba-common package. I also made + samba-common depend on libpam-pwdb. + * Added simple man pages for the wrapper scripts smbmount and smbmount. + (Closes: Bug#44705 - Missing smbmount man page) + * Installed libreadlineg2-dev in my system so smbclient now has a + "history" command and libreadline support :-) + * This time I did add a check to the smbmount wrapper script to see if + the kernel has support for smbfs, as suggested by Jeroen Schaap + <J.Schaap@physiology.medfac.leidenuniv.nl>. I mentioned in the changelog + for samba-2.0.5a-3 that I did this but I forgot at the end. + + -- Eloy A. Paris <peloy@debian.org> Thu, 11 Nov 1999 12:08:15 -0500 + +samba (2.0.5a-5) unstable; urgency=low + + * I am sorry to report that the smbwrapper package is gone for the + moment. The reason for this is twofold: first of all, smbwrapper + is completely broken in Samba-2.0.5a (it compiles but it doesn't + run) and in the upcoming Samba-2.0.6 it doesn't even compile. Second, + when I asked Andrew Tridgell (father of Samba) about the state of + smbwrapper he told me that Ulrich Drepper (head of the glibc project) + broke on purpose the glibc stuff in which smbwrapper is based. + Consequently, Tridge recommended me to compile Samba without + support for smbwrapper. When, I have no idea. Sorry folks. Here is + the original message I received from Andrew: + + > 1) 2.0.5a's smbwrapper doesn't work under glibc2.1, and pre-2.0.6's + > smbwrapper doesn't even compile under glibc2.1. + + yep, Ulrich deliberately broke it. It won't get fixed till glibc + allows the sorts of games it plays to work again. I suggest you turn + it off in your build scripts until that gets sorted out. + + * Swat's file are now in /usr/share/samba/ instead of + /usr/lib/samba/ (bug #49011). + * Man pages now in /usr/share/man/ instead of /usr/man/ (bug #49011). + + -- Eloy A. Paris <peloy@debian.org> Tue, 2 Nov 1999 12:59:13 -0500 + +samba (2.0.5a-4) unstable; urgency=low + + * Applied patch from our fearless leader (Wichert) to fix the darn bug + that prevents Samba to work on 2.0.x kernels if it was compiled + in a system running a 2.2.x kernel. This closes #40645 (build uses + setresuid which doesn't work under 2.0.34 (does apparently under + 2.2.x) ). + * Fixed the entry that swat's postinst script adds to /etc/inetd.conf + so it is '#<off># swat\t\tstream\ttcp\tnowait.400 ...' instead of + '#<off>#swat\t\tstream\ttcp\tnowait.400 ...'. The old way caused + 'update-inetd --enable swat' to leave the entry for swat disabled. + Thanks to Dave Burchell <burchell@inetnebr.com> for finding out + this problem. This closes #48762 (swat uses non-standard syntax to + comment out inetd.conf entry). + * /usr/sbin/swat does not think anymore that the smbd daemon lives + in /usr/local/samba/bin/. To fix this I am running now source/configure + with "--prefix=/usr --exec-prefix=/usr". This closes #47716 (samba + 'swat' fails: incorrect hardwired path in the binary). + + -- Eloy A. Paris <peloy@debian.org> Sun, 31 Oct 1999 03:42:38 -0500 + +samba (2.0.5a-3) unstable; urgency=low + + * I am pretty darn busy with my MBA, I apologize for the long time it's + taking to squash bugs in the Samba packages. + * Built with debhelper v2 for FHS compliancy. Changed a couple of + things in debian/rules to accomodate for the new place for the docs. + I also had to change debian/{samba.postinst,samba.prerm,swat.postinst} + to make sure that the symlink from /usr/doc/xxx exists and points to + /usr/share/doc/xxx (the reason for this is that I am not letting + debhelper to create these scripts for me automatically). + * Built with latest libc6. + * smbfs: finally, the nasty bug that causes smbmount to die after + a while is gone thanks to Ben Tilly <Ben_Tilly@trepp.com>. + The problem was just a typo in source/client/smbmount.c. + This closes grave bug #42764 (smbmount dies) and #43341 + (smbfs-2.2.x won't function after a while). + * Fixed the smbmount wrapper script to eliminate a bashism (closes + #45202 - "wrapper scripts use $* instead of "$@") and to recognize + 2.3.x and 2.4.x kernels (closes #47688 - "smbfs: does not recognize + kernel 2.3.x"). + * Added a check to the smbmount wrapper script to see if the + kernel has support for smbfs, as suggested by Jeroen Schaap + <J.Schaap@physiology.medfac.leidenuniv.nl>. + * swat's man page is now part of the swat package, not of the samba + package. This closes #44808 (Samba has a man page for swat, but + the binary is not included). + * The interface program smbrun is not longer needed by smbd because + of the availability of execl() under Linux. Because of this, the + smbrun is not even being compiled. Since there is no need for smbrun + now, the smbrun man page was taken out of the samba package. This + closes #45266 (/usr/bin/smbrun missing). + * smbpasswd is now part of the samba-common package, and not part of + the samba package. This is to let administrators that do not want + to install a full Samba server administer passwords in remote + machines. This closes bug #42624 (smbpasswd should be included in + smbclient). This bug report also suggests that swat becomes part of + the samba package, that smbfs becomes part of the smbclient package, + and that the binary smbpasswd becomes part of the smbclient package. + I moved smbpasswd to the samba-common package but I am reluctant to + do the other things the bug report suggests. + * In order to keep dpkg happy when moving smbpasswd from the samba + package to samba-common, I had to add a "Replaces: samba (<= 2.0.5a-2)" + in the control section of the samba-common package and a + "Replaces: samba-common (<= 2.0.5a-2)" in the control section of the + samba package (in debian.control). + * Samba is now being compiled with the "--with-netatalk" option. This + closes #47480 (Could samba be compiled with the --with-netatalk option). + * All packages that depend on samba-common have a versioned dependency + now. This was accomplished by adding "(= ${Source-Version})" to the + relevant sections of debian/control. Thanks t Antti-Juhani Kaijanaho + <gaia@iki.fi> for the hint. This closes #42985 (samba should probably + have a versioned depends on samba-common). + * Made sure the file docs/textdocs/DIAGNOSIS.txt gets installed in all + the Samba packages. This closes bug #42049 (no DIAGNOSTICS.txt file). + * Added the smbadduser helper script to the samba package. This closes + #44480 (Samba doesn't come with the smbadduser program). + * Applied patch from szasz@triton.sch.bme.hu that prevents smbmount + to leave an entry in /etc/mtab for a share that could not be mounted + because of invalid user of password. The patch also allows smbumount + to unmount the share in the event that something goes wrong with the + smbmount process. This closes bug #48613 (Mount/umount problems + + patch) as well as #44130 (failed mount is still mounted). + * smbmount-2.2.x is now setuid root. This is needed for the patch + applied above to be effective. If smbmount-2.2.x is not setuid root + then an entry will be left in /etc/mtab even when the mount + fails. I had to add "usr/bin/smbmount-2.2.x" to debian/smbfs.suid + for this to work. + + -- Eloy A. Paris <peloy@debian.org> Wed, 27 Oct 1999 10:36:13 -0400 + +samba (2.0.5a-2) unstable; urgency=low + + * This version is basically the same as 2.0.5a-1 but it was compiled + on a Potato system with glibc2.1. See below the change log for 2.0.5a-1 + for more information. + + -- Eloy A. Paris <peloy@debian.org> Tue, 27 Jul 1999 02:25:29 -0400 + +samba (2.0.5a-1) stable; urgency=high + + * I'm back from the Honey Moon. We are pretty busy because we are moving + to Pittsburgh (from Caracas, Venezuela) in aprox. 24 hours and we still + have plenty of things to pack and to do. Samba 2.0.5 was released + while I was in the Honey Moon and it is just now (almost 3 AM) when + I have time to package it. + * Because of the security problems fixed in 2.0.5, this upload goes + to both stable and unstable (the Security Team asked for this). + * This release (2.0.5a-1) was compiled on a Slink system. 2.0.5a-2 will + be compiled on a Potato system. + * Added a "Replaces: samba (<= 1.9.18p10-7)" to the samba-common + section in debian/control (as suggested by Steve Haslam + <araqnid@debian.org>) to fix the problems that appear when upgrading + from the Samba package in Slink. Please test this as I am completely + unable to do so. This should fix bug #39818 (Upgrading Samba from the + Slink version). + * Removed the hacks to the autoconf stuff that I added to 2.0.4b-2 in + order to have defined several socket options when compiling with + Linux 2.2.x kernel headers - the fix is now upstream. + * Finally!!! smbmount was re-written (thanks Tridge :-) to use a command + line syntax similar to the one used by the old smbmount (for 2.0.x + kernels). This means that the wrapper script is no longer necessary + so I removed it. In its place there is a simple wrapper script that + calls smbmount-2.0.x or smbmount-2.2.x depending on the kernel that is + running. + * Because of the wedding, the Honey Moon, and our move to Pittsburgh, + I can't work on fixing other bugs in this release. + + -- Eloy A. Paris <peloy@debian.org> Tue, 27 Jul 1999 02:18:51 -0400 + +samba (2.0.4b-3) unstable; urgency=low + + * Stupid mistake: I forgot to add /usr/bin/smbumount to debian/smbfs.files + and because of this /usr/bin/smbumount was part of the samba package + instead of part of the smbfs package. + + -- Eloy A. Paris <peloy@debian.org> Thu, 1 Jul 1999 01:51:24 -0400 + +samba (2.0.4b-2) unstable; urgency=low + + * Dark (and archive maintainers): please remove from Potato the smbfsx + binary package and also the old source package for smbfs. smbfs and + smbfsx have been merged starting with this version. + * Merged the old smbfs package with Samba. Now there is only one package + for the smbfs utilities and is called "smbfs". The package smbfsx + does not exist any more and this new smbfs package must be used + for both 2.0.x and > 2.1.x kernels. + * A wrapper script was added to handle the syntax change in smbmount + in the new smbfs utilities (required for kernels > 2.1.70). The + home page for this script is http://www.wittsend.com/mhw/smbmount.html. + Please _note_ that this will change (for good) in Samba 2.0.5 :-) + * Added debian/smbumount.sh. It's another wrapper that calls smbumount-2.2.x + or smbumount-2.0.x depending on the kernel currently running. + * Not using -t for savelog in cron.weekly script. + * Recompiled without libreadlineg-dev (Samba does not seem to be using + it so unnecessary dependencies are produced). + * glibc2.1 build. + * Removed smbpasswd.8 man page from the debian/ directory because it is + now being provided upstream. + * Got rid of the ugly hack I put in source/lib/util_sock.c to have + IPTOS_LOWDELAY and IPTOS_THROUGHPUT defined. Now I patched the + autoconf stuff to #include <netinet/ip.h>. I've sent the patch to + Jeremy Allison so we have this upstream. + + -- Eloy A. Paris <peloy@debian.org> Mon, 28 Jun 1999 17:47:19 -0400 + +samba (2.0.4b-1) unstable; urgency=low + + * New upstream release. This release fixes the following Debian bugs: + #33838 (Amanda/ Samba 2.0.2 and backing up large filesystems) and + #33867 (Amanda 2.4.1 and Samba 2.0.2 and large filesystems). Jeremy + Allison released Samba 2.0.4 and found out that there were a couple + of minor bugs so he released 2.0.4a. Then he found out about more + serious bugs and released 2.0.4b. I have built this package several + times between yesterday and today because of this. Now I am releasing + the Debian packages for Samba with what I believe will be the latest + release the Samba Team will make at least in the next 4 days (Jeremy + is taking a short vacation). + * Still compiling against glibc2.0 (sorry about that :-) + * Hacked source/smbwrapper/smbsh.c to fix the problem + of smbsh not finding the shared library smbwrapper.so. It looks + now in /usr/lib/samba/ for this file. This fixes #32971, #32989, + #33278, #34911 and #36317. + * Made smbfsx depend on samba-common because smbfsx uses /etc/samba/smb.conf + and /etc/samba/codepages/. This fixes #33128 (smbmount complains about + missing /etc/smb.conf). + * Package swat does not depend on httpd anymore (there's no need to). + This fixes #35795 (swat requires httpd). + * Renamed smbmount-2.1.x and smbumount-2.1.x to smbmount-2.2.x and + smbumount-2.2.x. Same applies to the man pages. + * Changed minor type in smbmount's man page (changed "\"" by "\'"). This + fixes #34070 (wrong quotes in manpage). + * Used Fabrizio Polacco's <fpolacco@icenet.fi> procedure to create the + Debian package for Samba. This closes #35781 (samba has no pristine + source). + * Changes to /etc/cron.weely/samba: rotate /var/log/{nmb,smb}.old only + if the size of either is different than 0. Also, added comments at the + beginning of this script to explain how rotation of log files works in + Samba. Thanks to ujr@physik.phy.tu-dresden.de (Ulf Jaenicke-Roessler) + for the suggestions. This closes #37490 (cron.weekly script rotates not + used [sn]mb.old files). As I side effect, this should also close + #31462 (still trouble with /etc/cron.weekly/samba). + * Check for old /etc/pam.d/samba file which is not provided by this version + of the Debian Samba package but was provided in older versions. If this + file exists we delete it. We check for this in the postinst. This closes + #37356 (samba put stuff in pam.d that pam complains about) and #34312 + (libpam0g: questions during upgrade). + * Make sure the mode of /etc/samba/smbpasswd is set to 600. This is done + in the postinst script. This closes #35730 (Security problem with + /etc/samba/smbpasswd when upgrading from samba 1.9.18p8-2 to 2.0.3-1). + * I have just checked and it looks like #28748 (smbfsx doesn't "return ") + has been fixed. This might have been fixed since a long time ago. + * Long long standing bug #18488 (smbclient: internal tar is broken) is + closed in this release of Samba. The bug might have been closed for a + long long time, but I did not check for this before. + * Temporary fix to the annoying "Unknown socket option IPTOS_LOWDELAY" + message. This fixes #33698 (socket option IPTOS_LOWDELAY no longer works), + #34148 (warnings from smbd) and #35333 (samba warnings). + + -- Eloy A. Paris <peloy@debian.org> Thu, 20 May 1999 00:35:57 -0400 + +samba (2.0.3-1) unstable; urgency=low + + * New upstream version. + * Removed the convert_smbpasswd.pl program I created and put in + /usr/doc/samba/ because there's a convert_smbpasswd script in the + upstream sources that does the same thing. I modified the postinst + script to use this script instead of the one I created. + + -- Eloy A. Paris <peloy@debian.org> Sun, 28 Feb 1999 01:35:37 -0400 + +samba (2.0.2-2) unstable; urgency=low + + * Updated the README.Debian file. + * Updated the description of the samba package in the control file. + * The binaries smbmnt and smbumount-2.1.x in the smbfsx package are now + installed setuid root as they should be. This was done by doing a + a "chmod u+s" for each binary in debian/rules and by creating the + file debian/smbfsx.suid. + * Minor patch to source/client/smbumount.c to allow normal users + to umount what they have mounted (problem was a kernel vs. libc6 + size mismatch). I sent the patch upstream. + * Created debian/smbwrapper.dirs so the directory /usr/lib/samba/ is + created. + * Modified debian/rules to move smbwrapper.so from debian/tmp/usr/bin/ to + debian/smbwrapper/usr/lib/samba/. + * Hacked source/smbwrapper/smbsh.c to fix the problem + of smbsh not finding the shared library smbwrapper.so. + + -- Eloy A. Paris <peloy@debian.org> Thu, 11 Feb 1999 18:11:34 -0400 + +samba (2.0.2-1) unstable; urgency=low + + * New upstream version. + + -- Eloy A. Paris <peloy@debian.org> Thu, 11 Feb 1999 01:35:51 -0400 + +samba (2.0.1-1) unstable; urgency=low + + * New upstream version. + + -- Eloy A. Paris <peloy@debian.org> Sat, 6 Feb 1999 06:51:18 -0400 + +samba (2.0.0final-4) unstable; urgency=low + + * The samba postinst made an unwarranted assumption that the file + /etc/samba/smbpasswd exists. If the file did not exist (which is + perfectly valid) the postinst will fail. This fixes #32953. + + -- Eloy A. Paris <peloy@debian.org> Fri, 5 Feb 1999 23:32:46 -0400 + +samba (2.0.0final-3) unstable; urgency=low + + * Added to debian/control a "Depends: ${shlibs:Depends}" line for the + samba-common package so dependencies for this package are set + correctly (thanks to Dark for pointing this out). + + -- Eloy A. Paris <peloy@debian.org> Thu, 4 Feb 1999 09:45:21 -0400 + +samba (2.0.0final-2) unstable; urgency=low + + * Finally!!! The first upload to unstable. Sorry for the delay folks + but I have been quite busy lately :-) Another reason for the delay + is that I wanted to ease the migration from Samba 1.9.18p10 and + before to Samba 2.0.0. I changed the location of the config. files + from /etc/ to /etc/samba/ and this made things a little bit harder. + * This package needs 2.2 kernel headers to compile (well, this is + true for the smbfsx package, all others compile fine with 2.0 kernel + headers). + * Created a preinst script for the samba package to take care of the + location migration of smb.conf (from /etc/ to /etc/samba/). The + preinst script also takes care of moving /etc/smbpasswd to its new + location (/etc/samba/). + * Created postinst and postrm scripts to add/remove an entry for swat + in /etc/inetd.conf. + * I had forgotten to install the sambaconfig script so I changed + debian/rules to install this script. + * Added a postrm script for the samba package (I had forgotten to add + this script to the new Samba packages after the migration from 1.9.18 + to 2.0.0). + * Created a small Perl script that is called from the samba postinst + to convert the smbpasswd from the old format used in version prior + to 2.0.0 to the new one used in 2.0.0 and beyond. + * The upgrade process should be automatically now. Please let me know + of any problems you encounter. + + -- Eloy A. Paris <peloy@debian.org> Sat, 23 Jan 1999 09:34:10 -0400 + +samba (2.0.0final-1) experimental; urgency=low + + * Finally!!! Samba 2.0.0 is here! I am not uploading to unstable + because I still have to work out the migration from the old + samba packages to the new ones. I also need to work more on the + new swat package. + + -- Eloy A. Paris <peloy@debian.org> Thu, 14 Jan 1999 22:40:02 -0400 + +samba (2.0.0beta5-1) experimental; urgency=low + + * New upstream version. + + -- Eloy A. Paris <peloy@debian.org> Tue, 5 Jan 1999 00:37:57 -0400 + +samba (2.0.0beta4-1) experimental; urgency=low + + * New upstream version. + + -- Eloy A. Paris <peloy@debian.org> Wed, 23 Dec 1998 18:37:45 -0400 + +samba (2.0.0beta3-1) experimental; urgency=low + + * New upstream version. + * I have just realized that the documentation patches (for man pages) + that I used for the 1.9.18 release are not longer necessary because + there was a major re-write of all the Samba documentation that added + the missing bits of information. So, I have just removed these minor + patches. + + -- Eloy A. Paris <peloy@debian.org> Tue, 8 Dec 1998 12:00:30 -0400 + +samba (2.0.0beta2-1) experimental; urgency=low + + * New upstream version. + * This new version fixes the potential security problem that + was posted to debian-private (using the "message command" parameter + to execute arbitrary commands from messages sent from LinPopUp). + * Changed /etc/init.d/samba to use one of the variables stored in + /etc/samba/debian_config to know how Samba is being run (from inetd or + as daemons) instead of grepping /etc/inetd.conf which may not exist + if the user is running xinetd (this fixes bug #29687 - assumes using + vanilla inetd) + + -- Eloy A. Paris <peloy@debian.org> Mon, 23 Nov 1998 23:32:03 -0400 + +samba (2.0.0beta1-1) experimental; urgency=low + + * First beta release of the samba-2.0.0 code. Before the beta I was + working with sources downloaded directly from the CVS server. This + package goes into experimental and I plan to release the new + samba to unstable as soon as it gets out of beta. + * Created several packages out of the Samba sources. They are: + samba (nmbd and smbd daemons + related programs), smbclient (FTP + like command line utility to retrieve files from SMB servers), + swat (Samba Web Administration Tool), samba-common (common files + used by samba, smbclient and swat), smbfsx (smbfs utilities for + kernels >= 2.1.70), smbwrapper and samba-doc (Samba documentation). + * Refreshed debian/samba-doc.docs so recently added docs. are + installed in the samba-doc package. New additions include man + pages in the /usr/doc/samba-doc/htmldocs/ directory. + * Deleted Debian specific nmblookup(1) man page as it is now upstream. + * Added smbtorture to smbclient package. + * Moved rpcclient from the samba package to the smbclient package. + * The Samba daemons (nmbd and smbd) now create a PID file so I changed + all calls to start-stop-daemon to use the PID file. + * Fixed debian/rules to install mksmbpasswd (fixes #27655). + * Modified /etc/init.d/samba so nmbd is started without the -a (append + to the log file instead of overwrite) switch. The new behavior of + nmbd is to NOT overwrite log files, so the -a switch can be deleted + safely. + * Moved from debstd to debhelper. + + -- Eloy A. Paris <peloy@debian.org> Thu, 1 Oct 1998 08:37:41 -0400 + +samba (1.9.18p10-5) frozen unstable; urgency=high + + * Oppsss!!! While fixing bug #26884 I introduced a bug even worse than + the one I was trying to fix: in /etc/init.d/samba I got rid of the test + that tells us whether the Samba daemons are running from inetd or as + standalone daemons. I corrected the problem by editing again + /etc/init.d/samba to uncomment the test. + * Wishlist bug #28298 (typos in samba) was fixed. + * Wishlist bug #28309 (typos in smb.conf) was fixed. + + -- Eloy A. Paris <peloy@debian.org> Wed, 28 Oct 1998 09:11:47 -0400 + +samba (1.9.18p10-4) unstable; urgency=low + + * Minor patch to debian/rules to delete *substvars instead of only + substvars when doing a "debian/rules clean" (thanks to Daniel Jacobowitz + <dmj@andrew.cmu.edu> for this). + * Small patch to source/shmem_sysv.c that eases compilation under + glibc-2.1 (thanks to Daniel <dmj@andrew.cmu.edu> for this). + + -- Eloy A. Paris <peloy@debian.org> Thu, 17 Sep 1998 15:33:49 -0400 + +samba (1.9.18p10-3) unstable; urgency=low + + * Patched smbclient again to fix minor formatting problem introduced + by Magosanyi Arpad's smbclient patch. + + -- Eloy A. Paris <peloy@debian.org> Thu, 3 Sep 1998 11:03:23 -0400 + +samba (1.9.18p10-2) unstable; urgency=low + + * Sync'ed include files for the smbfs utilities with the ones in + kernel 2.1.119. + * Added to the /usr/doc/samba/examples/ directory a new script called + wins2dns (courtesy of Jason Gunthorpe <jgg@deltatee.com>) that + generates BIND sonze files for hosts in the WINS database. + * Patched smbclient to include enhancements by Magosanyi Arpad + <mag@bunuel.tii.matav.hu> that make scripting easier. + + -- Eloy A. Paris <peloy@debian.org> Fri, 28 Aug 1998 13:34:54 -0400 + +samba (1.9.18p10-1) stable unstable; urgency=low + + * New upstream version (see /usr/doc/samba/WHATSNEW.txt for a + description of what has changed). I built a 1.9.18p9-1 but I + never released it because an obscure bug was found just a couple + of days before the official release, so the Samba Team stopped + the rollover of 1.9.18p9. + * Updated documentation (new files were added to the docs/ directory + that were not installed in /usr/doc/samba/). + * Fixed long standing bug #7695 (smb.conf's man page doesn't document + 'printing=lprng') - I made a couple of changes to the man page to + include references to lprng. + * Fixes bug #24930 (samba needs to suggest psmisc?). I don't think it + is necessary to make samba suggest psmisc just because the postinst + script mentions to call killall. So, I removed all references to + "killall" in the scripts. + * Fixes bug #25999 (Samba does not by default work with unix password + sync): I added the "passwd program" and "passwd chat" parameters to + the sample smb.conf to reflect the Debian environment. + + -- Eloy A. Paris <peloy@debian.org> Fri, 21 Aug 1998 08:59:18 -0400 + +samba (1.9.18p9-1) unstable; urgency=low + + * New upstream version (see /usr/doc/samba/WHATSNEW.txt for a + description of what has changed). + * Removed Jeremy Allison's patch applied to 1.9.18p8-2 because it is + now part of the new upstream version. + * Corrected small typo in addtosmbpass' man page (fixes #25629). + + -- Eloy A. Paris <peloy@debian.org> Tue, 11 Aug 1998 08:53:08 -0400 + +samba (1.9.18p8-2) frozen unstable; urgency=medium + + * Applied patch received from Jeremy Allison (Samba Team) that fixes + "grave" bug #23903 (samba maps username before authenicating with + NT password server). + * Added a "sleep 2" between "start-stop-daemon --stop" and + "start-stop-daemon --start" in /etc/init.d/samba so when this script + is called with the "restart" parameter the Samba daemons are restarted + properly. This fixes bug #24211 (init.d script doesn't restart). + * Sent start-stop-daemon output in /etc/init.d/samba to /dev/null to + avoid annoying warning messages. + * Added perfomance tune parameters to sample /etc/smb.conf (SO_SNDBUF=4096 + and SO_RCVBUF=4096 to "socket options" in /etc/smb.conf). I can't + find who sent this suggestion to me. If you are listening, drop me a + note and I'll put your name here :-) + + -- Eloy A. Paris <peloy@debian.org> Mon, 29 Jun 1998 08:45:01 -0400 + +samba (1.9.18p8-1) frozen unstable; urgency=low + + * New upstream release that fixes _lots_ of "ugly" bugs. The list of + fixed bugs is too long to include here (see /usr/doc/samba/WHATSNEW.txt). + * Fixed postinst to quote arguments to if [ arg .. ] constructs + (fixes #22881). + * Applied Jeremy Allison's patch (posted to the samba-ntdom mailing + list) that solves a problem with username maps (the Samba Team did + not catch this problem before final 1.9.18p8). + * Made /etc/init.d/samba to print out a warning when Samba is running + from inetd and the user runs /etc/init.d/samba to start|stop|restart + Samba (there's no point on doing this because inetd will start the + daemons again when there is traffic on UDP port 137-139). + + -- Eloy A. Paris <peloy@debian.org> Sat, 13 Jun 1998 00:18:25 -0400 + +samba (1.9.18p7-4) frozen unstable; urgency=medium + + * Fixes the serious problem of having the WINS name server + database getting deleted at boot time. That happened because the + WINS database was being stored under /var/lock/samba/ and all files + under /var/lock/ are deleted at boot time. The place where the WINS + database is stored was moved to /var/samba/. + + -- Eloy A. Paris <peloy@debian.org> Mon, 18 May 1998 20:24:29 -0400 + +samba (1.9.18p7-3) stable; urgency=high + + * Libc5 version for Bo (stable) that fixes the recently reported + security hole. + + -- Eloy A. Paris <peloy@debian.org> Mon, 18 May 1998 20:19:33 -0400 + +samba (1.9.18p7-2) frozen unstable; urgency=low + + * Added patches from the non-mantainer upload that make us able + to compile Samba on Alpha systems. This fixes bug #22379. + + -- Eloy A. Paris <peloy@debian.org> Wed, 13 May 1998 20:38:51 -0400 + +samba (1.9.18p7-1) frozen unstable; urgency=low + + * New upstream release (just bug fixes, no new functionality). + + -- Eloy A. Paris <peloy@debian.org> Wed, 13 May 1998 11:47:32 -0400 + +samba (1.9.18p6-2) frozen unstable; urgency=low + + * Uploaded to frozen (I forgot to upload last version to frozen + so it got installed only in unstable). + + -- Eloy A. Paris <peloy@debian.org> Tue, 12 May 1998 18:10:17 -0400 + +samba (1.9.18p6-1.1) unstable; urgency=low + + * non-maintainer upload for Alpha + * patch needed for source/quota.c (_syscall4() confusion) + + -- Paul Slootman <paul@debian.org> Tue, 12 May 1998 20:39:13 +0200 + +samba (1.9.18p6-1) unstable; urgency=low + + * New upstream release that fixes a possible buffer overflow. + This security hole was reported on BugTraq by Drago. The + previous Debian version (1.9.18p5-1) was not released because + 1.9.18p5 and 1.9.18p6 were released very closely. + + -- Eloy A. Paris <peloy@debian.org> Mon, 11 May 1998 20:28:33 -0400 + +samba (1.9.18p5-1) unstable; urgency=low + + * New upstream release (no new funcionality, just bug fixes - see + /usr/doc/samba/WHATSNEW.txt.gz). + * Backed off Debian patches that were added upstream. + + -- Eloy A. Paris <peloy@debian.org> Mon, 11 May 1998 08:43:53 -0400 + +samba (1.9.18p4-2) frozen unstable; urgency=low + + * Patched smbclient(1) man page to not reference the unsopported + -A parameter (fixes #6863). + * Changes to start nmbd with the -a option (in /etc/init.d/samba + and in the entry added to /etc/inetd.conf). + * Fixed typo in sample smb.conf (fixes #21484). + * Fixed yet another typo in sample smb.conf (fixes #21447). + + -- Eloy A. Paris <peloy@debian.org> Fri, 17 Apr 1998 22:19:23 -0400 + +samba (1.9.18p4-1) frozen unstable; urgency=low + + * New upstream version that fixes several bugs. + * New scheme for keeping track of Debian specific configuration. + This new scheme fixes bug #18624 (Samba always asks the user about + configuration options). New scheme stores Debian specific + configuration information in /etc/samba/debian_config. + * Changes to /usr/sbin/sambaconfig, prerm and postinst to support the + new configuration scheme. + * Moved required kernel 2.1.x include files inside the source tree + so I don't have to do very nasty things like creating crazy + symlinks in /usr/include to make this package compile. This + allows non-root users to build the package and fixes bug + #20104. + * Fixed address of the FSF in /usr/doc/samba/copyright (problem + reported by lintian). + * The /etc/init.d/samba script now supports the force-reload + argument, as required by the policy (problem reported by lintian). + * Added a "rm /etc/cron.weekly/samba" at the end of the postinst. + * Now the samba package can be installed even if no nmbd or smbd processes + are running. This fixes the following bugs: #8917, #9334, #10268, + #10411, #11146 and #13387. + * Provides the original README in /usr/doc/samba. This fixes bug #9693. + * Added a --no-reload option to sambaconfig to not reload Samba + after configuration. + * Created man pages for sambaconfig(8), addtosmbpass(8), + mksmbpasswd(8) and nmblookup(1). + * Corrected small typo in sample /etc/smb.conf. + * Added two new parameters to /etc/smb.conf: "preserver case" and + "short preserve case". + * "rm -Rf /var/lock/samba" in postrm when package is being purged. + * Patched upstream source (nmbd.c) to not overwrite log files when + nmbd is called with the -a parameter (fixes #17704: nmbd ignores + -a option). + * /etc/init.d/samba now starts the nmbd daemon with the -a parameter + to not overwrite log files. + + -- Eloy A. Paris <peloy@debian.org> Mon, 23 Mar 1998 21:22:03 -0400 + +samba (1.9.18p3-1) unstable; urgency=low + + * New upstream version. + * Oppsss!!! I really screwed it up (actually, debstd did). + 1.9.18p2-2 still contained man pages (smbmount and smbumount) part + of other packages. This version does have this corrected. If not, + I no longer deserve to be a Debian developer! So, this version + fixes bug #18438 and some of the bugs I claimed to fix in + 1.9.18p2-2. Oh, by the way, I fixed the problem by running debstd + with -m in debian/rules (man pages are installed by "make install" + so it's a bad idea to re-install man pages with debstd). + + -- Eloy A. Paris <peloy@debian.org> Mon, 23 Feb 1998 17:32:42 -0400 + +samba (1.9.18p2-2) unstable; urgency=low + + * Fixes bugs #18017, #17999, #17961, #17932: old 1.9.18p2-1 provided + a man page for smbmount, which conflicts with package smbfs. This + was solved by creating a multi-binary package that produces + package samba and new package smbfsx. + * Fixes bug #18000 (typo in postinst). + * Fixes bug #17958 (postinst asks obsolete question). Actually, + the question is still asked, but only if Samba is run as daemons. + * Created a multi-binary package from the Samba sources: package + samba and new package smbfsx which provides SMB mount utilities + for kernels > 2.1.70. + + -- Eloy A. Paris <peloy@debian.org> Mon, 9 Feb 1998 19:47:05 -0400 + +samba (1.9.18p2-1) unstable; urgency=low + + * New upstream version. + * Removed /etc/cron.weekly/samba because Samba does not handle well + rotation of log files (if the log file is rotated Samba will + continue to log to the rotated file, instead of the just created + one). In any case, Samba will rotate log files after an specific + file size. + + -- Eloy A. Paris <peloy@debian.org> Tue, 27 Jan 1998 22:34:27 -0400 + +samba (1.9.18p1-2) unstable; urgency=low + + * Created a multi-binary package out of the Samba sources to provide + packages samba and smbfsx (userland utilities to work with + smbfs with kernels > 2.1.x. + + -- Eloy A. Paris <peloy@debian.org> Sat, 17 Jan 1998 09:23:48 -0400 + +samba (1.9.18p1-1) unstable; urgency=low + + * New upstream version. + * Created /etc/cron.daily/samba to save a copy of /etc/smbpasswd in + /var/backups/smbpasswd.bak. + + -- Eloy A. Paris <peloy@debian.org> Wed, 14 Jan 1998 13:40:56 -0400 + +samba (1.9.18alpha14-1) unstable; urgency=low + + * New upstream version. + * Added a note to the postinst script telling the user that he/she + needs to run smbpasswd manually after creating a new /etc/smbpasswd + from /etc/passwd. + + -- Eloy A. Paris <peloy@debian.org> Tue, 23 Dec 1997 23:44:37 -0400 + +samba (1.9.18alpha13-1) unstable; urgency=low + + * New upstream version. + + -- Eloy A. Paris <peloy@debian.org> Tue, 16 Dec 1997 13:02:32 -0400 + +samba (1.9.18alpha12-1) unstable; urgency=low + + * New upstream version. + * Conflicts with the sambades package because the new Samba 1.9.18 + series do not depend on the DES libraries to support encrypted + passwords. + * Added parameter "encrypt passwords = yes" to /etc/smb.conf. + * Compiled with support for quotas in disk_free(). + * Home directories are now exported read only by default. + * Re-worked debian/rules. + * Re-worked sample smb.conf. + + -- Eloy A. Paris <peloy@debian.org> Thu, 4 Dec 1997 22:50:34 -0400 + +samba (1.9.17p4-1) unstable; urgency=low + + * New upstream version. + * Made /etc/smb.conf readable by everybody because some Samba utilities + will fail otherwise when run by non-root users. + * Dropped PAM support while the PAM libraries are ported to libc6. + + -- Eloy A. Paris <peloy@debian.org> Tue, 21 Oct 1997 18:08:49 -0400 + +samba (1.9.17p3-1) unstable; urgency=low + + * New upstream version. + * Made /etc/smb.conf readable only by root as suggested by smbd's man page. + + -- Eloy A. Paris <peloy@debian.org> Wed, 15 Oct 1997 09:21:25 -0400 + +samba (1.9.17p2-2) unstable; urgency=low + + * Running Samba as daemons instead of from inetd. + * Removing netbios entries in /etc/inetd.conf. + + -- Eloy A. Paris <peloy@debian.org> Thu, 9 Oct 1997 23:37:25 -0400 + +samba (1.9.17p2-1) unstable; urgency=low + + * New upstream version that fixes a serious security hole. + * Removed Debian patches added in 1.9.17-1 and 1.9.17p1-1 because + these patches are now part of the upstream release. + + -- Eloy A. Paris <peloy@debian.org> Sun, 28 Sep 1997 22:54:33 -0400 + +samba (1.9.17p1-1) unstable; urgency=low + + * New upstream version. + * Defined symbol _LINUX_C_LIB_VERSION_MAJOR as 6 in includes.h to shut up + compiler warnings. + * Included rpcsvc/ypclnt.h in includes.h to shut up compiler warnings. + * Included crypt.h to have function prototype for crypt(). + * Included netinet/tcp.h to have some socket options included. + * Included netinet/ip.h to have some socket options included. + * Linking with libcrypt (LIBM='... -lcrypt'). Without including this + library smbd generates a seg. fault when authenticating users (?). + + -- Eloy A. Paris <debian.org> Wed, 10 Sep 1997 22:09:18 -0400 + +samba (1.9.17-1) unstable; urgency=low + + * New upstream version (called the "Browse Fix Release") + * Added the option --oknodo to the start-stop-daemon invocation in prerm + script. This was because the prerm was failing because start-stop-daemon + was returning an error code if no nmbd or smbd daemons were found + to kill. + * The function yp_get_default_domain(), referenced in three source + files was part of libc5 but with libc6 (glibc2) it has been moved + to libnss_nis. Since the linker was unable to find the function + I had to add LIBSM='-lnss_nis' to debian/rules. + * Added -DNO_ASMSIGNALH and -DGLIBC2 to FLAGSM in debian/rules + because compiling was failing because of conflicts with glibc2. + * Patched source/includes.h to include termios.h if GLIBC2 is defined. + + -- Eloy A. Paris <peloy@debian.org> Wed, 27 Aug 1997 08:39:32 -0400 + +samba (1.9.17alpha5-1) unstable; urgency=low + + * New upstream version. + + -- Eloy A. Paris <peloy@debian.org> Thu, 14 Aug 1997 18:05:02 -0400 + +samba (1.9.16p11-3) unstable; urgency=low + + * Fixed accidental omission of /etc/pam.d/samba. + + -- Klee Dienes <klee@debian.org> Sat, 15 Mar 1997 22:31:26 -0500 + +samba (1.9.16p11-2) unstable; urgency=low + + * Recompiled against newer PAM libraries. + * Added /etc/pam.d/samba. + + -- Klee Dienes <klee@debian.org> Sat, 8 Mar 1997 01:16:28 -0500 + +samba (1.9.16p11-1) unstable; urgency=low + + * New upstream release. + * Added PAM support. + + -- Klee Dienes <klee@debian.org> Tue, 25 Feb 1997 18:00:12 -0500 + +samba (1.9.16p9-2) unstable; urgency=low + + * minor packaging changes + + -- Klee Dienes <klee@sauron.sedona.com> Sun, 3 Nov 1996 11:45:37 -0700 + +samba (1.9.16p9-1) unstable; urgency=low + + * upgraded to new upstream version + + -- Klee Dienes <klee@sauron.sedona.com> Sat, 26 Oct 1996 21:38:20 -0700 + +1.9.16alpha10-1: + 960714 + * Removed Package_Revision from control file. + * Removed -m486 compiler option. + * Added Architecture, Section and Priority fields to control file. + * Upgraded to latest upstream version. + * Uses update-inetd now. + * Added shadow passwords support. + * Fixed Bug#1946: nmbd won't browse + +1.9.15p4-1: + 951128 + * Upgraded to latest upstream version. + * Fixed many bugs. + * Adds Master Browsing support. + * Converted to ELF. + * Fixed bug #1825 - nmbd is now killed when removing samba. + +1.9.14-1: + 950926 Andrew Howell <andrew@it.com.au> + * Upgraded to latest version. + * Fixed Bug #1139 - samba won't print + +1.9.14alpha5-1: + * Fixes killing of inetd problem in debian.postint and debian.postrm + +1.9.14alpha5-0: + 950704 Andrew Howell <andrew@it.com.au> + * Taken over samba package from Bruce Perens. + * Upgraded to newest version of samba. + +1.9.02-1: + 9-January-1994 Bruce Perens <Bruce@Pixar.com> + * Added Debian GNU/Linux package maintenance system files, and + configured for Debian systems. diff --git a/packaging/Debian/debian/config.cache b/packaging/Debian/debian/config.cache new file mode 100644 index 00000000000..8872a27b761 --- /dev/null +++ b/packaging/Debian/debian/config.cache @@ -0,0 +1,221 @@ +# +# 22 August 2001 Steve Langasek <vorlon@debian.org> +# +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +# +# This config.cache file contains a list of acceptable autoconf +# values which can be used in compiling Samba for Debian woody/sid. +# +# Autoconf sorts options alphabetically in its output. This file +# groups options logically. + + +# Load any architecture-specific settings +if [ -n "$DEB_HOST_GNU_TYPE" \ + -a -f ../debian/config.cache.${DEB_HOST_GNU_TYPE} ]; then + . ../debian/config.cache.${DEB_HOST_GNU_TYPE} +fi + + +# This is at the top because it's most in need of regular tweaking. +# These are options which are supported on 2.4 kernels, but not on 2.2 +# kernels. + +samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=${samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no} +samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=${samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no} +samba_cv_HAVE_KERNEL_SHARE_MODES=${samba_cv_HAVE_KERNEL_SHARE_MODES=no} + + +# These are present in 2.2 kernels, but not in 2.0... + +samba_cv_have_setresuid=${samba_cv_have_setresuid=yes} +samba_cv_have_setresgid=${samba_cv_have_setresgid=yes} +samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=yes} + + +# Various basic libc/compiler stuff that it's blindingly obvious that +# Linux supports (now watch me get bitten for saying that) + +ac_cv_c_const=${ac_cv_c_const=yes} +ac_cv_c_inline=${ac_cv_c_inline=inline} +samba_cv_volatile=${samba_cv_volatile=yes} +ac_cv_dirent_d_off=${ac_cv_dirent_d_off=yes} +ac_cv_func_bzero=${ac_cv_func_bzero=yes} +ac_cv_func_chmod=${ac_cv_func_chmod=yes} +ac_cv_func_chown=${ac_cv_func_chown=yes} +ac_cv_func_chroot=${ac_cv_func_chroot=yes} +ac_cv_func_connect=${ac_cv_func_connect=yes} +ac_cv_func_dup2=${ac_cv_func_dup2=yes} +ac_cv_func_execl=${ac_cv_func_execl=yes} +ac_cv_func_fchmod=${ac_cv_func_fchmod=yes} +ac_cv_func_fchown=${ac_cv_func_fchown=yes} +ac_cv_func_fstat=${ac_cv_func_fstat=yes} +ac_cv_func_fsync=${ac_cv_func_fsync=yes} +ac_cv_func_ftruncate=${ac_cv_func_ftruncate=yes} +ac_cv_func_getcwd=${ac_cv_func_getcwd=yes} +ac_cv_func_getgrent=${ac_cv_func_getgrent=yes} +ac_cv_func_getgrnam=${ac_cv_func_getgrnam=yes} +ac_cv_func_getspnam=${ac_cv_func_getspnam=yes} +ac_cv_func_glob=${ac_cv_func_glob=yes} +ac_cv_func_grantpt=${ac_cv_func_grantpt=yes} +ac_cv_func_initgroups=${ac_cv_func_initgroups=yes} +ac_cv_func_llseek=${ac_cv_func_llseek=yes} +ac_cv_func_memcmp_clean=${ac_cv_func_memcmp_clean=yes} +ac_cv_func_memmove=${ac_cv_func_memmove=yes} +ac_cv_func_memset=${ac_cv_func_memset=yes} +ac_cv_func_mktime=${ac_cv_func_mktime=yes} +ac_cv_func_pipe=${ac_cv_func_pipe=yes} +ac_cv_func_poll=${ac_cv_func_poll=yes} +ac_cv_func_pread=${ac_cv_func_pread=yes} +ac_cv_func_pwrite=${ac_cv_func_pwrite=yes} +ac_cv_func_rand=${ac_cv_func_rand=yes} +ac_cv_func_random=${ac_cv_func_random=yes} +ac_cv_func_readlink=${ac_cv_func_readlink=yes} +ac_cv_func_rename=${ac_cv_func_rename=yes} +ac_cv_func_select=${ac_cv_func_select=yes} +ac_cv_func_setenv=${ac_cv_func_setenv=yes} +ac_cv_func_setgroups=${ac_cv_func_setgroups=yes} +ac_cv_func_setsid=${ac_cv_func_setsid=yes} +ac_cv_func_sigaction=${ac_cv_func_sigaction=yes} +ac_cv_func_sigblock=${ac_cv_func_sigblock=yes} +ac_cv_func_sigprocmask=${ac_cv_func_sigprocmask=yes} +ac_cv_func_snprintf=${ac_cv_func_snprintf=yes} +ac_cv_func_srand=${ac_cv_func_srand=yes} +ac_cv_func_srandom=${ac_cv_func_srandom=yes} +ac_cv_func_strcasecmp=${ac_cv_func_strcasecmp=yes} +ac_cv_func_strchr=${ac_cv_func_strchr=yes} +ac_cv_func_strdup=${ac_cv_func_strdup=yes} +ac_cv_func_strerror=${ac_cv_func_strerror=yes} +ac_cv_func_strftime=${ac_cv_func_strftime=yes} +ac_cv_func_strpbrk=${ac_cv_func_strpbrk=yes} +ac_cv_func_strtoul=${ac_cv_func_strtoul=yes} +ac_cv_func_symlink=${ac_cv_func_symlink=yes} +ac_cv_func_usleep=${ac_cv_func_usleep=yes} +ac_cv_func_utime=${ac_cv_func_utime=yes} +ac_cv_func_utimes=${ac_cv_func_utimes=yes} +ac_cv_func_vsnprintf=${ac_cv_func_vsnprintf=yes} +ac_cv_func_waitpid=${ac_cv_func_waitpid=yes} +ac_cv_type_ino_t=${ac_cv_type_ino_t=yes} +ac_cv_type_mode_t=${ac_cv_type_mode_t=yes} +ac_cv_type_pid_t=${ac_cv_type_pid_t=yes} +ac_cv_type_size_t=${ac_cv_type_size_t=yes} +ac_cv_type_uid_t=${ac_cv_type_uid_t=yes} +samba_cv_socklen_t=${samba_cv_socklen_t=yes} + +# Yes, we know Linux supports fcntl locking. Just ignore +# any errors caused by building on an NFS mount. +samba_cv_HAVE_FCNTL_LOCK=${samba_cv_HAVE_FCNTL_LOCK=yes} + + +# smbwrapper doesn't work because the glibc maintainers don't want +# to support transparent userland VFS. We might as well preempt +# any checks for shadowed symbols that are only useful for smbwrapper. + +ac_cv_func___chdir=${ac_cv_func___chdir=no} +ac_cv_func__chdir=${ac_cv_func__chdir=no} +ac_cv_func___close=${ac_cv_func___close=no} +ac_cv_func__close=${ac_cv_func__close=no} +ac_cv_func___closedir=${ac_cv_func___closedir=no} +ac_cv_func__closedir=${ac_cv_func__closedir=no} +ac_cv_func___dup=${ac_cv_func___dup=no} +ac_cv_func__dup=${ac_cv_func__dup=no} +ac_cv_func___dup2=${ac_cv_func___dup2=no} +ac_cv_func__dup2=${ac_cv_func__dup2=no} +ac_cv_func___fchdir=${ac_cv_func___fchdir=no} +ac_cv_func__fchdir=${ac_cv_func__fchdir=no} +ac_cv_func___fcntl=${ac_cv_func___fcntl=no} +ac_cv_func__fcntl=${ac_cv_func__fcntl=no} +ac_cv_func___fork=${ac_cv_func___fork=no} +ac_cv_func__fork=${ac_cv_func__fork=no} +ac_cv_func___fstat=${ac_cv_func___fstat=no} +ac_cv_func__fstat=${ac_cv_func__fstat=no} +ac_cv_func___fstat64=${ac_cv_func___fstat64=no} +ac_cv_func__fstat64=${ac_cv_func__fstat64=no} +ac_cv_func___fxstat=${ac_cv_func___fxstat=no} +ac_cv_func___getcwd=${ac_cv_func___getcwd=no} +ac_cv_func__getcwd=${ac_cv_func__getcwd=no} +ac_cv_func___getdents=${ac_cv_func___getdents=no} +ac_cv_func__getdents=${ac_cv_func__getdents=no} +ac_cv_func___llseek=${ac_cv_func___llseek=no} +ac_cv_func___sys_llseek=${ac_cv_func___sys_llseek=no} +ac_cv_func__llseek=${ac_cv_func__llseek=no} +ac_cv_func___lseek=${ac_cv_func___lseek=no} +ac_cv_func__lseek=${ac_cv_func__lseek=no} +ac_cv_func___lstat=${ac_cv_func___lstat=no} +ac_cv_func__lstat=${ac_cv_func__lstat=no} +ac_cv_func___lstat64=${ac_cv_func___lstat64=no} +ac_cv_func__lstat64=${ac_cv_func__lstat64=no} +ac_cv_func___lxstat=${ac_cv_func___lxstat=no} +ac_cv_func___open=${ac_cv_func___open=no} +ac_cv_func__open=${ac_cv_func__open=no} +ac_cv_func___open64=${ac_cv_func___open64=no} +ac_cv_func__open64=${ac_cv_func__open64=no} +ac_cv_func___opendir=${ac_cv_func___opendir=no} +ac_cv_func__opendir=${ac_cv_func__opendir=no} +ac_cv_func___pread=${ac_cv_func___pread=no} +ac_cv_func__pread=${ac_cv_func__pread=no} +ac_cv_func___pread64=${ac_cv_func___pread64=no} +ac_cv_func__pread64=${ac_cv_func__pread64=no} +ac_cv_func___pwrite=${ac_cv_func___pwrite=no} +ac_cv_func__pwrite=${ac_cv_func__pwrite=no} +ac_cv_func___pwrite64=${ac_cv_func___pwrite64=no} +ac_cv_func__pwrite64=${ac_cv_func__pwrite64=no} +ac_cv_func___read=${ac_cv_func___read=no} +ac_cv_func__read=${ac_cv_func__read=no} +ac_cv_func___readdir=${ac_cv_func___readdir=no} +ac_cv_func__readdir=${ac_cv_func__readdir=no} +ac_cv_func___readdir64=${ac_cv_func___readdir64=no} +ac_cv_func__readdir64=${ac_cv_func__readdir64=no} +ac_cv_func___seekdir=${ac_cv_func___seekdir=no} +ac_cv_func__seekdir=${ac_cv_func__seekdir=no} +ac_cv_func___stat=${ac_cv_func___stat=no} +ac_cv_func__stat=${ac_cv_func__stat=no} +ac_cv_func___stat64=${ac_cv_func___stat64=no} +ac_cv_func__stat64=${ac_cv_func__stat64=no} +ac_cv_func___telldir=${ac_cv_func___telldir=no} +ac_cv_func__telldir=${ac_cv_func__telldir=no} +ac_cv_func___write=${ac_cv_func___write=no} +ac_cv_func__write=${ac_cv_func__write=no} +ac_cv_func___xstat=${ac_cv_func___xstat=no} + + + +# Miscellaneous stuff that isn't, and shouldn't be, available +# in Debian. Those interested in building debs for other systems may +# need to remove some of these defines. + +ac_cv_func_bigcrypt=${ac_cv_func_bigcrypt=no} +ac_cv_func_crypt16=${ac_cv_func_crypt16=no} +ac_cv_func_getauthuid=${ac_cv_func_getauthuid=no} +ac_cv_func_getprpwnam=${ac_cv_func_getprpwnam=no} +ac_cv_func_getpwanam=${ac_cv_func_getpwanam=no} +ac_cv_func_putprpwnam=${ac_cv_func_putprpwnam=no} +ac_cv_func_rdchk=${ac_cv_func_rdchk=no} +ac_cv_func_set_auth_parameters=${ac_cv_func_set_auth_parameters=no} +ac_cv_func_setgidx=${ac_cv_func_setgidx=no} +ac_cv_func_setluid=${ac_cv_func_setluid=no} +ac_cv_func_setpriv=${ac_cv_func_setpriv=no} +ac_cv_func_setuidx=${ac_cv_func_setuidx=no} +ac_cv_lib_sec_bigcrypt=${ac_cv_lib_sec_bigcrypt=no} +ac_cv_lib_sec_getprpwnam=${ac_cv_lib_sec_getprpwnam=no} +ac_cv_lib_sec_getspnam=${ac_cv_lib_sec_getspnam=no} +ac_cv_lib_sec_putprpwnam=${ac_cv_lib_sec_putprpwnam=no} +ac_cv_lib_sec_set_auth_parameters=${ac_cv_lib_sec_set_auth_parameters=no} +ac_cv_lib_security_bigcrypt=${ac_cv_lib_security_bigcrypt=no} +ac_cv_lib_security_getprpwnam=${ac_cv_lib_security_getprpwnam=no} +ac_cv_lib_security_getspnam=${ac_cv_lib_security_getspnam=no} +ac_cv_lib_security_putprpwnam=${ac_cv_lib_security_putprpwnam=no} +ac_cv_lib_security_set_auth_parameters=${ac_cv_lib_security_set_auth_parameters=no} diff --git a/packaging/Debian/debian/config.cache.alpha-linux b/packaging/Debian/debian/config.cache.alpha-linux new file mode 100644 index 00000000000..6d171920263 --- /dev/null +++ b/packaging/Debian/debian/config.cache.alpha-linux @@ -0,0 +1,12 @@ +# 22 Aug 2001 Steve Langasek <vorlon@debian.org> + +# This file contains autoconf settings specific to the alpha-linux +# platform that should be preloaded when building for this architecture. + + +# Linux 2.2 on Alpha doesn't have a functional setresgid() call, but +# Linux 2.4 does. Ensure that packages compiled for woody remain +# compatible with 2.2 kernels, even if the build machine is running 2.4. +samba_cv_have_setresgid=${samba_cv_have_setresgid=no} +samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=no} +samba_cv_USE_SETREUID=${samba_cv_USE_SETREUID=yes} diff --git a/packaging/Debian/debian/config.cache.sparc-linux b/packaging/Debian/debian/config.cache.sparc-linux new file mode 100644 index 00000000000..a2a21b1d3ad --- /dev/null +++ b/packaging/Debian/debian/config.cache.sparc-linux @@ -0,0 +1,13 @@ +# 24 Spe 2001 Steve Langasek <vorlon@debian.org> + +# This file contains autoconf settings specific to the sparc-linux +# platform that should be preloaded when building for this architecture. + + +# Linux 2.2 on Sparc doesn't have setresgid() or setresuid(), but +# Linux 2.4 does. Ensure that packages compiled for woody remain +# compatible with 2.2 kernels, even if the build machine is running 2.4. +samba_cv_have_setresuid=${samba_cv_have_setresuid=no} +samba_cv_have_setresgid=${samba_cv_have_setresgid=no} +samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=no} +samba_cv_USE_SETREUID=${samba_cv_USE_SETREUID=yes} diff --git a/packaging/Debian/debian/control b/packaging/Debian/debian/control new file mode 100644 index 00000000000..7bfb41b79d9 --- /dev/null +++ b/packaging/Debian/debian/control @@ -0,0 +1,188 @@ +Source: samba +Section: net +Priority: optional +Maintainer: Eloy A. Paris <peloy@debian.org> +Uploaders: Steve Langasek <vorlon@debian.org> +Build-Depends: debhelper (>= 4.1.13), libpam0g-dev, libreadline4-dev, libcupsys2-dev, autoconf, libacl1-dev (>= 2.2.11-1), libacl1 (>= 2.2.11-1), libkrb5-dev, libldap2-dev, po-debconf, python2.3-dev +Standards-Version: 3.5.10 + +Package: samba +Architecture: any +Depends: samba-common (= ${Source-Version}), netbase, logrotate, ${shlibs:Depends}, ${misc:Depends}, libpam-runtime (>= 0.76-13.1), libpam-modules +Replaces: samba-common (<= 2.0.5a-2) +Suggests: samba-doc +Description: a LanManager-like file and printer server for Unix + The Samba software suite is a collection of programs that + implements the SMB protocol for unix systems, allowing you to serve + files and printers to Windows, NT, OS/2 and DOS clients. This protocol + is sometimes also referred to as the LanManager or NetBIOS protocol. + . + This package contains all the components necessary to turn your + Debian GNU/Linux box into a powerful file and printer server. + . + Currently, the Samba Debian packages consist of the following: + . + samba - LanManager-like file and printer server for Unix. + samba-common - Samba common files used by both the server and the client. + smbclient - LanManager-like simple client for Unix. + swat - Samba Web Administration Tool + samba-doc - Samba documentation. + smbfs - Mount and umount commands for the smbfs (kernels 2.2.x and above). + libpam-smbpass - pluggable authentication module for SMB password database + libsmbclient - Shared library that allows applications to talk to SMB servers + libsmbclient-dev - libsmbclient shared libraries + winbind: Service to resolve user and group information from Windows NT servers + python2.3-samba: Python bindings that allow access to various aspects of Samba + . + It is possible to install a subset of these packages depending on + your particular needs. For example, to access other SMB servers you + should only need the smbclient and samba-common packages. + +Package: samba-common +Architecture: any +Depends: debconf, libpam-modules, ${shlibs:Depends} +Replaces: samba (<< 2.999+3.0.alpha21-4) +Description: Samba common files used by both the server and the client + The Samba software suite is a collection of programs that + implements the SMB protocol for unix systems, allowing you to serve + files and printers to Windows, NT, OS/2 and DOS clients. This protocol + is sometimes also referred to as the LanManager or NetBIOS protocol. + . + This package contains the common files that are used by both the server + (provided in the samba package) and the client (provided in the smbclient + package). + +Package: smbclient +Architecture: any +Depends: samba-common (= ${Source-Version}), ${shlibs:Depends} +Replaces: samba (<< 2.999+3.0.alpha21-4) +Provides: samba-client +Suggests: smbfs +Description: a LanManager-like simple client for Unix + The Samba software suite is a collection of programs that + implements the SMB protocol for unix systems, allowing you to serve + files and printers to Windows, NT, OS/2 and DOS clients. This protocol + is sometimes also referred to as the LanManager or NetBIOS protocol. + . + This package contains some client components of the Samba suite. In + particular it includes the command line utilities smbclient, smbtar, + and smbspool. If you want to mount shares exported from Microsoft + Windows machines or a Samba server you must install the smbfs package. + +Package: swat +Architecture: any +Depends: debconf, samba (= ${Source-Version}), ${shlibs:Depends} +Recommends: samba-doc +Description: Samba Web Administration Tool + The Samba software suite is a collection of programs that + implements the SMB protocol for unix systems, allowing you to serve + files and printers to Windows, NT, OS/2 and DOS clients. This protocol + is sometimes also referred to as the LanManager or NetBIOS protocol. + . + This package contains the components of the Samba suite that are needed + for Web administration of the Samba server. + . + Note: if you want to use the on-line documentation that is accesible + through the Swat front-end you must install the samba-doc package. + +Package: samba-doc +Section: doc +Architecture: all +Description: Samba documentation + The Samba software suite is a collection of programs that + implements the SMB protocol for unix systems, allowing you to serve + files and printers to Windows, NT, OS/2 and DOS clients. This protocol + is sometimes also referred to as the LanManager or NetBIOS protocol. + . + This package contains all the documentation that comes in the original + tarball. + +Package: smbfs +Section: otherosfs +Priority: optional +Architecture: any +Depends: netbase (>= 2.02), samba-common (= ${Source-Version}), ${shlibs:Depends} +Suggests: smbclient +Replaces: smbfsx +Conflicts: smbfsx, suidmanager (<< 0.50) +Description: mount and umount commands for the smbfs (for kernels >= than 2.2.x) + Smbfs is a filesystem which understands the SMB protocol. + This is the protocol Windows for Workgroups, Windows NT or + LAN Manager use to talk to each other. It was inspired by + samba, the program by Andrew Tridgell that turns any unix + site into a file server for DOS or Windows clients. + . + If you want to use command-line utilities like smbclient, smbtar + and/or smbspool you just need to install the smbclient package. + . + Starting with the Debian Samba packages version 2.2.0-1, the old smbfs + utilities for 2.0.x have been removed. There are no wrapper scripts + that call a specific smbmount/smbumount depending on the kernel + version. If you are using a 2.0.x kernel please upgrade or use the + latest Samba 2.0.7 Debian package. + +Package: libpam-smbpass +Section: admin +Priority: extra +Architecture: any +Depends: ${shlibs:Depends} +Suggests: samba +Description: pluggable authentication module for SMB password database + This is a stackable PAM module that allows a system administrator to easily + migrate to using encrypted passwords for Samba and to keep smb passwords in + sync with unix passwords. Unlike other solutions, it does this without + requiring users to change their existing passwords or login to Samba using + cleartext passwords. + +Package: libsmbclient +Section: libs +Priority: extra +Architecture: any +Depends: ${shlibs:Depends} +Description: shared library that allows applications to talk to SMB servers + libsmbclient allows to write applications that use the SMB protocol. + This gives applications the ability to talk to Microsoft Windows servers + and Unix servers running Samba. + . + This package contains the libsmbclient shared library. + +Package: libsmbclient-dev +Section: libdevel +Priority: extra +Architecture: any +Depends: libsmbclient (= ${Source-Version}) +Description: libsmbclient static libraries and headers + libsmbclient allows to write applications that use the SMB protocol. + This gives applications the ability to talk to Microsoft Windows servers + and Unix servers running Samba. + . + This package contains the libsmbclient static libraries and headers + needed to build applications that use SMB services. + +Package: winbind +Section: net +Priority: optional +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Replaces: samba (<= 2.2.3-2) +Description: service to resolve user and group information from Windows NT servers + This package provides the winbindd daemon, which provides a + service for the Name Service Switch capability that is present + in most modern C libraries (like the GNU C Library - glibc.) + . + The service provided by winbindd is called `winbind' and + can be used to resolve user and group information from a + Windows NT server. The service can also provide authentication + services via an associated PAM module. + +Package: python2.3-samba +Section: python +Priority: optional +Architecture: any +Depends: ${shlibs:Depends}, python2.3 +Description: Python bindings that allow access to various aspects of Samba + The Samba Python bindings allow you to access various aspects of Samba. + At the moment their status is "experimental" but they have been reported + to work well. + . + See /usr/share/doc/python2.3-samba/examples for a couple of examples. diff --git a/packaging/Debian/debian/copyright b/packaging/Debian/debian/copyright new file mode 100644 index 00000000000..e74a64fa5b8 --- /dev/null +++ b/packaging/Debian/debian/copyright @@ -0,0 +1,28 @@ +This is the Debian Linux prepackaged version of the Samba SMB +(LAN-Manager) server. Samba was written by Andrew Tridgell +<Andrew.Tridgell@anu.edu.au> and many others. + +This package was put together by Eloy Paris <peloy@debian.org> +and Steve Langasek <vorlon@debian.org> based on previous work by +Klee Dienes <klee@debian.org>, Andrew Howell <andrew@it.com.au> +and Bruce Perens <bruce@pixar.com> from sources found at +<URL:ftp://ftp.samba.org/pub/samba>. + +Copyright: + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 dated June, 1991. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, + MA 02111-1307, USA + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. diff --git a/packaging/Debian/debian/gdbcommands b/packaging/Debian/debian/gdbcommands new file mode 100644 index 00000000000..5774b9ae311 --- /dev/null +++ b/packaging/Debian/debian/gdbcommands @@ -0,0 +1,2 @@ +bt +quit diff --git a/packaging/Debian/debian/libpam-smbpass.docs b/packaging/Debian/debian/libpam-smbpass.docs new file mode 100644 index 00000000000..89fbbf90425 --- /dev/null +++ b/packaging/Debian/debian/libpam-smbpass.docs @@ -0,0 +1,2 @@ +source/pam_smbpass/README +source/pam_smbpass/TODO diff --git a/packaging/Debian/debian/libpam-smbpass.examples b/packaging/Debian/debian/libpam-smbpass.examples new file mode 100644 index 00000000000..48d841b2c15 --- /dev/null +++ b/packaging/Debian/debian/libpam-smbpass.examples @@ -0,0 +1,5 @@ +source/pam_smbpass/samples/README +source/pam_smbpass/samples/kdc-pdc +source/pam_smbpass/samples/password-mature +source/pam_smbpass/samples/password-migration +source/pam_smbpass/samples/password-sync diff --git a/packaging/Debian/debian/libpam-smbpass.files b/packaging/Debian/debian/libpam-smbpass.files new file mode 100644 index 00000000000..4263df5c0f0 --- /dev/null +++ b/packaging/Debian/debian/libpam-smbpass.files @@ -0,0 +1 @@ +lib/security/pam_smbpass.so diff --git a/packaging/Debian/debian/libsmbclient-dev.examples b/packaging/Debian/debian/libsmbclient-dev.examples new file mode 100644 index 00000000000..2094c40b556 --- /dev/null +++ b/packaging/Debian/debian/libsmbclient-dev.examples @@ -0,0 +1 @@ +examples/libsmbclient/ diff --git a/packaging/Debian/debian/libsmbclient-dev.files b/packaging/Debian/debian/libsmbclient-dev.files new file mode 100644 index 00000000000..a52c17cfc56 --- /dev/null +++ b/packaging/Debian/debian/libsmbclient-dev.files @@ -0,0 +1,3 @@ +usr/lib/libsmbclient.a +usr/lib/libsmbclient.so +usr/include/libsmbclient.h diff --git a/packaging/Debian/debian/libsmbclient.files b/packaging/Debian/debian/libsmbclient.files new file mode 100644 index 00000000000..18b7f3b1654 --- /dev/null +++ b/packaging/Debian/debian/libsmbclient.files @@ -0,0 +1,2 @@ +usr/lib/libsmbclient.so.0.1 +usr/lib/libsmbclient.so.0 diff --git a/packaging/Debian/debian/libsmbclient.shlibs b/packaging/Debian/debian/libsmbclient.shlibs new file mode 100644 index 00000000000..9c6eea200a9 --- /dev/null +++ b/packaging/Debian/debian/libsmbclient.shlibs @@ -0,0 +1 @@ +libsmbclient 0 libsmbclient (>= 2.2.2-11) diff --git a/packaging/Debian/debian/mksmbpasswd.8 b/packaging/Debian/debian/mksmbpasswd.8 new file mode 100644 index 00000000000..0a500102e8a --- /dev/null +++ b/packaging/Debian/debian/mksmbpasswd.8 @@ -0,0 +1,28 @@ +.TH MKSMBPASSWD 8 12-Apr-1998 +.SH NAME +mksmbpasswd \- formats a /etc/passwd entry for a smbpasswd file +.SH SYNOPSIS +mksmbpasswd cat /etc/passwd | /usr/sbin/mksmbpasswd > /etc/samba/smbpasswd +.SH DESCRIPTION +.B mksmbpasswd +should be used only once, the first time Samba is installed. The idea +is to ease accounts creation by transferring all user accounts from +/etc/passwd to /etc/samba/smbpasswd. +.PP +Please note that passwords are not transferred automatically from +/etc/passwd to the new /etc/samba/smbpasswd file. After running +.B mksmbpasswd +all accounts are disabled so the system administrator must run +smbpasswd for each account that needs to be enable. +.SH FILES +.TP +/etc/passwd +System wide accounts file +.TP +/etc/samba/smbpasswd +Encrypted passwords file for the Samba daemons +.SH SEE ALSO +samba(7), nmbd(8), smbd(8) +.SH AUTHOR +Eloy A. Paris <peloy@debian.org> (man page based on sendmailconfig's man page +by Robert Leslie <rob@mars.org>) diff --git a/packaging/Debian/debian/mksmbpasswd.awk b/packaging/Debian/debian/mksmbpasswd.awk new file mode 100644 index 00000000000..a7b41a725d3 --- /dev/null +++ b/packaging/Debian/debian/mksmbpasswd.awk @@ -0,0 +1,5 @@ +#!/usr/bin/awk -f +BEGIN {FS=":" + printf("#\n# SMB password file.\n#\n") + } +{ printf( "%s:%s:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:[U ]:LCT-00000000:%s\n", $1, $3, $5) } diff --git a/packaging/Debian/debian/panic-action b/packaging/Debian/debian/panic-action new file mode 100644 index 00000000000..13f773c1ef8 --- /dev/null +++ b/packaging/Debian/debian/panic-action @@ -0,0 +1,48 @@ +#!/bin/sh + +# Redirect all output to our mail command +( + # We must be given a pid to look at + if [ -z "$1" ]; then + echo "$0 called with no arguments." + exit 1 + fi + + if [ ! -d "/proc/$1" ]; then + echo "$0: No such process: $1" + exit 1 + fi + + # Find out what binary we're debugging + BINARYNAME=`readlink "/proc/$1/exe"` + + # Generic header for our email + echo "The Samba 'panic action' script, $0," + echo "was called for pid $1 ($BINARYNAME)." + echo + + if [ -z "$BINARYNAME" ]; then + echo "This means there was a problem with the program, such as a segfault." + echo "However, the executable could not be found for process $1." + echo "It may have died unexpectedly, or you may not have permission to" + echo "debug the process." + exit 1 + fi + + # No debugger + if [ ! -x /usr/bin/gdb ]; then + echo "This means there was a problem with the program, such as a segfault." + echo "However, gdb was not found on your system, so the error could not be" + echo "debugged. Please install the gdb package so that debugging information is" + echo "available the next time such a problem occurs." + exit 1 + fi + + echo "Below is a backtrace for this process generated with gdb, which shows" + echo "the state of the program at the time the error occured. You are" + echo "encouraged to submit this information as a bug report to Debian. For" + echo "information about the procedure for submitting bug reports , please see" + echo "http://www.debian.org/Bugs/Reporting or the reportbug(1) manpage." + echo + gdb -x /etc/samba/gdbcommands -batch "$BINARYNAME" "$1" +) | mail -s "Segfault in Samba" root diff --git a/packaging/Debian/debian/patches/VERSION.patch b/packaging/Debian/debian/patches/VERSION.patch new file mode 100644 index 00000000000..0f5c129c564 --- /dev/null +++ b/packaging/Debian/debian/patches/VERSION.patch @@ -0,0 +1,8 @@ +--- samba-3.0.0rc2/source/VERSION.orig 2003-09-02 21:56:11.000000000 -0400 ++++ samba-3.0.0rc2/source/VERSION 2003-09-02 21:56:30.000000000 -0400 +@@ -120,4 +120,4 @@ + # e.g. SAMBA_VERSION_VENDOR_SUFFIX=vendor_version() # + # -> "CVS 3.0.0rc2-VendorVersion" # + ######################################################## +-SAMBA_VERSION_VENDOR_SUFFIX= ++SAMBA_VERSION_VENDOR_SUFFIX="Debian" diff --git a/packaging/Debian/debian/patches/documentation.patch b/packaging/Debian/debian/patches/documentation.patch new file mode 100644 index 00000000000..c5e66232f9c --- /dev/null +++ b/packaging/Debian/debian/patches/documentation.patch @@ -0,0 +1,68 @@ +--- samba_3_0/docs/manpages/swat.8.orig 2003-06-06 16:16:24.000000000 -0400 ++++ samba_3_0/docs/manpages/swat.8 2003-06-06 16:25:13.000000000 -0400 +@@ -89,6 +89,13 @@ + .SH "INSTALLATION" + + .PP ++\fBDebian-specific Note\fR: all these steps have already been done for ++you. However, by default, swat is not enabled. This has been done for ++security reasons. To enable swat you need to edit /etc/inetd.conf, ++uncomment the swat entry (usually at the end of the file), and then ++restart inetd. ++ ++.PP + Swat is included as binary package with most distributions\&. The package manager in this case takes care of the installation and configuration\&. This section is only for those who have compiled swat from scratch\&. + + .PP +@@ -96,15 +103,15 @@ + + .TP 3 + \(bu +-/usr/local/samba/bin/swat ++/usr/sbin/swat + + .TP + \(bu +-/usr/local/samba/swat/images/* ++/usr/share/samba/swat/images/* + + .TP + \(bu +-/usr/local/samba/swat/help/* ++/usr/share/samba/swat/help/* + + .LP + +@@ -114,7 +121,7 @@ + You need to edit your \fI/etc/inetd\&.conf \fR and \fI/etc/services\fR to enable SWAT to be launched via \fBinetd\fR\&. + + .PP +-In \fI/etc/services\fR you need to add a line like this: ++In \fI/etc/services\fR you need to add a line like this (not needed for Debian): + + .PP + \fBswat 901/tcp\fR +@@ -126,10 +133,10 @@ + the choice of port number isn't really important except that it should be less than 1024 and not currently used (using a number above 1024 presents an obscure security hole depending on the implementation details of your\fBinetd\fR daemon)\&. + + .PP +-In \fI/etc/inetd\&.conf\fR you should add a line like this: ++In \fI/etc/inetd\&.conf\fR you should add a line like this (not needed for Debian since the maintainer scripts do it. You need to uncomment the line, though, because it is added commented out for security reasons): + + .PP +-\fBswat stream tcp nowait.400 root /usr/local/samba/bin/swat swat\fR ++\fBswat stream tcp nowait.400 root /usr/sbin/swat swat\fR + + .PP + One you have edited \fI/etc/services\fR and \fI/etc/inetd\&.conf\fR you need to send a HUP signal to inetd\&. To do this use \fBkill -1 PID \fR where PID is the process ID of the inetd daemon\&. +@@ -155,8 +162,8 @@ + + + .TP +-\fI/usr/local/samba/lib/smb\&.conf\fR +-This is the default location of the \fBsmb.conf\fR(5) server configuration file that swat edits\&. Other common places that systems install this file are \fI /usr/samba/lib/smb\&.conf\fR and \fI/etc/smb\&.conf \fR\&. This file describes all the services the server is to make available to clients\&. ++\fI/etc/samba/smb\&.conf\fR ++This is the default location of the \fBsmb.conf\fR(5) server configuration file that swat edits\&. This file describes all the services the server is to make available to clients\&. + + + .SH "WARNINGS" diff --git a/packaging/Debian/debian/patches/fhs.patch b/packaging/Debian/debian/patches/fhs.patch new file mode 100644 index 00000000000..652641216b6 --- /dev/null +++ b/packaging/Debian/debian/patches/fhs.patch @@ -0,0 +1,570 @@ +diff -uNr samba-3.0.0beta2.orig/source/Makefile.in samba-3.0.0beta2/source/Makefile.in +--- samba-3.0.0beta2.orig/source/Makefile.in 2003-07-02 23:26:46.000000000 -0500 ++++ samba-3.0.0beta2/source/Makefile.in 2003-07-02 23:19:46.000000000 -0500 +@@ -67,6 +67,7 @@ + CONFIGDIR = @configdir@ + VARDIR = @localstatedir@ + MANDIR = @mandir@ ++DATADIR = @datadir@ + + # The permissions to give the executables + INSTALLPERMS = 0755 +@@ -90,6 +91,13 @@ + # the directory where lock files go + LOCKDIR = @lockdir@ + ++# FHS directories; equal to LOCKDIR if not using --with-fhs ++CACHEDIR = @cachedir@ ++STATEDIR = @statedir@ ++ ++# Where to look for (and install) codepage databases. ++CODEPAGEDIR = @codepagedir@ ++ + # the directory where pid files go + PIDDIR = @piddir@ + # man pages language(s) +@@ -114,7 +122,7 @@ + PATH_FLAGS4 = $(PATH_FLAGS3) -DSWATDIR=\"$(SWATDIR)\" -DLOCKDIR=\"$(LOCKDIR)\" -DPIDDIR=\"$(PIDDIR)\" + PATH_FLAGS5 = $(PATH_FLAGS4) -DLIBDIR=\"$(LIBDIR)\" \ + -DLOGFILEBASE=\"$(LOGFILEBASE)\" -DSHLIBEXT=\"@SHLIBEXT@\" +-PATH_FLAGS6 = $(PATH_FLAGS5) -DCONFIGDIR=\"$(CONFIGDIR)\" ++PATH_FLAGS6 = $(PATH_FLAGS5) -DCONFIGDIR=\"$(CONFIGDIR)\" -DCODEPAGEDIR=\"$(CODEPAGEDIR)\" -DCACHEDIR=\"$(CACHEDIR)\" -DSTATEDIR=\"$(STATEDIR)\" + PATH_FLAGS = $(PATH_FLAGS6) $(PASSWD_FLAGS) + + # Note that all executable programs now provide for an optional executable suffix. +@@ -1203,7 +1211,7 @@ + @$(SHELL) $(srcdir)/script/installscripts.sh $(INSTALLPERMS) $(DESTDIR)$(BINDIR) $(SCRIPTS) + + installdat: installdirs +- @$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR)$(LIBDIR) $(srcdir) ++ @$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR)$(CODEPAGEDIR) $(srcdir) + + installswat: installdirs + @$(SHELL) $(srcdir)/script/installswat.sh $(DESTDIR)$(SWATDIR) $(srcdir) +diff -uNr samba-3.0.0beta2.orig/source/configure.in samba-3.0.0beta2/source/configure.in +--- samba-3.0.0beta2.orig/source/configure.in 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/configure.in 2003-07-02 23:19:02.000000000 -0500 +@@ -17,18 +17,25 @@ + AC_ARG_WITH(fhs, + [ --with-fhs Use FHS-compliant paths (default=no)], + configdir="${sysconfdir}/samba" +- lockdir="\${VARDIR}/cache/samba" ++ lockdir="\${VARDIR}/run/samba" + piddir="\${VARDIR}/run/samba" + logfilebase="\${VARDIR}/log/samba" + privatedir="\${CONFIGDIR}/private" + libdir="\${prefix}/lib/samba" +- swatdir="\${DATADIR}/samba/swat", ++ swatdir="\${DATADIR}/samba/swat" ++ codepagedir="\${DATADIR}/samba" ++ statedir="\${VARDIR}/lib/samba" ++ cachedir="\${VARDIR}/cache/samba" ++ AC_DEFINE(FHS_COMPATIBLE, 1, [Whether to use fully FHS-compatible paths]), + configdir="\${LIBDIR}" + logfilebase="\${VARDIR}" + lockdir="\${VARDIR}/locks" + piddir="\${VARDIR}/locks" + privatedir="\${prefix}/private" +- swatdir="\${prefix}/swat") ++ codepagedir="\${LIBDIR}" ++ swatdir="\${prefix}/swat" ++ statedir="\${LOCKDIR}" ++ cachedir="\${LOCKDIR}") + + ################################################# + # set private directory location +@@ -134,6 +141,9 @@ + AC_SUBST(swatdir) + AC_SUBST(bindir) + AC_SUBST(sbindir) ++AC_SUBST(codepagedir) ++AC_SUBST(statedir) ++AC_SUBST(cachedir) + + dnl Unique-to-Samba variables we'll be playing with. + AC_SUBST(SHELL) +diff -uNr samba-3.0.0beta2.orig/source/dynconfig.c samba-3.0.0beta2/source/dynconfig.c +--- samba-3.0.0beta2.orig/source/dynconfig.c 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/dynconfig.c 2003-07-02 23:19:02.000000000 -0500 +@@ -53,6 +53,13 @@ + pstring dyn_LMHOSTSFILE = LMHOSTSFILE; + + /** ++ * @brief Samba data directory. ++ * ++ * @sa data_path() to get the path to a file inside the CODEPAGEDIR. ++ **/ ++pstring dyn_CODEPAGEDIR = CODEPAGEDIR; ++ ++/** + * @brief Samba library directory. + * + * @sa lib_path() to get the path to a file inside the LIBDIR. +@@ -70,3 +77,27 @@ + + const pstring dyn_SMB_PASSWD_FILE = SMB_PASSWD_FILE; + const pstring dyn_PRIVATE_DIR = PRIVATE_DIR; ++ ++ ++/* In non-FHS mode, these should be configurable using 'lock dir ='; ++ but in FHS mode, they are their own directory. Implement as wrapper ++ functions so that everything can still be kept in dynconfig.c. ++ */ ++ ++char *dyn_STATEDIR(void) ++{ ++#ifdef FHS_COMPATIBLE ++ return STATEDIR; ++#else ++ return lp_lockdir(); ++#endif ++} ++ ++char *dyn_CACHEDIR(void) ++{ ++#ifdef FHS_COMPATIBLE ++ return CACHEDIR; ++#else ++ return lp_lockdir(); ++#endif ++} +diff -uNr samba-3.0.0beta2.orig/source/groupdb/mapping.c samba-3.0.0beta2/source/groupdb/mapping.c +--- samba-3.0.0beta2.orig/source/groupdb/mapping.c 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/groupdb/mapping.c 2003-07-02 23:19:02.000000000 -0500 +@@ -134,7 +134,7 @@ + + if (tdb && local_pid == sys_getpid()) + return True; +- tdb = tdb_open_log(lock_path("group_mapping.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); ++ tdb = tdb_open_log(state_path("group_mapping.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); + if (!tdb) { + DEBUG(0,("Failed to open group mapping database\n")); + return False; +diff -uNr samba-3.0.0beta2.orig/source/include/dynconfig.h samba-3.0.0beta2/source/include/dynconfig.h +--- samba-3.0.0beta2.orig/source/include/dynconfig.h 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/include/dynconfig.h 2003-07-02 23:19:02.000000000 -0500 +@@ -31,8 +31,12 @@ + extern pstring dyn_CONFIGFILE; + extern pstring dyn_LOGFILEBASE, dyn_LMHOSTSFILE; + extern pstring dyn_LIBDIR; ++extern pstring dyn_CODEPAGEDIR; + extern const fstring dyn_SHLIBEXT; + extern const pstring dyn_LOCKDIR; + extern const pstring dyn_PIDDIR; + extern const pstring dyn_SMB_PASSWD_FILE; + extern const pstring dyn_PRIVATE_DIR; ++ ++char *dyn_STATEDIR(void); ++char *dyn_CACHEDIR(void); +diff -uNr samba-3.0.0beta2.orig/source/intl/lang_tdb.c samba-3.0.0beta2/source/intl/lang_tdb.c +--- samba-3.0.0beta2.orig/source/intl/lang_tdb.c 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/intl/lang_tdb.c 2003-07-02 23:19:02.000000000 -0500 +@@ -123,7 +123,7 @@ + /* if no lang then we don't translate */ + if (!lang) return True; + +- asprintf(&msg_path, "%s.msg", lib_path((const char *)lang)); ++ asprintf(&msg_path, "%s.msg", data_path((const char *)lang)); + if (stat(msg_path, &st) != 0) { + /* the msg file isn't available */ + free(msg_path); +@@ -131,7 +131,7 @@ + } + + +- asprintf(&path, "%s%s.tdb", lock_path("lang_"), lang); ++ asprintf(&path, "%s%s.tdb", state_path("lang_"), lang); + + tdb = tdb_open_log(path, 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0644); + if (!tdb) { +diff -uNr samba-3.0.0beta2.orig/source/lib/account_pol.c samba-3.0.0beta2/source/lib/account_pol.c +--- samba-3.0.0beta2.orig/source/lib/account_pol.c 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/lib/account_pol.c 2003-07-02 23:19:02.000000000 -0500 +@@ -36,7 +36,7 @@ + + if (tdb && local_pid == sys_getpid()) + return True; +- tdb = tdb_open_log(lock_path("account_policy.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); ++ tdb = tdb_open_log(state_path("account_policy.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); + if (!tdb) { + DEBUG(0,("Failed to open account policy database\n")); + return False; +diff -uNr samba-3.0.0beta2.orig/source/lib/util.c samba-3.0.0beta2/source/lib/util.c +--- samba-3.0.0beta2.orig/source/lib/util.c 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/lib/util.c 2003-07-02 23:19:02.000000000 -0500 +@@ -2190,6 +2190,61 @@ + } + + /** ++ * @brief Returns an absolute path to a file in the Samba data directory. ++ * ++ * @param name File to find, relative to CODEPAGEDIR. ++ * ++ * @retval Pointer to a static #pstring containing the full path. ++ **/ ++ ++char *data_path(const char *name) ++{ ++ static pstring fname; ++ snprintf(fname, sizeof(fname), "%s/%s", dyn_CODEPAGEDIR, name); ++ return fname; ++} ++ ++/***************************************************************** ++a useful function for returning a path in the Samba state directory ++ *****************************************************************/ ++char *state_path(char *name) ++{ ++ static pstring fname; ++ ++ pstrcpy(fname,dyn_STATEDIR()); ++ trim_string(fname,"","/"); ++ ++ if (!directory_exist(fname,NULL)) { ++ mkdir(fname,0755); ++ } ++ ++ pstrcat(fname,"/"); ++ pstrcat(fname,name); ++ ++ return fname; ++} ++ ++/***************************************************************** ++a useful function for returning a path in the Samba cache directory ++ *****************************************************************/ ++char *cache_path(char *name) ++{ ++ static pstring fname; ++ ++ pstrcpy(fname,dyn_CACHEDIR()); ++ trim_string(fname,"","/"); ++ ++ if (!directory_exist(fname,NULL)) { ++ mkdir(fname,0755); ++ } ++ ++ pstrcat(fname,"/"); ++ pstrcat(fname,name); ++ ++ return fname; ++} ++ ++/** + * @brief Returns the platform specific shared library extension. + * + * @retval Pointer to a static #fstring containing the extension. +diff -uNr samba-3.0.0beta2.orig/source/lib/util_unistr.c samba-3.0.0beta2/source/lib/util_unistr.c +--- samba-3.0.0beta2.orig/source/lib/util_unistr.c 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/lib/util_unistr.c 2003-07-02 23:19:02.000000000 -0500 +@@ -54,8 +54,8 @@ + if (initialised) return; + initialised = 1; + +- upcase_table = map_file(lib_path("upcase.dat"), 0x20000); +- lowcase_table = map_file(lib_path("lowcase.dat"), 0x20000); ++ upcase_table = map_file(data_path("upcase.dat"), 0x20000); ++ lowcase_table = map_file(data_path("lowcase.dat"), 0x20000); + + /* we would like Samba to limp along even if these tables are + not available */ +@@ -161,7 +161,7 @@ + return; + } + +- valid_file = map_file(lib_path("valid.dat"), 0x10000); ++ valid_file = map_file(data_path("valid.dat"), 0x10000); + if (valid_file) { + valid_table = valid_file; + mapped_file = 1; +diff -uNr samba-3.0.0beta2.orig/source/libsmb/samlogon_cache.c samba-3.0.0beta2/source/libsmb/samlogon_cache.c +--- samba-3.0.0beta2.orig/source/libsmb/samlogon_cache.c 2003-07-01 09:40:37.000000000 -0500 ++++ samba-3.0.0beta2/source/libsmb/samlogon_cache.c 2003-07-02 23:19:02.000000000 -0500 +@@ -34,7 +34,7 @@ + BOOL netsamlogon_cache_init(void) + { + if (!netsamlogon_tdb) { +- netsamlogon_tdb = tdb_open_log(lock_path(NETSAMLOGON_TDB), 0, ++ netsamlogon_tdb = tdb_open_log(cache_path(NETSAMLOGON_TDB), 0, + TDB_DEFAULT, O_RDWR | O_CREAT, 0600); + } + +@@ -67,7 +67,7 @@ + winbindd_cache.tdb open. Open the tdb if a NULL is passed. */ + + if (!tdb) { +- tdb = tdb_open_log(lock_path("winbindd_cache.tdb"), 5000, ++ tdb = tdb_open_log(cache_path("winbindd_cache.tdb"), 5000, + TDB_DEFAULT, O_RDWR, 0600); + if (!tdb) { + DEBUG(5, ("netsamlogon_clear_cached_user: failed to open cache\n")); +--- samba_3_0/source/nmbd/nmbd_serverlistdb.c.orig 2003-09-08 10:53:13.000000000 -0400 ++++ samba_3_0/source/nmbd/nmbd_serverlistdb.c 2003-09-08 11:22:03.000000000 -0400 +@@ -327,7 +327,7 @@ + + updatecount++; + +- pstrcpy(fname,lp_lockdir()); ++ pstrcpy(fname,dyn_CACHEDIR()); + trim_char(fname,'\0' ,'/'); + pstrcat(fname,"/"); + pstrcat(fname,SERVER_LIST); +--- samba-3.0.0rc2/source/nmbd/nmbd_winsserver.c.orig 2003-08-28 17:42:44.000000000 -0400 ++++ samba-3.0.0rc2/source/nmbd/nmbd_winsserver.c 2003-08-31 08:09:11.000000000 -0400 +@@ -228,7 +228,7 @@ + + add_samba_names_to_subnet(wins_server_subnet); + +- if((fp = x_fopen(lock_path(WINS_LIST),O_RDONLY,0)) == NULL) { ++ if((fp = x_fopen(state_path(WINS_LIST),O_RDONLY,0)) == NULL) { + DEBUG(2,("initialise_wins: Can't open wins database file %s. Error was %s\n", + WINS_LIST, strerror(errno) )); + return True; +@@ -1759,7 +1759,7 @@ + } + } + +- slprintf(fname,sizeof(fname)-1,"%s/%s", lp_lockdir(), WINS_LIST); ++ slprintf(fname,sizeof(fname)-1,"%s/%s", dyn_STATEDIR(), WINS_LIST); + all_string_sub(fname,"//", "/", 0); + slprintf(fnamenew,sizeof(fnamenew)-1,"%s.%u", fname, (unsigned int)sys_getpid()); + +diff -uNr samba-3.0.0beta2.orig/source/nsswitch/winbindd_cache.c samba-3.0.0beta2/source/nsswitch/winbindd_cache.c +--- samba-3.0.0beta2.orig/source/nsswitch/winbindd_cache.c 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/nsswitch/winbindd_cache.c 2003-07-02 23:19:02.000000000 -0500 +@@ -56,7 +56,7 @@ + if (opt_nocache) + return; + +- wcache->tdb = tdb_open_log(lock_path("winbindd_cache.tdb"), 5000, ++ wcache->tdb = tdb_open_log(cache_path("winbindd_cache.tdb"), 5000, + TDB_CLEAR_IF_FIRST, O_RDWR|O_CREAT, 0600); + + if (!wcache->tdb) { +diff -uNr samba-3.0.0beta2.orig/source/nsswitch/winbindd_util.c samba-3.0.0beta2/source/nsswitch/winbindd_util.c +--- samba-3.0.0beta2.orig/source/nsswitch/winbindd_util.c 2003-07-01 15:44:25.000000000 -0500 ++++ samba-3.0.0beta2/source/nsswitch/winbindd_util.c 2003-07-02 23:19:02.000000000 -0500 +@@ -813,7 +813,7 @@ + SMB_STRUCT_STAT stbuf; + TDB_CONTEXT *idmap_tdb; + +- pstrcpy(idmap_name, lock_path("winbindd_idmap.tdb")); ++ pstrcpy(idmap_name, state_path("winbindd_idmap.tdb")); + + if (!file_exist(idmap_name, &stbuf)) { + /* nothing to convert return */ +diff -uNr samba-3.0.0beta2.orig/source/param/loadparm.c samba-3.0.0beta2/source/param/loadparm.c +--- samba-3.0.0beta2.orig/source/param/loadparm.c 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/param/loadparm.c 2003-07-02 23:19:02.000000000 -0500 +@@ -104,6 +104,9 @@ + char *szAddPrinterCommand; + char *szDeletePrinterCommand; + char *szOs2DriverMap; ++#ifdef FHS_COMPATIBLE ++ char *szLockDirStub; ++#endif + char *szLockDir; + char *szPidDir; + char *szRootdir; +@@ -1083,8 +1083,13 @@ + {"config file", P_STRING, P_GLOBAL, &Globals.szConfigFile, NULL, NULL, FLAG_HIDE}, + {"preload", P_STRING, P_GLOBAL, &Globals.szAutoServices, NULL, NULL, FLAG_ADVANCED}, + {"auto services", P_STRING, P_GLOBAL, &Globals.szAutoServices, NULL, NULL, FLAG_ADVANCED}, ++#ifdef FHS_COMPATIBLE ++ {"lock directory", P_STRING, P_GLOBAL, &Globals.szLockDirStub, NULL, NULL, 0}, ++ {"lock dir", P_STRING, P_GLOBAL, &Globals.szLockDirStub, NULL, NULL, 0}, ++#else + {"lock directory", P_STRING, P_GLOBAL, &Globals.szLockDir, NULL, NULL, FLAG_ADVANCED}, + {"lock dir", P_STRING, P_GLOBAL, &Globals.szLockDir, NULL, NULL, FLAG_HIDE}, ++#endif + {"pid directory", P_STRING, P_GLOBAL, &Globals.szPidDir, NULL, NULL, FLAG_ADVANCED}, + #ifdef WITH_UTMP + {"utmp directory", P_STRING, P_GLOBAL, &Globals.szUtmpDir, NULL, NULL, FLAG_ADVANCED}, +diff -uNr samba-3.0.0beta2.orig/source/passdb/pdb_tdb.c samba-3.0.0beta2/source/passdb/pdb_tdb.c +--- samba-3.0.0beta2.orig/source/passdb/pdb_tdb.c 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/passdb/pdb_tdb.c 2003-07-02 23:19:02.000000000 -0500 +@@ -501,10 +501,7 @@ + if (location) { + tdb_state->tdbsam_location = talloc_strdup(pdb_context->mem_ctx, location); + } else { +- pstring tdbfile; +- get_private_directory(tdbfile); +- pstrcat(tdbfile, "/"); +- pstrcat(tdbfile, PASSDB_FILE_NAME); ++ char *tdbfile = state_path(PASSDB_FILE_NAME); + tdb_state->tdbsam_location = talloc_strdup(pdb_context->mem_ctx, tdbfile); + } + +diff -uNr samba-3.0.0beta2.orig/source/passdb/privileges.c samba-3.0.0beta2/source/passdb/privileges.c +--- samba-3.0.0beta2.orig/source/passdb/privileges.c 2003-06-07 12:57:35.000000000 -0500 ++++ samba-3.0.0beta2/source/passdb/privileges.c 2003-07-02 23:19:02.000000000 -0500 +@@ -62,7 +62,7 @@ + /* initialise the privilege database */ + BOOL privilege_init(void) + { +- tdb = tdb_open_log(lock_path("privilege.tdb"), 0, TDB_DEFAULT, ++ tdb = tdb_open_log(state_path("privilege.tdb"), 0, TDB_DEFAULT, + O_RDWR|O_CREAT, 0600); + if (!tdb) { + DEBUG(0,("Failed to open privilege database\n")); +diff -uNr samba-3.0.0beta2.orig/source/passdb/secrets.c samba-3.0.0beta2/source/passdb/secrets.c +--- samba-3.0.0beta2.orig/source/passdb/secrets.c 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/passdb/secrets.c 2003-07-02 23:19:02.000000000 -0500 +@@ -37,8 +37,7 @@ + if (tdb) + return True; + +- pstrcpy(fname, lp_private_dir()); +- pstrcat(fname,"/secrets.tdb"); ++ pstrcpy(fname, state_path("secrets.tdb")); + + tdb = tdb_open_log(fname, 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); + +diff -uNr samba-3.0.0beta2.orig/source/printing/nt_printing.c samba-3.0.0beta2/source/printing/nt_printing.c +--- samba-3.0.0beta2.orig/source/printing/nt_printing.c 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/printing/nt_printing.c 2003-07-02 23:19:02.000000000 -0500 +@@ -293,28 +293,28 @@ + + if (tdb_drivers) + tdb_close(tdb_drivers); +- tdb_drivers = tdb_open_log(lock_path("ntdrivers.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); ++ tdb_drivers = tdb_open_log(state_path("ntdrivers.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); + if (!tdb_drivers) { + DEBUG(0,("nt_printing_init: Failed to open nt drivers database %s (%s)\n", +- lock_path("ntdrivers.tdb"), strerror(errno) )); ++ state_path("ntdrivers.tdb"), strerror(errno) )); + return False; + } + + if (tdb_printers) + tdb_close(tdb_printers); +- tdb_printers = tdb_open_log(lock_path("ntprinters.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); ++ tdb_printers = tdb_open_log(state_path("ntprinters.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); + if (!tdb_printers) { + DEBUG(0,("nt_printing_init: Failed to open nt printers database %s (%s)\n", +- lock_path("ntprinters.tdb"), strerror(errno) )); ++ state_path("ntprinters.tdb"), strerror(errno) )); + return False; + } + + if (tdb_forms) + tdb_close(tdb_forms); +- tdb_forms = tdb_open_log(lock_path("ntforms.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); ++ tdb_forms = tdb_open_log(state_path("ntforms.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); + if (!tdb_forms) { + DEBUG(0,("nt_printing_init: Failed to open nt forms database %s (%s)\n", +- lock_path("ntforms.tdb"), strerror(errno) )); ++ state_path("ntforms.tdb"), strerror(errno) )); + return False; + } + +diff -uNr samba-3.0.0beta2.orig/source/printing/printing.c samba-3.0.0beta2/source/printing/printing.c +--- samba-3.0.0beta2.orig/source/printing/printing.c 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/printing/printing.c 2003-07-02 23:19:02.000000000 -0500 +@@ -174,8 +174,8 @@ + if (local_pid == sys_getpid()) + return True; + +- unlink(lock_path("printing.tdb")); +- pstrcpy(printing_path,lock_path("printing")); ++ unlink(cache_path("printing.tdb")); ++ pstrcpy(printing_path,cache_path("printing")); + mkdir(printing_path,0755); + + local_pid = sys_getpid(); +diff -uNr samba-3.0.0beta2.orig/source/printing/printing_db.c samba-3.0.0beta2/source/printing/printing_db.c +--- samba-3.0.0beta2.orig/source/printing/printing_db.c 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/printing/printing_db.c 2003-07-02 23:19:02.000000000 -0500 +@@ -86,7 +86,7 @@ + DLIST_ADD(print_db_head, p); + } + +- pstrcpy(printdb_path, lock_path("printing/")); ++ pstrcpy(printdb_path, cache_path("printing/")); + pstrcat(printdb_path, printername); + pstrcat(printdb_path, ".tdb"); + +diff -uNr samba-3.0.0beta2.orig/source/registry/reg_db.c samba-3.0.0beta2/source/registry/reg_db.c +--- samba-3.0.0beta2.orig/source/registry/reg_db.c 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/registry/reg_db.c 2003-07-02 23:19:02.000000000 -0500 +@@ -131,13 +131,13 @@ + * if we need to init the data in the registry + */ + +- tdb_reg = tdb_open_log(lock_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR, 0600); ++ tdb_reg = tdb_open_log(state_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR, 0600); + if ( !tdb_reg ) + { +- tdb_reg = tdb_open_log(lock_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); ++ tdb_reg = tdb_open_log(state_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); + if ( !tdb_reg ) { + DEBUG(0,("init_registry: Failed to open registry %s (%s)\n", +- lock_path("registry.tdb"), strerror(errno) )); ++ state_path("registry.tdb"), strerror(errno) )); + return False; + } + +diff -uNr samba-3.0.0beta2.orig/source/rpc_server/srv_srvsvc_nt.c samba-3.0.0beta2/source/rpc_server/srv_srvsvc_nt.c +--- samba-3.0.0beta2.orig/source/rpc_server/srv_srvsvc_nt.c 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/rpc_server/srv_srvsvc_nt.c 2003-07-02 23:19:02.000000000 -0500 +@@ -133,10 +133,10 @@ + + if (share_tdb && local_pid == sys_getpid()) + return True; +- share_tdb = tdb_open_log(lock_path("share_info.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); ++ share_tdb = tdb_open_log(state_path("share_info.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); + if (!share_tdb) { + DEBUG(0,("Failed to open share info database %s (%s)\n", +- lock_path("share_info.tdb"), strerror(errno) )); ++ state_path("share_info.tdb"), strerror(errno) )); + return False; + } + +diff -uNr samba-3.0.0beta2.orig/source/sam/idmap_tdb.c samba-3.0.0beta2/source/sam/idmap_tdb.c +--- samba-3.0.0beta2.orig/source/sam/idmap_tdb.c 2003-07-01 15:44:26.000000000 -0500 ++++ samba-3.0.0beta2/source/sam/idmap_tdb.c 2003-07-02 23:19:02.000000000 -0500 +@@ -487,7 +487,7 @@ + BOOL tdb_is_new = False; + + /* use the old database if present */ +- tdbfile = strdup(lock_path("winbindd_idmap.tdb")); ++ tdbfile = strdup(state_path("winbindd_idmap.tdb")); + if (!tdbfile) { + DEBUG(0, ("idmap_init: out of memory!\n")); + return NT_STATUS_NO_MEMORY; +diff -uNr samba-3.0.0beta2.orig/source/smbd/lanman.c samba-3.0.0beta2/source/smbd/lanman.c +--- samba-3.0.0beta2.orig/source/smbd/lanman.c 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/smbd/lanman.c 2003-07-02 23:19:02.000000000 -0500 +@@ -966,9 +966,9 @@ + BOOL local_list_only; + int i; + +- lines = file_lines_load(lock_path(SERVER_LIST), NULL); ++ lines = file_lines_load(cache_path(SERVER_LIST), NULL); + if (!lines) { +- DEBUG(4,("Can't open %s - %s\n",lock_path(SERVER_LIST),strerror(errno))); ++ DEBUG(4,("Can't open %s - %s\n",cache_path(SERVER_LIST),strerror(errno))); + return(0); + } + +diff -uNr samba-3.0.0beta2.orig/source/wrepld/process.c samba-3.0.0beta2/source/wrepld/process.c +--- samba-3.0.0beta2.orig/source/wrepld/process.c 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/wrepld/process.c 2003-07-02 23:19:02.000000000 -0500 +@@ -197,7 +197,7 @@ + { + TDB_CONTEXT *tdb; + +- tdb = tdb_open_log(lock_path(WINS_LIST), 0, TDB_DEFAULT, O_RDONLY, 0600); ++ tdb = tdb_open_log(state_path(WINS_LIST), 0, TDB_DEFAULT, O_RDONLY, 0600); + if (!tdb) { + DEBUG(2,("get_our_last_id: Can't open wins database file %s. Error was %s\n", WINS_LIST, strerror(errno) )); + return; +@@ -489,7 +489,7 @@ + } + + +- tdb = tdb_open_log(lock_path(WINS_LIST), 0, TDB_DEFAULT, O_RDONLY, 0600); ++ tdb = tdb_open_log(state_path(WINS_LIST), 0, TDB_DEFAULT, O_RDONLY, 0600); + if (!tdb) { + DEBUG(2,("send_entry_request: Can't open wins database file %s. Error was %s\n", WINS_LIST, strerror(errno) )); + return; diff --git a/packaging/Debian/debian/patches/installswat.sh.patch b/packaging/Debian/debian/patches/installswat.sh.patch new file mode 100644 index 00000000000..b425e3bef76 --- /dev/null +++ b/packaging/Debian/debian/patches/installswat.sh.patch @@ -0,0 +1,76 @@ +--- samba_3_0/source/script/installswat.sh.orig 2003-08-28 18:03:10.000000000 -0400 ++++ samba_3_0/source/script/installswat.sh 2003-08-28 18:11:14.000000000 -0400 +@@ -9,7 +9,7 @@ + echo Installing the Samba Web Administration Tool + + LANGS=". `cd $SRCDIR../swat/; /bin/echo lang/??`" +-echo Installing langs are `cd $SRCDIR../swat/lang/; /bin/echo ??` ++echo Installing the following additional langs: `cd $SRCDIR../swat/lang/; /bin/echo ??` + + for ln in $LANGS; do + SWATLANGDIR=$SWATDIR/$ln +@@ -23,21 +23,17 @@ + fi + fi + done +-done +- +-# Install images +-for ln in $LANGS; do + +-for f in $SRCDIR../swat/$ln/images/*.gif; do ++ # Install images ++ for f in $SRCDIR../swat/$ln/images/*.gif; do + FNAME=$SWATDIR/$ln/images/`basename $f` + echo $FNAME + cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? + chmod 0644 $FNAME +-done +- +-# Install html help ++ done + +-for f in $SRCDIR../swat/$ln/help/*.html; do ++ # Install html help ++ for f in $SRCDIR../swat/$ln/help/*.html; do + FNAME=$SWATDIR/$ln/help/`basename $f` + echo $FNAME + if [ "x$BOOKDIR" = "x" ]; then +@@ -49,26 +45,24 @@ + cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? + rm -f $f + chmod 0644 $FNAME +-done +- +-# Install html documentation +- +-for f in $SRCDIR../docs/htmldocs/*.html; do +- FNAME=$SWATDIR/help/`basename $f` +- echo $FNAME +- cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? +- chmod 0644 $FNAME +-done +- +-# Install "server-side" includes ++ done + +-for f in $SRCDIR../swat/$ln/include/*.html; do ++ # Install "server-side" includes ++ for f in $SRCDIR../swat/$ln/include/*.html; do + FNAME=$SWATDIR/$ln/include/`basename $f` + echo $FNAME + cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? + chmod 0644 $FNAME ++ done ++ + done + ++# Install html documentation ++for f in $SRCDIR../docs/htmldocs/*.html; do ++ FNAME=$SWATDIR/help/`basename $f` ++ echo $FNAME ++ ln -s ../../../doc/samba-doc/htmldocs/`basename $f` $FNAME || echo Cannot install $FNAME. Does $USER have privileges? ++ chmod 0644 $FNAME + done + + # Install Using Samba book (but only if it is there) diff --git a/packaging/Debian/debian/patches/nmbd-signalling.patch b/packaging/Debian/debian/patches/nmbd-signalling.patch new file mode 100644 index 00000000000..ca04cce3bfa --- /dev/null +++ b/packaging/Debian/debian/patches/nmbd-signalling.patch @@ -0,0 +1,20 @@ +diff -uNr samba-2.999+3.0.alpha21.orig/source/nmbd/nmbd_subnetdb.c samba-2.999+3.0.alpha21/source/nmbd/nmbd_subnetdb.c +--- samba-2.999+3.0.alpha21.orig/source/nmbd/nmbd_subnetdb.c 2002-11-26 20:54:19.000000000 -0600 ++++ samba-2.999+3.0.alpha21/source/nmbd/nmbd_subnetdb.c 2002-12-16 23:34:13.000000000 -0600 +@@ -214,12 +214,16 @@ + extern struct in_addr loopback_ip; + + if(num_interfaces == 0) { ++ void (*old_handler)(int); ++ + DEBUG(0,("create_subnets: No local interfaces !\n")); + DEBUG(0,("create_subnets: Waiting for an interface to appear ...\n")); ++ old_handler = CatchSignal( SIGTERM, SIGNAL_CAST SIG_DFL ); + while (iface_count() == 0) { + sleep(5); + load_interfaces(); + } ++ CatchSignal( SIGTERM, SIGNAL_CAST old_handler ); + } + + num_interfaces = iface_count(); diff --git a/packaging/Debian/debian/patches/samba.patch b/packaging/Debian/debian/patches/samba.patch new file mode 100644 index 00000000000..8707ec517ba --- /dev/null +++ b/packaging/Debian/debian/patches/samba.patch @@ -0,0 +1,93 @@ +diff -uNr samba-3.0.0beta1.orig/source/client/smbmount.c samba-3.0.0beta1/source/client/smbmount.c +--- samba-3.0.0beta1.orig/source/client/smbmount.c 2003-06-07 12:57:32.000000000 -0500 ++++ samba-3.0.0beta1/source/client/smbmount.c 2003-06-30 20:12:22.000000000 -0500 +@@ -765,7 +765,7 @@ + *lp = 0; + pstrcpy(password,lp+1); + got_pass = True; +- memset(strchr_m(opteq+1,'%')+1,'X',strlen(password)); ++ memset(strchr_m(opteq+1,'%')+1,'\0',strlen(password)); + } + if ((lp=strchr_m(username,'/'))) { + *lp = 0; +@@ -775,7 +775,7 @@ + !strcmp(opts, "password")) { + pstrcpy(password,opteq+1); + got_pass = True; +- memset(opteq+1,'X',strlen(password)); ++ memset(opteq+1,'\0',strlen(password)); + } else if(!strcmp(opts, "credentials")) { + pstrcpy(credentials,opteq+1); + } else if(!strcmp(opts, "netbiosname")) { +@@ -889,7 +901,7 @@ + *p = 0; + pstrcpy(password,p+1); + got_pass = True; +- memset(strchr_m(getenv("USER"),'%')+1,'X',strlen(password)); ++ memset(strchr_m(getenv("USER"),'%')+1,'\0',strlen(password)); + } + strupper_m(username); + } +diff -uNr samba-3.0.0beta1.orig/source/script/installbin.sh samba-3.0.0beta1/source/script/installbin.sh +--- samba-3.0.0beta1.orig/source/script/installbin.sh 2002-04-22 13:16:20.000000000 -0500 ++++ samba-3.0.0beta1/source/script/installbin.sh 2003-06-30 20:12:22.000000000 -0500 +@@ -22,9 +22,11 @@ + chmod $INSTALLPERMS $BINDIR/$p2 + + # this is a special case, mount needs this in a specific location +- if [ $p2 = smbmount ]; then +- ln -sf $BINDIR/$p2 /sbin/mount.smbfs +- fi ++# Commented out for the Debian Samba package. We take care of this ++# important symlink in debian/rules. (peloy@debian.org) ++# if [ $p2 = smbmount ]; then ++# ln -sf $BINDIR/$p2 /sbin/mount.smbfs ++# fi + done + + +diff -uNr samba-3.0.0beta1.orig/source/smbd/service.c samba-3.0.0beta1/source/smbd/service.c +--- samba-3.0.0beta1.orig/source/smbd/service.c 2003-06-07 12:57:39.000000000 -0500 ++++ samba-3.0.0beta1/source/smbd/service.c 2003-06-30 20:12:57.000000000 -0500 +@@ -887,6 +887,9 @@ + file_close_conn(conn); + dptr_closecnum(conn); + ++ /* make sure we leave the directory available for unmount */ ++ vfs_ChDir(conn, "/"); ++ + /* execute any "postexec = " line */ + if (*lp_postexec(SNUM(conn)) && + change_to_user(conn, vuid)) { +@@ -906,8 +909,5 @@ + smbrun(cmd,NULL); + } + +- /* make sure we leave the directory available for unmount */ +- vfs_ChDir(conn, "/"); +- + conn_free(conn); + } +diff -uNr samba-3.0.0beta1.orig/source/smbwrapper/smbsh.c samba-3.0.0beta1/source/smbwrapper/smbsh.c +--- samba-3.0.0beta1.orig/source/smbwrapper/smbsh.c 2003-06-07 12:57:40.000000000 -0500 ++++ samba-3.0.0beta1/source/smbwrapper/smbsh.c 2003-06-30 20:12:22.000000000 -0500 +@@ -36,7 +36,7 @@ + int main(int argc, char *argv[]) + { + char *p, *u; +- const char *libd = dyn_BINDIR; ++ const char *libd = dyn_LIBDIR; + pstring line, wd; + int opt; + extern char *optarg; +diff -uNr samba-3.0.0beta1.orig/source/web/diagnose.c samba-3.0.0beta1/source/web/diagnose.c +--- samba-3.0.0beta1.orig/source/web/diagnose.c 2003-06-07 12:57:41.000000000 -0500 ++++ samba-3.0.0beta1/source/web/diagnose.c 2003-06-30 20:12:22.000000000 -0500 +@@ -70,6 +70,7 @@ + static struct cli_state cli; + extern struct in_addr loopback_ip; + ++ loopback_ip.s_addr = htonl((127 << 24) + 1); + if (!cli_initialise(&cli)) + return False; + diff --git a/packaging/Debian/debian/patches/smbclient-pager.patch b/packaging/Debian/debian/patches/smbclient-pager.patch new file mode 100644 index 00000000000..3ee85d4118c --- /dev/null +++ b/packaging/Debian/debian/patches/smbclient-pager.patch @@ -0,0 +1,12 @@ +diff -uNr samba-2.999+3.0cvs20020906.orig/source/include/local.h samba-2.999+3.0cvs20020906/source/include/local.h +--- samba-2.999+3.0cvs20020906.orig/source/include/local.h 2002-09-04 14:13:06.000000000 -0500 ++++ samba-2.999+3.0cvs20020906/source/include/local.h 2002-09-08 14:19:24.000000000 -0500 +@@ -109,7 +109,7 @@ + /* the default pager to use for the client "more" command. Users can + override this with the PAGER environment variable */ + #ifndef PAGER +-#define PAGER "more" ++#define PAGER "/usr/bin/pager" + #endif + + /* the size of the uid cache used to reduce valid user checks */ diff --git a/packaging/Debian/debian/patches/smbclient-tar.patch.unused b/packaging/Debian/debian/patches/smbclient-tar.patch.unused new file mode 100644 index 00000000000..e2a4c3ce2c0 --- /dev/null +++ b/packaging/Debian/debian/patches/smbclient-tar.patch.unused @@ -0,0 +1,43 @@ +diff -uNr samba-3.0.0beta2.orig/source/client/client.c samba-3.0.0beta2/source/client/client.c +--- samba-3.0.0beta2.orig/source/client/client.c 2003-07-01 22:36:24.000000000 -0500 ++++ samba-3.0.0beta2/source/client/client.c 2003-07-06 15:17:36.000000000 -0500 +@@ -2773,6 +2773,7 @@ + int opt; + pstring query_host; + BOOL message = False; ++ char* tar_args = NULL; + extern char tar_type; + pstring term_code; + static const char *new_name_resolve_order = NULL; +@@ -2816,7 +2817,7 @@ + max_protocol = interpret_protocol(poptGetOptArg(pc), max_protocol); + break; + case 'T': +- if (!tar_parseargs(argc, argv, poptGetOptArg(pc), optind)) { ++ if (!(tar_args = poptGetOptArg(pc))) { + poptPrintUsage(pc, stderr, 0); + exit(1); + } +@@ -2917,6 +2917,22 @@ + pstrcpy(cmdline_auth_info.password,poptGetArg(pc)); + } + ++ /* The tar command may take a number of string options; pass ++ everything we have left to tar_parseargs(). */ ++ if (tar_args) { ++ const char **argv2 = poptGetArgs(pc); ++ int argc2 = 0; ++ ++ if (argv2) { ++ while (argv2[argc2]) argc2++; ++ } ++ ++ if (!tar_parseargs(argc2, argv2, tar_args, 0)) { ++ poptPrintUsage(pc, stderr, 0); ++ exit(1); ++ } ++ } ++ + init_names(); + + if(new_name_resolve_order) diff --git a/packaging/Debian/debian/patches/smbmount-mtab-flags.patch b/packaging/Debian/debian/patches/smbmount-mtab-flags.patch new file mode 100644 index 00000000000..dac999dd63c --- /dev/null +++ b/packaging/Debian/debian/patches/smbmount-mtab-flags.patch @@ -0,0 +1,15 @@ +diff -ur samba-2.2.4.orig/source/client/smbmnt.c samba-2.2.4/source/client/smbmnt.c +--- samba-2.2.4.orig/source/client/smbmnt.c Sun Apr 8 15:22:51 2001 ++++ samba-2.2.4/source/client/smbmnt.c Sun May 5 16:42:29 2002 +@@ -259,7 +259,10 @@ + ment.mnt_fsname = share_name ? share_name : "none"; + ment.mnt_dir = mount_point; + ment.mnt_type = "smbfs"; +- ment.mnt_opts = ""; ++ if (mount_ro) ++ ment.mnt_opts = "ro"; ++ else ++ ment.mnt_opts = "rw"; + ment.mnt_freq = 0; + ment.mnt_passno= 0; + diff --git a/packaging/Debian/debian/patches/smbmount-nomtab.patch b/packaging/Debian/debian/patches/smbmount-nomtab.patch new file mode 100644 index 00000000000..88071481705 --- /dev/null +++ b/packaging/Debian/debian/patches/smbmount-nomtab.patch @@ -0,0 +1,160 @@ +diff -uNr samba-3.0alpha22.orig/source/client/smbmnt.c samba-3.0alpha22/source/client/smbmnt.c +--- samba-3.0alpha22.orig/source/client/smbmnt.c 2003-03-15 12:11:39.000000000 -0600 ++++ samba-3.0alpha22/source/client/smbmnt.c 2003-03-15 12:11:49.000000000 -0600 +@@ -28,6 +28,7 @@ + static uid_t mount_uid; + static gid_t mount_gid; + static int mount_ro; ++static int no_mtab; + static unsigned mount_fmask; + static unsigned mount_dmask; + static int user_mount; +@@ -40,6 +41,7 @@ + printf("Usage: smbmnt mount-point [options]\n"); + printf("Version %s\n\n",VERSION); + printf("-s share share name on server\n" ++ "-n don't update /etc/mtab\n" + "-r mount read-only\n" + "-u uid mount as uid\n" + "-g gid mount as gid\n" +@@ -54,7 +56,7 @@ + { + int opt; + +- while ((opt = getopt (argc, argv, "s:u:g:rf:d:o:")) != EOF) ++ while ((opt = getopt (argc, argv, "s:u:g:nrf:d:o:")) != EOF) + { + switch (opt) + { +@@ -71,6 +73,9 @@ + mount_gid = strtol(optarg, NULL, 0); + } + break; ++ case 'n': ++ no_mtab = 1; ++ break; + case 'r': + mount_ro = 1; + break; +@@ -274,36 +279,38 @@ + return -1; + } + +- if ((fd = open(MOUNTED"~", O_RDWR|O_CREAT|O_EXCL, 0600)) == -1) +- { +- fprintf(stderr, "Can't get "MOUNTED"~ lock file"); +- return 1; +- } +- close(fd); ++ if (!no_mtab) { ++ if ((fd = open(MOUNTED"~", O_RDWR|O_CREAT|O_EXCL, 0600)) == -1) ++ { ++ fprintf(stderr, "Can't get "MOUNTED"~ lock file"); ++ return 1; ++ } ++ close(fd); + +- if ((mtab = setmntent(MOUNTED, "a+")) == NULL) +- { +- fprintf(stderr, "Can't open " MOUNTED); +- return 1; +- } ++ if ((mtab = setmntent(MOUNTED, "a+")) == NULL) ++ { ++ fprintf(stderr, "Can't open " MOUNTED); ++ return 1; ++ } + +- if (addmntent(mtab, &ment) == 1) +- { +- fprintf(stderr, "Can't write mount entry"); +- return 1; +- } +- if (fchmod(fileno(mtab), 0644) == -1) +- { +- fprintf(stderr, "Can't set perms on "MOUNTED); +- return 1; +- } +- endmntent(mtab); ++ if (addmntent(mtab, &ment) == 1) ++ { ++ fprintf(stderr, "Can't write mount entry"); ++ return 1; ++ } ++ if (fchmod(fileno(mtab), 0644) == -1) ++ { ++ fprintf(stderr, "Can't set perms on "MOUNTED); ++ return 1; ++ } ++ endmntent(mtab); + +- if (unlink(MOUNTED"~") == -1) +- { +- fprintf(stderr, "Can't remove "MOUNTED"~"); +- return 1; +- } ++ if (unlink(MOUNTED"~") == -1) ++ { ++ fprintf(stderr, "Can't remove "MOUNTED"~"); ++ return 1; ++ } ++ } + + return 0; + } +diff -uNr samba-3.0alpha22.orig/source/client/smbmount.c samba-3.0alpha22/source/client/smbmount.c +--- samba-3.0alpha22.orig/source/client/smbmount.c 2003-03-15 12:04:29.000000000 -0600 ++++ samba-3.0alpha22/source/client/smbmount.c 2003-03-15 12:15:10.000000000 -0600 +@@ -48,6 +48,7 @@ + static int mount_ro; + static unsigned mount_fmask; + static unsigned mount_dmask; ++static BOOL no_mtab = False; + static BOOL use_kerberos; + /* TODO: Add code to detect smbfs version in kernel */ + static BOOL status32_smbfs = False; +@@ -273,6 +274,9 @@ + return; + } + ++ if (no_mtab) ++ return; ++ + if ((fd = open(MOUNTED"~", O_RDWR|O_CREAT|O_EXCL, 0600)) == -1) { + DEBUG(0,("%d: Can't get "MOUNTED"~ lock file", sys_getpid())); + return; +@@ -466,6 +470,9 @@ + args[i++] = "-s"; + args[i++] = svc2; + ++ if (no_mtab) { ++ args[i++] = "-n"; ++ } + if (mount_ro) { + args[i++] = "-r"; + } +@@ -661,7 +668,7 @@ + ****************************************************************************/ + static void usage(void) + { +- printf("Usage: mount.smbfs service mountpoint [-o options,...]\n"); ++ printf("Usage: mount.smbfs service mountpoint [-n] [-o options,...]\n"); + + printf("Version %s\n\n",VERSION); + +@@ -739,8 +746,13 @@ + argc -= 2; + argv += 2; + +- opt = getopt(argc, argv, "o:"); +- if(opt != 'o') { ++ opt = getopt(argc, argv, "no:"); ++ if (opt == 'n') { ++ DEBUG(3,("No mtab!\n")); ++ no_mtab = True; ++ opt = getopt(argc, argv, "o:"); ++ } ++ if (opt != 'o') { + return; + } + diff --git a/packaging/Debian/debian/patches/smbstatus-locking.patch b/packaging/Debian/debian/patches/smbstatus-locking.patch new file mode 100644 index 00000000000..d37896a3699 --- /dev/null +++ b/packaging/Debian/debian/patches/smbstatus-locking.patch @@ -0,0 +1,20 @@ +diff -uNr samba-2.999+3.0.alpha21.orig/source/utils/status.c samba-2.999+3.0.alpha21/source/utils/status.c +--- samba-2.999+3.0.alpha21.orig/source/utils/status.c 2002-11-26 20:54:22.000000000 -0600 ++++ samba-2.999+3.0.alpha21/source/utils/status.c 2002-12-16 23:37:14.000000000 -0600 +@@ -630,6 +630,16 @@ + if (!shares_only) { + int ret; + ++ tdb = tdb_open_log(lock_path("locking.tdb"), 0, TDB_DEFAULT, O_RDONLY, 0); ++ ++ if (!tdb) { ++ d_printf("%s not initialised\n", lock_path("locking.tdb")); ++ d_printf("This is normal if an SMB client has never connected to your server.\n"); ++ exit(0); ++ } else { ++ tdb_close(tdb); ++ } ++ + if (!locking_init(1)) { + d_printf("Can't initialise locking module - exiting\n"); + exit(1); diff --git a/packaging/Debian/debian/po/POTFILES.in b/packaging/Debian/debian/po/POTFILES.in new file mode 100644 index 00000000000..95a7ea81506 --- /dev/null +++ b/packaging/Debian/debian/po/POTFILES.in @@ -0,0 +1,3 @@ +[type: gettext/rfc822deb] samba-common.templates +[type: gettext/rfc822deb] samba.templates +[type: gettext/rfc822deb] swat.templates diff --git a/packaging/Debian/debian/po/es.po b/packaging/Debian/debian/po/es.po new file mode 100644 index 00000000000..0d1d1a770de --- /dev/null +++ b/packaging/Debian/debian/po/es.po @@ -0,0 +1,298 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: Samba for Debian 3.0.0beta2-1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2003-08-30 19:08-0500\n" +"PO-Revision-Date: 2003-07-02 21:51-0500\n" +"Last-Translator: Steve Langasek <vorlon@debian.org>\n" +"Language-Team: Spanish <debian-l10n-spanish@lists.debian.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Description +#: ../samba-common.templates:3 +msgid "Character Set for Unix filesystem" +msgstr "Juego de caracteres para el sistema de ficheros Unix" + +# +#. Description +#: ../samba-common.templates:3 +msgid "" +"You currently have a \"character set\" configured in your smb.conf. In " +"Samba 3.0, this option is replaced by a new option, \"unix charset\". Please " +"specify the character set you wish to use for theis new option, which " +"controls how Samba interprets filenames on the file system." +msgstr "" +"Actualmente hay una opción de \"character set\" en smb.conf. En Samba 3.0 " +"esta opción ha sido reemplazado por una opción nueva: \"unix charset\". Por " +"favor, indique el juego de caracteres que desea usar para esta opción nueva, " +"que controla cómo Samba interpretará los nombres en el sistema de ficheros." + +#. Description +#: ../samba-common.templates:3 +msgid "If you leave this option blank, your smb.conf will not be changed." +msgstr "Si deja en blanco este campo, no se cambiará smb.conf." + +#. Description +#: ../samba-common.templates:13 +msgid "Character Set for DOS clients" +msgstr "Juego de caracteres para los clientes DOS" + +#. Description +#: ../samba-common.templates:13 +msgid "" +"You currently have a \"client code page\" set in your smb.conf. In Samba " +"3.0, this option is replaced by the option \"dos charset\". Please specify " +"the character set you wish to use for this new option. In most cases, the " +"default chosen for you will be sufficient. Note that this option is not " +"needed to support Windows clients, it is only for DOS clients. If you leave " +"this option blank, your smb.conf will not be changed." +msgstr "" +"Actualmente hay una opción de \"client code page\" en smb.conf. En Samba " +"3.0 esta opción ha sido reemplazado por la opción \"dos charset\". Por " +"favor, indique el juego de caracteres que desea usar para esta opción " +"nueva. Esta opción no se necesita en absoluto para clientes Windows; es " +"exclusivamente para los clientes DOS. Si deja en blanco este campo, no se " +"cambiará smb.conf." + +#. Description +#: ../samba-common.templates:24 +msgid "Modify smb.conf to use WINS settings from DHCP?" +msgstr "" +"¿Modificar smb.conf para usar la configuración WINS que proviene de DHCP?" + +#. Description +#: ../samba-common.templates:24 +msgid "" +"If your computer gets IP address information from a DHCP server on the " +"network, the DHCP server may also provide information about WINS servers " +"(\"NetBIOS name servers\") present on the network. This requires a change " +"to your smb.conf file so that DHCP-provided WINS settings will automatically " +"be read from /etc/samba/dhcp.conf." +msgstr "" +"Si su sistema recibe la dirección IP desde un servidor DHCP en la red, el " +"servidor DHCP también puede proveerle informaciones sobre los servidores de " +"WINS que haya en la red. Esto requiere un cambio en el fichero smb.conf " +"para que la configuración de WINS proveniente de DHCP se lea automaticamente " +"de /etc/samba/dhcp.conf." + +#. Description +#: ../samba-common.templates:24 +msgid "" +"You must have the dhcp3-client package installed to take advantage of this " +"feature." +msgstr "" +"Hay que instalar el paquete dhcp3-client para aprovechar esta funcionalidad." + +#. Description +#: ../samba-common.templates:37 +msgid "Configure smb.conf through debconf?" +msgstr "¿Configurar smb.conf mediante debconf?" + +#. Description +#: ../samba-common.templates:37 +msgid "" +"The rest of the configuration of Samba deals with questions that affect " +"parameters in /etc/samba/smb.conf, which is the file used to configure the " +"Samba programs (nmbd and smbd.) Your current smb.conf contains an 'include' " +"line or an option that spans multiple lines, which could confuse debconf and " +"require you to edit your smb.conf by hand to get it working again." +msgstr "" +"El resto de la configuración de Samba trata sobre cuestiones que afectan al " +"contenido de /etc/samba/smb.conf, que es el fichero utilizado para " +"configurar los programas de Samba (nmbd y smbd). Su smb.conf actual contiene " +"una lÃnea 'include' o una opción que atraviesa más de una lÃnea, asà que " +"debconf puede dejarlo con un smb.conf descompuesto, requiriendo que lo " +"arregle a mano." + +#. Description +#: ../samba-common.templates:37 +msgid "" +"If you don't use debconf to configure smb.conf, you will have to handle any " +"configuration changes yourself, and will not be able to take advantage of " +"periodic configuration enhancements. Therefore, use of debconf is " +"recommended if possible." +msgstr "" +"Si no usa debconf para configurar smb.conf, tendrá que cuidar a mano " +"cualquier cambio a la configuración de Samba y no disfrutará de aumentos " +"periódicos de configuración. Por eso se recomienda el uso de debconf cuando " +"sea posible." + +#. Description +#: ../samba-common.templates:52 +msgid "Workgroup/Domain Name?" +msgstr "Nombre del dominio o del grupo de trabajo" + +#. Description +#: ../samba-common.templates:52 +msgid "" +"This controls what workgroup your server will appear to be in when queried " +"by clients. Note that this parameter also controls the Domain name used with " +"the security=domain setting." +msgstr "" +"Es el grupo de trabajo en el que aparecerá su servidor cuando se lo " +"pregunten los clientes de la red. Este parámetro también controla el nombre " +"de dominio que se usa con la configuración security=domain." + +#. Description +#: ../samba-common.templates:60 +msgid "Use password encryption?" +msgstr "¿Utilizar contraseñas cifradas?" + +#. Description +#: ../samba-common.templates:60 +msgid "" +"Recent Windows clients communicate with SMB servers using encrypted " +"passwords. If you want to use clear text passwords you will need to change a " +"parameter in your Windows registry. It is recommended that you use encrypted " +"passwords. If you do, make sure you have a valid /etc/samba/smbpasswd file " +"and that you set passwords in there for each user using the smbpasswd " +"command." +msgstr "" +"Los clientes Windows más modernos se comunican con los servidores SMB " +"utilizando contraseñas cifradas. Si quiere usar contraseñas en texto plano, " +"tendrá que cambiar un parámetro en el registro de Windows. Es muy " +"recomendable usar cifrado en las contraseñas. Si elige hacerlo, compruebe " +"que tiene un fichero /etc/samba/smbpasswd válido y que ha puesto las " +"contraseñas con el programa smbpasswd." + +#. Description +#: ../samba.templates:4 +msgid "Create samba password database, /var/lib/samba/passdb.tdb?" +msgstr "¿Crear el base de dados de contraseñas /var/lib/samba/passdb.tdb?" + +#. Description +#: ../samba.templates:4 +msgid "" +"To be compatible with the defaults in most versions of Windows, Samba must " +"be configured to use encrypted passwords. This requires user passwords to " +"be stored in a file separate from /etc/passwd. This file can be created " +"automatically, but the passwords must be added manually (by you or the user) " +"by running smbpasswd, and you must arrange to keep it up-to-date in the " +"future. If you do not create it, you will have to reconfigure samba (and " +"probably your client machines) to use plaintext passwords. See /usr/share/" +"doc/samba-doc/htmldocs/ENCRYPTION.html from the samba-doc package for more " +"details." +msgstr "" +"Para manterner la compatibilidad con el comportamiento por defecto de la " +"mayoria de los sistemas Windows, hay que configurar Samba para que use " +"contraseñas cifradas, lo cual requiere la creación de un fichero, distinto " +"del /etc/passwd, donde se guarden las contraseñas de los usuarios. El " +"fichero se puede crear automaticamente, aunque es necesario añadir las " +"contraseñas manualmente (por usted o por el usuario) mediante el programa " +"'smbpasswd', y debe encargarse de mantener las contraseñas al dÃa. Si no " +"crea este fichero, es imprescindible configurar Samba (y posiblemente los " +"sistemas Windows) para que use contraseñas no cifradas. Véa /usr/share/doc/" +"samba-doc/htmldocs/ENCRYPTION.html del paquete samba-doc para más " +"información." + +#. Description +#: ../samba.templates:17 +msgid "Samba's log files have moved." +msgstr "Se han cambiado de lugar los ficheros de registro de Samba." + +#. Description +#: ../samba.templates:17 +msgid "" +"Starting with the first packages of Samba 2.2 for Debian the log files for " +"both Samba daemons (nmbd and smbd) are now stored in /var/log/samba/. The " +"names of the files are log.nmbd and log.smbd, for nmbd and smbd respectively." +msgstr "" +"A partir de los primeros paquetes Debian de Samba 2.2, los ficheros de " +"registro de los dos demonios del Samba (nmbd y smbd) se encuentran en /var/" +"log/samba/. Los nombres de estos ficheros son log.nmbd y log.smbd, para " +"nmbd y smbd respectivamente." + +#. Description +#: ../samba.templates:17 +msgid "" +"The old log files that were in /var/log/ will be moved to the new location " +"for you." +msgstr "" +"Los ficheros de registro antiguos que habÃa en /var/log se moverán " +"automáticamente a su nueva ubicación." + +#. Description +#: ../samba.templates:28 +msgid "Running nmbd from inetd is no longer supported" +msgstr "Ya no se puede ejecutar nmbd desde el inetd" + +#. Description +#: ../samba.templates:28 +msgid "" +"Your system was previously configured to start nmbd and smbd from inetd. As " +"of version 2.999+3.0.alpha20-4, nmbd will no longer be started from inetd. " +"If you have modified your /etc/init.d/samba startup script, you may need to " +"adjust it by hand now so that nmbd will start." +msgstr "" +"Su sistema estaba configurado anteriormente para ejectuar nmbd y smbd desde " +"inetd. A partir de la version 2.999+3.0.alpha20-4, nmbd ya no se ejecuta " +"desde inetd. Si ha modificado el script de arranque /etc/init.d/samba, " +"puede que tenga que editarlo ahora para que nmbd se ejecute." + +#. Choices +#: ../samba.templates:36 +msgid "daemons, inetd" +msgstr "demonios, inetd" + +#. Description +#: ../samba.templates:38 +msgid "How do you want to run Samba?" +msgstr "¿Cómo quiere que se ejecute Samba?" + +#. Description +#: ../samba.templates:38 +msgid "" +"The Samba daemon smbd can run as a normal daemon or from inetd. Running as a " +"daemon is the recommended approach." +msgstr "" +"El servicio Samba smbd puede ejecutarse como demonio normal o desde el " +"inetd. Se recomienda que se ejecute como demonio independiente." + +#. Description +#: ../samba.templates:45 +msgid "Move /etc/samba/smbpasswd to /var/lib/samba/passdb.tdb?" +msgstr "" +"¿Convertir el fichero /etc/samba/smbpasswd en /var/lib/samba/passdb.tdb?" + +#. Description +#: ../samba.templates:45 +#, fuzzy +msgid "" +"Samba 3.0 introduces a newer, more complete SAM database interface which " +"supersedes the /etc/samba/smbpasswd file. Would you like your existing " +"smbpasswd file to be migrated to /var/lib/samba/passdb.tdb for you? If you " +"plan to use another pdb backend (e.g., LDAP) instead, you should answer 'no' " +"here." +msgstr "" +"La versión 3.0 de Samba introduce un nuevo base de dados \"SAM\" más " +"completo que suplanta al fichero /etc/samba/smbpasswd. ¿Quiere que el " +"fichero corriente smbpasswd sea convertido en /var/lib/samba/passdb.tdb? Si " +"pretende usar otro " + +#. Description +#: ../swat.templates:3 +msgid "Your smb.conf will be re-written!" +msgstr "¡Se sobrescribirá su configuración smb.conf!" + +#. Description +#: ../swat.templates:3 +msgid "" +"SWAT will rewrite your smb.conf file. It will rearrange the entries and " +"delete all comments, include= and copy= options. If you have a carefully " +"crafted smb.conf then back it up or don't use SWAT!" +msgstr "" diff --git a/packaging/Debian/debian/po/fr.po b/packaging/Debian/debian/po/fr.po new file mode 100644 index 00000000000..6be14c19b43 --- /dev/null +++ b/packaging/Debian/debian/po/fr.po @@ -0,0 +1,301 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: Samba for Debian 3.0.0beta2-1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2003-08-30 19:08-0500\n" +"PO-Revision-Date: 2003-07-02 21:52-0500\n" +"Last-Translator: Steve Langasek <vorlon@debian.org>\n" +"Language-Team: French <debian-l10n-french@lists.debian.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-15\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Description +#: ../samba-common.templates:3 +msgid "Character Set for Unix filesystem" +msgstr "Jeu de caractères pour les systèmes de fichiers Unix" + +#. Description +#: ../samba-common.templates:3 +msgid "" +"You currently have a \"character set\" configured in your smb.conf. In " +"Samba 3.0, this option is replaced by a new option, \"unix charset\". Please " +"specify the character set you wish to use for theis new option, which " +"controls how Samba interprets filenames on the file system." +msgstr "" +"Une instruction « character set » (jeu de caractères) est utilisée dans " +"votre fichier smb.conf. Avec Samba 3.0, cette option est remplacée par une " +"nouvelle option, « unix charset » (jeu de caractères Unix). Veuillez " +"indiquer le jeu de caractères que vous voulez utiliser avec cette option, " +"qui permet d'interpréter les noms de fichiers sur le système." + +#. Description +#: ../samba-common.templates:3 +msgid "If you leave this option blank, your smb.conf will not be changed." +msgstr "" +"Le fichier smb.conf ne sera pas modifié si vous laissez cette option sans " +"réponse." + +#. Description +#: ../samba-common.templates:13 +msgid "Character Set for DOS clients" +msgstr "Jeu de caractères pour les clients DOS" + +#. Description +#: ../samba-common.templates:13 +msgid "" +"You currently have a \"client code page\" set in your smb.conf. In Samba " +"3.0, this option is replaced by the option \"dos charset\". Please specify " +"the character set you wish to use for this new option. In most cases, the " +"default chosen for you will be sufficient. Note that this option is not " +"needed to support Windows clients, it is only for DOS clients. If you leave " +"this option blank, your smb.conf will not be changed." +msgstr "" +"Votre fichier smb.conf contient une option « client code page » (page de " +"codes du client). Avec Samba 3.0, cette option a été remplacée par l'option " +"« dos charset » (jeu de caractères DOS). Veuillez indiquer le jeu de " +"caractères que vous voulez utiliser avec la nouvelle option. En général le " +"jeu de caractères choisi par défaut est suffisant. Veuillez noter que cette " +"option ne sert pas pour les clients Windows mais seulement pour les clients " +"DOS. Le fichier smb.conf ne sera pas modifié si vous laissez cette option " +"sans réponse. " + +#. Description +#: ../samba-common.templates:24 +msgid "Modify smb.conf to use WINS settings from DHCP?" +msgstr "Modifier smb.conf pour utiliser les paramètres WINS fournis par DHCP ?" + +#. Description +#: ../samba-common.templates:24 +msgid "" +"If your computer gets IP address information from a DHCP server on the " +"network, the DHCP server may also provide information about WINS servers " +"(\"NetBIOS name servers\") present on the network. This requires a change " +"to your smb.conf file so that DHCP-provided WINS settings will automatically " +"be read from /etc/samba/dhcp.conf." +msgstr "" +"Si votre ordinateur obtient ses paramètres IP à partir d'un serveur DHCP du " +"réseau, ce serveur peut aussi fournir des informations sur les serveurs WINS " +"(serveurs de noms NetBIOS) présents sur le réseau. Une modification du " +"fichier smb.conf est nécessaire afin que les réglages WINS fournis par le " +"serveur DHCP soient lus dans /etc/samba/dhcp.conf." + +#. Description +#: ../samba-common.templates:24 +msgid "" +"You must have the dhcp3-client package installed to take advantage of this " +"feature." +msgstr "Pour cela, le paquet dhcp3-client doit être installé." + +#. Description +#: ../samba-common.templates:37 +msgid "Configure smb.conf through debconf?" +msgstr "Voulez-vous configurer smb.conf avec debconf ?" + +#. Description +#: ../samba-common.templates:37 +msgid "" +"The rest of the configuration of Samba deals with questions that affect " +"parameters in /etc/samba/smb.conf, which is the file used to configure the " +"Samba programs (nmbd and smbd.) Your current smb.conf contains an 'include' " +"line or an option that spans multiple lines, which could confuse debconf and " +"require you to edit your smb.conf by hand to get it working again." +msgstr "" +"La suite de la configuration de Samba pose des questions sur des paramètres " +"de /etc/samba/smb.conf, le fichier utilisé pour configurer les programmes de " +"Samba (nmbd et smbd). Votre fichier actuel contient une ligne « include » ou " +"une option qui s'étale sur plusieurs lignes : cela peut perturber debconf et " +"il vaut mieux gérer manuellement le contenu de ce fichier." + +#. Description +#: ../samba-common.templates:37 +msgid "" +"If you don't use debconf to configure smb.conf, you will have to handle any " +"configuration changes yourself, and will not be able to take advantage of " +"periodic configuration enhancements. Therefore, use of debconf is " +"recommended if possible." +msgstr "" +"Si vous n'utilisez pas debconf pour configurer smb.conf, vous devrez vous-" +"même gérer les modifications de configuration et vous ne pourrez pas " +"bénéficier des améliorations faites dans la configuration. Si possible, il " +"est conseillé d'utiliser debconf." + +#. Description +#: ../samba-common.templates:52 +msgid "Workgroup/Domain Name?" +msgstr "Groupe de travail et nom de domaine ?" + +#. Description +#: ../samba-common.templates:52 +msgid "" +"This controls what workgroup your server will appear to be in when queried " +"by clients. Note that this parameter also controls the Domain name used with " +"the security=domain setting." +msgstr "" +"Ce paramètre indique le groupe de travail où les clients trouveront le " +"serveur. Il indique aussi le nom de domaine utilisé par le paramètre " +"« security=domain »." + +#. Description +#: ../samba-common.templates:60 +msgid "Use password encryption?" +msgstr "Voulez-vous chiffrer les mots de passe ?" + +#. Description +#: ../samba-common.templates:60 +msgid "" +"Recent Windows clients communicate with SMB servers using encrypted " +"passwords. If you want to use clear text passwords you will need to change a " +"parameter in your Windows registry. It is recommended that you use encrypted " +"passwords. If you do, make sure you have a valid /etc/samba/smbpasswd file " +"and that you set passwords in there for each user using the smbpasswd " +"command." +msgstr "" +"Des clients Windows récents communiquent avec les serveurs SMB en utilisant " +"des mots de passe chiffrés. Si vous voulez utiliser des mots de passe sans " +"chiffrement, vous devez modifier un paramètre dans le registre de Windows. " +"Il est recommandé d'utiliser des mots de passe chiffrés. Si vous le faites, " +"n'oubliez pas de créer un fichier /etc/samba/smbpasswd et d'y mettre les " +"mots de passe de tous les utilisateurs qui se servent de la commande " +"smbpasswd." + +#. Description +#: ../samba.templates:4 +msgid "Create samba password database, /var/lib/samba/passdb.tdb?" +msgstr "Faut-il créer une base de données /var/lib/samba/passdb.tdb ?" + +#. Description +#: ../samba.templates:4 +msgid "" +"To be compatible with the defaults in most versions of Windows, Samba must " +"be configured to use encrypted passwords. This requires user passwords to " +"be stored in a file separate from /etc/passwd. This file can be created " +"automatically, but the passwords must be added manually (by you or the user) " +"by running smbpasswd, and you must arrange to keep it up-to-date in the " +"future. If you do not create it, you will have to reconfigure samba (and " +"probably your client machines) to use plaintext passwords. See /usr/share/" +"doc/samba-doc/htmldocs/ENCRYPTION.html from the samba-doc package for more " +"details." +msgstr "" +"Pour préserver la compatibilité avec le comportement par défaut de la " +"plupart des systèmes Windows, Samba doit utiliser les mots de passe " +"chiffrés. Cela exige la création d'un fichier, distinct du fichier /etc/" +"passwd, pour mettre les mots de passe des utilisateurs. Ce fichier peut être " +"créé automatiquement, mais quelqu'un (vous ou l'utilisateur) devra ajouter " +"les mots de passe manuellement en utilisant la commande smbpasswd ; et vous " +"devrez maintenir à jour ce fichier. Si vous ne voulez pas créer le fichier " +"maintenant, Samba (et peut-être les ordinateurs Windows) devra utiliser des " +"mots de passe non chiffrés. Voyez /usr/share/doc/samba-doc/htmldocs/" +"ENCRYPTION.html dans le paquet samba-doc pour plus de détails." + +#. Description +#: ../samba.templates:17 +msgid "Samba's log files have moved." +msgstr "Les fichiers-journaux de Samba ont changé de place." + +#. Description +#: ../samba.templates:17 +msgid "" +"Starting with the first packages of Samba 2.2 for Debian the log files for " +"both Samba daemons (nmbd and smbd) are now stored in /var/log/samba/. The " +"names of the files are log.nmbd and log.smbd, for nmbd and smbd respectively." +msgstr "" +"À partir des premiers paquets de Samba 2.2 pour Debian, les fichiers-" +"journaux des démons nmbd et smbd se trouvent dans /var/log/samba/. Les noms " +"de ces fichiers sont log.nmbd et log.smbd pour, respectivement, nmbd et smbd." + +#. Description +#: ../samba.templates:17 +msgid "" +"The old log files that were in /var/log/ will be moved to the new location " +"for you." +msgstr "" +"Les anciens fichiers-journaux dans /var/log/ seront mis au bon endroit." + +#. Description +#: ../samba.templates:28 +msgid "Running nmbd from inetd is no longer supported" +msgstr "L'utilisation de nmbd à partir d'inetd n'est plus supportée" + +#. Description +#: ../samba.templates:28 +msgid "" +"Your system was previously configured to start nmbd and smbd from inetd. As " +"of version 2.999+3.0.alpha20-4, nmbd will no longer be started from inetd. " +"If you have modified your /etc/init.d/samba startup script, you may need to " +"adjust it by hand now so that nmbd will start." +msgstr "" +"Votre système lançait nmbd et smbd à partir d'inetd. Depuis la version 2.999" +"+3.0.alpha20-4, on ne peut plus exécuter nmbd à partir d'inetd. Si vous avez " +"modifié le script de lancement /etc/init.d/samba, vous avez peut-être besoin " +"de le corriger manuellement pour permettre le lancement de nmbd. " + +#. Choices +#: ../samba.templates:36 +msgid "daemons, inetd" +msgstr "démons, inetd" + +#. Description +#: ../samba.templates:38 +msgid "How do you want to run Samba?" +msgstr "Comment voulez-vous lancer Samba ?" + +#. Description +#: ../samba.templates:38 +msgid "" +"The Samba daemon smbd can run as a normal daemon or from inetd. Running as a " +"daemon is the recommended approach." +msgstr "" +"Le service de Samba smbd peut s'exécuter en tant que démon classique ou bien " +"être lancé par inetd. L'approche recommandée est qu'il s'exécute en tant que " +"démon." + +#. Description +#: ../samba.templates:45 +msgid "Move /etc/samba/smbpasswd to /var/lib/samba/passdb.tdb?" +msgstr "Faut-il convertir /etc/samba/smbpasswd en /var/lib/samba/passdb.tdb ?" + +#. Description +#: ../samba.templates:45 +msgid "" +"Samba 3.0 introduces a newer, more complete SAM database interface which " +"supersedes the /etc/samba/smbpasswd file. Would you like your existing " +"smbpasswd file to be migrated to /var/lib/samba/passdb.tdb for you? If you " +"plan to use another pdb backend (e.g., LDAP) instead, you should answer 'no' " +"here." +msgstr "" +"Avec Samba 3.0, une nouvelle interface pour les bases de données SAM, plus " +"complète, vient remplacer le fichier /etc/samba/smbpasswd. Voulez-vous que " +"votre fichier existant soit remplacé par /var/lib/samba/passdb.tdb ? Si vous " +"envisagez d'utiliser une autre interface d'authentification (p.ex. LDAP), " +"refusez la proposition maintenant." + +#. Description +#: ../swat.templates:3 +msgid "Your smb.conf will be re-written!" +msgstr "Ré-écriture de votre fichier smb.conf !" + +#. Description +#: ../swat.templates:3 +msgid "" +"SWAT will rewrite your smb.conf file. It will rearrange the entries and " +"delete all comments, include= and copy= options. If you have a carefully " +"crafted smb.conf then back it up or don't use SWAT!" +msgstr "" +"SWAT va modifier votre fichier smb.conf. Les entrées seront réorganisées et " +"les commentaires détruits ainsi que les entrées « include = » et « copy = ». " +"Si votre smb.conf était soigneusement construit, sauvegardez-le ou " +"n'utilisez pas SWAT !" diff --git a/packaging/Debian/debian/po/nl.po b/packaging/Debian/debian/po/nl.po new file mode 100644 index 00000000000..61e8742dbb5 --- /dev/null +++ b/packaging/Debian/debian/po/nl.po @@ -0,0 +1,302 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: samba\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2003-08-30 19:08-0500\n" +"PO-Revision-Date: 2003-08-30 02:03+0100\n" +"Last-Translator: Bart Cornelis <cobaco@linux.be>\n" +"Language-Team: dutch <debian-l10n-dutch@lists.debian.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Description +#: ../samba-common.templates:3 +msgid "Character Set for Unix filesystem" +msgstr "Karakterset voor Unix bestandsysteem" + +#. Description +#: ../samba-common.templates:3 +msgid "" +"You currently have a \"character set\" configured in your smb.conf. In " +"Samba 3.0, this option is replaced by a new option, \"unix charset\". Please " +"specify the character set you wish to use for theis new option, which " +"controls how Samba interprets filenames on the file system." +msgstr "" +"U heeft momenteel een \"karakterset\" ingesteld in uw smb.conf. In Samba 3.0 " +"werd deze optie vervangen door een nieuwe \"unix karakterset\" optie. " +"Gelieve de karakterset die u voor deze nieuwe optie wil gebruiken aan te " +"geven, deze bepaald hoe Samba de bestandsnamen in het bestandsysteem " +"interpreteerd." + +#. Description +#: ../samba-common.templates:3 +msgid "If you leave this option blank, your smb.conf will not be changed." +msgstr "" +"Uw smb.conf bestand wordt niet aangepast indien u deze optie leeg laat." + +#. Description +#: ../samba-common.templates:13 +msgid "Character Set for DOS clients" +msgstr "Karakterset voor DOS-clients" + +#. Description +#: ../samba-common.templates:13 +msgid "" +"You currently have a \"client code page\" set in your smb.conf. In Samba " +"3.0, this option is replaced by the option \"dos charset\". Please specify " +"the character set you wish to use for this new option. In most cases, the " +"default chosen for you will be sufficient. Note that this option is not " +"needed to support Windows clients, it is only for DOS clients. If you leave " +"this option blank, your smb.conf will not be changed." +msgstr "" +"U heeft momenteel een \"client code pagina\" ingesteld in uw smb.conf. In " +"Samba 3.0 werd deze optie vervangen door de optie \"dos karakterset\". " +"Gelieve de karakterset die u voor deze nieuwe optie wilt gebruiken aan te " +"geven. In de meeste gevallen zal het standaard ingevulde antwoord voldoen. " +"Merk op dat deze optie niet nodig is voor ondersteuning van Windows-clients, " +"enkel voor DOS-clients. Uw smb.conf wordt niet veranderd wanneer u deze " +"optie blank laat." + +#. Description +#: ../samba-common.templates:24 +msgid "Modify smb.conf to use WINS settings from DHCP?" +msgstr "smb.conf aanpassen om de WINS instellingen van DHCP te gebruiken?" + +#. Description +#: ../samba-common.templates:24 +msgid "" +"If your computer gets IP address information from a DHCP server on the " +"network, the DHCP server may also provide information about WINS servers " +"(\"NetBIOS name servers\") present on the network. This requires a change " +"to your smb.conf file so that DHCP-provided WINS settings will automatically " +"be read from /etc/samba/dhcp.conf." +msgstr "" +"Indien uw computer zijn ip-addres informatie van een DHCP-server op het " +"netwerk haalt, voorziet deze mogelijks ook informatie betreffende de op het " +"netwerk aanwezige WINS-servers (\"NetBIOS naam servers\").\" Dit vereist een " +"verandering aan uw smb.conf bestand, opdat de door DHCP doorgegeven WINS " +"instellingen automatisch gelezen worden van /etc/samba/dhcp.conf." + +#. Description +#: ../samba-common.templates:24 +msgid "" +"You must have the dhcp3-client package installed to take advantage of this " +"feature." +msgstr "" +"U dient het dhcp3-client-pakket geïnstalleert te hebben om van deze optie " +"gebruik te maken." + +#. Description +#: ../samba-common.templates:37 +msgid "Configure smb.conf through debconf?" +msgstr "Configuratie in smb.conf met debconf beheren?" + +#. Description +#: ../samba-common.templates:37 +msgid "" +"The rest of the configuration of Samba deals with questions that affect " +"parameters in /etc/samba/smb.conf, which is the file used to configure the " +"Samba programs (nmbd and smbd.) Your current smb.conf contains an 'include' " +"line or an option that spans multiple lines, which could confuse debconf and " +"require you to edit your smb.conf by hand to get it working again." +msgstr "" +"De resterende Samba configuratie beslaat parameters in /etc/samba/smb.conf, " +"het configuratiebestand dat gebruikt wordt voor de Samba programmas (nmbd en " +"smbd). Uw huidige smb.conf bevat een 'include' regel of een optie die " +"meerdere regels beslaat, dit kan debconf mogelijks in verwarring brenngen. " +"Indien debconf in verwarring raakt dient u uw smb.conf handmatig aan te " +"passen om samba terug werkend te krijgen." + +#. Description +#: ../samba-common.templates:37 +msgid "" +"If you don't use debconf to configure smb.conf, you will have to handle any " +"configuration changes yourself, and will not be able to take advantage of " +"periodic configuration enhancements. Therefore, use of debconf is " +"recommended if possible." +msgstr "" +"Indien u geen gebruik maakt van debconf voor het beheer van smb.conf dient u " +"alle configuratie instellingen zelf te doen, en zult u geen voordeel halen " +"uit de periodieke configuratie verbeteringen. Het gebruik van debconf wordt " +"dan ook aangeraden. " + +#. Description +#: ../samba-common.templates:52 +msgid "Workgroup/Domain Name?" +msgstr "Werkgroep/Domeinnaam?" + +#. Description +#: ../samba-common.templates:52 +msgid "" +"This controls what workgroup your server will appear to be in when queried " +"by clients. Note that this parameter also controls the Domain name used with " +"the security=domain setting." +msgstr "" +"Dit bepaald van welke werkgroep uw server deel zal lijken uit te maken bij " +"het beantwoorden van vragen door clients. Merk op dat deze parameter ook de " +"domeinnaam die gebruikt wordt voor de security=domein instelling bepaald." + +#. Description +#: ../samba-common.templates:60 +msgid "Use password encryption?" +msgstr "Wachtwoord versleuteling gebruiken?" + +#. Description +#: ../samba-common.templates:60 +msgid "" +"Recent Windows clients communicate with SMB servers using encrypted " +"passwords. If you want to use clear text passwords you will need to change a " +"parameter in your Windows registry. It is recommended that you use encrypted " +"passwords. If you do, make sure you have a valid /etc/samba/smbpasswd file " +"and that you set passwords in there for each user using the smbpasswd " +"command." +msgstr "" +"Recente Windows clients maken gebruik van versleutelde wachtwoorden voor de " +"communicatie met SMB-servers. Indien u onversleutelde tekst wachtwoorden " +"wilt gebruiken dient u een parameter te veranderen in de Windows registry. " +"Het gebruik van versleutelde wachtwoorden wordt aangeraden. Indien u dit " +"doet zorg er dan voor dat u een geldig /etc/samba/smbpasswd bestand heeft en " +"dat u de wachtwoorden daar voor elke gebruiker met behulp van smbpasswd " +"insteld. " + +#. Description +#: ../samba.templates:4 +msgid "Create samba password database, /var/lib/samba/passdb.tdb?" +msgstr "Samba wachtwoord database, /var/lib/samba/passdb.tdb, aanmaken?" + +#. Description +#: ../samba.templates:4 +msgid "" +"To be compatible with the defaults in most versions of Windows, Samba must " +"be configured to use encrypted passwords. This requires user passwords to " +"be stored in a file separate from /etc/passwd. This file can be created " +"automatically, but the passwords must be added manually (by you or the user) " +"by running smbpasswd, and you must arrange to keep it up-to-date in the " +"future. If you do not create it, you will have to reconfigure samba (and " +"probably your client machines) to use plaintext passwords. See /usr/share/" +"doc/samba-doc/htmldocs/ENCRYPTION.html from the samba-doc package for more " +"details." +msgstr "" +"Om compatibel te zijn met de standaard instellingen van de meeste " +"Windowsversies dient Samba gebruik te maken van versleutelde wachtwoorden. " +"Dit vereist dat de gebruikerswachtwoorden opgeslagen worden in een bestand " +"dat verschilt van /etc/passwd. Dit bestand kan automatisch aangemaakt " +"worden, maar de wachtwoorden dienen handmatig (door de gebuiker) toegevoegt " +"te worden met het smbpasswd commando. U dient dit bestand in de toekomst ook " +"aktueel te houden. Indien u dit bestand niet aanmaakt zult u samba (en naar " +"alle waarschijnlijkheid de client machines) moeten herconfigureren zodat " +"deze onversleutelde wachtwoorden gebruiken. Zie /usr/share/doc/samba-doc/" +"htmldocs/ENCRYPTION.html uit het samba-doc pakket voor meer details." + +#. Description +#: ../samba.templates:17 +msgid "Samba's log files have moved." +msgstr "Samba's log bestanden zijn verhuisd." + +#. Description +#: ../samba.templates:17 +msgid "" +"Starting with the first packages of Samba 2.2 for Debian the log files for " +"both Samba daemons (nmbd and smbd) are now stored in /var/log/samba/. The " +"names of the files are log.nmbd and log.smbd, for nmbd and smbd respectively." +msgstr "" +"Vanaf de eerste Debian pakketten vaan Samba versie 2.2 zijn de log bestanden " +"van beide Samba daemons (nmbd en smbd) opgeslagen in /var/log/samba/. De log " +"bestanden voor nmbd en smbd zijn, respectievelijk, log.nmbd en log.smbd." + +#. Description +#: ../samba.templates:17 +msgid "" +"The old log files that were in /var/log/ will be moved to the new location " +"for you." +msgstr "" +"De oude logbestanden in /var/log worden voor u naar de nieuwe locatie " +"verplaatst." + +#. Description +#: ../samba.templates:28 +msgid "Running nmbd from inetd is no longer supported" +msgstr "nmbd vanuit inetd draaien wordt niet langer ondersteund" + +#. Description +#: ../samba.templates:28 +msgid "" +"Your system was previously configured to start nmbd and smbd from inetd. As " +"of version 2.999+3.0.alpha20-4, nmbd will no longer be started from inetd. " +"If you have modified your /etc/init.d/samba startup script, you may need to " +"adjust it by hand now so that nmbd will start." +msgstr "" +"Uw systeem was geconfigureerd om nmbd en smbd vanuit inetd te starten. Vanaf " +"versie 2.999+3.0.alpha20-4 kan nmbd niet langer door inetd gestart worden. " +"Indien u uw /etc/init.d/samba startup-script aangepast had, dient u dit " +"mogelijks aan te passen opdat nmbd zou starten." + +#. Choices +#: ../samba.templates:36 +msgid "daemons, inetd" +msgstr "daemons, inetd" + +#. Description +#: ../samba.templates:38 +msgid "How do you want to run Samba?" +msgstr "Hoe wilt u Samba draaien?" + +#. Description +#: ../samba.templates:38 +msgid "" +"The Samba daemon smbd can run as a normal daemon or from inetd. Running as a " +"daemon is the recommended approach." +msgstr "" +"De Samba daemon smbd kan als een normale daemon of via inetd draaien. Als " +"een daemon is de aangeraden aanpak." + +#. Description +#: ../samba.templates:45 +msgid "Move /etc/samba/smbpasswd to /var/lib/samba/passdb.tdb?" +msgstr "/etc/samba/smbpasswd verplaatsen naar /var/lib/samba/passdb.tdb?" + +#. Description +#: ../samba.templates:45 +msgid "" +"Samba 3.0 introduces a newer, more complete SAM database interface which " +"supersedes the /etc/samba/smbpasswd file. Would you like your existing " +"smbpasswd file to be migrated to /var/lib/samba/passdb.tdb for you? If you " +"plan to use another pdb backend (e.g., LDAP) instead, you should answer 'no' " +"here." +msgstr "" +"Samba 3.0 introduceert een nieuwe, meer complete SAM databaseinterface die " +"het /etc/samba/smbpasswd bestand overstijgt. \"Wilt u dat ik uw bestaand " +"smbpasswd bestand voor u naar /var/lib/samba/passdb.tdb migreer? Indien u " +"van plan bent om, in plaats hiervan, een ander pdb-backend (e.g. LDAP) te " +"gebruiken dient u hier 'nee' te antwoorden." + +#. Description +#: ../swat.templates:3 +msgid "Your smb.conf will be re-written!" +msgstr "Uw smb.conf wordt herschreven!" + +#. Description +#: ../swat.templates:3 +msgid "" +"SWAT will rewrite your smb.conf file. It will rearrange the entries and " +"delete all comments, include= and copy= options. If you have a carefully " +"crafted smb.conf then back it up or don't use SWAT!" +msgstr "" +"SWAT zal uw smb.conf bestand herschrijven. Het zal de ingangen anders " +"schikken en alle comments, include= en copy= opties verwijderen. Als u een, " +"met veel zorg, handmatig opgebouwd smb.conf bestand heeft, maak dan een " +"reservekopie of zie van het gebruik van SWAT af! " diff --git a/packaging/Debian/debian/po/pt_BR.po b/packaging/Debian/debian/po/pt_BR.po new file mode 100644 index 00000000000..2af42a562b9 --- /dev/null +++ b/packaging/Debian/debian/po/pt_BR.po @@ -0,0 +1,308 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: samba_3.0.0beta2-1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2003-08-30 19:08-0500\n" +"PO-Revision-Date: 2003-07-02 21:56-0500\n" +"Last-Translator: Steve Langasek <vorlon@debian.org>\n" +"Language-Team: Debian-BR Project <debian-l10n-portuguese@lists.debian.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Description +#: ../samba-common.templates:3 +msgid "Character Set for Unix filesystem" +msgstr "Conjunto de caracteres para sistema de arquivos Unix" + +#. Description +#: ../samba-common.templates:3 +#, fuzzy +msgid "" +"You currently have a \"character set\" configured in your smb.conf. In " +"Samba 3.0, this option is replaced by a new option, \"unix charset\". Please " +"specify the character set you wish to use for theis new option, which " +"controls how Samba interprets filenames on the file system." +msgstr "" +"Atualmente existe um \"conjunto de caracteres\" (\"character set\") " +"configurado em seu arquivo smb.conf. No Samba 3.0, esta opção foi " +"substituída por uma nova opção, \"unix charset\". Por favor especifique o " +"conjunto de caracteres a ser usado para essa nova opção, a qual controla " +"como o Samba interpreta nomes de arquivos no sistema de arquivos." + +#. Description +#: ../samba-common.templates:3 +msgid "If you leave this option blank, your smb.conf will not be changed." +msgstr "" +"Caso você deixe esta opção em branco, seu arquivo smb.conf não será " +"modificado." + +#. Description +#: ../samba-common.templates:13 +msgid "Character Set for DOS clients" +msgstr "Conjunto de caracteres para clientes DOS" + +#. Description +#: ../samba-common.templates:13 +msgid "" +"You currently have a \"client code page\" set in your smb.conf. In Samba " +"3.0, this option is replaced by the option \"dos charset\". Please specify " +"the character set you wish to use for this new option. In most cases, the " +"default chosen for you will be sufficient. Note that this option is not " +"needed to support Windows clients, it is only for DOS clients. If you leave " +"this option blank, your smb.conf will not be changed." +msgstr "" +"Atualmente existe um \"código de página do cliente\" (\"client code page\") " +"definido em seu arquivo smb.conf. No Samba 3.0, essa opção foi substituída " +"pela opção \"dos charset\". Por favor, especifique o conjunto de caracteres " +"que você deseja usar para essa nova opção. Note que essa opção não é " +"necessária para suportar clientes Windows mas sim válida somente para " +"clientes DOS. Caso você deixe essa opção em branco, seu arquivo smb.conf não " +"será modificado." + +#. Description +#: ../samba-common.templates:24 +msgid "Modify smb.conf to use WINS settings from DHCP?" +msgstr "Modificar smb.conf para usar configurações WINS fornecidas via DHCP ?" + +#. Description +#: ../samba-common.templates:24 +msgid "" +"If your computer gets IP address information from a DHCP server on the " +"network, the DHCP server may also provide information about WINS servers " +"(\"NetBIOS name servers\") present on the network. This requires a change " +"to your smb.conf file so that DHCP-provided WINS settings will automatically " +"be read from /etc/samba/dhcp.conf." +msgstr "" +"Caso seu computador obtenha as informações de endereçamento IP de um " +"servidor DHCP na rede, o servidor DHCP pode também fornecer informações " +"sobre servidor WINS (\"Servidor de Nomes NetBIOS\") presentes na rede. Para " +"o Samba ler as configurações WINS fornecidas pelo servidor DHCP " +"automaticamente do arquivo /etc/samba/dhcp.conf, é preciso modificar seu " +"arquivo smb.conf." + +#. Description +#: ../samba-common.templates:24 +msgid "" +"You must have the dhcp3-client package installed to take advantage of this " +"feature." +msgstr "" +"Você deve possuir o pacote dhcp3-client instalado para poder usar este " +"recurso." + +#. Description +#: ../samba-common.templates:37 +msgid "Configure smb.conf through debconf?" +msgstr "Configurar smb.conf através do debconf ?" + +#. Description +#: ../samba-common.templates:37 +msgid "" +"The rest of the configuration of Samba deals with questions that affect " +"parameters in /etc/samba/smb.conf, which is the file used to configure the " +"Samba programs (nmbd and smbd.) Your current smb.conf contains an 'include' " +"line or an option that spans multiple lines, which could confuse debconf and " +"require you to edit your smb.conf by hand to get it working again." +msgstr "" +"O restante da configuração do Samba lida com questões que afetam parâmetros " +"no arquivo /etc/samba/smb.conf, que é o arquivo usado para configurar os " +"programas Samba (nmbd e smbd). Seu arquivo smb.conf atual contém uma linha " +"'include' ou uma opção que ocupa diversas linhas, o que pode confundir o " +"debconf e requerer que você edite seu arquivo smb.conf manualmente para tê-" +"lo funcional novamente." + +#. Description +#: ../samba-common.templates:37 +msgid "" +"If you don't use debconf to configure smb.conf, you will have to handle any " +"configuration changes yourself, and will not be able to take advantage of " +"periodic configuration enhancements. Therefore, use of debconf is " +"recommended if possible." +msgstr "" +"Caso você opte por não usar o debconf para configurar o smb.conf, será " +"necessário que você lide com quaisquer mudanças de configurações manualmente " +"e você não poderá aproveitar os melhoramentos periódicos de configuração. " +"Por esse motivo, é recomendado usar o debconf, caso seja possível." + +#. Description +#: ../samba-common.templates:52 +msgid "Workgroup/Domain Name?" +msgstr "Nome de Domínio/Grupo de Trabalho ?" + +#. Description +#: ../samba-common.templates:52 +msgid "" +"This controls what workgroup your server will appear to be in when queried " +"by clients. Note that this parameter also controls the Domain name used with " +"the security=domain setting." +msgstr "" +"Este parâmetro controla em qual grupo de trabalho (workgroup) seu servidor " +"parecerá estar quando o mesmo for pesquisado por clientes. Note que este " +"parâmetro também controla o nome de Domínio usado com a configuração " +"security=domain." + +#. Description +#: ../samba-common.templates:60 +msgid "Use password encryption?" +msgstr "Usar encriptação de senhas ?" + +#. Description +#: ../samba-common.templates:60 +msgid "" +"Recent Windows clients communicate with SMB servers using encrypted " +"passwords. If you want to use clear text passwords you will need to change a " +"parameter in your Windows registry. It is recommended that you use encrypted " +"passwords. If you do, make sure you have a valid /etc/samba/smbpasswd file " +"and that you set passwords in there for each user using the smbpasswd " +"command." +msgstr "" +"Clientes Windows atuais comunicam-se com servidores SMB usando senhas " +"encriptadas. Caso você queira usar senhas em texto puro você precisará " +"modificar um parâmetro no registro de seu Windows. É recomendado que você " +"use senhas encriptadas. Se for usá-las, certifique-se de possuir um arquivo /" +"etc/samba/smbpasswd válido e que você tenha definido senhas no mesmo para " +"cada usuário, utilizando o comando smbpasswd." + +#. Description +#: ../samba.templates:4 +msgid "Create samba password database, /var/lib/samba/passdb.tdb?" +msgstr "Gerar a base de dados para senhas /var/lib/samba/passdb.tdb ?" + +#. Description +#: ../samba.templates:4 +msgid "" +"To be compatible with the defaults in most versions of Windows, Samba must " +"be configured to use encrypted passwords. This requires user passwords to " +"be stored in a file separate from /etc/passwd. This file can be created " +"automatically, but the passwords must be added manually (by you or the user) " +"by running smbpasswd, and you must arrange to keep it up-to-date in the " +"future. If you do not create it, you will have to reconfigure samba (and " +"probably your client machines) to use plaintext passwords. See /usr/share/" +"doc/samba-doc/htmldocs/ENCRYPTION.html from the samba-doc package for more " +"details." +msgstr "" +"Para compatibilidade com os padrões adotados em todas as versões atuais do " +"Windows o Samba deve ser configurado para usar senhas encriptadas. Isso " +"requer que as senhas dos usuários sejam armazenadas em um arquivo diferente " +"do /etc/passwd. Esse arquivo pode ser criado automaticamente, mas as senhas " +"devem ser definidas manualmente (por você ou pelo usuário) executando o " +"utilitário smbpasswd. Você deve certificar-se de manter esse arquivo " +"atualizado futuramente. Caso você não crie esse arquivo, você terá que " +"reconfigurar o Samba (e provavelmente suas máquinas clientes) para " +"utilização de senhas em texto puro. Consulte a documentação do pacote samba-" +"doc em /usr/share/doc/samba-doc/htmldocs/ENCRYPTION.html para maiores " +"detalhes." + +#. Description +#: ../samba.templates:17 +msgid "Samba's log files have moved." +msgstr "Arquivos de log do Samba foram movidos." + +#. Description +#: ../samba.templates:17 +msgid "" +"Starting with the first packages of Samba 2.2 for Debian the log files for " +"both Samba daemons (nmbd and smbd) are now stored in /var/log/samba/. The " +"names of the files are log.nmbd and log.smbd, for nmbd and smbd respectively." +msgstr "" +"Desde os primeiros pacotes Debian do Samba 2.2 os arquivos de log para ambos " +"os daemons Samba (nmbd e smbd) são armazenados no diretório /var/log/samba/. " +"Os nomes desses arquivos são log.nmbd e log.smbd, para o nmbd e para o smbd, " +"respectivamente." + +#. Description +#: ../samba.templates:17 +msgid "" +"The old log files that were in /var/log/ will be moved to the new location " +"for you." +msgstr "" +"Os antigos arquivos de log que estavam em /var/log/ serão movidos para a " +"nova localização automaticamente para você." + +#. Description +#: ../samba.templates:28 +msgid "Running nmbd from inetd is no longer supported" +msgstr "A execução do nmbd a partir do inetd não é mais suportada" + +#. Description +#: ../samba.templates:28 +msgid "" +"Your system was previously configured to start nmbd and smbd from inetd. As " +"of version 2.999+3.0.alpha20-4, nmbd will no longer be started from inetd. " +"If you have modified your /etc/init.d/samba startup script, you may need to " +"adjust it by hand now so that nmbd will start." +msgstr "" +"Seu sistema foi previamente configurado para iniciar os daemons nmbd e smbd " +"a partir do inetd. Desde a versão 2.999+3.0.alpha20-4, o nmbd não mais será " +"iniciado a partir do inetd. Caso você tenha modificado seu script de " +"inicialização /etc/init.d/samba, você pode precisar ajustá-lo manualmente " +"agora para que o nmbd seja iniciado." + +#. Choices +#: ../samba.templates:36 +msgid "daemons, inetd" +msgstr "daemons, inetd" + +#. Description +#: ../samba.templates:38 +msgid "How do you want to run Samba?" +msgstr "Como você deseja que o Samba seja executado ?" + +#. Description +#: ../samba.templates:38 +msgid "" +"The Samba daemon smbd can run as a normal daemon or from inetd. Running as a " +"daemon is the recommended approach." +msgstr "" +"O serviço Samba smbd pode ser executado como daemon normal ou a partir do " +"inetd. Executá-lo como daemon é o método recomendado." + +#. Description +#: ../samba.templates:45 +msgid "Move /etc/samba/smbpasswd to /var/lib/samba/passdb.tdb?" +msgstr "Mover /etc/samba/smbpasswd para /var/lib/samba/passdb.tdb ?" + +#. Description +#: ../samba.templates:45 +msgid "" +"Samba 3.0 introduces a newer, more complete SAM database interface which " +"supersedes the /etc/samba/smbpasswd file. Would you like your existing " +"smbpasswd file to be migrated to /var/lib/samba/passdb.tdb for you? If you " +"plan to use another pdb backend (e.g., LDAP) instead, you should answer 'no' " +"here." +msgstr "" +"O Samba 3.0 introduz uma nova e mais complete interface de base de dados SAM " +"que substitui o arquivo /etc/samba/smbpasswd. Você gostaria que o arquivo " +"smbpasswd existente fosse migrado para /var/lib/samba/passdb.tdb para você ? " +"Caso você planeje usar um outro backend (como LDAP, por exemplo) você deverá " +"escolher 'não' aqui." + +#. Description +#: ../swat.templates:3 +msgid "Your smb.conf will be re-written!" +msgstr "Seu arquivo smb.conf será reescrito !" + +#. Description +#: ../swat.templates:3 +msgid "" +"SWAT will rewrite your smb.conf file. It will rearrange the entries and " +"delete all comments, include= and copy= options. If you have a carefully " +"crafted smb.conf then back it up or don't use SWAT!" +msgstr "" +"O SWAT irá reescrever seu arquivo smb.conf. Ele irá rearrumar as entradas e " +"apagar todos os comentários, opções include= e copy=. Caso você possua um " +"arquivo smb.conf cuidadosamente criado e comentado, faça uma cópia de " +"segurança (backup) do mesmo ou não use o SWAT !" diff --git a/packaging/Debian/debian/po/templates.pot b/packaging/Debian/debian/po/templates.pot new file mode 100644 index 00000000000..465f4719b0d --- /dev/null +++ b/packaging/Debian/debian/po/templates.pot @@ -0,0 +1,233 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2003-08-30 19:08-0500\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Description +#: ../samba-common.templates:3 +msgid "Character Set for Unix filesystem" +msgstr "" + +#. Description +#: ../samba-common.templates:3 +msgid "" +"You currently have a \"character set\" configured in your smb.conf. In " +"Samba 3.0, this option is replaced by a new option, \"unix charset\". Please " +"specify the character set you wish to use for theis new option, which " +"controls how Samba interprets filenames on the file system." +msgstr "" + +#. Description +#: ../samba-common.templates:3 +msgid "If you leave this option blank, your smb.conf will not be changed." +msgstr "" + +#. Description +#: ../samba-common.templates:13 +msgid "Character Set for DOS clients" +msgstr "" + +#. Description +#: ../samba-common.templates:13 +msgid "" +"You currently have a \"client code page\" set in your smb.conf. In Samba " +"3.0, this option is replaced by the option \"dos charset\". Please specify " +"the character set you wish to use for this new option. In most cases, the " +"default chosen for you will be sufficient. Note that this option is not " +"needed to support Windows clients, it is only for DOS clients. If you leave " +"this option blank, your smb.conf will not be changed." +msgstr "" + +#. Description +#: ../samba-common.templates:24 +msgid "Modify smb.conf to use WINS settings from DHCP?" +msgstr "" + +#. Description +#: ../samba-common.templates:24 +msgid "" +"If your computer gets IP address information from a DHCP server on the " +"network, the DHCP server may also provide information about WINS servers " +"(\"NetBIOS name servers\") present on the network. This requires a change " +"to your smb.conf file so that DHCP-provided WINS settings will automatically " +"be read from /etc/samba/dhcp.conf." +msgstr "" + +#. Description +#: ../samba-common.templates:24 +msgid "" +"You must have the dhcp3-client package installed to take advantage of this " +"feature." +msgstr "" + +#. Description +#: ../samba-common.templates:37 +msgid "Configure smb.conf through debconf?" +msgstr "" + +#. Description +#: ../samba-common.templates:37 +msgid "" +"The rest of the configuration of Samba deals with questions that affect " +"parameters in /etc/samba/smb.conf, which is the file used to configure the " +"Samba programs (nmbd and smbd.) Your current smb.conf contains an 'include' " +"line or an option that spans multiple lines, which could confuse debconf and " +"require you to edit your smb.conf by hand to get it working again." +msgstr "" + +#. Description +#: ../samba-common.templates:37 +msgid "" +"If you don't use debconf to configure smb.conf, you will have to handle any " +"configuration changes yourself, and will not be able to take advantage of " +"periodic configuration enhancements. Therefore, use of debconf is " +"recommended if possible." +msgstr "" + +#. Description +#: ../samba-common.templates:52 +msgid "Workgroup/Domain Name?" +msgstr "" + +#. Description +#: ../samba-common.templates:52 +msgid "" +"This controls what workgroup your server will appear to be in when queried " +"by clients. Note that this parameter also controls the Domain name used with " +"the security=domain setting." +msgstr "" + +#. Description +#: ../samba-common.templates:60 +msgid "Use password encryption?" +msgstr "" + +#. Description +#: ../samba-common.templates:60 +msgid "" +"Recent Windows clients communicate with SMB servers using encrypted " +"passwords. If you want to use clear text passwords you will need to change a " +"parameter in your Windows registry. It is recommended that you use encrypted " +"passwords. If you do, make sure you have a valid /etc/samba/smbpasswd file " +"and that you set passwords in there for each user using the smbpasswd " +"command." +msgstr "" + +#. Description +#: ../samba.templates:4 +msgid "Create samba password database, /var/lib/samba/passdb.tdb?" +msgstr "" + +#. Description +#: ../samba.templates:4 +msgid "" +"To be compatible with the defaults in most versions of Windows, Samba must " +"be configured to use encrypted passwords. This requires user passwords to " +"be stored in a file separate from /etc/passwd. This file can be created " +"automatically, but the passwords must be added manually (by you or the user) " +"by running smbpasswd, and you must arrange to keep it up-to-date in the " +"future. If you do not create it, you will have to reconfigure samba (and " +"probably your client machines) to use plaintext passwords. See /usr/share/" +"doc/samba-doc/htmldocs/ENCRYPTION.html from the samba-doc package for more " +"details." +msgstr "" + +#. Description +#: ../samba.templates:17 +msgid "Samba's log files have moved." +msgstr "" + +#. Description +#: ../samba.templates:17 +msgid "" +"Starting with the first packages of Samba 2.2 for Debian the log files for " +"both Samba daemons (nmbd and smbd) are now stored in /var/log/samba/. The " +"names of the files are log.nmbd and log.smbd, for nmbd and smbd respectively." +msgstr "" + +#. Description +#: ../samba.templates:17 +msgid "" +"The old log files that were in /var/log/ will be moved to the new location " +"for you." +msgstr "" + +#. Description +#: ../samba.templates:28 +msgid "Running nmbd from inetd is no longer supported" +msgstr "" + +#. Description +#: ../samba.templates:28 +msgid "" +"Your system was previously configured to start nmbd and smbd from inetd. As " +"of version 2.999+3.0.alpha20-4, nmbd will no longer be started from inetd. " +"If you have modified your /etc/init.d/samba startup script, you may need to " +"adjust it by hand now so that nmbd will start." +msgstr "" + +#. Choices +#: ../samba.templates:36 +msgid "daemons, inetd" +msgstr "" + +#. Description +#: ../samba.templates:38 +msgid "How do you want to run Samba?" +msgstr "" + +#. Description +#: ../samba.templates:38 +msgid "" +"The Samba daemon smbd can run as a normal daemon or from inetd. Running as a " +"daemon is the recommended approach." +msgstr "" + +#. Description +#: ../samba.templates:45 +msgid "Move /etc/samba/smbpasswd to /var/lib/samba/passdb.tdb?" +msgstr "" + +#. Description +#: ../samba.templates:45 +msgid "" +"Samba 3.0 introduces a newer, more complete SAM database interface which " +"supersedes the /etc/samba/smbpasswd file. Would you like your existing " +"smbpasswd file to be migrated to /var/lib/samba/passdb.tdb for you? If you " +"plan to use another pdb backend (e.g., LDAP) instead, you should answer 'no' " +"here." +msgstr "" + +#. Description +#: ../swat.templates:3 +msgid "Your smb.conf will be re-written!" +msgstr "" + +#. Description +#: ../swat.templates:3 +msgid "" +"SWAT will rewrite your smb.conf file. It will rearrange the entries and " +"delete all comments, include= and copy= options. If you have a carefully " +"crafted smb.conf then back it up or don't use SWAT!" +msgstr "" diff --git a/packaging/Debian/debian/python2.3-samba.files b/packaging/Debian/debian/python2.3-samba.files new file mode 100644 index 00000000000..82759d81b89 --- /dev/null +++ b/packaging/Debian/debian/python2.3-samba.files @@ -0,0 +1 @@ +usr/lib/python2.3/site-packages/ diff --git a/packaging/Debian/debian/rules b/packaging/Debian/debian/rules new file mode 100755 index 00000000000..73e5d16bc19 --- /dev/null +++ b/packaging/Debian/debian/rules @@ -0,0 +1,316 @@ +#!/usr/bin/make -f +# +# Important modifications (introduction of a saved config.cache to +# solve build problems) introduced in Samba 2.2.1a-5. These +# modification were made by Steve Langasek <vorlon@netexpress.net>. +# +# + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This is the debhelper compatability version to use. +export DH_COMPAT=4 + +# This has to be exported to make some magic below work. +export DH_OPTIONS + +# Set the host and build architectures for use with config.cache loading, +# cross-building, etc. +DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + +export DEB_HOST_GNU_TYPE +export DEB_BUILD_GNU_TYPE + + +# Support the DEB_BUILD_OPTIONS variable +CFLAGS = -gstabs -Wall +INSTALL = install + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL += -s +endif + + +DESTDIR=`pwd`/debian/tmp +SWATDIR=`pwd`/debian/swat + +IVARS = BASEDIR=$(DESTDIR)/usr \ + prefix=$(DESTDIR)/usr \ + BINDIR=$(DESTDIR)/usr/bin \ + SBINDIR=$(DESTDIR)/usr/sbin \ + MANDIR=$(DESTDIR)/usr/share/man \ + LIBDIR=$(DESTDIR)/usr/lib/samba \ + VARDIR=$(DESTDIR)/var \ + INCLUDEDIR=$(DESTDIR)/usr/include \ + SWATDIR=$(SWATDIR)/usr/share/samba/swat \ + CODEPAGEDIR=$(DESTDIR)/usr/share/samba/ \ + PRIVATEDIR=$(DESTDIR)/etc/samba \ + CONFIGDIR=$(DESTDIR)/etc/samba + +patch: patch-stamp +patch-stamp: + dh_testdir + if [ ! -f patch-stamp ]; then /bin/sh debian/scripts/patch-source; fi + touch patch-stamp + +unpatch: + dh_testdir + if [ -f patch-stamp ]; then /bin/sh debian/scripts/unpatch-source; fi + rm -f patch-stamp + +configure: patch-stamp configure-stamp +configure-stamp: + dh_testdir + + if [ -f debian/config.cache ]; then \ + cp -f debian/config.cache source/config.cache; \ + fi + + [ -f source/Makefile ] || (cd source && CFLAGS="$(CFLAGS)" ./configure \ + --host=$(DEB_HOST_GNU_TYPE) \ + --build=$(DEB_BUILD_GNU_TYPE) \ + --cache-file=./config.cache \ + --with-fhs \ + --enable-shared \ + --enable-static \ + --prefix=/usr \ + --sysconfdir=/etc \ + --libdir=/etc/samba \ + --with-privatedir=/etc/samba \ + --localstatedir=/var \ + --with-netatalk \ + --with-smbmount \ + --with-pam \ + --with-syslog \ + --with-utmp \ + --with-readline \ + --with-pam_smbpass \ + --with-libsmbclient \ + --with-winbind \ + --with-msdfs \ + --with-automount \ + --with-acl-support \ + --with-tdbsam \ + --with-ldap \ + --with-python=python2.3) + + touch configure-stamp + +build: patch-stamp configure-stamp build-stamp +build-stamp: + dh_testdir + + $(MAKE) -C source headers + $(MAKE) -C source all nsswitch/libnss_wins.so python_ext + + touch build-stamp + +clean: unpatch + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Clean first the Samba package +# -$(MAKE) -C source realclean +# -$(MAKE) -C source clean + -$(MAKE) -C source python_clean distclean + + # Delete stuff left after a build that is not deleted by 'make clean' + rm -f source/bin/wbinfo source/bin/winbindd source/bin/debug2html \ + source/bin/libsmbclient.a source/include/stamp-h + + dh_clean + +install: DH_OPTIONS= +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + mkdir -p $(DESTDIR)/usr/share/man $(DESTDIR)/usr/lib \ + $(DESTDIR)/lib/security $(DESTDIR)/sbin \ + $(DESTDIR)/usr/lib/cups/backend $(DESTDIR)/usr/share/samba \ + $(DESTDIR)/etc/pam.d $(DESTDIR)/etc/dhcp3/dhclient-enter-hooks.d \ + $(DESTDIR)/usr/lib/python2.3/site-packages + + # Add here commands to install the package into debian/tmp. + $(MAKE) -C source install $(IVARS) + + # libsmbclient files are not installed by the standard + # 'make install' - do it manually. + $(MAKE) -C source installclientlib $(IVARS) + mv $(DESTDIR)/usr/lib/libsmbclient.so $(DESTDIR)/usr/lib/libsmbclient.so.0.1 + ln -s libsmbclient.so.0.1 $(DESTDIR)/usr/lib/libsmbclient.so.0 + ln -s libsmbclient.so.0.1 $(DESTDIR)/usr/lib/libsmbclient.so + + # Install other stuff not installed by "make install" + install -m 0755 debian/mksmbpasswd.awk $(DESTDIR)/usr/sbin/mksmbpasswd + + # Install winbind stuff not installed by 'make install' + install -m 0644 source/nsswitch/libnss_winbind.so \ + $(DESTDIR)/lib/libnss_winbind.so.2 + install -m 0644 source/nsswitch/pam_winbind.so \ + $(DESTDIR)/lib/security/ + + # Install libnss_wins.so, which is not installed by 'make install' either. + install -m 0644 source/nsswitch/libnss_wins.so \ + $(DESTDIR)/lib/libnss_wins.so.2 + + # pam_smbpass.so isn't being installed by 'make install'. + # We'll move it here to $(DESTDIR)/lib/security/ and then + # libpam-smbpass.files will make dh_movefiles move it to the + # right location in the libpam-smbpass package. + install -m 0644 source/bin/pam_smbpass.so $(DESTDIR)/lib/security/ + + # Create the symlink that will allow us to do "mount -t smbfs ...". + # Create also a symlink that will allow "mount -t smb ..." to + # work too. The symlink is created in $(DESTDIR)/sbin/ but + # will be moved by dh_movefiles to the smbfs package later on. + ln -s /usr/bin/smbmount $(DESTDIR)/sbin/mount.smbfs + ln -s /usr/bin/smbmount $(DESTDIR)/sbin/mount.smb + ln -s smbmount.8 $(DESTDIR)/usr/share/man/man8/mount.smb.8 + ln -s smbmount.8 $(DESTDIR)/usr/share/man/man8/mount.smbfs.8 + + # For CUPS to support printing to samba printers, it's necessary + # to make the following symlink (according to + # Erich Schubert <debian@vitavonni.de> in #109509): + ln -s ../../../bin/smbspool $(DESTDIR)/usr/lib/cups/backend/smb + + # Install man pages for files without man pages in the upstream sources + install -m 0644 debian/mksmbpasswd.8 $(DESTDIR)/usr/share/man/man8/mksmbpasswd.8 + + # Delete unwanted stuff leftover from "make install" + + # The smbwrapper package is not being generated anymore, so we must + # delete the related man pages. + rm $(DESTDIR)/usr/share/man/man1/smbsh.1 + + # We're not providing findsmb (should we?) so let's remove the man + # pages. + find debian/ -name 'findsmb*' -exec rm -f {} \; + + # Install samba-common's conffiles - they'll get moved later to their + # correct place by dh_movefiles. + cp debian/smb.conf $(DESTDIR)/usr/share/samba/ + install -m755 debian/panic-action $(DESTDIR)/usr/share/samba/ + cp debian/gdbcommands $(DESTDIR)/etc/samba/ + cp debian/samba.pamd $(DESTDIR)/etc/pam.d/samba + install -m755 debian/samba-common.dhcp $(DESTDIR)/etc/dhcp3/dhclient-enter-hooks.d/samba + + # Install the Python modules + # + # Hmmm... need to figure this out. We have lib.linux-i686-2.2 + # and lib.linux-i686-2.3 directories. Using only the stuff from + # the 2.3 directory for now. peloy.- + #cp source/build/lib.*/samba/*.so $(DESTDIR)/usr/lib/python2.3/site-packages/ + cp source/build/lib.linux-*-2.3/samba/*.so $(DESTDIR)/usr/lib/python2.3/site-packages/ + + dh_movefiles + +# Build architecture-independent files here. +# Pass -i to all debhelper commands in this target to reduce clutter. +binary-indep: DH_OPTIONS=-i +binary-indep: build install + dh_testdir + dh_testroot + dh_installdebconf + dh_installdocs -A debian/README.build + # dh_installexamples is not available in Debian Potato... + [ -x /usr/bin/dh_installexamples ] && DH_OPTIONS= dh_installexamples -v -psamba-doc examples/* +# dh_installmenu +# dh_installemacsen +# dh_installpam +# dh_installinit +# dh_installcron +# dh_installmanpages +# dh_installinfo +# dh_undocumented + dh_installchangelogs + dh_link + dh_compress + dh_fixperms + + # Get rid of those pesky .cvsignore files to make lintian happy + find debian/ -name .cvsignore -exec rm -f {} \; + + dh_installdeb +# dh_perl + dh_gencontrol + dh_md5sums + dh_builddeb + +# Build architecture-dependent files here. +# Pass -a to all debhelper commands in this target to reduce clutter. +binary-arch: DH_OPTIONS=-a +binary-arch: build install + dh_testdir + dh_testroot + dh_installdebconf + dh_installdocs -A debian/README.build + # dh_installexamples is not available in Debian Potato... + [ -x /usr/bin/dh_installexamples ] && DH_OPTIONS= dh_installexamples -v -ppython2.3-samba source/python/examples/* +# dh_installmenu + # dh_installlogrotate is not available in Debian Potato... + if [ -x /usr/bin/dh_installlogrotate ]; then \ + dh_installlogrotate; \ + else \ + mkdir -p debian/samba/etc/logrotate.d; \ + cp debian/samba.logrotate debian/samba/etc/logrotate.d/samba; \ + mkdir -p debian/winbind/etc/logrotate.d; \ + cp debian/winbind.logrotate debian/winbind/etc/logrotate.d/winbind; \ + fi +# dh_installemacsen +# dh_installpam + DH_OPTIONS= dh_installinit -psamba -- "defaults 20 19" + DH_OPTIONS= dh_installinit -pwinbind + dh_installcron +# dh_installmanpages +# dh_installinfo + cp debian/winbind.lintian debian/winbind/usr/share/lintian/overrides/winbind +# dh_undocumented + dh_installchangelogs -Nlibpam-smbpass + DH_OPTIONS= dh_installchangelogs -plibpam-smbpass source/pam_smbpass/CHANGELOG + dh_strip + dh_link + dh_compress + dh_fixperms + + # Why this is executable, I have NO idea... + chmod a-x debian/libsmbclient-dev/usr/include/libsmbclient.h + + # You may want to make some executables suid here. + # The smbmnt and smbumount binaries should be setuid-root. This + # has security implications because these programs haven't had + # a thorough security audit. smbmount _does not_ have to have + # the setuid bit set. In fact, it is a security hole. + chmod u+s debian/smbfs/usr/bin/smbmnt + chmod u+s debian/smbfs/usr/bin/smbumount + + # Set some reasonable default perms for the samba logdir. + chmod 0750 debian/samba/var/log/samba/ + chown root.adm debian/samba/var/log/samba/ + + # Get rid of those pesky .cvsignore files to make lintian happy + # (maybe we only need the "find ... -exec rm -f {} ;" we have + # in the binary-indep target?) peloy.- + find debian/ -name .cvsignore -exec rm -f {} \; + + dh_installdeb +# dh_makeshlibs +# dh_perl + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/packaging/Debian/debian/samba-common.config b/packaging/Debian/debian/samba-common.config new file mode 100644 index 00000000000..ed76b95cb84 --- /dev/null +++ b/packaging/Debian/debian/samba-common.config @@ -0,0 +1,154 @@ +#/bin/sh -e + +# Source debconf library. +. /usr/share/debconf/confmodule + +# Function for grabbing a parameter from an smb.conf file +smbconf_retr() { + if [ -z "$1" ]; then + return + fi + + if [ -n "$2" ]; then + local FILE="$2" + fi + + if [ -z "$FILE" ]; then + return + fi + + sed -n -e" + s/^[[:space:]]*\[global\]/\[global\]/i + /^\[global\]/,/^[[:space:]]*\[/ { + s/^[[:space:]]*$1[[:space:]]*=[[:space:]]*//pi + }" $FILE \ + | tail -1 +} + +FILE=/etc/samba/smb.conf + +db_title "Samba Server" + +# We ask the question IFF the config contains complex options that could +# cause us to break the config. +if [ -f "$FILE" ] && grep -v dhcp.conf $FILE \ + | grep -qEi '\\$|^[[:space:]]*include[[:space:]]*=' +then + db_input high samba-common/do_debconf || true + db_go +else + db_set samba-common/do_debconf true +fi + +# If user doesn't want to use debconf to configure Samba the leave... +db_get samba-common/do_debconf || true +if [ "${RET}" = "false" ]; then + exit 0 +fi + +# User wants to use debconf, let's continue... + +# Adjust priority of the question about the workgroup name depending +# on whether a workgroup name has already being specified. +db_get samba-common/workgroup || true +if [ "${RET}" ]; then + WGPRIORITY=medium +else + WGPRIORITY=high +fi + +# Preload any values from the existing smb.conf file +if [ -f $FILE ]; then + WORKGROUP=`smbconf_retr workgroup` + if [ "$WORKGROUP" ]; then + db_set samba-common/workgroup "$WORKGROUP" + fi + + ENCRYPT=`smbconf_retr "encrypt passwords"` + if [ "$ENCRYPT" ]; then + ENCRYPT=`echo $ENCRYPT | tr '[A-Z]' '[a-z]'` + if [ "$ENCRYPT" = "yes" ]; then + ENCRYPT=true + elif [ "$ENCRYPT" = "no" ]; then + ENCRYPT=false + fi + + db_set samba-common/encrypt_passwords "$ENCRYPT" + fi + + CHARSET=`smbconf_retr "character set"` + CODEPAGE=`smbconf_retr "client code page"` + UNIXCHARSET=`smbconf_retr "unix charset"` + DOSCHARSET=`smbconf_retr "dos charset"` + + # If we're upgrading from an old version and there's no + # 'passdb backend' setting, add one. + if [ "$1" = "configure" -a -n "$2" ] \ + && dpkg --compare-versions "$2" lt 2.99.cvs.20020713-2 \ + && ! grep -q -i '^[[:space:]]*passdb backend[[:space:]]*=' $FILE + then + TMPFILE=/etc/samba/smb.conf.dpkg-tmp + sed -e' + s/^\([[:space:]]*\)\[global\]/\1\[global\]/i + s/^\([[:space:]]*\)encrypt passwords/\1encrypt passwords/i + /^[[:space:]]*\[global\]/,/^[[:space:]]*\[/ { + /^[[:space:]]*encrypt passwords[[:space:]]*=/a \ + passdb backend = smbpasswd guest + }' < $FILE > ${TMPFILE} + chmod a+r ${TMPFILE} + mv -f ${TMPFILE} /etc/samba/smb.conf + fi +fi + +# Get workgroup name +db_input $WGPRIORITY samba-common/workgroup || true +db_go + +# Use encrypted passwords? +db_input medium samba-common/encrypt_passwords || true +db_go + +# Handle migrating character sets +if [ -n "$CHARSET" -a -z "$UNIXCHARSET" ] +then + UNIXCHARSET=`echo $CHARSET | sed -e's/iso-/ISO/i'` + db_set samba-common/character_set "$UNIXCHARSET" + # FIXME: should eventually be low. + db_input medium samba-common/character_set || true + db_go +fi + +if [ -n "$CODEPAGE" -a -z "$DOSCHARSET" ] +then + DOSCHARSET=CP`echo $CODEPAGE | sed -e's/[[:alpha:]]*//g'` + db_set samba-common/codepage "$DOSCHARSET" + # FIXME: should eventually be low. + db_input medium samba-common/codepage || true + db_go +fi + +DHCPPRIORITY=medium +#if [ "$DEBCONF_RECONFIGURE" = 1 ] && [ -f /sbin/dhclient3 ] +if [ -f /sbin/dhclient3 ] +then + DHCPPRIORITY=high +# TODO: see if we can detect that dhcp3-client is *going* to be installed, +# even if it isn't yet. +#elif dpkg-query -W --showformat='${Status}\n' dhcp3-client | grep ??? +# unknown ok not-installed ? +# DHCPPRIORITY=high +fi + +if [ ! -f $FILE ] || grep -q -i 'wins server' $FILE +then + # check the values before and after; unset the 'applied' flag + # if they don't match. + db_get samba-common/dhcp || true + OLDDHCP="$RET" + db_input $DHCPPRIORITY samba-common/dhcp || true + db_go + db_get samba-common/dhcp || true + if [ "$OLDDHCP" != "$RET" ]; then + db_fset samba-common/dhcp applied false + fi +fi diff --git a/packaging/Debian/debian/samba-common.dhcp b/packaging/Debian/debian/samba-common.dhcp new file mode 100644 index 00000000000..3b2fa4ba191 --- /dev/null +++ b/packaging/Debian/debian/samba-common.dhcp @@ -0,0 +1,34 @@ +#!/bin/sh + +netbios_setup() { + # No need to continue if we're called with an unsupported option + + if [ "$reason" != BOUND ] && [ "$reason" != RENEW ] \ + && [ "$reason" != REBIND ] && [ "$reason" != REBOOT ] \ + && [ "$reason" != EXPIRE ] && [ "$reason" != FAIL ] + then + return + fi + + umask 022 + + if [ -z "$new_netbios_name_servers" ] || [ "$reason" = FAIL ] \ + || [ "$reason" = EXPIRE ] + then + # FIXME: add sed magic to only remove wins servers + # associated with this interface + echo -n > /etc/samba/dhcp.conf + elif [ "$new_netbios_name_servers" != "$old_netbios_name_servers" ] + then + local serverlist="" + for server in $new_netbios_name_servers + do + serverlist="$serverlist $interface:$server" + done + # FIXME: add sed magic to only update wins servers + # associated with this interface + echo " wins server =$serverlist" > /etc/samba/dhcp.conf + fi +} + +netbios_setup diff --git a/packaging/Debian/debian/samba-common.dirs b/packaging/Debian/debian/samba-common.dirs new file mode 100644 index 00000000000..c089ad73573 --- /dev/null +++ b/packaging/Debian/debian/samba-common.dirs @@ -0,0 +1,2 @@ +etc/samba +etc/dhcp3/dhclient-enter-hooks.d diff --git a/packaging/Debian/debian/samba-common.files b/packaging/Debian/debian/samba-common.files new file mode 100644 index 00000000000..9fb3a3a1623 --- /dev/null +++ b/packaging/Debian/debian/samba-common.files @@ -0,0 +1,15 @@ +etc/samba/ +etc/dhcp3/ +etc/pam.d/ +usr/bin/net +usr/bin/nmblookup +usr/bin/smbpasswd +usr/bin/testparm +usr/share/man/man1/nmblookup.1 +usr/share/man/man1/testparm.1 +usr/share/man/man5/lmhosts.5 +usr/share/man/man5/smb.conf.5 +usr/share/man/man7/samba.7 +usr/share/man/man8/net.8 +usr/share/man/man8/smbpasswd.8 +usr/share/samba/ diff --git a/packaging/Debian/debian/samba-common.postinst b/packaging/Debian/debian/samba-common.postinst new file mode 100644 index 00000000000..6c6eb9bf537 --- /dev/null +++ b/packaging/Debian/debian/samba-common.postinst @@ -0,0 +1,139 @@ +#!/bin/sh +# +# + +set -e + +# Do debconf stuff here +. /usr/share/debconf/confmodule + +# We need a default smb.conf file. If one doesn't exist we put in place +# one that has some basic defaults. +if [ ! -e /etc/samba/smb.conf ]; then + cp -a /usr/share/samba/smb.conf /etc/samba/ +fi + +# Static tempfile location, dpkg-style +TMPFILE=/etc/samba/smb.conf.dpkg-tmp + +# ------------------------- Debconf questions start --------------------- + +# Is the user configuring with debconf, or he/she prefers swat/manual +# config? +db_get samba-common/do_debconf || true +if [ "${RET}" = "true" ]; then + # Get workgroup name + db_get samba-common/workgroup || true + WORKGROUP="${RET}" + + # Oh my GOD, this is ugly. Why would anyone put these + # characters in a workgroup name? Why, Lord, why??? + WORKGROUP=`echo $WORKGROUP | \ + sed -e's/\\\\/\\\\\\\\/g + s#/#\\\\/#g + s/&/\\\&/g + s/\\\$/\\\\\\\$/g'` + + sed -e "s/^\([[:space:]]*\)\[global\]/\1\[global\]/i + /^[[:space:]]*\[global\]/,/^[[:space:]]*\[/ \ + s/^\([[:space:]]*\)workgroup[[:space:]]*=.*/\1workgroup = ${WORKGROUP}/i" \ + < /etc/samba/smb.conf >${TMPFILE} + mv -f ${TMPFILE} /etc/samba/smb.conf + + # Encrypt passwords? + db_get samba-common/encrypt_passwords || true + ENCRYPT_PASSWORDS="${RET}" + + sed -e "s/^\([[:space:]]*\)\[global\]/\1\[global\]/i + /^[[:space:]]*\[global\]/,/^[[:space:]]*\[/ \ + s/^\([[:space:]]*\)encrypt passwords[[:space:]]*=.*/\1encrypt passwords = ${ENCRYPT_PASSWORDS}/i" \ + < /etc/samba/smb.conf >${TMPFILE} + mv -f ${TMPFILE} /etc/samba/smb.conf + + # Install DHCP support + db_get samba-common/dhcp && DHCPVAL="$RET" + db_fget samba-common/dhcp applied || true + if [ "$DHCPVAL" = true ] && [ "$RET" != true ] && \ + ! grep -q dhcp.conf /etc/samba/smb.conf + then + sed -e "s/^\([[:space:]]*\)\[global\]/\1\[global\]/i + /^[[:space:]]*\[global\]/,/^[[:space:]]*\[/ { + /wins server[[:space:]]*=/a \\ +\\ +# If we receive WINS server info from DHCP, override the options above. \\ + include = /etc/samba/dhcp.conf +}" < /etc/samba/smb.conf > ${TMPFILE} + mv -f ${TMPFILE} /etc/samba/smb.conf + elif [ "$RET" != true ] && grep -q dhcp.conf /etc/samba/smb.conf + then + : + # FIXME: here we /delete/ the lines? + fi + # Once we get here, the config has been applied, whatever + # it is. + if [ "$RET" != true ]; then + db_fset samba-common/dhcp applied true + fi + + # Update charset settings? + if ! grep -q "^[[:space:]]*unix charset[[:space:]]*=" /etc/samba/smb.conf + then + db_get samba-common/character_set || true + UNIXCHARSET="${RET}" + if [ -n "$UNIXCHARSET" ] + then + sed -e "s/^\([[:space:]]*\)\[global\]/\1\[global\]/i + s/^\([[:space:]]*\)character set/\1character set/i + /^[[:space:]]*\[global\]/,/^[[:space:]]*\[/ { + /^[[:space:]]*character set[[:space:]]*=/c \\ + unix charset = $UNIXCHARSET + }" < /etc/samba/smb.conf > ${TMPFILE} + mv -f ${TMPFILE} /etc/samba/smb.conf + fi + fi + + if grep -qi "^[[:space:]]*passdb backend[[:space:]]*=.*unixsam" /etc/samba/smb.conf + then + sed -e 's/^\([[:space:]]*\)passdb backend/\1passdb backend/i + /^[[:space:]]*passdb backend/ { + s/unixsam/guest/i + }' < /etc/samba/smb.conf > ${TMPFILE} + mv -f ${TMPFILE} /etc/samba/smb.conf + fi + + if ! grep -q "^[[:space:]]*dos charset[[:space:]]*=" /etc/samba/smb.conf + then + db_get samba-common/codepage || true + DOSCHARSET="${RET}" + if [ -n "$DOSCHARSET" ] + then + sed -e "s/^\([[:space:]]*\)\[global\]/\1\[global\]/i + s/^\([[:space:]]*\)client code page/\1client code page/i + /^[[:space:]]*\[global\]/,/^[[:space:]]*\[/ { + /^[[:space:]]*client code page[[:space:]]*=/c \\ + dos charset = $DOSCHARSET +}" < /etc/samba/smb.conf > ${TMPFILE} + mv -f ${TMPFILE} /etc/samba/smb.conf + fi + fi + + if dpkg --compare-versions "$2" lt 2.999+3.0.alpha20-4 \ + && ! grep -q "^[[:space:]]*panic action[[:space:]]*=" /etc/samba/smb.conf + then + sed -e "s/^\([[:space:]]*\)\[global\]/\1\[global\]/i + /^[[:space:]]*\[global\]/a \\ +\\ +# Do something sensible when Samba crashes: mail the admin a backtrace\\ + panic action = /usr/share/samba/panic-action %d" < /etc/samba/smb.conf > ${TMPFILE} + mv -f ${TMPFILE} /etc/samba/smb.conf + fi + +fi + +chmod a+r /etc/samba/smb.conf + +# ------------------------- Debconf questions end --------------------- + +db_stop + +#DEBHELPER# diff --git a/packaging/Debian/debian/samba-common.postrm b/packaging/Debian/debian/samba-common.postrm new file mode 100644 index 00000000000..8a4b6d3d55e --- /dev/null +++ b/packaging/Debian/debian/samba-common.postrm @@ -0,0 +1,10 @@ +#!/bin/sh +# +# + +if [ "$1" = purge ]; then + # Remove any files left in /etc/samba/ + rm -Rf /etc/samba/ +fi + +#DEBHELPER# diff --git a/packaging/Debian/debian/samba-common.templates b/packaging/Debian/debian/samba-common.templates new file mode 100644 index 00000000000..e5f7b1ae0cc --- /dev/null +++ b/packaging/Debian/debian/samba-common.templates @@ -0,0 +1,66 @@ +Template: samba-common/character_set +Type: string +_Description: Character Set for Unix filesystem + You currently have a "character set" configured in your smb.conf. In + Samba 3.0, this option is replaced by a new option, "unix charset". + Please specify the character set you wish to use for theis new option, + which controls how Samba interprets filenames on the file system. + . + If you leave this option blank, your smb.conf will not be changed. + +Template: samba-common/codepage +Type: string +_Description: Character Set for DOS clients + You currently have a "client code page" set in your smb.conf. In Samba + 3.0, this option is replaced by the option "dos charset". Please specify + the character set you wish to use for this new option. In most cases, the + default chosen for you will be sufficient. Note that this option is not + needed to support Windows clients, it is only for DOS clients. If you + leave this option blank, your smb.conf will not be changed. + +Template: samba-common/dhcp +Type: boolean +Default: false +_Description: Modify smb.conf to use WINS settings from DHCP? + If your computer gets IP address information from a DHCP server on the + network, the DHCP server may also provide information about WINS servers + ("NetBIOS name servers") present on the network. This requires a + change to your smb.conf file so that DHCP-provided WINS settings will + automatically be read from /etc/samba/dhcp.conf. + . + You must have the dhcp3-client package installed to take advantage of this + feature. + +Template: samba-common/do_debconf +Type: boolean +Default: true +_Description: Configure smb.conf through debconf? + The rest of the configuration of Samba deals with questions that affect + parameters in /etc/samba/smb.conf, which is the file used to configure the + Samba programs (nmbd and smbd.) Your current smb.conf contains an + 'include' line or an option that spans multiple lines, which could confuse + debconf and require you to edit your smb.conf by hand to get it working + again. + . + If you don't use debconf to configure smb.conf, you will have to handle + any configuration changes yourself, and will not be able to take + advantage of periodic configuration enhancements. Therefore, use of + debconf is recommended if possible. + +Template: samba-common/workgroup +Type: string +_Description: Workgroup/Domain Name? + This controls what workgroup your server will appear to be in when queried + by clients. Note that this parameter also controls the Domain name used + with the security=domain setting. + +Template: samba-common/encrypt_passwords +Type: boolean +Default: true +_Description: Use password encryption? + Recent Windows clients communicate with SMB servers using encrypted + passwords. If you want to use clear text passwords you will need to change + a parameter in your Windows registry. It is recommended that you use + encrypted passwords. If you do, make sure you have a valid + /etc/samba/smbpasswd file and that you set passwords in there for each + user using the smbpasswd command. diff --git a/packaging/Debian/debian/samba-doc.docs b/packaging/Debian/debian/samba-doc.docs new file mode 100644 index 00000000000..4d2cec2ee22 --- /dev/null +++ b/packaging/Debian/debian/samba-doc.docs @@ -0,0 +1,7 @@ +README +docs/Samba-HOWTO-Collection.pdf +docs/THANKS +docs/history +docs/faq/ +docs/htmldocs/ +docs/Registry/ diff --git a/packaging/Debian/debian/samba-doc.examples b/packaging/Debian/debian/samba-doc.examples new file mode 100644 index 00000000000..e71180364cf --- /dev/null +++ b/packaging/Debian/debian/samba-doc.examples @@ -0,0 +1,2 @@ +debian/wins2dns.awk +source/smbadduser diff --git a/packaging/Debian/debian/samba.config b/packaging/Debian/debian/samba.config new file mode 100644 index 00000000000..89792d436e4 --- /dev/null +++ b/packaging/Debian/debian/samba.config @@ -0,0 +1,92 @@ +#/bin/sh -e +# +# + +# Source debconf library. +. /usr/share/debconf/confmodule + +# Function for grabbing a parameter from an smb.conf file +smbconf_retr() { + if [ -z "$1" ]; then + return + fi + + if [ -n "$2" ]; then + local FILE="$2" + fi + + if [ -z "$FILE" ]; then + return + fi + + sed -n -e" + s/^[[:space:]]*\[global\]/\[global\]/i + /^\[global\]/,/^[[:space:]]*\[/ { + s/^[[:space:]]*$1[[:space:]]*=[[:space:]]*//pi + }" $FILE \ + | tail -1 +} + +FILE=/etc/samba/smb.conf + +db_title "Samba Server" + +# Babysit users who don't read README.Debian +if [ -n "$2" ] && dpkg --compare-versions "$2" lt "2.2" +then + db_input medium samba/log_files_moved || true + db_go +fi + +db_input medium samba/run_mode || true +db_go + + +# Offer to move the password database for existing users +if [ "$1" = "configure" -a -n "$2" -a -e /etc/samba/smbpasswd \ + -a ! -e /var/lib/samba/passdb.tdb ] \ + && dpkg --compare-versions "$2" lt 2.99.cvs.20020713-2 +then + FILE=/etc/samba/smb.conf + PASSDB="" + if [ -f "$FILE" ]; then + PASSDB=`smbconf_retr "passdb backend"` + fi + TDBPRIORITY=medium + if echo "$PASSDB" | grep -q ldapsam; then + TDBPRIORITY=low + fi + db_get samba-common/do_debconf || true + if [ "${RET}" = "false" ]; then + TDBPRIORITY=low + fi + + db_input "$TDBPRIORITY" samba/tdbsam || true +fi + +# We vary the priority of the next question depending on whether +# the password database already exists... +if [ -e /etc/samba/smbpasswd -o -e /var/lib/samba/passdb.tdb ]; then + PRIORITY="low" +else + # If 'encrypt passwords' is true in smb.conf, and smbpasswd + # does not exist, default to yes here. + FILE=/etc/samba/smb.conf + if [ -f "$FILE" ]; then + ENCRYPT=`smbconf_retr "encrypt passwords"` + if [ "$ENCRYPT" ]; then + ENCRYPT=`echo $ENCRYPT | tr '[A-Z]' '[a-z]'` + if [ "$ENCRYPT" = "yes" ]; then + ENCRYPT=true + fi + if [ "$ENCRYPT" = "no" ]; then + ENCRYPT=false + fi + fi + db_set samba/generate_smbpasswd "$ENCRYPT" + fi + PRIORITY="medium" +fi + +db_input $PRIORITY samba/generate_smbpasswd || true +db_go diff --git a/packaging/Debian/debian/samba.cron.daily b/packaging/Debian/debian/samba.cron.daily new file mode 100644 index 00000000000..42fc98d8f6d --- /dev/null +++ b/packaging/Debian/debian/samba.cron.daily @@ -0,0 +1,16 @@ +#!/bin/sh +# +# cron script to save a backup copy of /etc/samba/smbpasswd in /var/backups. +# +# Written by Eloy A. Paris <peloy@debian.org> for the Debian project. +# + +BAK=/var/backups + +umask 022 +if cd $BAK; then + # Make sure /etc/samba/smbpasswd exists + if [ -f /etc/samba/smbpasswd ]; then + cmp -s smbpasswd.bak /etc/samba/smbpasswd || cp -p /etc/samba/smbpasswd smbpasswd.bak + fi +fi diff --git a/packaging/Debian/debian/samba.dirs b/packaging/Debian/debian/samba.dirs new file mode 100644 index 00000000000..a58e4e98929 --- /dev/null +++ b/packaging/Debian/debian/samba.dirs @@ -0,0 +1,7 @@ +usr/bin +usr/sbin +var/log/samba +var/lib/samba/printers/W32X86 +var/lib/samba/printers/WIN40 +var/run/samba +var/cache/samba diff --git a/packaging/Debian/debian/samba.docs b/packaging/Debian/debian/samba.docs new file mode 100644 index 00000000000..b8cc5419fb1 --- /dev/null +++ b/packaging/Debian/debian/samba.docs @@ -0,0 +1,5 @@ +README +Roadmap +WHATSNEW.txt +docs/htmldocs/diagnosis.html +docs/README.ldap diff --git a/packaging/Debian/debian/samba.files b/packaging/Debian/debian/samba.files new file mode 100644 index 00000000000..f52e6c5e4f7 --- /dev/null +++ b/packaging/Debian/debian/samba.files @@ -0,0 +1,19 @@ +usr/bin/testprns +usr/bin/smbstatus +usr/bin/smbcontrol +usr/bin/tdbbackup +usr/bin/pdbedit +usr/sbin/smbd +usr/sbin/nmbd +usr/sbin/mksmbpasswd +usr/lib/samba/vfs +usr/share/man/man1/smbcontrol.1 +usr/share/man/man1/smbstatus.1 +usr/share/man/man1/testprns.1 +usr/share/man/man5/smbpasswd.5 +usr/share/man/man8/nmbd.8 +usr/share/man/man8/pdbedit.8 +usr/share/man/man8/smbd.8 +usr/share/man/man8/mksmbpasswd.8 +usr/share/man/man8/tdbbackup.8 + diff --git a/packaging/Debian/debian/samba.init b/packaging/Debian/debian/samba.init new file mode 100644 index 00000000000..5d0f4671a00 --- /dev/null +++ b/packaging/Debian/debian/samba.init @@ -0,0 +1,83 @@ +#!/bin/sh +# +# Start/stops the Samba daemons (nmbd and smbd). +# +# + +# Defaults +RUN_MODE="daemons" + +# Reads config file (will override defaults above) +[ -r /etc/default/samba ] && . /etc/default/samba + +NMBDPID=/var/run/samba/nmbd.pid +SMBDPID=/var/run/samba/smbd.pid + +# clear conflicting settings from the environment +unset TMPDIR + +# See if the daemons are there +test -x /usr/sbin/nmbd -a -x /usr/sbin/smbd || exit 0 + +case "$1" in + start) + echo -n "Starting Samba daemons:" + + echo -n " nmbd" + start-stop-daemon --start --quiet --exec /usr/sbin/nmbd -- -D + + if [ "$RUN_MODE" != "inetd" ]; then + echo -n " smbd" + start-stop-daemon --start --quiet --exec /usr/sbin/smbd -- -D + fi + + echo "." + ;; + stop) + echo -n "Stopping Samba daemons: " + + start-stop-daemon --stop --quiet --pidfile $NMBDPID + # Wait a little and remove stale PID file + sleep 1 + if [ -f $NMBDPID ] && ! ps h `cat $NMBDPID` > /dev/null + then + # Stale PID file (nmbd was succesfully stopped), + # remove it (should be removed by nmbd itself IMHO.) + rm -f $NMBDPID + fi + echo -n "nmbd" + + if [ "$RUN_MODE" != "inetd" ]; then + start-stop-daemon --stop --quiet --pidfile $SMBDPID + # Wait a little and remove stale PID file + sleep 1 + if [ -f $SMBDPID ] && ! ps h `cat $SMBDPID` > /dev/null + then + # Stale PID file (nmbd was succesfully stopped), + # remove it (should be removed by smbd itself IMHO.) + rm -f $SMBDPID + fi + echo -n " smbd" + fi + + echo "." + + ;; + reload) + echo -n "Reloading /etc/samba/smb.conf (smbd only)" + start-stop-daemon --stop --signal HUP --pidfile $SMBDPID + + echo "." + ;; + restart|force-reload) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "Usage: /etc/init.d/samba {start|stop|reload|restart|force-reload}" + exit 1 + ;; +esac + +exit 0 diff --git a/packaging/Debian/debian/samba.logrotate b/packaging/Debian/debian/samba.logrotate new file mode 100644 index 00000000000..f90437bf2ad --- /dev/null +++ b/packaging/Debian/debian/samba.logrotate @@ -0,0 +1,21 @@ +/var/log/samba/log.smbd { + weekly + missingok + rotate 7 + postrotate + invoke-rc.d --quiet samba reload > /dev/null + endscript + compress + notifempty +} + +/var/log/samba/log.nmbd { + weekly + missingok + rotate 7 + postrotate + [ -f /var/run/samba/nmbd.pid ] && kill -HUP `cat /var/run/samba/nmbd.pid` + endscript + compress + notifempty +} diff --git a/packaging/Debian/debian/samba.pamd b/packaging/Debian/debian/samba.pamd new file mode 100644 index 00000000000..e2c7a99356d --- /dev/null +++ b/packaging/Debian/debian/samba.pamd @@ -0,0 +1,3 @@ +@include common-auth +@include common-account +@include common-session diff --git a/packaging/Debian/debian/samba.postinst b/packaging/Debian/debian/samba.postinst new file mode 100644 index 00000000000..1a25290ed27 --- /dev/null +++ b/packaging/Debian/debian/samba.postinst @@ -0,0 +1,228 @@ +#!/bin/sh -e +# +# Post-installation script for the Samba package for Debian GNU/Linux +# +# + +case "$1" in + configure) + # continue below + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + exit 0 + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +# Handle debconf +. /usr/share/debconf/confmodule + +INITCONFFILE=/etc/default/samba + +# We generate several files during the postinst, and we don't want +# them to be readable only by root. +umask 022 + + +# Generate configuration file if it does not exist, using default values. +[ -r "${INITCONFFILE}" ] || { + echo Generating ${INITCONFFILE}... >&2 + cat >${INITCONFFILE} <<'EOFMAGICNUMBER1234' +# Defaults for samba initscript +# sourced by /etc/init.d/samba +# installed at /etc/default/samba by the maintainer scripts +# + +# +# This is a POSIX shell fragment +# + +# How should Samba (smbd) run? Possible values are "daemons" +# or "inetd". +RUN_MODE="" +EOFMAGICNUMBER1234 +} + +# --- Begin of FHS migration code --- + +# Starting with Samba 2.2.3-4 the WINS database, the browse +# database and other important run-time files are stored in +# FHS-compliant directories. The following code takes care of +# moving the files in the old directories (/var/samba/ and +# /var/state/samba) to the new FHS-compliant directories. + +if [ -d /var/samba/ ]; then + mv /var/samba/* /var/lib/samba/ 2>/dev/null || true + rmdir /var/samba/ +fi + +# Default for anything we don't know about (see next two 'for' loops) +# is /var/lib/samba -- guaranteed not to accidentally tromp on any +# files the admin thought were safe. +if [ -d /var/state/samba ]; then + mv /var/state/samba/* /var/lib/samba/ 2>/dev/null || true + rmdir /var/state/samba/ + + # It's not FHS, and it's probably our fault this is here, + # so delete it if we can. + rmdir /var/state/ 2> /dev/null || true +fi + +# All these files are now placed in their respective FHS-compliant +# directories. Separate out the individual files accordingly. +for F in browse.dat printing.tdb winbindd_cache.tdb +do + if [ -e /var/lib/samba/"$F" ]; then + mv /var/lib/samba/"$F" /var/cache/samba/ + fi +done + +for F in brlock.tdb connections.tdb locking.tdb messages.tdb nmbd.pid \ + sessionid.tdb smbd.pid unexpected.tdb +do + if [ -e /var/lib/samba/"$F" ]; then + mv /var/lib/samba/"$F" /var/run/samba/ + fi +done + +# Beginning with Samba 2.2.5-1, we also move the domain secrets file +# to a more suitable location, since no one really edits this by hand. +if [ -e /etc/samba/secrets.tdb -a ! -e /var/lib/samba/secrets.tdb ] +then + mv /etc/samba/secrets.tdb /var/lib/samba/ +fi + +# If upgrading from a previous 2.999 snapshot, move the passdb.tdb +# database into /var/lib. + +if [ -n "$2" ] && dpkg --compare-versions "$2" lt 2.999+3.0.alpha23-5 \ + && [ -e /etc/samba/passdb.tdb -a ! -e /var/lib/samba/passdb.tdb ] +then + mv /etc/samba/passdb.tdb /var/lib/samba/ +fi + +# --- End of FHS migration code --- + +# If upgrading from a previous 2.999 snapshot, clear the broken +# registry.tdb file. +if [ -n "$2" ] && dpkg --compare-versions "$2" gt 2.99.cvs.20020713-1 \ + && dpkg --compare-versions "$2" lt 2.999+3.0cvs20020805-1 +then + rm -f /var/lib/samba/registry.tdb +fi + +# ------------------------- Debconf questions start --------------------- + +# Run Samba as daemons or from inetd? +db_get samba/run_mode || true +RUN_MODE="${RET}" + +TMPFILE=/etc/default/samba.dpkg-tmp +sed -e "s/^[[:space:]]*RUN_MODE[[:space:]]*=.*/RUN_MODE=\"${RUN_MODE}\"/" \ + < ${INITCONFFILE} >${TMPFILE} +chmod a+r ${TMPFILE} +mv -f ${TMPFILE} ${INITCONFFILE} + +# Generate a smbpasswd file? +db_get samba/generate_smbpasswd || true +GENERATE_SMBPASSWD="${RET}" + +db_get samba/tdbsam || true +PDB_MIGRATE="${RET}" + +# Done with debconf now. +db_stop + +umask 066 + +# FIXME: disable if ldapsam support is enabled? +# FIXME: we don't want to pass these through the smbpasswd backend, +# some of the faking can cause us problems! +if [ "${GENERATE_SMBPASSWD}" = "true" -a ! -e /var/lib/samba/passdb.tdb -a ! -e /etc/samba/smbpasswd ]; then + getent passwd | /usr/sbin/mksmbpasswd > /etc/samba/smbpasswd + pdbedit -i smbpasswd -e tdbsam + rm /etc/samba/smbpasswd +fi + +umask 022 + +if [ -n "$2" -a -e /etc/samba/smbpasswd \ + -a ! -e /var/lib/samba/passdb.tdb -a "$PDB_MIGRATE" = "true" ] \ + && dpkg --compare-versions "$2" lt 2.99.cvs.20020713-2 +then + umask 066 + pdbedit -i smbpasswd -e tdbsam + rm /etc/samba/smbpasswd + umask 022 + + # The database has been moved, now make sure we can still find it. + PASSDB=`sed -n -e"s/^[[:space:]]*\[global\]/\[global\]/i + /^\[global\]/,/^[[:space:]]*\[/ \ + s/^[[:space:]]*passdb backend[[:space:]]*=[[:space:]]*//pi" \ + < /etc/samba/smb.conf \ + | tail -1` + if echo "$PASSDB" | egrep -q "(^|[[:space:]])smbpasswd"; then + if ! echo "$PASSDB" | egrep -q "(^|[[:space:]])tdbsam"; then + PASSDB=`echo $PASSDB | sed -e's/\(^\|[[:space:]]\)smbpasswd/\1tdbsam/'` + fi + fi + if ! echo "$PASSDB" | egrep -q "(^|[[:space:]])tdbsam"; then + PASSDB="tdbsam $PASSDB" + fi + TMPFILE=/etc/samba/smb.conf.dpkg-tmp + sed -e "s/^\([[:space:]]*\)\[global\]/\1\[global\]/i + /^[[:space:]]*\[global\]/,/^[[:space:]]*\[/ \ + s/^\([[:space:]]*\)passdb backend[[:space:]]*=.*/\1passdb backend = ${PASSDB}/i" \ + < /etc/samba/smb.conf >${TMPFILE} + chmod a+r ${TMPFILE} + mv -f ${TMPFILE} /etc/samba/smb.conf +fi + +# ------------------------- Debconf questions end --------------------- + +# Handle removal of nmbd from inetd.conf, which is no longer a supported +# configuration. +if dpkg --compare-versions "$2" lt 2.999+3.0.alpha20-4; then + update-inetd --remove netbios-ns +fi + +# We want to add these entries to inetd.conf commented out. Otherwise +# UDP traffic could make inetd to start nmbd or smbd right during +# the configuration stage. +if [ -z "$2" ]; then + update-inetd --add "#<off># netbios-ssn stream tcp nowait root /usr/sbin/tcpd /usr/sbin/smbd" +fi + +if [ "$RUN_MODE" = "daemons" ]; then + update-inetd --disable netbios-ssn +else + update-inetd --enable netbios-ssn +fi + +# This check is a safety net: the /etc/samba/smbpasswd file must have +# permissions 600. +if [ -f /etc/samba/smbpasswd ]; then + chmod 600 /etc/samba/smbpasswd +fi + +# Do the same check for /var/backup/smbpasswd.bak, just in case. +if [ -f /var/backups/smbpasswd.bak ]; then + chmod 600 /var/backups/smbpasswd.bak +fi + +# Delete old /etc/samba/debian_config file, which is not used anymore +# now that we are using debconf. +rm -f /etc/samba/debian_config + +# Move old log files to the new location of Samba's log files +mv -f /var/log/nmb* /var/log/samba/ 2> /dev/null || true +mv -f /var/log/smb* /var/log/samba/ 2> /dev/null || true + +#DEBHELPER# + +exit 0 diff --git a/packaging/Debian/debian/samba.postrm b/packaging/Debian/debian/samba.postrm new file mode 100644 index 00000000000..b79fe1d0099 --- /dev/null +++ b/packaging/Debian/debian/samba.postrm @@ -0,0 +1,26 @@ +#!/bin/sh -e +# +# + +if [ "$1" = purge ]; then + + # Remove Samba's state files, both volatile and non-volatile + rm -Rf /var/run/samba/ /var/cache/samba/ /var/lib/samba + + # Remove log files + rm -Rf /var/log/samba/ + + # Remove init.d configuration file + echo Removing configuration file /etc/default/samba... >&2 + rm -f /etc/default/samba + + # Remove NetBIOS entries from /etc/inetd.conf + update-inetd --remove netbios-ssn + +else + # Not purging, do not remove NetBIOS entries from /etc/inetd.conf + update-inetd --disable netbios-ssn + +fi + +#DEBHELPER# diff --git a/packaging/Debian/debian/samba.prerm b/packaging/Debian/debian/samba.prerm new file mode 100644 index 00000000000..ab62c706d85 --- /dev/null +++ b/packaging/Debian/debian/samba.prerm @@ -0,0 +1,10 @@ +#!/bin/sh -e + +if [ "$1" = upgrade -a -n "$2" ] && dpkg --compare-versions "$2" lt 2.99 \ + && [ -e /var/lib/samba/passdb.tdb -a ! -e /etc/samba/smbpasswd ] +then + pdbedit -i tdbsam -e smbpasswd + rm -f /var/lib/samba/passdb.tdb +fi + +#DEBHELPER# diff --git a/packaging/Debian/debian/samba.templates b/packaging/Debian/debian/samba.templates new file mode 100644 index 00000000000..ce503aea5c4 --- /dev/null +++ b/packaging/Debian/debian/samba.templates @@ -0,0 +1,50 @@ +Template: samba/generate_smbpasswd +Type: boolean +Default: false +_Description: Create samba password database, /var/lib/samba/passdb.tdb? + To be compatible with the defaults in most versions of Windows, Samba must + be configured to use encrypted passwords. This requires user passwords to + be stored in a file separate from /etc/passwd. This file can be created + automatically, but the passwords must be added manually (by you or the + user) by running smbpasswd, and you must arrange to keep it up-to-date in + the future. If you do not create it, you will have to reconfigure samba + (and probably your client machines) to use plaintext passwords. See + /usr/share/doc/samba-doc/htmldocs/ENCRYPTION.html from the samba-doc + package for more details. + +Template: samba/log_files_moved +Type: note +_Description: Samba's log files have moved. + Starting with the first packages of Samba 2.2 for Debian the log files for + both Samba daemons (nmbd and smbd) are now stored in /var/log/samba/. The + names of the files are log.nmbd and log.smbd, for nmbd and smbd + respectively. + . + The old log files that were in /var/log/ will be moved to the new location + for you. + +Template: samba/nmbd_from_inetd +Type: note +_Description: Running nmbd from inetd is no longer supported + Your system was previously configured to start nmbd and smbd from inetd. + As of version 2.999+3.0.alpha20-4, nmbd will no longer be started from + inetd. If you have modified your /etc/init.d/samba startup script, you + may need to adjust it by hand now so that nmbd will start. + +Template: samba/run_mode +Type: select +_Choices: daemons, inetd +Default: daemons +_Description: How do you want to run Samba? + The Samba daemon smbd can run as a normal daemon or from inetd. Running as + a daemon is the recommended approach. + +Template: samba/tdbsam +Type: boolean +Default: false +_Description: Move /etc/samba/smbpasswd to /var/lib/samba/passdb.tdb? + Samba 3.0 introduces a newer, more complete SAM database interface which + supersedes the /etc/samba/smbpasswd file. Would you like your existing + smbpasswd file to be migrated to /var/lib/samba/passdb.tdb for you? If you + plan to use another pdb backend (e.g., LDAP) instead, you should answer + 'no' here. diff --git a/packaging/Debian/debian/scripts/patch-source b/packaging/Debian/debian/scripts/patch-source new file mode 100755 index 00000000000..a8559b41676 --- /dev/null +++ b/packaging/Debian/debian/scripts/patch-source @@ -0,0 +1,28 @@ +#!/bin/sh -e +# +# + +for patch in debian/patches/*.patch; do + echo '->'`basename $patch`: + patch -p1 --ignore-whitespace < $patch +done + +# This code is currently not used because it creates a long version +# number string. For now we're sticking to <upstream version>-Debian, +# as in 3.0.0rc2-Debian. peloy@debian.org.- + +# ---- Begin unused code ---- +# Get Debian version number from 1st line of the Debian changelog +#DEBIAN_VERSION=`sed -n -e '1s/^.*(\(.*\)).*$/\1/p' debian/changelog` + +# Insert Debian version number in source/VERSION, which will then be +# used to create source/include/version.h. +#TMPFILE=source/VERSION.debian +#sed -e "s/^\(SAMBA_VERSION_VENDOR_SUFFIX=\).*$/\1\"Debian-${DEBIAN_VERSION}\"/" source/VERSION > ${TMPFILE} +#mv -f ${TMPFILE} source/VERSION +# ---- End unused code ---- + +# Regenerate configure only if it is older than configure.in +[ source/configure -ot source/configure.in ] && (cd source && sh ./autogen.sh) + +exit 0 diff --git a/packaging/Debian/debian/scripts/unpatch-source b/packaging/Debian/debian/scripts/unpatch-source new file mode 100755 index 00000000000..d3681cfa504 --- /dev/null +++ b/packaging/Debian/debian/scripts/unpatch-source @@ -0,0 +1,20 @@ +#!/bin/sh -e +# +# + +# We want to reverse the patches in the opposite order we applied +# them, hence the 'ls|sort -r'. +for patch in `ls debian/patches/*.patch | sort -r`; do + patch -p1 -R --ignore-whitespace < $patch +done + +# Unused code. See comment in the patch-source script. + +#TMPFILE=source/VERSION.debian +#sed -e "s/^\(SAMBA_VERSION_VENDOR_SUFFIX=\).*$/\1/" source/VERSION > ${TMPFILE} +#mv -f ${TMPFILE} source/VERSION + +# Regenerate configure only if it is older than configure.in +[ source/configure -ot source/configure.in ] && (cd source && autoheader && autoconf) + +exit 0 diff --git a/packaging/Debian/debian/smb.conf b/packaging/Debian/debian/smb.conf new file mode 100644 index 00000000000..8a75979945a --- /dev/null +++ b/packaging/Debian/debian/smb.conf @@ -0,0 +1,237 @@ +# +# Sample configuration file for the Samba suite for Debian GNU/Linux. +# +# +# This is the main Samba configuration file. You should read the +# smb.conf(5) manual page in order to understand the options listed +# here. Samba has a huge number of configurable options most of which +# are not shown in this example +# +# Any line which starts with a ; (semi-colon) or a # (hash) +# is a comment and is ignored. In this example we will use a # +# for commentary and a ; for parts of the config file that you +# may wish to enable +# +# NOTE: Whenever you modify this file you should run the command +# "testparm" to check that you have not many any basic syntactic +# errors. +# + +#======================= Global Settings ======================= + +[global] + +## Browsing/Identification ### + +# Change this to the workgroup/NT-domain name your Samba server will part of + workgroup = DEBIAN_FANS + +# server string is the equivalent of the NT Description field + server string = %h server (Samba %v) + +# Windows Internet Name Serving Support Section: +# WINS Support - Tells the NMBD component of Samba to enable its WINS Server +; wins support = no + +# WINS Server - Tells the NMBD components of Samba to be a WINS Client +# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both +; wins server = w.x.y.z + +# This will prevent nmbd to search for NetBIOS names through DNS. + dns proxy = no + +# What naming service and in what order should we use to resolve host names +# to IP addresses +; name resolve order = lmhosts host wins bcast + + +#### Debugging/Accounting #### + +# This tells Samba to use a separate log file for each machine +# that connects + log file = /var/log/samba/log.%m + +# Put a capping on the size of the log files (in Kb). + max log size = 1000 + +# If you want Samba to only log through syslog then set the following +# parameter to 'yes'. +; syslog only = no + +# We want Samba to log a minimum amount of information to syslog. Everything +# should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log +# through syslog you should set the following parameter to something higher. + syslog = 0 + +# Do something sensible when Samba crashes: mail the admin a backtrace + panic action = /usr/share/samba/panic-action %d + + +####### Authentication ####### + +# "security = user" is always a good idea. This will require a Unix account +# in this server for every user accessing the server. See +# /usr/share/doc/samba-doc/htmldocs/ServerType.html in the samba-doc +# package for details. +; security = user + +# You may wish to use password encryption. See the section on +# 'encrypt passwords' in the smb.conf(5) manpage before enabling. + encrypt passwords = no + +# If you are using encrypted passwords, Samba will need to know what +# password database type you are using. + passdb backend = tdbsam guest + + obey pam restrictions = yes + +; guest account = nobody + invalid users = root + +# This boolean parameter controls whether Samba attempts to sync the Unix +# password with the SMB password when the encrypted SMB password in the +# passdb is changed. +; unix password sync = no + +# For Unix password sync to work on a Debian GNU/Linux system, the following +# parameters must be set (thanks to Augustin Luton <aluton@hybrigenics.fr> for +# sending the correct chat script for the passwd program in Debian Potato). + passwd program = /usr/bin/passwd %u + passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n . + +# This boolean controls whether PAM will be used for password changes +# when requested by an SMB client instead of the program listed in +# 'passwd program'. The default is 'no'. +; pam password change = no + + +########## Printing ########## + +# If you want to automatically load your printer list rather +# than setting them up individually then you'll need this +; load printers = yes + +# lpr(ng) printing. You may wish to override the location of the +# printcap file +; printing = bsd +; printcap name = /etc/printcap + +# CUPS printing. See also the cupsaddsmb(8) manpage in the +# cupsys-client package. +; printing = cups +; printcap name = cups + +# When using [print$], root is implicitly a 'printer admin', but you can +# also give this right to other users to add drivers and set printer +# properties +; printer admin = @ntadmin + + +######## File sharing ######## + +# Name mangling options +; preserve case = yes +; short preserve case = yes + + +############ Misc ############ + +# Using the following line enables you to customise your configuration +# on a per machine basis. The %m gets replaced with the netbios name +# of the machine that is connecting +; include = /home/samba/etc/smb.conf.%m + +# Most people will find that this option gives better performance. +# See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/speed.html +# for details +# You may want to add the following on a Linux system: +# SO_RCVBUF=8192 SO_SNDBUF=8192 + socket options = TCP_NODELAY + +# The following parameter is useful only if you have the linpopup package +# installed. The samba maintainer and the linpopup maintainer are +# working to ease installation and configuration of linpopup and samba. +; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' & + +# Domain Master specifies Samba to be the Domain Master Browser. If this +# machine will be configured as a BDC (a secondary logon server), you +# must set this to 'no'; otherwise, the default behavior is recommended. +; domain master = auto + +# Some defaults for winbind (make sure you're not using the ranges +# for something else.) +; idmap uid = 10000-20000 +; idmap gid = 10000-20000 +; template shell = /bin/bash + +#======================= Share Definitions ======================= + +[homes] + comment = Home Directories + browseable = no + +# By default, the home directories are exported read-only. Change next +# parameter to 'yes' if you want to be able to write to them. + writable = no + +# File creation mask is set to 0700 for security reasons. If you want to +# create files with group=rw permissions, set next parameter to 0775. + create mask = 0700 + +# Directory creation mask is set to 0700 for security reasons. If you want to +# create dirs. with group=rw permissions, set next parameter to 0775. + directory mask = 0700 + +# Un-comment the following and create the netlogon directory for Domain Logons +# (you need to configure Samba to act as a domain controller too.) +;[netlogon] +; comment = Network Logon Service +; path = /home/samba/netlogon +; guest ok = yes +; writable = no +; share modes = no + +[printers] + comment = All Printers + browseable = no + path = /tmp + printable = yes + public = no + writable = no + create mode = 0700 + +# Windows clients look for this share name as a source of downloadable +# printer drivers +[print$] + comment = Printer Drivers + path = /var/lib/samba/printers + browseable = yes + read only = yes + guest ok = no +# Uncomment to allow remote administration of Windows print drivers. +# Replace 'ntadmin' with the name of the group your admin users are +# members of. +; write list = root, @ntadmin + +# A sample share for sharing your CD-ROM with others. +;[cdrom] +; comment = Samba server's CD-ROM +; writable = no +; locking = no +; path = /cdrom +; public = yes + +# The next two parameters show how to auto-mount a CD-ROM when the +# cdrom share is accesed. For this to work /etc/fstab must contain +# an entry like this: +# +# /dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0 +# +# The CD-ROM gets unmounted automatically after the connection to the +# +# If you don't want to use auto-mounting/unmounting make sure the CD +# is mounted on /cdrom +# +; preexec = /bin/mount /cdrom +; postexec = /bin/umount /cdrom + diff --git a/packaging/Debian/debian/smbclient.files b/packaging/Debian/debian/smbclient.files new file mode 100644 index 00000000000..96e8945bf3d --- /dev/null +++ b/packaging/Debian/debian/smbclient.files @@ -0,0 +1,15 @@ +usr/bin/smbclient +usr/bin/smbtar +usr/bin/rpcclient +usr/bin/smbspool +usr/bin/smbtree +usr/bin/smbcacls +usr/bin/smbcquotas +usr/share/man/man1/smbclient.1 +usr/share/man/man1/smbtar.1 +usr/share/man/man1/rpcclient.1 +usr/share/man/man8/smbspool.8 +usr/share/man/man1/smbcacls.1 +usr/share/man/man1/smbcquotas.1 +usr/share/man/man1/smbtree.1 +usr/lib/cups/backend/smb diff --git a/packaging/Debian/debian/smbfs.files b/packaging/Debian/debian/smbfs.files new file mode 100644 index 00000000000..870db7d6453 --- /dev/null +++ b/packaging/Debian/debian/smbfs.files @@ -0,0 +1,10 @@ +sbin/mount.smbfs +sbin/mount.smb +usr/bin/smbmount +usr/bin/smbumount +usr/bin/smbmnt +usr/share/man/man8/smbmount.8 +usr/share/man/man8/smbumount.8 +usr/share/man/man8/smbmnt.8 +usr/share/man/man8/mount.smb.8 +usr/share/man/man8/mount.smbfs.8 diff --git a/packaging/Debian/debian/smbwrapper.dirs b/packaging/Debian/debian/smbwrapper.dirs new file mode 100644 index 00000000000..fd727bddf05 --- /dev/null +++ b/packaging/Debian/debian/smbwrapper.dirs @@ -0,0 +1,2 @@ +usr/bin +usr/share/samba diff --git a/packaging/Debian/debian/smbwrapper.docs b/packaging/Debian/debian/smbwrapper.docs new file mode 100644 index 00000000000..2924e78734a --- /dev/null +++ b/packaging/Debian/debian/smbwrapper.docs @@ -0,0 +1,2 @@ +source/smbwrapper/README +source/smbwrapper/PORTING diff --git a/packaging/Debian/debian/smbwrapper.files b/packaging/Debian/debian/smbwrapper.files new file mode 100644 index 00000000000..08edbead6e6 --- /dev/null +++ b/packaging/Debian/debian/smbwrapper.files @@ -0,0 +1 @@ +usr/bin/smbsh diff --git a/packaging/Debian/debian/swat.config b/packaging/Debian/debian/swat.config new file mode 100644 index 00000000000..e210fae55ea --- /dev/null +++ b/packaging/Debian/debian/swat.config @@ -0,0 +1,11 @@ +#/bin/sh -e +# +# + +# Source debconf library. +. /usr/share/debconf/confmodule + +db_title "Samba Web Administration Tool (SWAT)" + +db_input medium swat/smb_conf_warn || true +db_go diff --git a/packaging/Debian/debian/swat.dirs b/packaging/Debian/debian/swat.dirs new file mode 100644 index 00000000000..d5df7df4b8e --- /dev/null +++ b/packaging/Debian/debian/swat.dirs @@ -0,0 +1,2 @@ +usr/sbin +usr/share/samba/swat diff --git a/packaging/Debian/debian/swat.files b/packaging/Debian/debian/swat.files new file mode 100644 index 00000000000..6fed39111be --- /dev/null +++ b/packaging/Debian/debian/swat.files @@ -0,0 +1,2 @@ +usr/sbin/swat +usr/share/man/man8/swat.8 diff --git a/packaging/Debian/debian/swat.postinst b/packaging/Debian/debian/swat.postinst new file mode 100644 index 00000000000..338f8a07c23 --- /dev/null +++ b/packaging/Debian/debian/swat.postinst @@ -0,0 +1,23 @@ +#!/bin/sh +# +# + +PATH=/sbin:/bin:/usr/sbin:/usr/bin + +case "$1" in + configure) + ;; + abort-upgrade|abort-remove|abort-deconfigure) + exit 0 + ;; + *) + echo "$0: Unknown action \"$1\"" + exit 0 + ;; +esac + +# Set up swat, turned off by default. +update-inetd --group OTHER --add \ + '#<off># swat\t\tstream\ttcp\tnowait.400\troot\t/usr/sbin/tcpd\t/usr/sbin/swat' + +#DEBHELPER# diff --git a/packaging/Debian/debian/swat.postrm b/packaging/Debian/debian/swat.postrm new file mode 100644 index 00000000000..6bc5873096e --- /dev/null +++ b/packaging/Debian/debian/swat.postrm @@ -0,0 +1,22 @@ +#!/bin/sh +# +# + +case "$1" in + purge) + update-inetd --remove '/usr/sbin/swat$' + ;; + remove) + ;; + upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + *) + echo "$0: unknown action \"$1\"" + exit 0 + ;; +esac + +#DEBHELPER# + +exit 0 + diff --git a/packaging/Debian/debian/swat.templates b/packaging/Debian/debian/swat.templates new file mode 100644 index 00000000000..3407f7efbc1 --- /dev/null +++ b/packaging/Debian/debian/swat.templates @@ -0,0 +1,6 @@ +Template: swat/smb_conf_warn +Type: note +_Description: Your smb.conf will be re-written! + SWAT will rewrite your smb.conf file. It will rearrange the entries and + delete all comments, include= and copy= options. If you have a carefully + crafted smb.conf then back it up or don't use SWAT! diff --git a/packaging/Debian/debian/winbind.dirs b/packaging/Debian/debian/winbind.dirs new file mode 100644 index 00000000000..1da8fba83ad --- /dev/null +++ b/packaging/Debian/debian/winbind.dirs @@ -0,0 +1 @@ +usr/share/lintian/overrides diff --git a/packaging/Debian/debian/winbind.files b/packaging/Debian/debian/winbind.files new file mode 100644 index 00000000000..2834acf7caf --- /dev/null +++ b/packaging/Debian/debian/winbind.files @@ -0,0 +1,7 @@ +usr/sbin/winbindd +usr/bin/wbinfo +usr/share/man/man1/wbinfo.1 +usr/share/man/man8/winbindd.8 +lib/security/pam_winbind.so +lib/libnss_winbind.so.2 +lib/libnss_wins.so.2 diff --git a/packaging/Debian/debian/winbind.init b/packaging/Debian/debian/winbind.init new file mode 100644 index 00000000000..2dfdf3b8352 --- /dev/null +++ b/packaging/Debian/debian/winbind.init @@ -0,0 +1,48 @@ +#!/bin/sh +# +# Start/stops the winbindd daemon. +# +# + +PATH=/sbin:/bin:/usr/sbin:/usr/bin + +DAEMON=/usr/sbin/winbindd + +# clear conflicting settings from the environment +unset TMPDIR + +# See if the daemon is there +test -x $DAEMON || exit 0 + +case "$1" in + start) + echo -n "Starting the Winbind daemon: winbindd" + + start-stop-daemon --start --quiet --exec $DAEMON + + echo "." + ;; + stop) + echo -n "Stopping the Winbind daemon: winbindd" + + start-stop-daemon --stop --quiet --oknodo --exec $DAEMON + + echo "." + ;; + restart|force-reload) + echo -n "Restarting the Winbind daemon: winbindd" + + start-stop-daemon --stop --quiet --oknodo --exec $DAEMON + sleep 2 + start-stop-daemon --start --quiet --exec $DAEMON + + echo "." + ;; + *) + echo "Usage: /etc/init.d/winbind {start|stop|restart|force-reload}" + exit 1 + ;; +esac + +exit 0 + diff --git a/packaging/Debian/debian/winbind.lintian b/packaging/Debian/debian/winbind.lintian new file mode 100644 index 00000000000..fca17d3cca1 --- /dev/null +++ b/packaging/Debian/debian/winbind.lintian @@ -0,0 +1,6 @@ +winbind: ldconfig-symlink-missing-for-shlib lib/libnss_winbind.so lib/libnss_winbind.so.2 libnss_winbind.so +winbind: ldconfig-symlink-missing-for-shlib lib/libnss_wins.so lib/libnss_wins.so.2 libnss_wins.so +winbind: no-shlibs-control-file lib/libnss_winbind.so.2 +winbind: no-shlibs-control-file lib/libnss_wins.so.2 +winbind: postinst-must-call-ldconfig lib/libnss_wins.so.2 +winbind: postrm-should-call-ldconfig lib/libnss_wins.so.2 diff --git a/packaging/Debian/debian/winbind.logrotate b/packaging/Debian/debian/winbind.logrotate new file mode 100644 index 00000000000..e36cd1281c5 --- /dev/null +++ b/packaging/Debian/debian/winbind.logrotate @@ -0,0 +1,10 @@ +/var/log/samba/log.winbindd { + weekly + missingok + rotate 7 + postrotate + [ -f /var/run/samba/winbindd.pid ] && kill -HUP `cat /var/run/samba/winbindd.pid` + endscript + compress + notifempty +} diff --git a/packaging/Debian/debian/wins2dns.awk b/packaging/Debian/debian/wins2dns.awk new file mode 100644 index 00000000000..176868a115d --- /dev/null +++ b/packaging/Debian/debian/wins2dns.awk @@ -0,0 +1,38 @@ +#!/usr/bin/awk -f +# +# Date: Wed, 26 Aug 1998 10:37:39 -0600 (MDT) +# From: Jason Gunthorpe <jgg@deltatee.com> +# To: samba@packages.debian.org +# Subject: Nifty samba script +# +# Here is a really nifty script I just wrote for samba, it takes the wins +# database in /var/samba/wins and writes out two dns files for it. In this +# way network wide wins clients can get into the dns for use by unix +# machines. +# +# Perhaps this could be included in /usr/doc/examples or somesuch. +# + +BEGIN { + FS="#|\""; +FORWARD="/tmp/wins.hosts" +REVERSE="/tmp/wins.rev" +DOMAIN="ven.ra.rockwell.com" +} +$3 == "00" { + split($4,a," " ); + split(a[2],b,"."); + while (sub(" ","-",$2)); + $2=tolower($2); + if (b[1] == "255") + next; + if (length($2) >= 8) + print $2"\ta\t"a[2] > FORWARD + else + print $2"\t\ta\t"a[2] > FORWARD + print b[4]"."b[3]"\t\tptr\t"$2"."DOMAIN"." > REVERSE +} +END { + system("echo killall -HUP named"); +} + diff --git a/packaging/Example/Instructions b/packaging/Example/Instructions new file mode 100644 index 00000000000..02ffa7b6a8c --- /dev/null +++ b/packaging/Example/Instructions @@ -0,0 +1,41 @@ +Copyright (C) 1997-1998 Samba-Team +E-mail: samba-binaries@samba.org + +Subject: Installation Instructions for SuperNewOS X.X +-------------------------------------------------------- + +1) cd / +2) tar xvf [path-to-samba-package]/install.tar +3) cd /usr/local/samba/lib +4) vi smb.conf + +Now modify smb.conf to reflect your site needs. + +5) samba start + +To stop samba: + + samba stop + +You could install samba to run from the system start-up scripts +(recommended) by running ./setup.sh + +Start / Stop Samba as follows:- + + samba [start | stop] + + +Subject: New Users Must Read This +----------------------------------- +Above ALL else, read the smb.conf man pages _AND_ all text documentation. + +To enable SMB encrypted password support do the following: + +1) Put /usr/local/samba/bin in your PATH +2) Edit /usr/local/samba/lib/smb.conf and uncomment the + line "encrypt passwd = yes" +3) Execute: smbpasswd -a "username" "password" + +The above will create your /usr/local/samba/private/smbpasswd file +in which will be the NT and LanMAN hashed passwords. + diff --git a/packaging/Example/PackageDate b/packaging/Example/PackageDate new file mode 100644 index 00000000000..95cbb0972bf --- /dev/null +++ b/packaging/Example/PackageDate @@ -0,0 +1 @@ +# Month, WeekDay, Date, Year, PreparerCity, Country diff --git a/packaging/Example/Packager b/packaging/Example/Packager new file mode 100644 index 00000000000..f5db3f8c303 --- /dev/null +++ b/packaging/Example/Packager @@ -0,0 +1 @@ +Packager: John Doe <doej@somewhere.org> diff --git a/packaging/Example/Packaging-instructions b/packaging/Example/Packaging-instructions new file mode 100644 index 00000000000..b598fd68b15 --- /dev/null +++ b/packaging/Example/Packaging-instructions @@ -0,0 +1,16 @@ +The package building files should be located in a +directory called: samba-X.X.X + +Where X.X.X is the version ID. + +Step Directions +==== ============================================ +1. Copy the samba distribution tarball into the packaging directory +2. Make sure you have a installed on your system the GNU gzip/gunzip files +3. Edit "package-prep" script as required +4. Run "package-prep" + +If all goes well, you should now have a usable distribution package. + +Note: Update the Instructions file as required. + diff --git a/packaging/Example/package-prep b/packaging/Example/package-prep new file mode 100755 index 00000000000..e8f5089a865 --- /dev/null +++ b/packaging/Example/package-prep @@ -0,0 +1,51 @@ +#!/bin/sh + +# Extract the skeleton directory structure into which samba will be installed. +tar xvf skeleton.tar + +# Now link the skeleton directory structure into the final install tree. +( cd /usr/local; + mv man man.orig; + mv samba samba.orig; + NOWDIR=`pwd`; + ln -sf $NOWDIR/usr/local/man man; + ln -sf $NOWDIR/usr/local/samba samba; ) + +# Unpack the master source tarball +gunzip samba-X.X.X.tar.gz +tar xvf samba-X.X.X.tar + +# Now build the binary files +cd samba-X.X.X/source +./configure +make +make install + +# Install into the packaging tree that full reflects the final install tree +cd $NOWDIR/usr/local/samba +cp -pr man ../ +rm -rf man +cd $NOWDIR + +# Create the package tarball +tar cvf install.tar usr var + +# Clean up original sources preserving all configured files +# Note: This will allow installers to check build options +cd samba-X.X.X/source +rm -f ../source/bin/* +make clean +cd ../.. +tar cvf samba-X.X.X.tar samba-X.X.X +rm -rf samba-X.X.X +rm -rf usr var +cd .. +tar cvf samba-X.X.X-OS-Version-CPU.tar samba-X.X.X +gzip samba-X.X.X-OS-Version-CPU.tar + +# We now have the distribution package, now restore our runtime system +cd samba-X.X.X +tar xcf install.tar + +# Please test operation before shipping the binary distribution package +# to the samba-team. diff --git a/packaging/Example/samba.init b/packaging/Example/samba.init new file mode 100755 index 00000000000..c1d605cda06 --- /dev/null +++ b/packaging/Example/samba.init @@ -0,0 +1,34 @@ +#!/bin/sh +# +if [ ! -d /usr/bin ]; then + echo "The /usr file system is not mounted." + exit 1 +fi + +killproc() { + pid=`/bin/ps ax | grep -w $1 | sed -e 's/^ *//' -e 's/ .*//'` + echo "Stopping $1 now." + [ "$pid" != "" ] && kill -15 $pid + echo $pid +} + + +# Start/stop processes required for samba server + +case "$1" in + + 'start') + echo "Starting Samba" + /usr/local/samba/sbin/smbd + /usr/local/samba/sbin/nmbd + echo "Done." + ;; + 'stop') + killproc smbd + killproc nmbd + ;; + *) + echo "Usage: /sbin/init.d/samba.init [ start | stop ]" + ;; +esac +exit 0 diff --git a/packaging/Example/setup.sh b/packaging/Example/setup.sh new file mode 100755 index 00000000000..994b16d5ef0 --- /dev/null +++ b/packaging/Example/setup.sh @@ -0,0 +1,27 @@ +#!/bin/sh +# +# Note: This file MUST be edited to suit the target OS environment. +# + +echo "Setting up for SWAT - The Samba Web Administration Tool" + +echo 'swat 901/tcp' >> /etc/services +uniq /etc/services /tmp/tempserv +cp /tmp/tempserv /etc/services +rm /tmp/tempserv +echo 'swat stream tcp nowait.400 root /usr/local/samba/bin/swat swat' >> /etc/inetd.conf +uniq /etc/inetd.conf /tmp/tempinetd +cp /tmp/tempinetd /etc/inetd.conf +rm /tmp/tempinetd +echo "Creating Symbolic Links for Start up Scripts" +cp -f samba.init /sbin/init.d +chown bin.bin /sbin/init.d/samba.init +chmod 750 /sbin/init.d/samba.init +ln -sf /sbin/init.d/samba.init /sbin/rc0.d/K01samba +ln -sf /sbin/init.d/samba.init /sbin/rc2.d/K91samba +ln -sf /sbin/init.d/samba.init /sbin/rc3.d/S91samba +echo "Done. Now settting up samba command" +ln /sbin/init.d/samba.init /sbin/samba +echo "Done." +echo "To start / stop samba:" +echo " execute: samba [start | stop] diff --git a/packaging/Example/skeleton.tar b/packaging/Example/skeleton.tar Binary files differnew file mode 100644 index 00000000000..92598d0c5e7 --- /dev/null +++ b/packaging/Example/skeleton.tar diff --git a/packaging/Fedora/filter-requires-samba.sh b/packaging/Fedora/filter-requires-samba.sh new file mode 100755 index 00000000000..1ba10a0ee3d --- /dev/null +++ b/packaging/Fedora/filter-requires-samba.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +/usr/lib/rpm/perl.req $* | grep -v "Net::LDAP" diff --git a/packaging/Fedora/makerpms.sh.tmpl b/packaging/Fedora/makerpms.sh.tmpl new file mode 100644 index 00000000000..361d8418761 --- /dev/null +++ b/packaging/Fedora/makerpms.sh.tmpl @@ -0,0 +1,68 @@ +#!/bin/sh +# Copyright (C) John H Terpstra 1998-2002 +# Gerald (Jerry) Carter 2003 + +# The following allows environment variables to override the target directories +# the alternative is to have a file in your home directory calles .rpmmacros +# containing the following: +# %_topdir /home/mylogin/redhat +# +# Note: Under this directory rpm expects to find the same directories that are under the +# /usr/src/redhat directory +# + +SPECDIR=`rpm --eval %_specdir` +SRCDIR=`rpm --eval %_sourcedir` + +# At this point the SPECDIR and SRCDIR vaiables must have a value! + +USERID=`id -u` +GRPID=`id -g` +VERSION='PVERSION' +SPECFILE="samba.spec" +RPMVER=`rpm --version | awk '{print $3}'` +RPM="rpmbuild" + +## +## Check the RPM version (paranoid) +## +case $RPMVER in + 4*) + echo "Supported RPM version [$RPMVER]" + ;; + *) + echo "Unknown RPM version: `rpm --version`" + exit 1 + ;; +esac + +( cd ../../source; if [ -f Makefile ]; then make distclean; fi ) +( cd ../../.. ; chown -R ${USERID}.${GRPID} samba-${VERSION} ) + +( cd ../../.. ; tar --exclude=CVS -cf - samba-${VERSION}/. | bzip2 > ${SRCDIR}/samba-${VERSION}.tar.bz2 ) + +## +## copy additional source files +## +for file in samba.pamd samba.sysconfig samba.spec \ + smb.init swat.desktop filter-requires-samba.sh \ + samba.log samba.xinetd smbprint winbind.init \ + smb.conf smbusers +do + cp -p $file ${SRCDIR} + +done + +chmod 755 ${SRCDIR}/filter-requires-samba.sh + +cp -p ${SPECFILE} ${SPECDIR} + +## +## Build +## +echo Getting Ready to build release package +cd ${SPECDIR} +${RPM} -ba --clean --rmsource $SPECFILE + +echo Done. + diff --git a/packaging/Fedora/samba.log b/packaging/Fedora/samba.log new file mode 100644 index 00000000000..04106239fb1 --- /dev/null +++ b/packaging/Fedora/samba.log @@ -0,0 +1,9 @@ +/var/log/samba/*.log { + notifempty + missingok + sharedscripts + copytruncate + postrotate + /bin/kill -HUP `cat /var/run/smbd.pid /var/run/nmbd.pid /var/run/winbindd.pid 2> /dev/null` 2> /dev/null || true + endscript +} diff --git a/packaging/Fedora/samba.pamd b/packaging/Fedora/samba.pamd new file mode 100644 index 00000000000..f88aae628c2 --- /dev/null +++ b/packaging/Fedora/samba.pamd @@ -0,0 +1,4 @@ +auth required /lib/security/pam_stack.so service=system-auth +session required /lib/security/pam_stack.so service=system-auth +account required /lib/security/pam_stack.so service=system-auth +password required /lib/security/pam_stack.so service=system-auth diff --git a/packaging/Fedora/samba.spec.tmpl b/packaging/Fedora/samba.spec.tmpl new file mode 100644 index 00000000000..ae6f95c9005 --- /dev/null +++ b/packaging/Fedora/samba.spec.tmpl @@ -0,0 +1,398 @@ +%define initdir %{_sysconfdir}/rc.d/init.d +%define auth %(test -f /etc/pam.d/system-auth && echo /etc/pam.d/system-auth || echo) + +Summary: The Samba SMB server. +Name: samba +Version: PVERSION +Release: PRELEASE +License: GNU GPL Version 2 +Group: System Environment/Daemons +URL: http://www.samba.org/ + +Source: ftp://www.samba.org/pub/samba/%{name}-%{version}.tar.bz2 + +# Red Hat specific replacement-files +Source1: samba.log +Source2: samba.xinetd +Source4: samba.sysconfig +Source5: smb.init +Source6: winbind.init +Source7: samba.pamd +Source8: smbprint +Source9: smbusers +Source10: smb.conf + +# Don't depend on Net::LDAP +Source999: filter-requires-samba.sh + +# generic patches + +Requires: pam >= 0.64 %{auth} samba-common = %{version} +Requires: logrotate >= 3.4 initscripts >= 5.54-1 +BuildRoot: %{_tmppath}/%{name}-%{version}-root +Prereq: /sbin/chkconfig /bin/mktemp /usr/bin/killall +Prereq: fileutils sed /etc/init.d +BuildRequires: pam-devel, readline-devel, ncurses-devel, fileutils, libacl-devel, openldap-devel, krb5-devel + + +# Working around perl dependency problem from docs +%define __perl_requires %{SOURCE999} + +%description +Samba is the protocol 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 server that can be used to provide network services to +SMB (sometimes called "Lan Manager") clients. Samba uses NetBIOS over +TCP/IP (NetBT) protocols and does NOT need the NetBEUI (Microsoft Raw +NetBIOS frame) protocol. + +%package client +Summary: Samba (SMB) client programs. +Group: Applications/System +Requires: samba-common = %{version} +Obsoletes: smbfs + +%description client +The samba-client package provides some SMB clients to compliment the +built-in SMB filesystem in Linux. These clients allow access of SMB +shares and printing to SMB printers. + +%package common +Summary: Files used by both Samba servers and clients. +Group: Applications/System + +%description common +Samba-common provides files necessary for both the server and client +packages of Samba. + +%package swat +Summary: The Samba SMB server configuration program. +Group: Applications/System +Requires: samba = %{version} xinetd + +%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. + +%prep +%setup -q + +# copy Red Hat specific scripts +cp %{SOURCE5} packaging/Fedora/ +cp %{SOURCE6} packaging/Fedora/ +cp %{SOURCE7} packaging/Fedora/ +cp %{SOURCE8} packaging/Fedora/winbind.init + +%build + +cd source +%ifarch i386 sparc +RPM_OPT_FLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64" +%endif +%ifarch ia64 +libtoolize --copy --force # get it to recognize IA-64 +autoheader +autoconf +EXTRA="-D_LARGEFILE64_SOURCE" +%endif + +## run autogen if missing the configure script +if [ ! -f "configure" ]; then + ./autogen.sh +fi + +CFLAGS="$RPM_OPT_FLAGS" ./configure \ + --prefix=%{_prefix} \ + --localstatedir=/var \ + --sysconfdir=/etc \ + --with-privatedir=%{_sysconfdir}/samba \ + --with-fhs \ + --with-quotas \ + --with-smbmount \ + --with-pam \ + --with-pam_smbpass \ + --with-syslog \ + --with-utmp \ + --with-sambabook=%{_datadir}/swat/using_samba \ + --with-swatdir=%{_datadir}/swat \ + --with-libsmbclient \ + --with-acl-support +make showlayout +make proto +make %{?_smp_mflags} all nsswitch/libnss_wins.so debug2html + + +%install +rm -rf $RPM_BUILD_ROOT + +mkdir -p $RPM_BUILD_ROOT/sbin +mkdir -p $RPM_BUILD_ROOT/usr/{sbin,bin} +mkdir -p $RPM_BUILD_ROOT/%{initdir} +mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/{pam.d,logrotate.d} +mkdir -p $RPM_BUILD_ROOT/var/{log,spool,lib}/samba +mkdir -p $RPM_BUILD_ROOT/%{_datadir}/swat/using_samba +mkdir -p $RPM_BUILD_ROOT/%{_datadir}/samba/codepages + +cd source + +make DESTDIR=$RPM_BUILD_ROOT \ + install + +cd .. + +# Install other stuff +install -m644 %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/samba/smb.conf +install -m644 %{SOURCE8} $RPM_BUILD_ROOT/etc/samba/smbusers +install -m755 %{SOURCE8} $RPM_BUILD_ROOT%{_bindir} +install -m644 %{SOURCE7} $RPM_BUILD_ROOT/etc/pam.d/samba +install -m644 %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/samba +install -m755 source/script/mksmbpasswd.sh $RPM_BUILD_ROOT%{_bindir} + +install -m755 %{SOURCE5} $RPM_BUILD_ROOT%{initdir}/smb +install -m755 %{SOURCE6} $RPM_BUILD_ROOT%{initdir}/winbind +ln -s ../..%{initdir}/smb $RPM_BUILD_ROOT%{_sbindir}/samba +ln -s ../..%{initdir}/winbind $RPM_BUILD_ROOT%{_sbindir}/winbind + +ln -s ../usr/bin/smbmount $RPM_BUILD_ROOT/sbin/mount.smb +## Samba's Makefile is breaking this currently. Remove it and set our own +/bin/rm -f $RPM_BUILD_ROOT/sbin/mount.smbfs +ln -s ../usr/bin/smbmount $RPM_BUILD_ROOT/sbin/mount.smbfs + +echo 127.0.0.1 localhost > $RPM_BUILD_ROOT%{_sysconfdir}/samba/lmhosts + + +# pam_smbpass +mkdir -p $RPM_BUILD_ROOT/%{_lib}/security +mv source/bin/pam_smbpass.so $RPM_BUILD_ROOT/%{_lib}/security/pam_smbpass.so + +# winbind +mkdir -p $RPM_BUILD_ROOT/%{_lib}/security +install -m 755 source/nsswitch/pam_winbind.so $RPM_BUILD_ROOT/%{_lib}/security/pam_winbind.so +install -m 755 source/nsswitch/libnss_winbind.so $RPM_BUILD_ROOT/%{_lib}/libnss_winbind.so +install -m 755 source/nsswitch/libnss_wins.so $RPM_BUILD_ROOT/%{_lib}/libnss_wins.so +( cd $RPM_BUILD_ROOT/%{_lib}; + ln -sf libnss_winbind.so libnss_winbind.so.2; + ln -sf libnss_wins.so libnss_wins.so.2 ) + +# libsmbclient + +# make install puts libsmbclient.so in the wrong place on x86_64 +rm -f $RPM_BUILD_ROOT/usr/lib || true +mkdir -p $RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_includedir} +install -m 644 source/bin/libsmbclient.so $RPM_BUILD_ROOT%{_libdir}/libsmbclient.so +install -m 644 source/bin/libsmbclient.a $RPM_BUILD_ROOT%{_libdir}/libsmbclient.a +install -m 644 source/include/libsmbclient.h $RPM_BUILD_ROOT%{_includedir} + +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d +install -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/swat + +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig +install -m644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/samba + +## +## Clean out man pages for tools not installed here +## +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}/man8/mount.cifs.8* + +%clean +rm -rf $RPM_BUILD_ROOT + +%post +/sbin/chkconfig --add smb + +%preun +if [ $1 = 0 ] ; then + /sbin/chkconfig --del smb + rm -rf /var/log/samba/* /var/cache/samba/* + /sbin/service smb stop >/dev/null 2>&1 +fi +exit 0 + +%postun +if [ "$1" -ge "1" ]; then + %{initdir}/smb condrestart >/dev/null 2>&1 +fi + + +%post swat +# Add swat entry to /etc/services if not already there. +if [ ! "`grep ^\s**swat /etc/services`" ]; then + echo 'swat 901/tcp # Add swat service used via inetd' >> /etc/services +fi + +%post common +/sbin/chkconfig --add winbind +/sbin/ldconfig + +%preun common +if [ $1 = 0 ] ; then + /sbin/chkconfig --del winbind + /sbin/service winbind stop >/dev/null 2>&1 +fi +exit 0 + +%postun common -p /sbin/ldconfig + +%triggerpostun -- samba < 1.9.18p7 +if [ $1 != 0 ]; then + /sbin/chkconfig --add smb +fi + +%triggerpostun -- samba < 2.0.5a-3 +if [ $1 != 0 ]; then + [ ! -d /var/lock/samba ] && mkdir -m 0755 /var/lock/samba + [ ! -d /var/spool/samba ] && mkdir -m 1777 /var/spool/samba + chmod 644 /etc/services + [ -f /etc/inetd.conf ] && chmod 644 /etc/inetd.conf +fi + +%files +%defattr(-,root,root) +%doc README COPYING Manifest +%doc WHATSNEW.txt Roadmap +%doc docs +%doc examples/autofs examples/LDAP examples/libsmbclient examples/misc examples/printer-accounting +%doc examples/printing + +%attr(755,root,root) /%{_lib}/security/pam_smbpass.so +%{_sbindir}/smbd +%{_sbindir}/nmbd +# %{_bindir}/make_unicodemap +%{_bindir}/mksmbpasswd.sh +%{_bindir}/smbcontrol +%{_bindir}/smbstatus +# %{_bindir}/smbadduser +%{_bindir}/tdbbackup +%config(noreplace) %{_sysconfdir}/sysconfig/samba +%config(noreplace) %{_sysconfdir}/samba/smbusers +%attr(755,root,root) %config %{initdir}/smb +%config(noreplace) %{_sysconfdir}/logrotate.d/samba +%config(noreplace) %{_sysconfdir}/pam.d/samba +# %{_mandir}/man1/make_unicodemap.1* +%{_mandir}/man1/smbcontrol.1* +%{_mandir}/man1/smbstatus.1* +%{_mandir}/man5/smbpasswd.5* +%{_mandir}/man7/samba.7* +%{_mandir}/man8/nmbd.8* +%{_mandir}/man8/pdbedit.8* +%{_mandir}/man8/smbd.8* +%{_mandir}/man8/tdbbackup.8* +#%{_mandir}/ja/man1/smbstatus.1* +#%{_mandir}/ja/man5/smbpasswd.5* +#%{_mandir}/ja/man7/samba.7* +#%{_mandir}/ja/man8/smbd.8* +#%{_mandir}/ja/man8/nmbd.8* +%{_libdir}/samba/vfs + +%attr(0700,root,root) %dir /var/log/samba +%attr(1777,root,root) %dir /var/spool/samba + +%files swat +%defattr(-,root,root) +%config(noreplace) %{_sysconfdir}/xinetd.d/swat +%{_datadir}/swat +%{_sbindir}/swat +%{_mandir}/man8/swat.8* +#%{_mandir}/ja/man8/swat.8* +%attr(755,root,root) %{_libdir}/samba/*.msg + +%files client +%defattr(-,root,root) +/sbin/mount.smb +/sbin/mount.smbfs +%{_libdir}/samba/lowcase.dat +%{_libdir}/samba/upcase.dat +%{_libdir}/samba/valid.dat +%{_bindir}/rpcclient +%{_bindir}/smbcacls +%{_bindir}/smbmount +%{_bindir}/smbmnt +%{_bindir}/smbumount +%{_bindir}/findsmb +%{_bindir}/tdbdump +%{_mandir}/man8/tdbdump.8* +%{_mandir}/man8/smbmnt.8* +%{_mandir}/man8/smbmount.8* +%{_mandir}/man8/smbumount.8* +%{_mandir}/man8/smbspool.8* +%{_bindir}/nmblookup +%{_bindir}/smbclient +%{_bindir}/smbprint +%{_bindir}/smbspool +%{_bindir}/smbtar +%{_bindir}/net +%{_bindir}/smbtree +%{_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}/man8/net.8* +#%{_mandir}/ja/man1/smbtar.1* +#%{_mandir}/ja/man1/smbclient.1* +#%{_mandir}/ja/man1/nmblookup.1* + +%files common +%defattr(-,root,root) +/%{_lib}/libnss_wins.so* +/%{_lib}/libnss_winbind.so* +/%{_lib}/security/pam_winbind.so +%{_libdir}/libsmbclient.a +%{_libdir}/libsmbclient.so +%{_libdir}/samba/charset/CP*.so +%{_includedir}/libsmbclient.h +%{_bindir}/testparm +%{_bindir}/testprns +%{_bindir}/smbpasswd +# %{_bindir}/make_printerdef +%{_bindir}/wbinfo +# %{_bindir}/editreg +%{_bindir}/ntlm_auth +%{_bindir}/pdbedit +%{_bindir}/profiles +%{_bindir}/smbcquotas +#%{_bindir}/vfstest +%{_sbindir}/winbindd +%config(noreplace) %{_sysconfdir}/samba/smb.conf +%config(noreplace) %{_sysconfdir}/samba/lmhosts +%dir %{_datadir}/samba +%dir %{_datadir}/samba/codepages +%dir %{_sysconfdir}/samba +%{initdir}/winbind +# %{_datadir}/samba/codepages/* +# %{_mandir}/man1/make_smbcodepage.1* +%{_mandir}/man1/ntlm_auth.1* +%{_mandir}/man1/profiles.1* +%{_mandir}/man1/smbcquotas.1* +%{_mandir}/man1/testparm.1* +%{_mandir}/man1/testprns.1* +%{_mandir}/man5/smb.conf.5* +%{_mandir}/man5/lmhosts.5* +%{_mandir}/man8/smbpasswd.8* +%{_mandir}/man1/wbinfo.1* +%{_mandir}/man8/winbindd.8* +%{_mandir}/man1/vfstest.1* + +# #%lang(ja) %{_mandir}/ja/man1/make_smbcodepage.1* +#%lang(ja) %{_mandir}/ja/man1/testparm.1* +#%lang(ja) %{_mandir}/ja/man1/testprns.1* +#%lang(ja) %{_mandir}/ja/man5/smb.conf.5* +#%lang(ja) %{_mandir}/ja/man5/lmhosts.5* +#%lang(ja) %{_mandir}/ja/man8/smbpasswd.8* + +%changelog +* Fri Jan 16 2004 Gerald (Jerry) Carter <jerry@samba,org> +- Removed ChangeLog entries since they are kept in CVS + + + diff --git a/packaging/Fedora/samba.sysconfig b/packaging/Fedora/samba.sysconfig new file mode 100644 index 00000000000..944b72fcc28 --- /dev/null +++ b/packaging/Fedora/samba.sysconfig @@ -0,0 +1,6 @@ +# Options to smbd +SMBDOPTIONS="-D" +# Options to nmbd +NMBDOPTIONS="-D" +# Options for winbindd +WINBINDOPTIONS="" diff --git a/packaging/Fedora/samba.xinetd b/packaging/Fedora/samba.xinetd new file mode 100644 index 00000000000..8b62348dde3 --- /dev/null +++ b/packaging/Fedora/samba.xinetd @@ -0,0 +1,15 @@ +# default: off +# description: SWAT is the Samba Web Admin Tool. Use swat \ +# to configure your Samba server. To use SWAT, \ +# connect to port 901 with your favorite web browser. +service swat +{ + port = 901 + socket_type = stream + wait = no + only_from = 127.0.0.1 + user = root + server = /usr/sbin/swat + log_on_failure += USERID + disable = yes +} diff --git a/packaging/Fedora/smb.conf b/packaging/Fedora/smb.conf new file mode 100644 index 00000000000..74806da16bb --- /dev/null +++ b/packaging/Fedora/smb.conf @@ -0,0 +1,286 @@ +# This is the main Samba configuration file. You should read the +# smb.conf(5) manual page in order to understand the options listed +# here. Samba has a huge number of configurable options (perhaps too +# many!) most of which are not shown in this example +# +# Any line which starts with a ; (semi-colon) or a # (hash) +# is a comment and is ignored. In this example we will use a # +# for commentry and a ; for parts of the config file that you +# may wish to enable +# +# NOTE: Whenever you modify this file you should run the command "testparm" +# to check that you have not made any basic syntactic errors. +# +#======================= Global Settings ===================================== +[global] + +# workgroup = NT-Domain-Name or Workgroup-Name + workgroup = MYGROUP + +# server string is the equivalent of the NT Description field + server string = Samba Server + +# This option is important for security. It allows you to restrict +# connections to machines which are on your local network. The +# following example restricts access to two C class networks and +# the "loopback" interface. For more examples of the syntax see +# the smb.conf man page +; hosts allow = 192.168.1. 192.168.2. 127. + +# if you want to automatically load your printer list rather +# than setting them up individually then you'll need this + printcap name = /etc/printcap + load printers = yes + +# It should not be necessary to spell out the print system type unless +# yours is non-standard. Currently supported print systems include: +# bsd, sysv, plp, lprng, aix, hpux, qnx +; printing = bsd + +# Uncomment this if you want a guest account, you must add this to /etc/passwd +# otherwise the user "nobody" is used +; guest account = pcguest + +# this tells Samba to use a separate log file for each machine +# that connects + log file = /var/log/samba/log.%m + +# Put a capping on the size of the log files (in Kb). + max log size = 50 + +# Security mode. Most people will want user level security. See +# security_level.txt for details. + security = user +# Use password server option only with security = server +; password server = <NT-Server-Name> + +# Password Level allows matching of _n_ characters of the password for +# all combinations of upper and lower case. +; password level = 8 +; username level = 8 + +# You may wish to use password encryption. Please read +# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation. +# Do not enable this option unless you have read those documents +; encrypt passwords = yes +; smb passwd file = /etc/samba/smbpasswd + +# The following are needed to allow password changing from Windows to +# update the Linux system password also. +# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above. +# NOTE2: You do NOT need these to allow workstations to change only +# the encrypted SMB passwords. They allow the Unix password +# to be kept in sync with the SMB password. +; unix password sync = Yes +; passwd program = /usr/bin/passwd %u +; passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully* + +# Unix users can map to different SMB User names +; username map = /etc/samba/smbusers + +# Using the following line enables you to customise your configuration +# on a per machine basis. The %m gets replaced with the netbios name +# of the machine that is connecting +; include = /etc/samba/smb.conf.%m + +# Most people will find that this option gives better performance. +# See speed.txt and the manual pages for details + socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 + +# Configure Samba to use multiple interfaces +# If you have multiple network interfaces then you must list them +# here. See the man page for details. +; interfaces = 192.168.12.2/24 192.168.13.2/24 + +# Configure remote browse list synchronisation here +# request announcement to, or browse list sync from: +# a specific host or from / to a whole subnet (see below) +; remote browse sync = 192.168.3.25 192.168.5.255 +# Cause this host to announce itself to local subnets here +; remote announce = 192.168.1.255 192.168.2.44 + +# Browser Control Options: +# set local master to no if you don't want Samba to become a master +# browser on your network. Otherwise the normal election rules apply +; local master = no + +# OS Level determines the precedence of this server in master browser +# elections. The default value should be reasonable +; os level = 33 + +# Domain Master specifies Samba to be the Domain Master Browser. This +# allows Samba to collate browse lists between subnets. Don't use this +# if you already have a Windows NT domain controller doing this job +; domain master = yes + +# Preferred Master causes Samba to force a local browser election on startup +# and gives it a slightly higher chance of winning the election +; preferred master = yes + +# Enable this if you want Samba to be a domain logon server for +# Windows95 workstations. +; domain logons = yes + +# if you enable domain logons then you may want a per-machine or +# per user logon script +# run a specific logon batch file per workstation (machine) +; logon script = %m.bat +# run a specific logon batch file per username +; logon script = %U.bat + +# Where to store roving profiles (only for Win95 and WinNT) +# %L substitutes for this servers netbios name, %U is username +# You must uncomment the [Profiles] share below +; logon path = \\%L\Profiles\%U + +# All NetBIOS names must be resolved to IP Addresses +# 'Name Resolve Order' allows the named resolution mechanism to be specified +# the default order is "host lmhosts wins bcast". "host" means use the unix +# system gethostbyname() function call that will use either /etc/hosts OR +# DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf +# and the /etc/resolv.conf file. "host" therefore is system configuration +# dependant. This parameter is most often of use to prevent DNS lookups +# in order to resolve NetBIOS names to IP Addresses. Use with care! +# The example below excludes use of name resolution for machines that are NOT +# on the local network segment +# - OR - are not deliberately to be known via lmhosts or via WINS. +; name resolve order = wins lmhosts bcast + +# Windows Internet Name Serving Support Section: +# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server +; wins support = yes + +# WINS Server - Tells the NMBD components of Samba to be a WINS Client +# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both +; wins server = w.x.y.z + +# WINS Proxy - Tells Samba to answer name resolution queries on +# behalf of a non WINS capable client, for this to work there must be +# at least one WINS Server on the network. The default is NO. +; wins proxy = yes + +# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names +# via DNS nslookups. The built-in default for versions 1.9.17 is yes, +# this has been changed in version 1.9.18 to no. + dns proxy = no + +# Case Preservation can be handy - system default is _no_ +# NOTE: These can be set on a per share basis +; preserve case = no +; short preserve case = no +# Default case is normally upper case for all DOS files +; default case = lower +# Be very careful with case sensitivity - it can break things! +; case sensitive = no + +#============================ Share Definitions ============================== +[homes] + comment = Home Directories + browseable = no + writable = yes + +# Un-comment the following and create the netlogon directory for Domain Logons +; [netlogon] +; comment = Network Logon Service +; path = /home/netlogon +; guest ok = yes +; writable = no +; share modes = no + + +# Un-comment the following to provide a specific roving profile share +# the default is to use the user's home directory +;[Profiles] +; path = /home/profiles +; browseable = no +; guest ok = yes + + +# NOTE: If you have a BSD-style print system there is no need to +# specifically define each individual printer +[printers] + comment = All Printers + path = /var/spool/samba + browseable = no +# Set public = yes to allow user 'guest account' to print + guest ok = no + writable = no + printable = yes + +# This one is useful for people to share files +;[tmp] +; comment = Temporary file space +; path = /tmp +; read only = no +; public = yes + +# A publicly accessible directory, but read only, except for people in +# the "staff" group +;[public] +; comment = Public Stuff +; path = /home/samba +; public = yes +; read only = yes +; write list = @staff + +# Other examples. +# +# A private printer, usable only by fred. Spool data will be placed in fred's +# home directory. Note that fred must have write access to the spool directory, +# wherever it is. +;[fredsprn] +; comment = Fred's Printer +; valid users = fred +; path = /homes/fred +; printer = freds_printer +; public = no +; writable = no +; printable = yes + +# A private directory, usable only by fred. Note that fred requires write +# access to the directory. +;[fredsdir] +; comment = Fred's Service +; path = /usr/somewhere/private +; valid users = fred +; public = no +; writable = yes +; printable = no + +# a service which has a different directory for each machine that connects +# this allows you to tailor configurations to incoming machines. You could +# also use the %u option to tailor it by user name. +# The %m gets replaced with the machine name that is connecting. +;[pchome] +; comment = PC Directories +; path = /usr/pc/%m +; public = no +; writable = yes + +# A publicly accessible directory, read/write to all users. Note that all files +# created in the directory by users will be owned by the default user, so +# any user with access can delete any other user's files. Obviously this +# directory must be writable by the default user. Another user could of course +# be specified, in which case all files would be owned by that user instead. +;[public] +; path = /usr/somewhere/else/public +; public = yes +; only guest = yes +; writable = yes +; printable = no + +# The following two entries demonstrate how to share a directory so that two +# users can place files there that will be owned by the specific users. In this +# setup, the directory should be writable by both users and should have the +# sticky bit set on it to prevent abuse. Obviously this could be extended to +# as many users as required. +;[myshare] +; comment = Mary's and Fred's stuff +; path = /usr/somewhere/shared +; valid users = mary fred +; public = no +; writable = yes +; printable = no +; create mask = 0765 + + diff --git a/packaging/Fedora/smb.init b/packaging/Fedora/smb.init new file mode 100644 index 00000000000..11a011883f9 --- /dev/null +++ b/packaging/Fedora/smb.init @@ -0,0 +1,119 @@ +#!/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/smbd.pid +# 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 0 +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 0 + +# Check that smb.conf exists. +[ -f /etc/samba/smb.conf ] || exit 0 + +# Check that we can write to it... so non-root users stop here +[ -w /etc/samba/smb.conf ] || exit 0 + + +RETVAL=0 + + +start() { + KIND="SMB" + echo -n $"Starting $KIND services: " + daemon smbd $SMBDOPTIONS + RETVAL=$? + echo + KIND="NMB" + echo -n $"Starting $KIND services: " + daemon nmbd $NMBDOPTIONS + RETVAL2=$? + echo + [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && touch /var/lock/subsys/smb || \ + RETVAL=1 + return $RETVAL +} + +stop() { + KIND="SMB" + echo -n $"Shutting down $KIND services: " + killproc smbd -TERM + RETVAL=$? + [ $RETVAL -eq 0 ] && rm -f /var/run/smbd.pid + echo + KIND="NMB" + echo -n $"Shutting down $KIND services: " + killproc nmbd -TERM + RETVAL2=$? + [ $RETVAL2 -eq 0 ] && rm -f /var/run/nmbd.pid + [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && rm -f /var/lock/subsys/smb + echo "" + return $RETVAL +} + +restart() { + stop + start +} + +reload() { + echo -n $"Reloading smb.conf file: " + killproc smbd -HUP + RETVAL=$? + echo + return $RETVAL +} + +rhstatus() { + status smbd + status nmbd +} + +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 1 +esac + +exit $? diff --git a/packaging/Fedora/smbprint b/packaging/Fedora/smbprint new file mode 100644 index 00000000000..1c3959d49b5 --- /dev/null +++ b/packaging/Fedora/smbprint @@ -0,0 +1,84 @@ +#!/bin/sh +# This script is an input filter for printcap printing on a unix machine. It +# uses the smbclient program to print the file to the specified smb-based +# server and service. +# For example you could have a printcap entry like this +# +# smb:lp=/dev/null:sd=/usr/spool/smb:sh:if=/usr/local/samba/smbprint +# +# which would create a unix printer called "smb" that will print via this +# script. You will need to create the spool directory /usr/spool/smb with +# appropriate permissions and ownerships for your system. + +# Set these to the server and service you wish to print to +# In this example I have a WfWg PC called "lapland" that has a printer +# exported called "printer" with no password. + +# +# Script further altered by hamiltom@ecnz.co.nz (Michael Hamilton) +# so that the server, service, and password can be read from +# a /usr/var/spool/lpd/PRINTNAME/.config file. +# +# In order for this to work the /etc/printcap entry must include an +# accounting file (af=...): +# +# cdcolour:\ +# :cm=CD IBM Colorjet on 6th:\ +# :sd=/var/spool/lpd/cdcolour:\ +# :af=/var/spool/lpd/cdcolour/acct:\ +# :if=/usr/local/etc/smbprint:\ +# :mx=0:\ +# :lp=/dev/null: +# +# The /usr/var/spool/lpd/PRINTNAME/.config file should contain: +# share=PC_SERVER +# user="user" +# password="password" +# +# Please, do not modify the order in the file. +# Example: +# share=\\server\deskjet +# user="fred" +# password="" + +# +# The last parameter to the filter is the accounting file name. +# Extract the directory name from the file name. +# Concat this with /.config to get the config file. +# +eval acct_file=\${$#} +spool_dir=`dirname $acct_file` +config_file=$spool_dir/.config + +# Should read the following variables set in the config file: +# share +# hostip +# user +# password + +eval `cat $config_file` + +share=`echo $share | sed "s/[\]/\//g"` + +if [ "$user" != "" ]; then + usercmd="-U" +else + usercmd="" +fi + +if [ "$workgroup" != "" ]; then + workgroupcmd="-W" +else + workgroupcmd="" +fi + +if [ "$translate" = "yes" ]; then + command="translate ; print -" +else + command="print -" +fi +#echo $share $password $translate $x_command > /tmp/smbprint.log + +cat | /usr/bin/smbclient "$share" "$password" -E ${hostip:+-I} \ + $hostip -N -P $usercmd "$user" $workgroupcmd "$workgroup" \ + -c "$command" 2>/dev/null diff --git a/packaging/Fedora/smbusers b/packaging/Fedora/smbusers new file mode 100644 index 00000000000..ae3389f53f8 --- /dev/null +++ b/packaging/Fedora/smbusers @@ -0,0 +1,3 @@ +# Unix_name = SMB_name1 SMB_name2 ... +root = administrator admin +nobody = guest pcguest smbguest diff --git a/packaging/Fedora/swat.desktop b/packaging/Fedora/swat.desktop new file mode 100644 index 00000000000..0d7b4b5c48c --- /dev/null +++ b/packaging/Fedora/swat.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=Samba Configuration +Name[de]=Samba Konfiguration +Type=Application +Comment=Configure Samba with a web based interface +Exec=htmlview http://127.0.0.1:901/ +Terminal=false +Categories=X-Red-Hat-Extra;Application;System;X-Red-Hat-ServerConfig; diff --git a/packaging/Fedora/winbind.init b/packaging/Fedora/winbind.init new file mode 100644 index 00000000000..05e0eb4d006 --- /dev/null +++ b/packaging/Fedora/winbind.init @@ -0,0 +1,102 @@ +#!/bin/sh +# +# chkconfig: - 91 35 +# description: Starts and stops the Samba winbind daemon +# # +# pidfile: /var/cache/samba/winbind.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 0 +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 0 + +# Check that smb.conf exists. +[ -f /etc/samba/smb.conf ] || exit 0 + +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 -TERM + RETVAL=$? + [ $RETVAL -eq 0 ] \ + && && rm -f /var/run/nmbd.pid \ + && 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 +} + +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 1 +esac + +exit $? diff --git a/packaging/LSB/README b/packaging/LSB/README new file mode 100644 index 00000000000..4ff0b99d769 --- /dev/null +++ b/packaging/LSB/README @@ -0,0 +1,6 @@ +README.lsb - 1 July 2001 +------------------------ + +The files in this directory allow you to build an LSB-compliant +version of SAMBA using the RPM software and the LSB development +environment. diff --git a/packaging/LSB/lsb-samba.spec b/packaging/LSB/lsb-samba.spec new file mode 100644 index 00000000000..516eaa430eb --- /dev/null +++ b/packaging/LSB/lsb-samba.spec @@ -0,0 +1,100 @@ +# +# "$Id: lsb-samba.spec,v 1.2 2001/07/03 01:01:12 jra Exp $" +# +# Linux Standards Based RPM "spec" file for SAMBA. +# + +Summary: SAMBA +Name: lsb-samba +Version: 2.2.1 +Release: 0 +Copyright: GPL +Group: System Environment/Daemons +Source: ftp://ftp.samba.org/pub/samba/samba-%{version}.tar.gz +Url: http://www.samba.org +Packager: Michael Sweet <mike@easysw.com> +Vendor: SAMBA Team + +# Require the "lsb" package, which guarantees LSB compliance. +Requires: lsb + +# use BuildRoot so as not to disturb the version already installed +BuildRoot: /var/tmp/%{name}-root + +%description + +%prep +%setup + +%build +export LDFLAGS="-L/usr/lib/lsb --dynamic-linker=/lib/ld-lsb.so.1" + +./configure --with-fhs --prefix=/usr --sysconfdir=/etc \ + --sharedstatedir=/var --datadir=/usr/share \ + --with-configdir=/etc/samba \ + --with-swatdir=/usr/share/samba/swat + +# If we got this far, all prerequisite libraries must be here. +make + +%install +# Make sure the RPM_BUILD_ROOT directory exists. +rm -rf $RPM_BUILD_ROOT +mkdir $RPM_BUILD_ROOT + +make \ + BASEDIR=$RPM_BUILD_ROOT/usr \ + BINDIR=$RPM_BUILD_ROOT/usr/bin \ + CODEPAGEDIR=$RPM_BUILD_ROOT/usr/share/samba/codepages \ + CONFIGDIR=$RPM_BUILD_ROOT/etc/samba \ + INCLUDEDIR=$RPM_BUILD_ROOT/usr/include \ + LIBDIR=$RPM_BUILD_ROOT/usr/lib \ + LOCKDIR=$RPM_BUILD_ROOT/var/lock/samba \ + LOGFILEBASE=$RPM_BUILD_ROOT/var/log/samba \ + MANDIR=$RPM_BUILD_ROOT/usr/share/man \ + SBINDIR=$RPM_BUILD_ROOT/usr/sbin \ + SWATDIR=$RPM_BUILD_ROOT/usr/share/samba/swat \ + VARDIR=$RPM_BUILD_ROOT/var \ + install + +mkdir -p $RPM_BUILD_ROOT/etc/init.d +install -m 700 packaging/LSB/samba.sh /etc/init.d/samba + +mkdir -p $RPM_BUILD_ROOT/etc/samba +install -m 644 packaging/LSB/smb.conf /etc/samba + +mkdir -p $RPM_BUILD_ROOT/etc/xinetd.d +install -m 644 packaging/LSB/samba.xinetd /etc/xinetd.d/samba + +%post +/usr/lib/lsb/install_initd /etc/init.d/samba + +%preun +/usr/lib/lsb/remove_initd /etc/init.d/samba + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root) +%dir /etc/init.d +/etc/init.d/samba +%dir /etc/samba +%config(noreplace) /etc/samba/smb.conf +%dir /etc/samba/private +%dir /etc/xinetd.d +%config(noreplace) /etc/xinetd.d/samba +%dir /usr/bin +/usr/bin/* +%dir /usr/sbin +/usr/sbin/* +%dir /usr/share/man +/usr/share/man/* +%dir /usr/share/samba +/usr/share/samba/* +%dir /var/lock/samba +%dir /var/log/samba + +# +# End of "$Id: lsb-samba.spec,v 1.2 2001/07/03 01:01:12 jra Exp $". +# diff --git a/packaging/LSB/samba.sh b/packaging/LSB/samba.sh new file mode 100755 index 00000000000..99fa1b0117d --- /dev/null +++ b/packaging/LSB/samba.sh @@ -0,0 +1,80 @@ +#!/bin/sh +# +# "$Id: samba.sh,v 1.2 2001/07/03 01:01:12 jra Exp $" +# +# SAMBA startup (init) script for LSB-compliant systems. +# +# Provides: smbd nmbd +# Required-Start: 3 5 +# Required-Stop: 0 2 1 6 +# Default-Start: 3 5 +# Default-Stop: 0 2 1 6 +# Description: Starts and stops the SAMBA smbd and nmbd daemons \ +# used to provide SMB network services. +# + +# Source LSB function library. +. /lib/lsb/init-functions + +# Check that smb.conf exists. +if test ! -f /etc/samba/smb.conf; then + log_failure_msg "The smb.conf file does not exist." + exit 6 +fi + +# Make sure that smbd and nmbd exist... +if test ! -f /usr/sbin/nmbd -o ! -f /usr/sbin/smbd; then + log_failure_msg "The nmbd and/or smbd daemons are not installed." + exit 5 +fi + +# See how we were called. +case "$1" in + start) + start_daemon nmbd -D + start_daemon smbd -D + log_success_msg "Started SMB services." + ;; + + stop) + killproc smbd + killproc nmbd + log_success_msg "Shutdown SMB services." + ;; + + reload) + # smbd and nmbd automatically re-read the smb.conf file... + log_success_msg "Reload not necessary with SAMBA." + ;; + + status) + if test -z "`pidofproc smbd`"; then + log_success_msg "smbd is not running." + else + log_success_msg "smbd is running." + fi + if test -z "`pidofproc nmbd`"; then + log_success_msg "nmbd is not running." + else + log_success_msg "nmbd is running." + fi + ;; + + + restart | force-reload) + $0 stop + $0 start + ;; + + *) + echo "Usage: smb {start|stop|reload|force-reload|restart|status}" + exit 1 + ;; +esac + +# Return "success" +exit 0 + +# +# End of "$Id: samba.sh,v 1.2 2001/07/03 01:01:12 jra Exp $". +# diff --git a/packaging/LSB/samba.xinetd b/packaging/LSB/samba.xinetd new file mode 100644 index 00000000000..8c38b354218 --- /dev/null +++ b/packaging/LSB/samba.xinetd @@ -0,0 +1,15 @@ +# default: off +# description: SWAT is the Samba Web Admin Tool. Use swat \ +# to configure your Samba server. To use SWAT, \ +# connect to port 901 with your favorite web browser. +service swat +{ + port = 901 + socket_type = stream + wait = no + only_from = localhost + user = root + server = /usr/sbin/swat + log_on_failure += USERID + disable = yes +} diff --git a/packaging/LSB/smb.conf b/packaging/LSB/smb.conf new file mode 100644 index 00000000000..71ff9463884 --- /dev/null +++ b/packaging/LSB/smb.conf @@ -0,0 +1,290 @@ +# This is the main Samba configuration file. You should read the +# smb.conf(5) manual page in order to understand the options listed +# here. Samba has a huge number of configurable options (perhaps too +# many!) most of which are not shown in this example +# +# Any line which starts with a ; (semi-colon) or a # (hash) +# is a comment and is ignored. In this example we will use a # +# for commentry and a ; for parts of the config file that you +# may wish to enable +# +# NOTE: Whenever you modify this file you should run the command "testparm" +# to check that you have not made any basic syntactic errors. +# +#======================= Global Settings ===================================== +[global] + +# workgroup = NT-Domain-Name or Workgroup-Name + workgroup = MYGROUP + +# server string is the equivalent of the NT Description field + server string = Samba Server + +# This option is important for security. It allows you to restrict +# connections to machines which are on your local network. The +# following example restricts access to two C class networks and +# the "loopback" interface. For more examples of the syntax see +# the smb.conf man page +; hosts allow = 192.168.1. 192.168.2. 127. + +# if you want to automatically load your printer list rather +# than setting them up individually then you'll need this + printcap name = /etc/printcap + load printers = yes + +# It should not be necessary to spell out the print system type unless +# yours is non-standard. Currently supported print systems include: +# bsd, sysv, plp, lprng, aix, hpux, qnx +; printing = bsd + +# Uncomment this if you want a guest account, you must add this to /etc/passwd +# otherwise the user "nobody" is used +; guest account = pcguest + +# this tells Samba to use a separate log file for each machine +# that connects + log file = /var/log/samba/log.%m + +# Put a capping on the size of the log files (in Kb). + max log size = 50 + +# Security mode. Most people will want user level security. See +# security_level.txt for details. + security = user +# Use password server option only with security = server +; password server = <NT-Server-Name> + +# Password Level allows matching of _n_ characters of the password for +# all combinations of upper and lower case. +; password level = 8 +; username level = 8 + +# You may wish to use password encryption. Please read +# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation. +# Do not enable this option unless you have read those documents +; encrypt passwords = yes +; smb passwd file = /etc/samba/smbpasswd + +# The following are needed to allow password changing from Windows to +# update the Linux sytsem password also. +# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above. +# NOTE2: You do NOT need these to allow workstations to change only +# the encrypted SMB passwords. They allow the Unix password +# to be kept in sync with the SMB password. +; unix password sync = Yes +; passwd program = /usr/bin/passwd %u +; passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully* + +# Unix users can map to different SMB User names +; username map = /etc/samba/smbusers + +# Using the following line enables you to customise your configuration +# on a per machine basis. The %m gets replaced with the netbios name +# of the machine that is connecting +; include = /etc/samba/smb.conf.%m + +# Most people will find that this option gives better performance. +# See speed.txt and the manual pages for details + socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 + +# Configure Samba to use multiple interfaces +# If you have multiple network interfaces then you must list them +# here. See the man page for details. +; interfaces = 192.168.12.2/24 192.168.13.2/24 + +# Configure remote browse list synchronisation here +# request announcement to, or browse list sync from: +# a specific host or from / to a whole subnet (see below) +; remote browse sync = 192.168.3.25 192.168.5.255 +# Cause this host to announce itself to local subnets here +; remote announce = 192.168.1.255 192.168.2.44 + +# Browser Control Options: +# set local master to no if you don't want Samba to become a master +# browser on your network. Otherwise the normal election rules apply +; local master = no + +# OS Level determines the precedence of this server in master browser +# elections. The default value should be reasonable +; os level = 33 + +# Domain Master specifies Samba to be the Domain Master Browser. This +# allows Samba to collate browse lists between subnets. Don't use this +# if you already have a Windows NT domain controller doing this job +; domain master = yes + +# Preferred Master causes Samba to force a local browser election on startup +# and gives it a slightly higher chance of winning the election +; preferred master = yes + +# Use only if you have an NT server on your network that has been +# configured at install time to be a primary domain controller. +; domain controller = <NT-Domain-Controller-SMBName> + +# Enable this if you want Samba to be a domain logon server for +# Windows95 workstations. +; domain logons = yes + +# if you enable domain logons then you may want a per-machine or +# per user logon script +# run a specific logon batch file per workstation (machine) +; logon script = %m.bat +# run a specific logon batch file per username +; logon script = %U.bat + +# Where to store roving profiles (only for Win95 and WinNT) +# %L substitutes for this servers netbios name, %U is username +# You must uncomment the [Profiles] share below +; logon path = \\%L\Profiles\%U + +# All NetBIOS names must be resolved to IP Addresses +# 'Name Resolve Order' allows the named resolution mechanism to be specified +# the default order is "host lmhosts wins bcast". "host" means use the unix +# system gethostbyname() function call that will use either /etc/hosts OR +# DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf +# and the /etc/resolv.conf file. "host" therefore is system configuration +# dependant. This parameter is most often of use to prevent DNS lookups +# in order to resolve NetBIOS names to IP Addresses. Use with care! +# The example below excludes use of name resolution for machines that are NOT +# on the local network segment +# - OR - are not deliberately to be known via lmhosts or via WINS. +; name resolve order = wins lmhosts bcast + +# Windows Internet Name Serving Support Section: +# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server +; wins support = yes + +# WINS Server - Tells the NMBD components of Samba to be a WINS Client +# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both +; wins server = w.x.y.z + +# WINS Proxy - Tells Samba to answer name resolution queries on +# behalf of a non WINS capable client, for this to work there must be +# at least one WINS Server on the network. The default is NO. +; wins proxy = yes + +# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names +# via DNS nslookups. The built-in default for versions 1.9.17 is yes, +# this has been changed in version 1.9.18 to no. + dns proxy = no + +# Case Preservation can be handy - system default is _no_ +# NOTE: These can be set on a per share basis +; preserve case = no +; short preserve case = no +# Default case is normally upper case for all DOS files +; default case = lower +# Be very careful with case sensitivity - it can break things! +; case sensitive = no + +#============================ Share Definitions ============================== +[homes] + comment = Home Directories + browseable = no + writable = yes + +# Un-comment the following and create the netlogon directory for Domain Logons +; [netlogon] +; comment = Network Logon Service +; path = /home/netlogon +; guest ok = yes +; writable = no +; share modes = no + + +# Un-comment the following to provide a specific roving profile share +# the default is to use the user's home directory +;[Profiles] +; path = /home/profiles +; browseable = no +; guest ok = yes + + +# NOTE: If you have a BSD-style print system there is no need to +# specifically define each individual printer +[printers] + comment = All Printers + path = /var/spool/samba + browseable = no +# Set public = yes to allow user 'guest account' to print + guest ok = no + writable = no + printable = yes + +# This one is useful for people to share files +;[tmp] +; comment = Temporary file space +; path = /tmp +; read only = no +; public = yes + +# A publicly accessible directory, but read only, except for people in +# the "staff" group +;[public] +; comment = Public Stuff +; path = /home/samba +; public = yes +; read only = yes +; write list = @staff + +# Other examples. +# +# A private printer, usable only by fred. Spool data will be placed in fred's +# home directory. Note that fred must have write access to the spool directory, +# wherever it is. +;[fredsprn] +; comment = Fred's Printer +; valid users = fred +; path = /homes/fred +; printer = freds_printer +; public = no +; writable = no +; printable = yes + +# A private directory, usable only by fred. Note that fred requires write +# access to the directory. +;[fredsdir] +; comment = Fred's Service +; path = /usr/somewhere/private +; valid users = fred +; public = no +; writable = yes +; printable = no + +# a service which has a different directory for each machine that connects +# this allows you to tailor configurations to incoming machines. You could +# also use the %u option to tailor it by user name. +# The %m gets replaced with the machine name that is connecting. +;[pchome] +; comment = PC Directories +; path = /usr/pc/%m +; public = no +; writable = yes + +# A publicly accessible directory, read/write to all users. Note that all files +# created in the directory by users will be owned by the default user, so +# any user with access can delete any other user's files. Obviously this +# directory must be writable by the default user. Another user could of course +# be specified, in which case all files would be owned by that user instead. +;[public] +; path = /usr/somewhere/else/public +; public = yes +; only guest = yes +; writable = yes +; printable = no + +# The following two entries demonstrate how to share a directory so that two +# users can place files there that will be owned by the specific users. In this +# setup, the directory should be writable by both users and should have the +# sticky bit set on it to prevent abuse. Obviously this could be extended to +# as many users as required. +;[myshare] +; comment = Mary's and Fred's stuff +; path = /usr/somewhere/shared +; valid users = mary fred +; public = no +; writable = yes +; printable = no +; create mask = 0765 + + diff --git a/packaging/Mandrake/.cvsignore b/packaging/Mandrake/.cvsignore new file mode 100644 index 00000000000..ffcc2e7e5ee --- /dev/null +++ b/packaging/Mandrake/.cvsignore @@ -0,0 +1,2 @@ +makerpms.sh +samba2.spec diff --git a/packaging/Mandrake/README b/packaging/Mandrake/README new file mode 100644 index 00000000000..5ccfb1d22b3 --- /dev/null +++ b/packaging/Mandrake/README @@ -0,0 +1,11 @@ +Preparation Date: Sat Apr 14 2001 +Preparer: Gerald Carter <jerry@samba.org> + +Instructions: Preparing Samba Packages for Mandrake Linux 8.x +=============================================================== + +We provide support only for current versions of Mandrake Linux. + +To produce the RPMS simply type: + sh makerpms.sh + diff --git a/packaging/Mandrake/README.mandrake b/packaging/Mandrake/README.mandrake new file mode 100644 index 00000000000..83920f238f1 --- /dev/null +++ b/packaging/Mandrake/README.mandrake @@ -0,0 +1,117 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +The Mandrake samba spec file used for packaging for Mandrake and cooker +is now also used by the makerpms.sh script, and you can pass any options +that you would normally pass to rpm via the makerpms.sh script. + +Note that only release after 8.1 support passing options using +"--with <option>" syntax. The following options are available when +building with the script: + +- --with|--without ldap +- --with|--without acl +- --with|--without winbind +- --with|--without wins +- --with vscan +Using "--with vscan" requires that you place a copy of the samba-vscan +tarball (coverted to bz2 using bzme) from: +http://prdownloads.sourceforge.net/openantivirus/samba-vscan-0.2.5a.tar.gz?download in your rpm source directory: + +cp samba-vscan-0.2.5a.tar.gz `rpm --eval "%_sourcedir"` +bzme `rpm --eval "%_sourcedir"`/samba-vscan-0.2.5a.tar.gz + +When using "--with vscan" you will probably want to enable a virus scanner +also: +- --with fprot +- --with kaspersky +- --with mks +- --with openantivirus +- --with sophos +- --with symantec +- --with trend + +You may need to do additional setup for your virus scanner to get this to +work, please see ../../examples/VFS/<scanner>/INSTALL (after having started +a build with "sh makerpms.sh --with vscan") + +Note that only sophos has been tested with the spec, but the rest should work +(after the preparation). Reports of working scanners are welcome, and please +report any that do not work (preferably with a fix :-)). + +So, to build ldap-enable RPMs for with antivirus support with sophos, but +no acl support, use: +sh makerpms.sh --with ldap --with vscan --with sophos --without acl + +The same features can be enabled on Mandrake 7.2/8.0 by editing samba2.spec, +and changing the 0 to 1 to enable the option: + +%if %build_mdk80 +%define build_acl 0 +%define build_winbind 0 +%define build_wins 0 +%define build_ldap 0 +%endif + +Similar sections exist for the virus scanning options. + +(If you haven't rebuilt RPMs before, it is suggested that you take a +brief look through http://www.linux-mandrake.com/howtos/mdk-rpm/, +specifically sections 3.1 and 3.2) + +The defaults for Mandrake 8.1 and 8.2 are shown below: +%if %build_mdk82 +%define build_acl 1 +%define build_winbind 1 +%define build_wins 1 +%define build_ldap 0 +%endif + +%if %build_mdk81 +%define build_acl 1 +%define build_winbind 0 +%define build_wins 0 +%define build_ldap 0 +%endif + +Note that building with LDAP support will only allow you to use smbpasswd's +stored in ldap, not in the local smbpasswd file. From 2.2.5 onwards in the +2.2 tree, ldap-enable RPMs now carry an ldap modifier to indicate this (for +example, samba-server becomes samba-server-ldap). + +Building with acl requires that you have the acl development libraries. +The libraries are standard on 8.1 and 8.2. +ACLs can be used on Mandrake 8.0 with the updated kernel (to support XFS) +if you install the RPMs available at +http://ranger.dnsalias.com/mandrake/samba/RPMS/8.0/samba-2.2.1a_xfs/ + +Note that precompiled binaries of samba are also available on my site: +http://ranger.dnsalias.com/mandrake/samba +and that of Sylvestre Taburet: +http://people.mandrakesoft.com/~staburet/samba/ + +If you have any problems with these RPMs, please send email to both +bgmilne@cae.co.za and staburet@mandrakesoft.com + +These RPMs are provided as-is, are not official, and can not be +supported by Mandrakesoft. However, we will do our best to provide +reliable and well-packaged RPMS, since we use them on our own servers +and those of clients. + +This file is signed with my gpg key, a copy of my public key is available +at http://ranger.dnsalias.com/bgmilne.asc. The finger-print for this key +follows: +1024D/60D204A7 2919 E232 5610 A038 87B1 72D6 AC92 BA50 60D2 04A7 + +Recent posts by me on samba@samba.org have been signed with this key, +in case you really want to verify who I am to some extent. + +Buchan Milne +18 June 2002 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.0.6 (GNU/Linux) + +iD8DBQE9D2h3rJK6UGDSBKcRAhtJAKC0fVkIMETgRxccrwLBcKZKHllCIACeNcZ9 +bxGZSTOHs57ir3wFR+3s0XM= +=ifKf +-----END PGP SIGNATURE----- diff --git a/packaging/Mandrake/empty.patch b/packaging/Mandrake/empty.patch new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/packaging/Mandrake/empty.patch diff --git a/packaging/Mandrake/findsmb b/packaging/Mandrake/findsmb new file mode 100755 index 00000000000..f70d18dcbdc --- /dev/null +++ b/packaging/Mandrake/findsmb @@ -0,0 +1,141 @@ +#!/usr/bin/perl +# +# Prints info on all smb responding machines on a subnet. +# This script needs to be run on a machine without nmbd running and be +# run as root to get correct info from WIN95 clients. +# +# syntax: +# findsmb [subnet broadcast address] +# +# with no agrument it will list machines on the current subnet +# +# There will be a "+" in front of the workgroup name for machines that are +# local master browsers for that workgroup. There will be an "*" in front +# of the workgroup name for machines that are the domain master browser for +# that workgroup. +# + +$SAMBABIN = "/usr/bin"; + +for ($i = 0; $i < 2; $i++) { # test for -d option and broadcast address + $_ = shift; + if (m/-d|-D/) { + $DEBUG = 1; + } else { + if ($_) { + $BCAST = "-B $_"; + } + } +} + +sub ipsort # do numeric sort on last field of IP address +{ + @t1 = split(/\./,$a); + @t2 = split(/\./,$b); + @t1[3] <=> @t2[3]; +} + +# look for all machines that respond to a name lookup + +open(NMBLOOKUP,"$SAMBABIN/nmblookup $BCAST '*'|") || + die("Can't run nmblookup '*'.\n"); + +# get rid of all lines that are not a response IP address, +# strip everything but IP address and sort by last field in address + +@ipaddrs = sort ipsort grep(s/ \*<00>.*$//,<NMBLOOKUP>); + +# print header info + +print "\nIP ADDR NETBIOS NAME WORKGROUP/OS/VERSION $BCAST\n"; +print "---------------------------------------------------------------------\n"; + +foreach $ip (@ipaddrs) # loop through each IP address found +{ + $ip =~ s/\n//; # strip newline from IP address + +# find the netbios names registered by each machine + + open(NMBLOOKUP,"$SAMBABIN/nmblookup -r -A $ip|") || + die("Can't get nmb name list.\n"); + @nmblookup = <NMBLOOKUP>; + close NMBLOOKUP; + +# get the first <00> name + + @name = grep(/<00>/,@nmblookup); + $_ = @name[0]; + if ($_) { # we have a netbios name + if (/GROUP/) { # is it a group name + ($name, $aliases, $type, $length, @addresses) = + gethostbyaddr(pack('C4',split('\.',$ip)),2); + if (! $name) { # could not get name + $name = "unknown nis name"; + } + } else { + /(.{1,15})\s+<00>\s+/; + $name = $1; + } + +# do an smbclient command on the netbios name. + + open(SMB,"$SAMBABIN/smbclient -N -L $name -I $ip -U% |") || + die("Can't do smbclient command.\n"); + @smb = <SMB>; + close SMB; + + if ($DEBUG) { # if -d flag print results of nmblookup and smbclient + print "===============================================================\n"; + print @nmblookup; + print @smb; + } + +# look for the OS= string + + @info = grep(/OS=/,@smb); + $_ = @info[0]; + if ($_) { # we found response + s/Domain=|OS=|Server=|\n//g; # strip out descriptions to make line shorter + + } else { # no OS= string in response (WIN95 client) + +# for WIN95 clients get workgroup name from nmblookup response + @name = grep(/<00> - <GROUP>/,@nmblookup); + $_ = @name[0]; + if ($_) { + /(.{1,15})\s+<00>\s+/; + $_ = "[$1]"; + } else { + $_ = "Unknown Workgroup"; + } + } + +# see if machine registered a local master browser name + if (grep(/<1d>/,@nmblookup)) { + $master = '+'; # indicate local master browser + if (grep(/<1b>/,@nmblookup)) { # how about domain master browser? + $master = '*'; # indicate domain master browser + } + } else { + $master = ' '; # not a browse master + } + +# line up info in 3 columns + + print "$ip".' 'x(16-length($ip))."$name".' 'x(14-length($name))."$master"."$_\n"; + + } else { # no netbios name found +# try getting the host name + ($name, $aliases, $type, $length, @addresses) = + gethostbyaddr(pack('C4',split('\.',$ip)),2); + if (! $name) { # could not get name + $name = "unknown nis name"; + } + if ($DEBUG) { # if -d flag print results of nmblookup + print "===============================================================\n"; + print @nmblookup; + } + print "$ip".' 'x(16-length($ip))."$name\n"; + } +} + diff --git a/packaging/Mandrake/makerpms-cvs.sh b/packaging/Mandrake/makerpms-cvs.sh new file mode 100644 index 00000000000..08c4370b314 --- /dev/null +++ b/packaging/Mandrake/makerpms-cvs.sh @@ -0,0 +1,37 @@ +#!/bin/bash +# makerpms-cvs.sh +# A quick script to build RPMs from cvs to test packaging +# Buchan Milne <bgmilne@cae.co.za> + +[ $# -lt 1 ] && echo "Usage: $0 <Samba version>" && exit 1 + +VERSION=$1 +RELEASE=0.`date +%Y%m%d` +shift + +# Replace PRELEASE and PVERSION with release number in all files ending with +# .tmpl + +FILES=$(find . -name "*.tmpl" -type f) + +for i in $FILES;do + NEW=$(echo $i|sed -e 's/\.tmpl//g'); + cat $i |sed -e 's/PVERSION/'$VERSION'/g; s/PRELEASE/'$RELEASE'/g'> $NEW ; +done + +#Change up three directories, rename directory to samba-$VERSION, change back +#then run makerpms.sh + + +CURRENT=$(pwd) +pushd $(dirname $(dirname $(dirname $CURRENT))) +SAMBA_DIR=$(basename $(dirname $(dirname $CURRENT))) +mv $SAMBA_DIR samba-$VERSION +pushd samba-$VERSION/source +./autogen.sh +popd +pushd samba-$VERSION/packaging/Mandrake +sh makerpms.sh $@ +popd +mv samba-$VERSION $SAMBA_DIR +popd diff --git a/packaging/Mandrake/makerpms.sh.tmpl b/packaging/Mandrake/makerpms.sh.tmpl new file mode 100644 index 00000000000..5d06e2bbcca --- /dev/null +++ b/packaging/Mandrake/makerpms.sh.tmpl @@ -0,0 +1,77 @@ +#!/bin/sh +# Copyright (C) John H Terpstra 1998-2002 +# Updated for RPM 3 by Jochen Wiedmann, joe@ispsoft.de +# Changed for a generic tar file rebuild by abartlet@pcug.org.au +# Taken from Red Hat build area by JHT +# Changed by John H Terpstra to build on RH8.1 - should also work for earlier versions jht@samba.org +# Changes from Buchan Milne <bgmilne@cae.co.za> + +# The following allows environment variables to override the target directories +# the alternative is to have a file in your home directory calles .rpmmacros +# containing the following: +# %_topdir /home/mylogin/RPM +# + +# rpm --eval should always give a correct answer for this +SPECDIR=`rpm "$@" --eval "%{_specdir}"` +SRCDIR=`rpm "$@" --eval "%{_sourcedir}"` + +# At this point the (SPECDIR and) SRCDIR vaiables must have a value! + +USERID=`id -u` +GRPID=`id -g` +VERSION='PVERSION' + +RPMVER=`rpm --version | awk '{print $3}'` +echo The RPM Version on this machine is: $RPMVER + +case $RPMVER in + 2*) + echo Building for RPM v2.x + sed -e "s/MANDIR_MACRO/\%\{prefix\}\/man/g" < samba2.spec > samba.spec + ;; + 3*) + echo Building for RPM v3.x + sed -e "s/MANDIR_MACRO/\%\{prefix\}\/man/g" < samba2.spec > samba.spec + ;; + 4*) + echo Building for RPM v4.x + sed -e "s/MANDIR_MACRO/\%\{_mandir\}/g" < samba2.spec > samba.spec + ;; + *) + echo "Unknown RPM version: `rpm --version`" + exit 1 + ;; +esac + +( cd ../../source; if [ -f Makefile ]; then make distclean; fi ) +( cd ../../.. ; chown -R ${USERID}.${GRPID} samba-${VERSION} ) +echo "Compressing the source as bzip2, may take a while ..." +( cd ../../.. ; tar --exclude=CVS -cjf ${SRCDIR}/samba-${VERSION}.tar.bz2 samba-${VERSION} ) + +cp -av samba.spec ${SPECDIR} +# cp -a *.patch.bz2 *.xpm.bz2 smb.* samba.xinetd samba.log $SRCDIR +# Prepare to allow straight patches synced from Mandrake cvs: +# Updating of sources and patches can be done more easily and accurately +# by using info in the spec file. It won't work for files that use an rpm +# macro in their name, but that shouldn't be a problem. + +SOURCES=`awk '/^Source/ {print $2}' samba.spec |grep -v "%{"` +PATCHES=`awk '/^Patch/ {print $2}' samba.spec` + +for i in $PATCHES $SOURCES;do + # We have two cases to fix, one where it's bzip2'ed + # in the spec and not in CVS, one where it's bzip2'ed + # in CVS but not in the spec + [ -e $i ] && cp -av $i $SRCDIR + i_nobz2=`echo $i|sed -e 's/.bz2$//'` + i_bz2=$i.bz2 + [ -e $i_nobz2 ] && bzip2 -kf $i_nobz2 && mv -fv $i $SRCDIR + [ -e $i_bz2 ] && bunzip2 -kf $i_bz2 && mv -fv $i $SRCDIR +done + +echo Getting Ready to build release package +cd ${SPECDIR} +rpm -ba -v --clean --rmsource samba.spec $@ + +echo Done. diff --git a/packaging/Mandrake/mount.cifs.8 b/packaging/Mandrake/mount.cifs.8 new file mode 100644 index 00000000000..7ab1be305c2 --- /dev/null +++ b/packaging/Mandrake/mount.cifs.8 @@ -0,0 +1,181 @@ +.\" This manpage has been automatically generated by docbook2man +.\" from a DocBook document. This tool can be found at: +.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> +.\" Please send any bug reports, improvements, comments, patches, +.\" etc. to Steve Cheng <steve@ggi-project.org>. +.TH "MOUNT.CIFS" "8" "03 August 2002" "" "" +.SH NAME +mount.cifs \- mount using the Common Internet File System (CIFS) +.SH SYNOPSIS + +\fBmount.cifs\fR \fBservice\fR \fBmount-point\fR [ \fB-o options\fR] + +.SH "DESCRIPTION" +.PP +\fBmount.cifs\fR mounts a Linux CIFS filesystem. It +is usually invoked as \fBmount.cifs\fR by +the \fBmount(8)\fR command when using the +"-t cifs" option. This command only works in Linux, and the kernel must +support the cifs filesystem. The CIFS protocol is the successor to the +SMB protocol and is supported by most Windows servers and many other +commercial servers and Network Attached Storage appliances as well as +by the popular Open Source server Samba. +.PP +Options to \fBmount.cifs\fR are specified as a comma-separated +list of key=value pairs. It is possible to send options other +than those listed here, assuming that cifs supports them. If +you get mount failures, check your kernel log for errors on +unknown options. +.PP +\fBmount.cifs\fR is a daemon. After mounting it keeps running until +the mounted cifs is umounted. It will log things that happen +when in daemon mode using the "machine name" mount.cifs, so +typically this output will end up in +\fIlog.mount.cifs\fR. +.SH "OPTIONS" +.TP +\fBusername=<arg>\fR +specifies the username to connect as. If +this is not given, then the environment variable \fB USER\fR is used. This option can also take the +form "user%password" or "user/workgroup" or +"user/workgroup%password" to allow the password and workgroup +to be specified as part of the username. +.TP +\fBpassword=<arg>\fR +specifies the CIFS password. If this +option is not given then the environment variable +\fBPASSWD\fR is used. If it can find +no password \fBmount.cifs\fR will prompt +for a passeword, unless the guest option is +given. + +Note that password which contain the arguement delimiter +character (i.e. a comma ',') will failed to be parsed correctly +on the command line. However, the same password defined +in the PASSWD environment variable or a credentials file (see +below) will be read correctly. +.TP +\fBcredentials=<filename>\fR +specifies a file that contains a username +and/or password. The format of the file is: + + +.nf + username = <value> + password = <value> + +.fi + +This is preferred over having passwords in plaintext in a +shared file, such as \fI/etc/fstab\fR. Be sure to protect any +credentials file properly. +.TP +\fBuid=<arg>\fR +sets the uid that will own all files on +the mounted filesystem. +It may be specified as either a username or a numeric uid. +.TP +\fBgid=<arg>\fR +sets the gid that will own all files on +the mounted filesystem. +It may be specified as either a groupname or a numeric +gid. +.TP +\fBport=<arg>\fR +sets the remote cifs port number. By default +port 445 is tried then if no response port 139 is tried. +.TP +\fBfmask=<arg>\fR +sets the file mask. This determines the +permissions that remote files have in the local filesystem. +The default is based on the current umask. +.TP +\fBdmask=<arg>\fR +sets the directory mask. This determines the +permissions that remote directories have in the local filesystem. +The default is based on the current umask. +.TP +\fBdebug=<arg>\fR +sets the debug level. This is useful for +tracking down cifs connection problems. A suggested value to +start with is 4. If set too high there will be a lot of +output, possibly hiding the useful output. +.TP +\fBip=<arg>\fR +sets the destination host or IP address. +.TP +\fBdomain=<arg>\fR +sets the domain (workgroup) of the user +.TP +\fBguest\fR +don't prompt for a password +.TP +\fBro\fR +mount read-only +.TP +\fBrw\fR +mount read-write +.TP +\fBiocharset=<arg>\fR +sets the charset used by the Linux side for codepage +to charset translations (NLS). Argument should be the +name of a charset, like iso8859-1. (Note: only kernel +2.4.0 or later) +.TP +\fBcodepage=<arg>\fR +sets the codepage the server uses. See the iocharset +option. Example value cp850. (Note: only kernel 2.4.0 +or later) +.TP +\fBttl=<arg>\fR +how long a directory listing is cached in milliseconds +(also affects visibility of file size and date +changes). A higher value means that changes on the +server take longer to be noticed but it can give +better performance on large directories, especially +over long distances. Default is 1000ms but something +like 10000ms (10 seconds) is probably more reasonable +in many cases. +(Note: only kernel 2.4.2 or later) +.SH "ENVIRONMENT VARIABLES" +.PP +The variable \fBUSER\fR may contain the username of the +person using the client. This information is used only if the +protocol level is high enough to support session-level +passwords. The variable can be used to set both username and +password by using the format username%password. +.PP +The variable \fBPASSWD\fR may contain the password of the +person using the client. This information is used only if the +protocol level is high enough to support session-level +passwords. +.PP +The variable \fBPASSWD_FILE\fR may contain the pathname +of a file to read the password from. A single line of input is +read and used as the password. +.SH "BUGS" +.PP +Passwords and other options containing , can not be handled. +For passwords an alternative way of passing them is in a credentials +file or in the PASSWD environment. +.PP +The credentials file does not handle usernames or passwords with +leading space. +.PP +Note that the typical response to a bug report is suggestion +to try the latest version first. So please try doing that first, +and always include which versions you use of relevant software +when reporting bugs (minimum: samba, kernel, distribution) +.SH "SEE ALSO" +.PP +Documentation/filesystems/cifs.txt in the linux kernel +source tree may contain additional options and information. +.SH "AUTHOR" +.PP +Steve French +The syntax and manpage were loosely based on that of smbmount. +.PP +The current maintainer of the Linux cifs vfs and the userspace +tool \fBmount.cifs\fR is Steve French <URL:mailto:sfrench@samba.org>. +The SAMBA Mailing list <URL:mailto:samba@samba.org> +is the preferred place to ask questions regarding these programs. diff --git a/packaging/Mandrake/samba-2.2.0-buildroot.patch b/packaging/Mandrake/samba-2.2.0-buildroot.patch new file mode 100644 index 00000000000..72091a13bcb --- /dev/null +++ b/packaging/Mandrake/samba-2.2.0-buildroot.patch @@ -0,0 +1,15 @@ +--- samba-2.2.0/source/script/installbin.sh Fri Jan 12 21:28:02 2001 ++++ samba-2.2.0/source/script/installbin.sh.207 Thu Apr 19 09:40:57 2001 +@@ -33,9 +33,9 @@ + chmod $INSTALLPERMS $BINDIR/$p2 + + # this is a special case, mount needs this in a specific location +- if [ $p2 = smbmount ]; then +- ln -sf $BINDIR/$p2 /sbin/mount.smbfs +- fi ++ #if [ $p2 = smbmount ]; then ++ # ln -sf $BINDIR/$p2 /sbin/mount.smbfs ++ #fi + done + + diff --git a/packaging/Mandrake/samba-3.0-smbmount-sbin.patch b/packaging/Mandrake/samba-3.0-smbmount-sbin.patch new file mode 100644 index 00000000000..586fb3cff9c --- /dev/null +++ b/packaging/Mandrake/samba-3.0-smbmount-sbin.patch @@ -0,0 +1,11 @@ +--- samba-3.0alpha1/source/client/smbmount.c.orig Fri Nov 30 02:29:22 2001 ++++ samba-3.0alpha1/source/client/smbmount.c Thu Dec 6 00:48:57 2001 +@@ -468,7 +468,7 @@ + if (sys_fork() == 0) { + char *smbmnt_path; + +- asprintf(&smbmnt_path, "%s/smbmnt", dyn_BINDIR); ++ asprintf(&smbmnt_path, "%s/smbmnt", dyn_SBINDIR); + + if (file_exist(smbmnt_path, NULL)) { + execv(smbmnt_path, args); diff --git a/packaging/Mandrake/samba-print-pdf.sh b/packaging/Mandrake/samba-print-pdf.sh new file mode 100644 index 00000000000..973bb4f90ee --- /dev/null +++ b/packaging/Mandrake/samba-print-pdf.sh @@ -0,0 +1,111 @@ +#!/bin/bash +# samba-print-pdf +# This is a script which allows you to set up a virtual printer on samba +# which will take the file (generated by a postscript filter on windows) +# and turn it into a PDF, informing the user of where it is when it +# is done +# +# (c) Buchan Milne <bgmilne@cae.co.za> 2002 +# License: GPLv2 +# Changelog +# v0.0.6 20030428 +# - Allow options passed as env. variables from print command +# - Inline and simplify sed (use tr) clean script +# - Ensure file arrives in PREFIX even if TEMP is used without provided name +# - Changes from Joshua M. Schmidlkofer <joshua@imr-net.com> 20030425 +# - Debugging, adjustments, and corrections. +# - Stupid sed sanitizing script. [probably horribly inefficient also]. +# - Temp file usage cleanup. +# v0.0.5 20020723 +# - Add support for preset settings +# - Allow passing of filename provided by client as final filename +# +# Arguments: +# $1 = file (usually passed with %s from samba) +# $2 = unix prefix to where to place the file (~%u should work) +# $3 = windows prefix to the same location (//%L/%u should work) +# $4 = user/computer to send a notification to (%u or %m) +# $5 = IP address of client (%I) +# $6 = Name of destination file without extension (%J) +# $7 = PDF setting (prepress,print,screen etc) +# +# If you want to customise any of the following configuration defaults, +# you can place them in the file /etc/samba/print-pdf.conf. +# If you need to modify anything in this script, please provide me with your +# changes, preferably in such a way that the changes are configurable. + +PS2PDF=ps2pdf13 +OPTIONS="-dAutoFilterColorImages=false -sColorImageFilter=FlateEncode" +#Values taken from arguments: +INPUT=$1 +PREFIX="$2" +WINBASE=$(echo "$3"|sed -e 's,/,\\\\,g') +#NAME=`echo "$6"|sed -e 's/[&/:{}\\\[<>$#@*^!?=|]/-/g;s/\]/-/g'` +NAME=`echo "$6"|tr '[:punct:]' '[-*]'` + +# Source config file if it exists: +CONFFILE=/etc/samba/print-pdf.conf +[ -e $CONFFILE ] && . $CONFFILE + +#Values not taken as arguments, could be set via env. vars (?) or config file +KEEP_PS=${KEEP_PS=0} +PERMS=${PERMS=640} +BASEFILE=${BASEFILE=pdf-service} +TEMP="${TEMP=$2}" +UMASK=${UMASK=006} + +#Make sure that destination directory exists +mkdir -p "$PREFIX" + +INFILE=$(basename $INPUT) + +umask $UMASK + +[ -n "$NAME" ] && TEMP="$PREFIX" + +#make a temp file to use for the output of the PDF +OUTPUT=`mktemp -q $TEMP/$BASEFILE-XXXXXX` +if [ $? -ne 0 ]; then + echo "$0: Can't create temp file $TEMP/$OUTPUT, exiting..." + exit 1 +fi +if [ -n "$NAME" ]; then + FINALOUTPUT="$PREFIX/$NAME" +else + FINALOUTPUT="$OUTPUT" +fi +if [ -n "$7" ]; then + OPTIONS="$OPTIONS -dPDFSETTINGS=/${7#pdf-}" +else + OPTIONS="$OPTIONS -dPDFSETTINGS=/default" +fi + +WIN_OUTPUT="$WINBASE\\"`basename "$FINALOUTPUT"` +#mv "$INPUT" "$INPUT.ps";INPUT="$INPUT.ps" + +# create the pdf +$PS2PDF $OPTIONS "$INPUT" "$OUTPUT.pdf" >/dev/null 2>&1 +mv -f "${OUTPUT}.pdf" "${FINALOUTPUT}".pdf + +# Generate a message to send to the user, and deal with the original file: +MESSAGE=$(echo "Your PDF file has been created as $WIN_OUTPUT.pdf\n") + + +# Cleanup +if [ $KEEP_PS != 0 ];then + mv -f $INPUT "${FINALOUTPUT}".ps + MESSAGE=$(echo "$MESSAGE and your postscript file as $WIN_OUTPUT.ps") + # Fix permissions on the generated files + chmod $PERMS "${FINALOUTPUT}".ps "${FINALOUTPUT}".pdf +else + rm -f $INPUT + # Fix permissions on the generated files + chmod $PERMS "${FINALOUTPUT}".pdf +fi + +#Remove empty file from mktemp: +rm -f $OUTPUT + +# Send notification to user +echo -e $MESSAGE|smbclient -M $4 -I $5 -U "PDF Generator" >/dev/null 2>&1 + diff --git a/packaging/Mandrake/samba-slapd-include.conf b/packaging/Mandrake/samba-slapd-include.conf new file mode 100644 index 00000000000..9c065b6f737 --- /dev/null +++ b/packaging/Mandrake/samba-slapd-include.conf @@ -0,0 +1,15 @@ +# You should either include this file into your +# /etc/openldap/slapd.conf, or add the contents (after editing), inside +# the db definition your samba server will use. + + +# Index the rid for samba: +index rid eq + + +# Basic samba acl: +access to attrs=lmPassword,ntPassword + by dn="cn=root,dc=mydomain,dc=com" write + by dn="uid=root,ou=People,dc=mydomain,dc=com" write + by * none + diff --git a/packaging/Mandrake/samba.log b/packaging/Mandrake/samba.log new file mode 100644 index 00000000000..4e8b44b60e7 --- /dev/null +++ b/packaging/Mandrake/samba.log @@ -0,0 +1,15 @@ +/var/log/samba/log.nmb { + notifempty + missingok + postrotate + /usr/bin/killall -HUP nmbd + endscript +} + +/var/log/samba/log.smb { + notifempty + missingok + postrotate + /usr/bin/killall -HUP smbd + endscript +} diff --git a/packaging/Mandrake/samba.pamd b/packaging/Mandrake/samba.pamd new file mode 100644 index 00000000000..30912de1726 --- /dev/null +++ b/packaging/Mandrake/samba.pamd @@ -0,0 +1,5 @@ +#%PAM-1.0 +auth required /lib/security/pam_nologin.so +auth required /lib/security/pam_stack.so service=system-auth +account required /lib/security/pam_stack.so service=system-auth +session required /lib/security/pam_stack.so service=system-auth diff --git a/packaging/Mandrake/samba.xinetd b/packaging/Mandrake/samba.xinetd new file mode 100644 index 00000000000..59910336bba --- /dev/null +++ b/packaging/Mandrake/samba.xinetd @@ -0,0 +1,15 @@ +# default: on +# description: SWAT is the Samba Web Admin Tool. Use swat \ +# to configure your Samba server. To use SWAT, \ +# connect to port 901 with your favorite web browser. +service swat +{ + port = 901 + socket_type = stream + wait = no + only_from = 127.0.0.1 + user = root + server = /usr/sbin/swat + log_on_failure += USERID + disable = no +} diff --git a/packaging/Mandrake/samba2.spec.tmpl b/packaging/Mandrake/samba2.spec.tmpl new file mode 100644 index 00000000000..127aee48d8e --- /dev/null +++ b/packaging/Mandrake/samba2.spec.tmpl @@ -0,0 +1,2344 @@ +# Note that this file exists in Mandrake packaging cvs (as samba3.spec) +# and samba cvs (as packaging/Mandrake/samba2.spec.tmpl). +# Keep in mind that any changes should take both locations into account +# Considerable effort has gone into making this possible, so that only +# one spec file is maintained, please don't break it. +# It should be possible, without any changes to this file, to build +# binary packages on most recent Mandrake releases: +# 1)from official source releases, using 'cd packaging/Mandrake; sh makerpms.sh' +# 2)from cvs snapshots, using 'cd packaging/Mandrake; sh makerpms-cvs.sh <ver>' +# 3)using official source releases and updated Mandrake packaging, by +# 'rpm -ba samba.spec' +# As such, any sources or patches used in a build from a samba release or +# cvs should be submitted for inclusion in samba cvs. + +%define pkg_name samba +%define ver 3.0.1pre3 +%define rel 5mdk +%define vscanver 0.3.3beta1 +%define libsmbmajor 0 + +%{!?lib: %global lib lib} +%{!?mklibname: %global mklibname(ds) %lib%{1}%{?2:%{2}}%{?3:_%{3}}%{-s:-static}%{-d:-devel}} + +%define libname %mklibname smbclient %libsmbmajor + +# Version and release replaced by samba-team at release from samba cvs +%define pversion PVERSION +%define prelease PRELEASE + +#Check to see if p(version|release) has been replaced (1 if replaced) +%define have_pversion %(if [ "%pversion" = `echo "pversion" |tr '[:lower:]' '[:upper:]'` ];then echo 0; else echo 1; fi) +%define have_prelease %(if [ "%prelease" = `echo "prelease" |tr '[:lower:]' '[:upper:]'` ];then echo 0; else echo 1; fi) + +%if %have_pversion +%define source_ver %{pversion} +# Don't abort for stupid reasons on builds from tarballs: +%global _unpackaged_files_terminate_build 0 +%global _missing_doc_files_terminate_build 0 +%else +%define source_ver %{ver} +%endif + +# We might have a prerelease: +%define have_pre %(echo %source_ver|awk '{p=0} /[a-z,A-Z][a-z,A-Z]/ {p=1} {print p}') +%if %have_pre +%define pre_ver %(perl -e '$name="%source_ver"; print ($name =~ /(.*?)[a-z]/);') +%define pre_pre %(echo %source_ver|sed -e 's/%pre_ver//g') +%endif + +# Check to see if we are running a build from a tarball release from samba.org +# (%have_pversion) If so, disable vscan, unless explicitly requested +# (--with vscan). +%define build_vscan 1 +%if %have_pversion +%define build_vscan 0 +%{?_with_vscan: %define build_vscan 1} +%endif + +# We now do detection of the Mandrake release we are building on: +#%define build_cooker %(if [ `awk '{print $3}' /etc/mandrake-release` = "Cooker" ];then echo 1; else echo 0; fi) +#%define build_cooker %(if [[ `cat /etc/mandrake-release|grep Cooker` ]];then echo 1; else echo 0; fi) +%define build_mdk100 %(if [ `awk '{print $4}' /etc/mandrake-release` = 10.0 ];then echo 1; else echo 0; fi) +%define build_mdk92 %(if [ `awk '{print $4}' /etc/mandrake-release` = 9.2 ];then echo 1; else echo 0; fi) +%define build_mdk91 %(if [ `awk '{print $4}' /etc/mandrake-release` = 9.1 ];then echo 1; else echo 0; fi) +%define build_mdk90 %(if [ `awk '{print $4}' /etc/mandrake-release` = 9.0 ];then echo 1; else echo 0; fi) +%define build_mdk82 %(if [ `awk '{print $4}' /etc/mandrake-release` = 8.2 ];then echo 1; else echo 0; fi) +%define build_mdk81 %(if [ `awk '{print $4}' /etc/mandrake-release` = 8.1 ];then echo 1; else echo 0; fi) +%define build_mdk80 %(if [ `awk '{print $4}' /etc/mandrake-release` = 8.0 ];then echo 1; else echo 0; fi) +%define build_mdk72 %(if [ `awk '{print $4}' /etc/mandrake-release` = 7.2 ];then echo 1; else echo 0; fi) +%define build_non_default 0 + +# Default options +%define build_alternatives 0 +%define build_system 0 +%define build_acl 1 +%define build_winbind 1 +%define build_wins 1 +%define build_ldap 0 +%define build_ads 1 +%define build_scanners 0 +# CUPS supports functionality for 'printcap name = cups' (9.0 and later): +%define build_cupspc 0 +# %_{pre,postun}_service are provided by rpm-helper in 9.0 and later +%define have_rpmhelper 1 + +# Set defaults for each version +%if %build_mdk100 +%define build_system 1 +%define build_alternatives 1 +%define build_cupspc 1 +%endif + +%if %build_mdk92 +%define build_alternatives 1 +%define build_cupspc 1 +%endif + +%if %build_mdk91 +%define build_cupspc 1 +%endif + +%if %build_mdk90 +%endif + +%if %build_mdk82 +%define have_rpmhelper 0 +%endif + +%if %build_mdk81 +%define build_winbind 0 +%define build_wins 0 +%define have_rpmhelper 0 +%endif + +%if %build_mdk80 +%define build_acl 0 +%define build_winbind 0 +%define build_wins 0 +%define build_ads 0 +%define have_rpmhelper 1 +%endif + +%if %build_mdk72 +%define build_acl 0 +%define build_winbind 0 +%define build_wins 0 +%define build_ads 0 +%define have_rpmhelper 1 +%endif + + +# Allow commandline option overrides (borrowed from Vince's qmail srpm): +# To use it, do rpm [-ba|--rebuild] --with 'xxx' +# Check if the rpm was built with the defaults, otherwise we inform the user +%define build_non_default 0 +%{?_with_system: %global build_system 1} +%{?_without_system: %global build_system 0} +%{?_with_acl: %global build_acl 1} +%{?_with_acl: %global build_non_default 1} +%{?_without_acl: %global build_acl 0} +%{?_without_acl: %global build_non_default 1} +%{?_with_winbind: %global build_winbind 1} +%{?_with_winbind: %global build_non_default 1} +%{?_without_winbind: %global build_winbind 0} +%{?_without_winbind: %global build_non_default 1} +%{?_with_wins: %global build_wins 1} +%{?_with_wins: %global build_non_default 1} +%{?_without_wins: %global build_wins 0} +%{?_without_wins: %global build_non_default 1} +%{?_with_ldap: %global build_ldap 1} +%{?_with_ldap: %global build_non_default 1} +%{?_without_ldap: %global build_ldap 0} +%{?_without_ldap: %global build_non_default 1} +%{?_with_ads: %global build_ads 1} +%{?_with_ads: %global build_non_default 1} +%{?_without_ads: %global build_ads 0} +%{?_without_ads: %global build_non_default 1} +%{?_with_scanners: %global build_scanners 1} +%{?_with_scanners: %global build_non_default 1} + +# As if that weren't enough, we're going to try building with antivirus +# support as an option also +%define build_fprot 0 +%define build_kaspersky 0 +%define build_mks 0 +%define build_openav 0 +%define build_sophos 0 +%define build_symantec 0 +%define build_trend 0 +%if %build_vscan && %build_scanners +#These can be enabled here by default +# (kaspersky requires their library present) +%define build_fprot 1 +%define build_mks 1 +%define build_openav 1 +%define build_sophos 1 +%define build_trend 1 +%endif +%if %build_vscan +%{?_with_fprot: %{expand: %%global build_fprot 1}} +%{?_with_kaspersky: %{expand: %%global build_kaspersky 1}} +%{?_with_mks: %{expand: %%global build_mks 1}} +%{?_with_openav: %{expand: %%global build_openav 1}} +%{?_with_sophos: %{expand: %%global build_sophos 1}} +#%{?_with_symantec: %{expand: %%global build_symantec 1}} +%{?_with_trend: %{expand: %%global build_trend 1}} +%global vscandir samba-vscan-%{vscanver} +%endif +%global vfsdir examples.bin/VFS + +#Standard texts for descriptions: +%define message_bugzilla() %(echo -e -n "Please file bug reports for this package at Mandrake bugzilla \\n(http://qa.mandrakesoft.com) under the product name %{1}") +%define message_system %(echo -e -n "NOTE: These packages of samba-%{version}, are provided, parallel installable\\nwith samba-2.2.x, to allow easy migration from samba-2.2.x to samba-%{version},\\nbut are not officially supported") + +#check gcc version to disable some optimisations on gcc-3.3.1 +%define gcc331 %(gcc -dumpversion|awk '{if ($1>3.3) print 1; else print 0}') + +#Define sets of binaries that we can use in globs and loops: +%global commonbin net,ntlm_auth,rpcclient,smbcacls,smbcquotas,smbpasswd,smbtree,testparm,testprns + +%global serverbin editreg,pdbedit,profiles,smbcontrol,smbstatus,tdbbackup,tdbdump +%global serversbin nmbd,samba,smbd,mkntpwd + +%global clientbin findsmb,nmblookup,smbclient,smbmnt,smbmount,smbprint,smbspool,smbtar,smbumount +%global client_bin mount.cifs +%global client_sbin mount.smb,mount.smbfs + +%global testbin debug2html,smbtorture,msgtest,masktest,locktest,locktest2,nsstest,vfstest + +%ifarch alpha +%define build_expsam xml +%else +%define build_expsam mysql,xml +%endif + +#Workaround missing macros in 8.x: +%{!?perl_vendorlib: %{expand: %%global perl_vendorlib %{perl_sitearch}/../}} + +# Determine whether this is the system samba or not. +%if %build_system +%define samba_major %{nil} +%else +%define samba_major 3 +%endif +# alternatives_major is %{nil} if we aren't system and not using alternatives +%if !%build_system || %build_alternatives +%define alternative_major 3 +%else +%define alternative_major %{nil} +%endif + +Summary: Samba SMB server. +Name: %{pkg_name}%{samba_major} + +%if %have_pre +Version: %{pre_ver} +%else +Version: %{source_ver} +%endif + +%if %have_prelease && !%have_pre +Release: 1.%{prelease}mdk +%endif +%if %have_prelease && %have_pre +Release: 0.%{pre_pre}.%{prelease}mdk +%endif +%if !%have_prelease && !%have_pre +Release: %{rel} +%endif +%if !%have_prelease && %have_pre +Release: 0.%{pre_pre}.%{rel} +%endif + +License: GPL +Group: System/Servers +Source: ftp://samba.org/pub/samba/samba-%{source_ver}.tar.bz2 +URL: http://www.samba.org +Source1: samba.log +Source3: samba.xinetd +Source4: swat_48.png.bz2 +Source5: swat_32.png.bz2 +Source6: swat_16.png.bz2 +Source7: README.%{name}-mandrake-rpm +%if %build_vscan +Source8: samba-vscan-%{vscanver}.tar.bz2 +%endif +Source10: samba-print-pdf.sh.bz2 +Patch1: smbw.patch.bz2 +Patch4: samba-3.0-smbmount-sbin.patch.bz2 +%if !%have_pversion +# Version specific patches: current version +%else +# Version specific patches: upcoming version +%endif +# Limbo patches (applied to prereleases, but not preleases, ie destined for +# samba CVS) +%if %have_pversion && %have_pre +%endif +Requires: pam >= 0.64, samba-common = %{version} +BuildRequires: pam-devel readline-devel libncurses-devel popt-devel +BuildRequires: libxml2-devel +%ifnarch alpha +BuildRequires: mysql-devel +%endif +%if %build_acl +BuildRequires: libacl-devel +%endif +%if %build_mdk72 +BuildRequires: cups-devel +%else +BuildRequires: libcups-devel +%endif +BuildRequires: libldap-devel +%if %build_ads +BuildRequires: libldap-devel krb5-devel +%endif +BuildRoot: %{_tmppath}/%{name}-%{version}-root +Prefix: /usr +Prereq: /sbin/chkconfig /bin/mktemp /usr/bin/killall +Prereq: fileutils sed /bin/grep + +%description +Samba provides an SMB server which can be used to provide +network services to SMB (sometimes called "Lan Manager") +clients, including various versions of MS Windows, OS/2, +and other Linux machines. Samba also provides some SMB +clients, which complement the built-in SMB filesystem +in Linux. Samba uses NetBIOS over TCP/IP (NetBT) protocols +and does NOT need NetBEUI (Microsoft Raw NetBIOS frame) +protocol. + +Samba-3.0 features working NT Domain Control capability and +includes the SWAT (Samba Web Administration Tool) that +allows samba's smb.conf file to be remotely managed using your +favourite web browser. For the time being this is being +enabled on TCP port 901 via xinetd. SWAT is now included in +it's own subpackage, samba-swat. + +Please refer to the WHATSNEW.txt document for fixup information. +This binary release includes encrypted password support. + +Please read the smb.conf file and ENCRYPTION.txt in the +docs directory for implementation details. +%if %have_pversion +%message_bugzilla samba3 +%endif +%if !%build_system +%message_system +%endif +%if %build_non_default +WARNING: This RPM was built with command-line options. Please +see README.%{name}-mandrake-rpm in the documentation for +more information. +%endif + +%package server +URL: http://www.samba.org +Summary: Samba (SMB) server programs. +Requires: %{name}-common = %{version} +%if %have_rpmhelper +PreReq: rpm-helper +%endif +Group: Networking/Other +%if %build_system +Provides: samba +Obsoletes: samba +Provides: samba-server-ldap +Obsoletes: samba-server-ldap +Provides: samba3-server +Obsoletes: samba3-server +%else +#Provides: samba-server +%endif + +%description server +Samba-server provides a SMB server which can be used to provide +network services to SMB (sometimes called "Lan Manager") +clients. Samba uses NetBIOS over TCP/IP (NetBT) protocols +and does NOT need NetBEUI (Microsoft Raw NetBIOS frame) +protocol. + +Samba-3.0 features working NT Domain Control capability and +includes the SWAT (Samba Web Administration Tool) that +allows samba's smb.conf file to be remotely managed using your +favourite web browser. For the time being this is being +enabled on TCP port 901 via xinetd. SWAT is now included in +it's own subpackage, samba-swat. + +Please refer to the WHATSNEW.txt document for fixup information. +This binary release includes encrypted password support. + +Please read the smb.conf file and ENCRYPTION.txt in the +docs directory for implementation details. +%if %have_pversion +%message_bugzilla samba3-server +%endif +%if !%build_system +%message_system +%endif + +%package client +URL: http://www.samba.org +Summary: Samba (SMB) client programs. +Group: Networking/Other +Requires: %{name}-common = %{version} +%if %build_alternatives +#Conflicts: samba-client < 2.2.8a-9mdk +%endif +%if %build_system +Provides: samba3-client +Obsoletes: samba3-client +Obsoletes: smbfs +%else +#Provides: samba-client +%endif +%if !%build_system && %build_alternatives +Provides: samba-client +%endif + +%description client +Samba-client provides some SMB clients, which complement the built-in +SMB filesystem in Linux. These allow the accessing of SMB shares, and +printing to SMB printers. +%if %have_pversion +%message_bugzilla samba3-client +%endif +%if !%build_system +%message_system +%endif + +%package common +URL: http://www.samba.org +Summary: Files used by both Samba servers and clients. +Group: System/Servers +%if %build_system +Provides: samba-common-ldap +Obsoletes: samba-common-ldap +Provides: samba3-common +Obsoletes: samba3-common +%else +#Provides: samba-common +%endif + +%description common +Samba-common provides files necessary for both the server and client +packages of Samba. +%if %have_pversion +%message_bugzilla samba3-common +%endif +%if !%build_system +%message_system +%endif + +%package doc +URL: http://www.samba.org +Summary: Documentation for Samba servers and clients. +Group: System/Servers +Requires: %{name}-common = %{version} +%if %build_system +Obsoletes: samba3-doc +Provides: samba3-doc +%else +#Provides: samba-doc +%endif + +%description doc +Samba-doc provides documentation files for both the server and client +packages of Samba. +%if %have_pversion +%message_bugzilla samba3-doc +%endif +%if !%build_system +%message_system +%endif + +%package swat +URL: http://www.samba.org +Summary: The Samba Web Administration Tool. +Requires: %{name}-server = %{version} +Requires: xinetd +Group: System/Servers +%if %build_system +Provides: samba-swat-ldap +Obsoletes: samba-swat-ldap +Provides: samba3-swat +Obsoletes: samba3-swat +%else +#Provides: samba-swat +%endif + +%description swat +SWAT (the Samba Web Administration Tool) allows samba's smb.conf file +to be remotely managed using your favourite web browser. For the time +being this is being enabled on TCP port 901 via xinetd. Note that +SWAT does not use SSL encryption, nor does it preserve comments in +your smb.conf file. Webmin uses SSL encryption by default, and +preserves comments in configuration files, even if it does not display +them, and is therefore the preferred method for remotely managing +Samba. +%if %have_pversion +%message_bugzilla samba3-swat +%endif +%if !%build_system +%message_system +%endif + +%if %build_winbind +%package winbind +URL: http://www.samba.org +Summary: Samba-winbind daemon, utilities and documentation +Group: System/Servers +Requires: %{name}-common = %{version} +%endif +%if %build_winbind && !%build_system +Conflicts: samba-winbind +%endif +%if %build_winbind +%description winbind +Provides the winbind daemon and testing tools to allow authentication +and group/user enumeration from a Windows or Samba domain controller. +%endif +%if %have_pversion +%message_bugzilla samba3-winbind +%endif +%if !%build_system +%message_system +%endif + +%if %build_wins +%package -n nss_wins%{samba_major} +URL: http://www.samba.org +Summary: Name Service Switch service for WINS +Group: System/Servers +Requires: %{name}-common = %{version} +PreReq: glibc +%endif +%if %build_wins && !%build_system +Conflicts: nss_wins +%endif +%if %build_wins +%description -n nss_wins%{samba_major} +Provides the libnss_wins shared library which resolves NetBIOS names to +IP addresses. +%endif +%if %have_pversion +%message_bugzilla nss_wins3 +%endif +%if !%build_system +%message_system +%endif + +%if %{?_with_test:1}%{!?_with_test:0} +%package test +URL: http://www.samba.org +Summary: Debugging and benchmarking tools for samba +Group: System/Servers +Requires: %{name}-common = %{version} +%endif +%if %build_system && %{?_with_test:1}%{!?_with_test:0} +Provides: samba3-test samba3-debug +Obsoletes: samba3-test samba3-debug +%endif +%if !%build_system && %{?_with_test:1}%{!?_with_test:0} +Provides: samba-test samba3-debug +Obsoletes: samba3-debug +%endif +%if %{?_with_test:1}%{!?_with_test:0} + +%description test +This package provides tools for benchmarking samba, and debugging +the correct operation of tools against smb servers. +%endif + +%if %build_system +%package -n %{libname} +URL: http://www.samba.org +Summary: SMB Client Library +Group: System/Libraries +Provides: libsmbclient + +%description -n %{libname} +This package contains the SMB client library, part of the samba +suite of networking software, allowing other software to access +SMB shares. +%endif +%if %have_pversion && %build_system +%message_bugzilla %{libname} +%endif + +%if %build_system +%package -n %{libname}-devel +URL: http://www.samba.org +Summary: SMB Client Library Development files +Group: System/Libraries +Provides: libsmbclient-devel +Requires: %{libname} = %{version}-%{release} + +%description -n %{libname}-devel +This package contains the development files for the SMB client +library, part of the samba suite of networking software, allowing +the development of other software to access SMB shares. +%endif +%if %have_pversion && %build_system +%message_bugzilla %{libname}-devel +%endif + +%if %build_system +%package -n %{libname}-static-devel +URL: http://www.samba.org +Summary: SMB Client Static Library Development files +Group: System/Libraries +Provides: libsmbclient-static-devel = %{version}-%{release} +Requires: %{libname}-devel = %{version}-%{release} + +%description -n %{libname}-static-devel +This package contains the static development files for the SMB +client library, part of the samba suite of networking software, +allowing the development of other software to access SMB shares. +%endif +%if %have_pversion && %build_system +%message_bugzilla %{libname}-devel +%endif + +#%package passdb-ldap +#URL: http://www.samba.org +#Summary: Samba password database plugin for MySQL +#Group: System/Libraries +# +#%description passdb-ldap +#The passdb-ldap package for samba provides a password database +#backend allowing samba to store account details in an LDAP +#database +#_if %have_pversion +#_message_bugzilla samba3-passdb-ldap +#_endif +#_if !%build_system +#_message_system +#_endif + +%ifnarch alpha +%package passdb-mysql +URL: http://www.samba.org +Summary: Samba password database plugin for MySQL +Group: System/Libraries +Requires: %{name}-server = %{version}-%{release} +%endif +%ifnarch alpha && %build_system +Obsoletes: samba3-passdb-mysql +Provides: samba3-passdb-mysql +%endif +%ifnarch alpha + +%description passdb-mysql +The passdb-mysql package for samba provides a password database +backend allowing samba to store account details in a MySQL +database +%endif + +%package passdb-xml +URL: http://www.samba.org +Summary: Samba password database plugin for XML files +Group: System/Libraries +Requires: %{name}-server = %{version}-%{release} +%if %build_system +Obsoletes: samba3-passdb-xml +Provides: samba3-passdb-xml +%endif + +%description passdb-xml +The passdb-xml package for samba provides a password database +backend allowing samba to store account details in XML files. +%if %have_pversion +%message_bugzilla samba3-passdb-xml +%endif +%if !%build_system +%message_system +%endif + +#Antivirus packages: +%if %build_fprot +%package vscan-fprot +Summary: On-access virus scanning for samba using FPROT +Group: System/Servers +Requires: %{name}-server = %{version} +Provides: %{name}-vscan +Autoreq: 0 +%description vscan-fprot +A vfs-module for samba to implement on-access scanning using the +FPROT antivirus software (which must be installed to use this). +%endif + +%if %build_kaspersky +%package vscan-kaspersky +Summary: On-access virus scanning for samba using Kaspersky +Group: System/Servers +Requires: %{name}-server = %{version} +Provides: %{name}-vscan +Autoreq: 0 +%description vscan-kaspersky +A vfs-module for samba to implement on-access scanning using the +Kaspersky antivirus software (which must be installed to use this). +%endif + +%if %build_mks +%package vscan-mks +Summary: On-access virus scanning for samba using MKS +Group: System/Servers +Requires: %{name}-server = %{version} +Provides: %{name}-vscan +Autoreq: 0 +%description vscan-mks +A vfs-module for samba to implement on-access scanning using the +MKS antivirus software (which must be installed to use this). +%endif + +%if %build_openav +%package vscan-openav +Summary: On-access virus scanning for samba using OpenAntivirus +Group: System/Servers +Requires: %{name}-server = %{version} +Provides: %{name}-vscan +Autoreq: 0 +%description vscan-openav +A vfs-module for samba to implement on-access scanning using the +OpenAntivirus antivirus software (which must be installed to use this). +%endif + +%if %build_sophos +%package vscan-sophos +Summary: On-access virus scanning for samba using Sophos +Group: System/Servers +Requires: %{name}-server = %{version} +Provides: %{name}-vscan +Autoreq: 0 +%description vscan-sophos +A vfs-module for samba to implement on-access scanning using the +Sophos antivirus software (which must be installed to use this). +%endif + +%if %build_symantec +%package vscan-symantec +Summary: On-access virus scanning for samba using Symantec +Group: System/Servers +Requires: %{name}-server = %{version} +Provides: %{name}-vscan +Autoreq: 0 +%description vscan-symantec +A vfs-module for samba to implement on-access scanning using the +Symantec antivirus software (which must be installed to use this). +%endif + +%if %build_trend +%package vscan-trend +Summary: On-access virus scanning for samba using Trend +Group: System/Servers +Requires: %{name}-server = %{version} +Provides: %{name}-vscan +Autoreq: 0 +%description vscan-trend +A vfs-module for samba to implement on-access scanning using the +Trend antivirus software (which must be installed to use this). +%endif + +%prep + +# Allow users to query build options with --with options: +#%define opt_status(%1) %(echo %{1}) +%if %{?_with_options:1}%{!?_with_options:0} +%define opt_status(%{1}) %(if [ %{1} -eq 1 ];then echo enabled;else echo disabled;fi) +#exit 1 +%{error: } +%{error:Build options available are:} +%{error:--with[out] system Build as the system samba package [or as samba3]} +%{error:--with[out] acl Build with support for file ACLs - %opt_status %build_acl} +%{error:--with[out] winbind Build with Winbind support - %opt_status %build_winbind} +%{error:--with[out] wins Build with WINS name resolution support - %opt_status %build_wins} +%{error:--with[out] ldap Build with legacy (samba2) LDAP support - %opt_status %build_ldap} +%{error:--with[out] ads Build with Active Directory support - %opt_status %build_ads} +%{error:--with[out] scanners Enable on-access virus scanners - %opt_status %build_scanners} +%{error: } +%else +%{error: } +%{error: This rpm has build options available, use --with options to see them} +%{error: } +%endif + +%if %{?_with_options:1}%{!?_with_options:0} && %build_scanners +%{error:--with scanners enables fprot,mks,openav,sophos and trend by default} +%{error: } +%{error:To enable others (requires development libraries for the scanner):} +%{error:--with kaspersky Enable on-access scanning with Kaspersky - %opt_status %build_kaspersky} +%{error: } +%endif + +%if %{?_with_options:1}%{!?_with_options:0} +clear +exit 1 +%endif + + +%if %build_non_default +RPM_EXTRA_OPTIONS="\ +%{?_with_system: --with system}\ +%{?_without_system: --without system}\ +%{?_with_acl: --with acl}\ +%{?_without_acl: --without acl}\ +%{?_with_winbind: --with winbind}\ +%{?_without_winbind: --without winbind}\ +%{?_with_wins: --with wins}\ +%{?_without_wins: --without wins}\ +%{?_with_ldap: --with ldap}\ +%{?_without_ldap: --without ldap}\ +%{?_with_ads: --with ads}\ +%{?_without_ads: --without ads}\ +%{?_with_scanners: --with scanners}\ +%{?_without_scanners: --without scanners}\ +" +echo "Building a non-default rpm with the following command-line arguments:" +echo "$RPM_EXTRA_OPTIONS" +echo "This rpm was built with non-default options, thus, to build ">%{SOURCE7} +echo "an identical rpm, you need to supply the following options">>%{SOURCE7} +echo "at build time: $RPM_EXTRA_OPTIONS">>%{SOURCE7} +echo -e "\n%{name}-%{version}-%{release}\n">>%{SOURCE7} +%else +echo "This rpm was built with default options">%{SOURCE7} +echo -e "\n%{name}-%{version}-%{release}\n">>%{SOURCE7} +%endif + +%if %build_vscan +%setup -q -a 8 -n %{pkg_name}-%{source_ver} +%else +%setup -q -n %{pkg_name}-%{source_ver} +%endif +#%patch111 -p1 +%patch1 -p1 -b .smbw +%patch4 -p1 -b .sbin +# Version specific patches: current version +%if !%have_pversion +echo "Applying patches for current version: %{ver}" +%else +# Version specific patches: upcoming version +echo "Applying patches for new versions: %{pversion}" +%endif + +# Limbo patches +%if %have_pversion && %have_pre +echo "Appling patches which should only be applied to prereleases" +%endif + +# Fix quota compilation in glibc>2.3 +%if %build_mdk91 || %build_mdk92 +#grep "<linux/quota.h>" source/smbd/quotas.c >/dev/null && \ +perl -pi -e 's@<linux/quota.h>@<sys/quota.h>@' source/smbd/quotas.c +%endif + +cp %{SOURCE7} . + +# Make a copy of examples so that we have a clean one for doc: +cp -a examples examples.bin + +%if %build_vscan +cp -a %{vscandir} %{vfsdir} +#fix stupid directory names: +mv %{vfsdir}/%{vscandir}/openantivirus %{vfsdir}/%{vscandir}/oav +%endif +# Inline replacement of config dir +for av in fprot kaspersky mks oav sophos trend; do + [ -e %{vfsdir}/%{vscandir}/$av/vscan-$av.h ] && perl -pi -e \ + 's,^#define PARAMCONF "/etc/samba,#define PARAMCONF "/etc/%{name},' \ + %{vfsdir}/%{vscandir}/$av/vscan-$av.h +done +#Inline edit vscan header: +perl -pi -e 's/^# define SAMBA_VERSION_MAJOR 2/# define SAMBA_VERSION_MAJOR 3/g' %{vfsdir}/%{vscandir}/include/vscan-global.h + +# Edit some files when not building system samba: +%if !%build_system +perl -pi -e 's/%{pkg_name}/%{name}/g' source/auth/pampass.c +%endif + +#remove cvs internal files from docs: +find docs examples -name '.cvsignore' -exec rm -f {} \; + +#make better doc trees: +mkdir -p clean-docs/samba-doc +cp -a examples docs clean-docs/samba-doc +mv -f clean-docs/samba-doc/examples/libsmbclient clean-docs/ +rm -Rf clean-docs/samba-doc/docs/{docbook,manpages,htmldocs,using_samba} +ln -s %{_datadir}/swat%{samba_major}/using_samba/ clean-docs/samba-doc/docs/using_samba +ln -sf %{_datadir}/swat%{samba_major}/help/ clean-docs/samba-doc/docs/htmldocs + +%build +#%serverbuild +(cd source +CFLAGS=`echo "$RPM_OPT_FLAGS"|sed -e 's/-g//g'` +%if %gcc331 +#CFLAGS=`echo "$CFLAGS"|sed -e 's/-O2/-Os/g'` +%endif +# Don't use --with-fhs now, since it overrides libdir, it sets configdir, +# lockdir,piddir logfilebase,privatedir and swatdir +%configure --prefix=%{_prefix} \ + --sysconfdir=%{_sysconfdir}/%{name} \ + --localstatedir=/var \ + --libdir=%{_libdir}/%{name} \ + --with-privatedir=%{_sysconfdir}/%{name} \ + --with-lockdir=/var/cache/%{name} \ + --with-piddir=/var/run/%{name} \ + --with-swatdir=%{_datadir}/swat%{samba_major} \ + --with-configdir=%{_sysconfdir}/%{name} \ + --with-logfilebase=/var/log/%{name} \ +%if !%build_ads + --with-ads=no \ +%endif + --with-automount \ + --with-smbmount \ + --with-pam \ + --with-pam_smbpass \ +%if %build_ldap + --with-ldapsam \ +%endif + --with-tdbsam \ + --with-syslog \ + --with-quotas \ + --with-utmp \ + --with-manpages-langs=en \ +%if %build_acl + --with-acl-support \ +%endif + --disable-mysqltest \ + --with-expsam=%build_expsam \ + --program-suffix=%{samba_major} +# --with-shared-modules=pdb_ldap,idmap_ldap \ +# --with-manpages-langs=en,ja,pl \ +#_if !%build_system +# --with-smbwrapper \ +#_endif +# --with-nisplussam \ +# --with-fhs \ + +#Fix the make file so we don't create debug information on 9.2 +%if %build_mdk92 +perl -pi -e 's/-g //g' Makefile +%endif + +perl -pi -e 's|-Wl,-rpath,%{_libdir}||g;s|-Wl,-rpath -Wl,%{_libdir}||g' Makefile + +make proto_exists +%make all libsmbclient smbfilter wins modules %{?_with_test: torture debug2html bin/log2pcap} bin/editreg client/mount.cifs + + +# Build VFS modules (experimental) +#cd ../%vfsdir +#_configure --prefix=%{prefix} \ +# --mandir=%{prefix}/share/man +#make +#make CFLAGS="$RPM_OPT_FLAGS -I../../source -I../../source/include -I../../source/ubiqx \ +# -I../../source/smbwrapper -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" +) + +# Build mkntpasswd in examples/LDAP/ for smbldaptools +make -C examples.bin/LDAP/smbldap-tools/mkntpwd + +# Build antivirus vfs objects: +%if %build_fprot +echo -e "\n\nBuild antivirus VFS modules\n\n" +echo "Building fprot" +(cd %{vfsdir}/%{vscandir}/fprot;make) +%endif +%if %build_kaspersky +echo "Building Kaspersky" +(cd %{vfsdir}/%{vscandir}/kavp + perl -p -i -e "s|/usr/local/|/usr/|g" Makefile.KAV4 + make -f Makefile.KAV4 +) +%endif +%if %build_mks +echo "Building mks" +(cd %{vfsdir}/%{vscandir}/mks;make) +%endif +%if %build_openav +echo "Building OpenAntivirus" +(cd %{vfsdir}/%{vscandir}/oav;make) +%endif +%if %build_sophos +echo "building sophos" +(cd %{vfsdir}/%{vscandir}/sophos;make) +%endif +%if %build_symantec +echo "Building symantec" +(cd %{vfsdir}/%{vscandir}/symantec;make) +%endif +%if %build_trend +echo "Building Trend" +(cd %{vfsdir}/%{vscandir}/trend;make) +%endif + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT + +#Ensure all docs are readable +chmod a+r docs -R + +# Any entries here mean samba makefile is *really* broken: +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/%{name} +mkdir -p $RPM_BUILD_ROOT/%{_datadir} +mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name}/vfs + +(cd source +make DESTDIR=$RPM_BUILD_ROOT LIBDIR=%{_libdir}/%{name} install installclientlib installmodules) + +install -m755 source/bin/editreg %{buildroot}/%{_bindir} + +#need to stay +mkdir -p $RPM_BUILD_ROOT/{sbin,bin} +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/{logrotate.d,pam.d,xinetd.d} +mkdir -p $RPM_BUILD_ROOT/%{_initrddir} +mkdir -p $RPM_BUILD_ROOT/var/cache/%{name} +mkdir -p $RPM_BUILD_ROOT/var/log/%{name} +mkdir -p $RPM_BUILD_ROOT/var/run/%{name} +mkdir -p $RPM_BUILD_ROOT/var/spool/%{name} +mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/%{name}/{netlogon,profiles,printers} +mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/%{name}/printers/{W32X86,WIN40,W32ALPHA,W32MIPS,W32PPC} +mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/%{name}/codepages/src +mkdir -p $RPM_BUILD_ROOT/%{_lib}/security +mkdir -p $RPM_BUILD_ROOT%{_libdir} +mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name}/vfs +mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/scripts + +#smbwrapper and pam_winbind not handled by make, pam_smbpass.so doesn't build +#install -m 755 source/bin/smbwrapper.so $RPM_BUILD_ROOT%{_libdir}/smbwrapper%{samba_major}.so +install -m 755 source/bin/pam_smbpass.so $RPM_BUILD_ROOT/%{_lib}/security/pam_smbpass%{samba_major}.so +install -m 755 source/nsswitch/pam_winbind.so $RPM_BUILD_ROOT/%{_lib}/security/pam_winbind.so + +install -m755 source/bin/libsmbclient.a $RPM_BUILD_ROOT%{_libdir}/libsmbclient.a +pushd $RPM_BUILD_ROOT/%{_libdir} +[ -f libsmbclient.so ] && mv -f libsmbclient.so libsmbclient.so.%{libsmbmajor} +ln -sf libsmbclient.so.%{libsmbmajor} libsmbclient.so +popd + +# smbsh forgotten +#install -m 755 source/bin/smbsh $RPM_BUILD_ROOT%{_bindir}/ + +# Install VFS modules +#install -m755 %vfsdir/audit.so $RPM_BUILD_ROOT/%{_libdir}/samba/vfs +#for i in block recycle +#do +# install -m755 %vfsdir/$i/$i.so $RPM_BUILD_ROOT/%{_libdir}/samba/vfs +#done + +# Antivirus support: +# mkdir -p $RPM_BUILD_ROOT%{_libdir}/samba/vfs/vscan + for av in fprot kavp mks oav sophos symantec trend; do + if [ -d %{vfsdir}/%{vscandir}/$av -a -e %{vfsdir}/%{vscandir}/$av/vscan-$av*.so ];then + cp %{vfsdir}/%{vscandir}/$av/vscan-$av*.so \ + $RPM_BUILD_ROOT%{_libdir}/%{name}/vfs/ + cp %{vfsdir}/%{vscandir}/$av/vscan-$av*.conf \ + $RPM_BUILD_ROOT%{_sysconfdir}/%{name} + fi + done + +#libnss_* not handled by make: +# Install the nsswitch library extension file +for i in wins winbind; do + install -m755 source/nsswitch/libnss_${i}.so $RPM_BUILD_ROOT/%{_lib}/libnss_${i}.so +done +# Make link for wins and winbind resolvers +( cd $RPM_BUILD_ROOT/%{_lib}; ln -s libnss_wins.so libnss_wins.so.2; ln -s libnss_winbind.so libnss_winbind.so.2) + +%if %{?_with_test:1}%{!?_with_test:0} +for i in {%{testbin}};do + install -m755 source/bin/${i} $RPM_BUILD_ROOT/%{_bindir}/${i}%{samba_major} +done +%endif + +# Install other stuff + +# install -m644 examples/VFS/recycle/recycle.conf $RPM_BUILD_ROOT%{_sysconfdir}/samba/ + install -m644 packaging/Mandrake/smbusers $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/smbusers + install -m755 packaging/Mandrake/smbprint $RPM_BUILD_ROOT/%{_bindir} + #install -m755 packaging/RedHat/smbadduser $RPM_BUILD_ROOT/usr/bin + install -m755 packaging/Mandrake/findsmb $RPM_BUILD_ROOT/%{_bindir} + install -m755 packaging/Mandrake/smb.init $RPM_BUILD_ROOT/%{_initrddir}/smb%{samba_major} + install -m755 packaging/Mandrake/smb.init $RPM_BUILD_ROOT/%{_sbindir}/%{name} + install -m755 packaging/Mandrake/winbind.init $RPM_BUILD_ROOT/%{_initrddir}/winbind +# install -m755 packaging/Mandrake/wrepld.init $RPM_BUILD_ROOT/%{_initrddir}/wrepld%{samba_major} + install -m755 packaging/Mandrake/winbind.init $RPM_BUILD_ROOT/%{_sbindir}/winbind + install -m644 packaging/Mandrake/samba.pamd $RPM_BUILD_ROOT/%{_sysconfdir}/pam.d/%{name} + install -m644 packaging/Mandrake/system-auth-winbind.pamd $RPM_BUILD_ROOT/%{_sysconfdir}/pam.d/system-auth-winbind +# + install -m644 %{SOURCE1} $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/%{name} +# install -m644 packaging/Mandrake/samba-slapd-include.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/samba-slapd.include + +# Install smbldap-tools scripts: +for i in examples/LDAP/smbldap-tools/*.pl; do + install -m 750 $i $RPM_BUILD_ROOT/%{_datadir}/%{name}/scripts/ + ln -s %{_datadir}/%{name}/scripts/`basename $i` $RPM_BUILD_ROOT/%{_bindir}/`basename $i|sed -e 's/\.pl//g'`%{samba_major} +done + +install -m 750 examples/LDAP/smbldap-tools/smbldap_tools.pm $RPM_BUILD_ROOT/%{_datadir}/%{name}/scripts/ + +# The conf file +install -m 640 examples/LDAP/smbldap-tools/smbldap_conf.pm $RPM_BUILD_ROOT/%{_sysconfdir}/%{name} + +#Fix the smbldap-tools when not system samba: +%if !%build_system +perl -pi -e 's/^(use|package)(\s+)smbldap_(\w+);$/${1}${2}smbldap_${3}%{samba_major};/g' \ +%{buildroot}/%{_sysconfdir}/%{name}/smbldap_conf.pm \ +%{buildroot}/%{_datadir}/%{name}/scripts/smbldap*.p? +perl -pi -e 's,/usr/local/sbin/mkntpwd,/usr/sbin/mkntpwd%{samba_major},g;s,553,421,g' %{buildroot}/%{_sysconfdir}/%{name}/smbldap_conf.pm +perl -pi -e 's,\$smbldap_conf::SID,\$smbldap_conf3::SID,g' %{buildroot}/%{_datadir}/%{name}/scripts/smbldap*.p? +%endif +perl -pi -e 's,/usr/local/sbin/smbldap-passwd.pl,%{_datadir}/%{name}/scripts/smbldap-passwd.pl,g' %{buildroot}/%{_datadir}/%{name}/scripts/smbldap-useradd.pl + +# Link both smbldap*.pm into vendor-perl (any better ideas?) +mkdir -p %{buildroot}/%{perl_vendorlib} +ln -s %{_sysconfdir}/%{name}/smbldap_conf.pm $RPM_BUILD_ROOT/%{perl_vendorlib}/smbldap_conf%{samba_major}.pm +ln -s %{_datadir}/%{name}/scripts/smbldap_tools.pm $RPM_BUILD_ROOT/%{perl_vendorlib}/smbldap_tools%{samba_major}.pm +#mkntpwd +install -m750 examples.bin/LDAP/smbldap-tools/mkntpwd/mkntpwd %{buildroot}/%{_sbindir}/mkntpwd%{samba_major} + +# Samba smbpasswd migration script: +install -m755 examples/LDAP/convertSambaAccount $RPM_BUILD_ROOT/%{_datadir}/%{name}/scripts/ + +# make a conf file for winbind from the default one: + cat packaging/Mandrake/smb.conf|sed -e 's/^; winbind/ winbind/g;s/^; obey pam/ obey pam/g; s/^; printer admin = @"D/ printer admin = @"D/g;s/^; password server = \*/ password server = \*/g;s/^; template/ template/g; s/^ security = user/ security = domain/g' > packaging/Mandrake/smb-winbind.conf + install -m644 packaging/Mandrake/smb-winbind.conf $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/smb-winbind.conf + +# Some inline fixes for smb.conf for non-winbind use +install -m644 packaging/Mandrake/smb.conf $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/smb.conf +cat packaging/Mandrake/smb.conf | \ +sed -e 's/^; printer admin = @adm/ printer admin = @adm/g' >$RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/smb.conf +%if %build_cupspc +perl -pi -e 's/printcap name = lpstat/printcap name = cups/g' $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/smb.conf +perl -pi -e 's/printcap name = lpstat/printcap name = cups/g' $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/smb-winbind.conf +%endif + +#%if !%build_system +# Fix script paths in smb.conf +#perl -pi -e 's,%{_datadir}/samba,%{_datadir}/%{name},g' %{buildroot}/%{_sysconfdir}/%{name}/smb*.conf +#%endif + + +#install mount.cifs +install -m755 source/client/mount.cifs %{buildroot}/bin/mount.cifs%{samba_major} + + echo 127.0.0.1 localhost > $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/lmhosts + +# Link smbspool to CUPS (does not require installed CUPS) + + mkdir -p $RPM_BUILD_ROOT/%{_libdir}/cups/backend + ln -s %{_bindir}/smbspool%{alternative_major} $RPM_BUILD_ROOT/%{_libdir}/cups/backend/smb%{alternative_major} + +# xinetd support + + mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/xinetd.d + install -m644 %{SOURCE3} $RPM_BUILD_ROOT/%{_sysconfdir}/xinetd.d/swat%{samba_major} + +# menu support + +mkdir -p $RPM_BUILD_ROOT%{_menudir} +cat > $RPM_BUILD_ROOT%{_menudir}/%{name}-swat << EOF +?package(%{name}-swat):\ +command="gnome-moz-remote http://localhost:901/" \ +needs="gnome" \ +icon="swat%{samba_major}.png" \ +section="Configuration/Networking" \ +title="Samba Configuration (SWAT)" \ +longtitle="The Swat Samba Administration Tool" +?package(%{name}-swat):\ +command="sh -c '\$BROWSER http://localhost:901/'" \ +needs="x11" \ +icon="swat%{samba_major}.png" \ +section="Configuration/Networking" \ +title="Samba Configuration (SWAT)" \ +longtitle="The Swat Samba Administration Tool" +EOF + +mkdir -p $RPM_BUILD_ROOT%{_liconsdir} $RPM_BUILD_ROOT%{_iconsdir} $RPM_BUILD_ROOT%{_miconsdir} + +bzcat %{SOURCE4} > $RPM_BUILD_ROOT%{_liconsdir}/swat%{samba_major}.png +bzcat %{SOURCE5} > $RPM_BUILD_ROOT%{_iconsdir}/swat%{samba_major}.png +bzcat %{SOURCE6} > $RPM_BUILD_ROOT%{_miconsdir}/swat%{samba_major}.png + +bzcat %{SOURCE10}> $RPM_BUILD_ROOT%{_datadir}/%{name}/scripts/print-pdf + +# Fix configs when not building system samba: + +#Client binaries will have suffixes while we use alternatives, even +# if we are system samba +%if !%build_system || %build_alternatives +for OLD in %{buildroot}/%{_bindir}/{%{clientbin}} %{buildroot}/bin/%{client_bin} %{buildroot}/%{_libdir}/cups/backend/smb +do + NEW=`echo ${OLD}%{alternative_major}` + [ -e $OLD ] && mv -f $OLD $NEW +done +for OLD in %{buildroot}/%{_mandir}/man?/{%{clientbin}}* %{buildroot}/%{_mandir}/man?/%{client_bin}* +do + if [ -e $OLD ] + then + BASE=`perl -e '$_="'${OLD}'"; m,(%buildroot)(.*?)(\.[0-9]),;print "$1$2\n";'` + EXT=`echo $OLD|sed -e 's,'${BASE}',,g'` + NEW=`echo ${BASE}%{alternative_major}${EXT}` + mv $OLD $NEW + fi +done +%endif +# Link smbmount to /sbin/mount.smb and /sbin/mount.smbfs +#I don't think it's possible for make to do this ... +(cd $RPM_BUILD_ROOT/sbin + ln -s ..%{_bindir}/smbmount%{alternative_major} mount.smb%{alternative_major} + ln -s ..%{_bindir}/smbmount%{alternative_major} mount.smbfs%{alternative_major} +) +# Server/common binaries are versioned only if not system samba: +%if !%build_system +for OLD in %{buildroot}/%{_bindir}/{%{commonbin}} %{buildroot}/%{_bindir}/{%{serverbin}} %{buildroot}/%{_sbindir}/{%{serversbin},swat} +do + NEW=`echo ${OLD}%{alternative_major}` + mv $OLD $NEW -f ||: +done +# And the man pages too: +for OLD in %{buildroot}/%{_mandir}/man?/{%{commonbin},%{serverbin},%{serversbin},swat,{%testbin},smb.conf,lmhosts}* +do + if [ -e $OLD ] + then + BASE=`perl -e '$_="'${OLD}'"; m,(%buildroot)(.*?)(\.[0-9]),;print "$1$2\n";'` +# BASE=`perl -e '$name="'${OLD}'"; print "",($name =~ /(.*?)\.[0-9]/), "\n";'` + EXT=`echo $OLD|sed -e 's,'${BASE}',,g'` + NEW=`echo ${BASE}%{samba_major}${EXT}` + mv $OLD $NEW + fi +done +# Replace paths in config files and init scripts: +for i in smb ;do + perl -pi -e 's,/subsys/'$i',/subsys/'$i'%{samba_major},g' $RPM_BUILD_ROOT/%{_initrddir}/${i}%{samba_major} +done +for i in %{_sysconfdir}/%{name}/smb.conf %{_initrddir}/smb%{samba_major} %{_sbindir}/%{name} %{_initrddir}/winbind /%{_sysconfdir}/logrotate.d/%{name} /%{_sysconfdir}/xinetd.d/swat%{samba_major} %{_initrddir}/wrepld%{samba_major}; do + perl -pi -e 's,/%{pkg_name},/%{name},g; s,smbd,%{_sbindir}/smbd%{samba_major},g; s,nmbd,%{_sbindir}/nmbd%{samba_major},g; s,/usr/sbin/swat,%{_sbindir}/swat%{samba_major},g;s,wrepld,%{_sbindir}/wrepld%{samba_major},g' $RPM_BUILD_ROOT/$i; +done +# Fix xinetd file for swat: +perl -pi -e 's,/usr/sbin,%{_sbindir},g' $RPM_BUILD_ROOT/%{_sysconfdir}/xinetd.d/swat%{samba_major} +%endif + +#Clean up unpackaged files: +for i in %{_bindir}/pam_smbpass.so %{_bindir}/smbwrapper.so;do +rm -f %{buildroot}/$i +done + +%clean +rm -rf $RPM_BUILD_ROOT + +%post server + +%_post_service smb%{samba_major} +#%_post_service wrepld%{samba_major} + +# Add a unix group for samba machine accounts +groupadd -frg 421 machines + +# Migrate tdb's from /var/lock/samba (taken from official samba spec file): +for i in /var/lock/samba/*.tdb +do +if [ -f $i ]; then + newname=`echo $i | sed -e's|var\/lock\/samba|var\/cache\/samba|'` + echo "Moving $i to $newname" + mv $i $newname +fi +done + +%post common +# Basic migration script for pre-2.2.1 users, +# since smb config moved from /etc to %{_sysconfdir}/samba + +# Let's create a proper %{_sysconfdir}/samba/smbpasswd file +[ -f %{_sysconfdir}/%{name}/smbpasswd ] || { + echo "Creating password file for samba..." + touch %{_sysconfdir}/%{name}/smbpasswd +} + +# And this too, in case we don't have smbd to create it for us +[ -f /var/cache/%{name}/unexpected.tdb ] || { + touch /var/cache/%{name}/unexpected.tdb +} + +# Let's define the proper paths for config files +perl -pi -e 's/(\/etc\/)(smb)/\1%{name}\/\2/' %{_sysconfdir}/%{name}/smb.conf + +# Fix the logrotate.d file from smb and nmb to smbd and nmbd +if [ -f %{_sysconfdir}/logrotate.d/samba ]; then + perl -pi -e 's/smb /smbd /' %{_sysconfdir}/logrotate.d/samba + perl -pi -e 's/nmb /nmbd /' %{_sysconfdir}/logrotate.d/samba +fi + +# And not loose our machine account SID +[ -f %{_sysconfdir}/MACHINE.SID ] && mv -f %{_sysconfdir}/MACHINE.SID %{_sysconfdir}/%{name}/ ||: + +%if %build_winbind +%post winbind +if [ $1 = 1 ]; then + /sbin/chkconfig winbind on + cp -af %{_sysconfdir}/nsswitch.conf %{_sysconfdir}/nsswitch.conf.rpmsave + cp -af %{_sysconfdir}/nsswitch.conf %{_sysconfdir}/nsswitch.conf.rpmtemp + for i in passwd group;do + grep ^$i %{_sysconfdir}/nsswitch.conf |grep -v 'winbind' >/dev/null + if [ $? = 0 ];then + echo "Adding a winbind entry to the $i section of %{_sysconfdir}/nsswitch.conf" + awk '/^'$i'/ {print $0 " winbind"};!/^'$i'/ {print}' %{_sysconfdir}/nsswitch.conf.rpmtemp >%{_sysconfdir}/nsswitch.conf; + cp -af %{_sysconfdir}/nsswitch.conf %{_sysconfdir}/nsswitch.conf.rpmtemp + else + echo "$i entry found in %{_sysconfdir}/nsswitch.conf" + fi + done + if [ -f %{_sysconfdir}/nsswitch.conf.rpmtemp ];then rm -f %{_sysconfdir}/nsswitch.conf.rpmtemp;fi +fi + +%preun winbind +if [ $1 = 0 ]; then + echo "Removing winbind entries from %{_sysconfdir}/nsswitch.conf" + perl -pi -e 's/ winbind//' %{_sysconfdir}/nsswitch.conf + + /sbin/chkconfig winbind reset +fi +%endif %build_winbind + +%if %build_wins +%post -n nss_wins%{samba_major} +if [ $1 = 1 ]; then + cp -af %{_sysconfdir}/nsswitch.conf %{_sysconfdir}/nsswitch.conf.rpmsave + grep '^hosts' %{_sysconfdir}/nsswitch.conf |grep -v 'wins' >/dev/null + if [ $? = 0 ];then + echo "Adding a wins entry to the hosts section of %{_sysconfdir}/nsswitch.conf" + awk '/^hosts/ {print $0 " wins"};!/^hosts/ {print}' %{_sysconfdir}/nsswitch.conf.rpmsave >%{_sysconfdir}/nsswitch.conf; + else + echo "wins entry found in %{_sysconfdir}/nsswitch.conf" + fi +# else +# echo "Upgrade, leaving nsswitch.conf intact" +fi + +%preun -n nss_wins%{samba_major} +if [ $1 = 0 ]; then + echo "Removing wins entry from %{_sysconfdir}/nsswitch.conf" + perl -pi -e 's/ wins//' %{_sysconfdir}/nsswitch.conf +#else +# echo "Leaving %{_sysconfdir}/nsswitch.conf intact" +fi +%endif %build_wins + +%preun server + +%_preun_service smb%{samba_major} +#%_preun_service wrepld%{samba_major} + +if [ $1 = 0 ] ; then +# /sbin/chkconfig --level 35 smb reset +# Let's not loose /var/cache/samba + + if [ -d /var/cache/%{name} ]; then + mv -f /var/cache/%{name} /var/cache/%{name}.BAK + fi +fi + +%post swat +if [ -f /var/lock/subsys/xinetd ]; then + service xinetd reload >/dev/null 2>&1 || : +fi +%update_menus + +%postun swat + +# Remove swat entry from xinetd +if [ $1 = 0 -a -f %{_sysconfdir}/xinetd.conf ] ; then +rm -f %{_sysconfdir}/xinetd.d/swat%{samba_major} + service xinetd reload &>/dev/null || : +fi + +if [ "$1" = "0" -a -x /usr/bin/update-menus ]; then /usr/bin/update-menus || true ; fi + +%clean_menus + +%if %build_system +%post -n %{libname} -p /sbin/ldconfig +%postun -n %{libname} -p /sbin/ldconfig +%endif + +%if %build_alternatives +%post client + +update-alternatives --install %{_bindir}/smbclient smbclient \ +%{_bindir}/smbclient%{alternative_major} 10 \ +$(for i in {/bin/mount.cifs,/sbin/{%{client_sbin}},%{_bindir}/{%{clientbin}}};do +j=`basename $i` +[ "$j" = "smbclient" ] || \ +echo -n " --slave ${i} ${j} ${i}%{alternative_major}";done) \ +--slave %{_libdir}/cups/backend/smb cups_smb %{_libdir}/cups/backend/smb%{alternative_major} || \ +update-alternatives --auto smbclient + +%preun client +[ $1 = 0 ] && update-alternatives --remove smbclient %{_bindir}/smbclient%{alternative_major} ||: +%endif + +%if %build_alternatives +%triggerpostun client -- samba-client, samba2-client +[ ! -e %{_bindir}/smbclient ] && update-alternatives --auto smbclient || : +%endif + +%files server +%defattr(-,root,root) +#%attr(-,root,root) /sbin/* +%(for i in %{_sbindir}/{%{serversbin}}%{samba_major};do echo $i;done) +#%{_sbindir}/%{name} +#%{_sbindir}/smbd%{samba_major} +#%{_sbindir}/nmbd%{samba_major} +#%{_sbindir}/mkntpwd%{samba_major} +#%{_sbindir}/wrepld%{samba_major} +%(for i in %{_bindir}/{%{serverbin}}%{samba_major};do echo $i;done) +#%{_bindir}/smbcontrol%{samba_major} +#%{_bindir}/smbstatus%{samba_major} +#%{_bindir}/pdbedit%{samba_major} +#%{_bindir}/tdbbackup%{samba_major} +#%{_bindir}/profiles%{samba_major} +#%{_bindir}/editreg%{samba_major} +%attr(755,root,root) /%{_lib}/security/pam_smbpass* +%dir %{_libdir}/%{name}/vfs +%{_libdir}/%{name}/vfs/*.so +%dir %{_libdir}/%{name}/pdb + +%attr(-,root,root) %config(noreplace) %{_sysconfdir}/%{name}/smbusers +%attr(-,root,root) %config(noreplace) %{_initrddir}/smb%{samba_major} +#%attr(-,root,root) %config(noreplace) %{_initrddir}/wrepld%{samba_major} +%attr(-,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} +%attr(-,root,root) %config(noreplace) %{_sysconfdir}/pam.d/%{name} +#%attr(-,root,root) %config(noreplace) %{_sysconfdir}/%{name}/samba-slapd.include +%{_mandir}/man1/smbstatus*.1* +%{_mandir}/man5/smbpasswd*.5* +%{_mandir}/man7/samba*.7* +%{_mandir}/man8/smbd*.8* +%{_mandir}/man8/nmbd*.8* +%{_mandir}/man8/pdbedit*.8* +%{_mandir}/man1/smbcontrol*.1* +%{_mandir}/man8/tdbbackup*.8* +%{_mandir}/man1/profiles*.1* +%{_mandir}/man1/editreg*.1* +%attr(775,root,adm) %dir %{_localstatedir}/%{name}/netlogon +%attr(755,root,root) %dir %{_localstatedir}/%{name}/profiles +%attr(755,root,root) %dir %{_localstatedir}/%{name}/printers +%attr(2775,root,adm) %dir %{_localstatedir}/%{name}/printers/* +%attr(1777,root,root) %dir /var/spool/%{name} +%dir %{_datadir}/%{name} +%dir %{_datadir}/%{name}/scripts +%attr(0755,root,root) %{_datadir}/%{name}/scripts/print-pdf +%attr(0750,root,adm) %{_datadir}/%{name}/scripts/smbldap*.pl +%attr(0750,root,adm) %{_bindir}/smbldap* +%attr(0640,root,adm) %config(noreplace) %{_sysconfdir}/%{name}/smbldap_conf.pm +%attr(0644,root,root) %{_datadir}/%{name}/scripts/smbldap_tools.pm +%{perl_vendorlib}/*.pm +#%attr(0700,root,root) %{_datadir}/%{name}/scripts/*port_smbpasswd.pl +%attr(0755,root,root) %{_datadir}/%{name}/scripts/convertSambaAccount + + +%files doc +%defattr(-,root,root) +%doc README COPYING Manifest Read-Manifest-Now +%doc WHATSNEW.txt Roadmap +%doc README.%{name}-mandrake-rpm +%doc clean-docs/samba-doc/docs +%doc clean-docs/samba-doc/examples +%attr(-,root,root) %{_datadir}/swat%{samba_major}/using_samba/ + +%files swat +%defattr(-,root,root) +%config(noreplace) %{_sysconfdir}/xinetd.d/swat%{samba_major} +#%attr(-,root,root) /sbin/* +%{_sbindir}/swat%{samba_major} +%{_menudir}/%{name}-swat +%{_miconsdir}/*.png +%{_liconsdir}/*.png +%{_iconsdir}/*.png +%attr(-,root,root) %{_datadir}/swat%{samba_major}/help/ +%attr(-,root,root) %{_datadir}/swat%{samba_major}/images/ +%attr(-,root,root) %{_datadir}/swat%{samba_major}/include/ +%lang(ja) %{_datadir}/swat%{samba_major}/lang/ja +%lang(tr) %{_datadir}/swat%{samba_major}/lang/tr +%{_mandir}/man8/swat*.8* +%lang(de) %{_libdir}/%{name}/de.msg +%lang(en) %{_libdir}/%{name}/en.msg +%lang(fr) %{_libdir}/%{name}/fr.msg +%lang(it) %{_libdir}/%{name}/it.msg +%lang(ja) %{_libdir}/%{name}/ja.msg +%lang(nl) %{_libdir}/%{name}/nl.msg +%lang(pl) %{_libdir}/%{name}/pl.msg +%lang(tr) %{_libdir}/%{name}/tr.msg +#%doc swat/README + +%files client +%defattr(-,root,root) +%(for i in %{_bindir}/{%{clientbin}}%{alternative_major};do echo $i;done) +%(for i in %{_mandir}/man?/{%{clientbin}}%{alternative_major}.?.*;do echo $i|grep -v smbprint;done) +%ifnarch alpha +%(for i in /sbin/{%{client_sbin}}%{alternative_major};do echo $i;done) +%attr(4755,root,root) /bin/mount.cifs%{alternative_major} +%attr(755,root,root) %{_bindir}/smbmount%{alternative_major} +%attr(4755,root,root) %{_bindir}/smbumount%{alternative_major} +%attr(4755,root,root) %{_bindir}/smbmnt%{alternative_major} +%{_mandir}/man8/smbmnt*.8* +%{_mandir}/man8/smbmount*.8* +%{_mandir}/man8/smbumount*.8* +%{_mandir}/man8/mount.cifs*.8* +%else +%exclude %{_bindir}/smb*m*nt%{samba_major} +%exclude %{_mandir}/man8/smb*m*nt*.8* +%endif +# Link of smbspool to CUPS +/%{_libdir}/cups/backend/smb%{alternative_major} + +%files common +%defattr(-,root,root) +%dir /var/cache/%{name} +%dir /var/log/%{name} +%dir /var/run/%{name} +%(for i in %{_bindir}/{%{commonbin}}%{samba_major};do echo $i;done) +%(for i in %{_mandir}/man?/{%{commonbin}}%{samba_major}\.[0-9]*;do echo $i;done) +#%{_libdir}/smbwrapper%{samba_major}.so +%dir %{_libdir}/%{name} +%{_libdir}/%{name}/*.dat +%{_libdir}/%{name}/charset +#%{_libdir}/%{name}/lowcase.dat +#%{_libdir}/%{name}/valid.dat +%dir %{_sysconfdir}/%{name} +%attr(-,root,root) %config(noreplace) %{_sysconfdir}/%{name}/smb.conf +%attr(-,root,root) %config(noreplace) %{_sysconfdir}/%{name}/smb-winbind.conf +%attr(-,root,root) %config(noreplace) %{_sysconfdir}/%{name}/lmhosts +%dir %{_localstatedir}/%{name} +%attr(-,root,root) %{_localstatedir}/%{name}/codepages +%{_mandir}/man5/smb.conf*.5* +%{_mandir}/man5/lmhosts*.5* +#%{_mandir}/man7/Samba*.7* +%dir %{_datadir}/swat%{samba_major} + +%if %build_winbind +%files winbind +%defattr(-,root,root) +%{_sbindir}/winbindd +%{_sbindir}/winbind +%{_bindir}/wbinfo +%attr(755,root,root) /%{_lib}/security/pam_winbind* +%attr(755,root,root) /%{_lib}/libnss_winbind* +%attr(-,root,root) %config(noreplace) %{_initrddir}/winbind +%attr(-,root,root) %config(noreplace) %{_sysconfdir}/pam.d/system-auth-winbind* +%{_mandir}/man8/winbindd*.8* +%{_mandir}/man1/wbinfo*.1* +%endif + +%if %build_wins +%files -n nss_wins%{samba_major} +%defattr(-,root,root) +%attr(755,root,root) /%{_lib}/libnss_wins.so* +%endif + +%if %{?_with_test:1}%{!?_with_test:0} +%files test +%defattr(-,root,root) +%(for i in %{_bindir}/{%{testbin}}%{samba_major};do echo $i;done) +%{_mandir}/man1/vfstest%{samba_major}*.1* +%exclude %{_mandir}/man1/log2pcap*.1* +%else +%exclude %{_mandir}/man1/vfstest%{samba_major}*.1* +%exclude %{_mandir}/man1/log2pcap*.1* +%endif + +%if %build_system +%files -n %{libname} +%defattr(-,root,root) +%{_libdir}/libsmbclient.so.* +%else +%exclude %{_libdir}/libsmbclient.so.* +%endif + +%if %build_system +%files -n %{libname}-devel +%defattr(-,root,root) +%{_includedir}/* +%{_libdir}/libsmbclient.so +%doc clean-docs/libsmbclient/* +%else +%exclude %{_includedir}/* +%exclude %{_libdir}/libsmbclient.so +%endif + +%if %build_system +%files -n %{libname}-static-devel +%defattr(-,root,root) +%{_libdir}/libsmbclient.a +%else +%exclude %{_libdir}/libsmbclient.a +%endif + +#%files passdb-ldap +#%defattr(-,root,root) +#%{_libdir}/%{name}/*/*ldap.so + +%ifnarch alpha +%files passdb-mysql +%defattr(-,root,root) +%{_libdir}/%{name}/pdb/*mysql.so +%endif + +%files passdb-xml +%defattr(-,root,root) +%{_libdir}/%{name}/pdb/*xml.so + +#Files for antivirus support: +%if %build_fprot +%files vscan-fprot +%defattr(-,root,root) +%{_libdir}/%{name}/vfs/vscan-fprotd.so +%config(noreplace) %{_sysconfdir}/%{name}/vscan-fprotd.conf +%doc %{vfsdir}/%{vscandir}/INSTALL +%endif + +%if %build_kaspersky +%files vscan-kaspersky +%defattr(-,root,root) +%{_libdir}/%{name}/vfs/vscan-kavp.so +%config(noreplace) %{_sysconfdir}/%{name}/vscan-kavp.conf +%doc %{vfsdir}/%{vscandir}/INSTALL +%endif + +%if %build_mks +%files vscan-mks +%defattr(-,root,root) +%{_libdir}/%{name}/vfs/vscan-mksd.so +%config(noreplace) %{_sysconfdir}/%{name}/vscan-mks*.conf +%doc %{vfsdir}/%{vscandir}/INSTALL +%endif + +%if %build_openav +%files vscan-openav +%defattr(-,root,root) +%{_libdir}/%{name}/vfs/vscan-oav.so +%config(noreplace) %{_sysconfdir}/%{name}/vscan-oav.conf +%doc %{vfsdir}/%{vscandir}/INSTALL +%endif + +%if %build_sophos +%files vscan-sophos +%defattr(-,root,root) +%{_libdir}/%{name}/vfs/vscan-sophos.so +%config(noreplace) %{_sysconfdir}/%{name}/vscan-sophos.conf +%doc %{vfsdir}/%{vscandir}/INSTALL +%endif + +%if %build_symantec +%files vscan-symantec +%defattr(-,root,root) +%{_libdir}/%{name}/vfs/vscan-symantec.so +%config(noreplace) %{_sysconfdir}/%{name}/vscan-symantec.conf +%doc %{vfsdir}/%{vscandir}/INSTALL +%endif + +%if %build_trend +%files vscan-trend +%defattr(-,root,root) +%{_libdir}/%{name}/vfs/vscan-trend.so +%config(noreplace) %{_sysconfdir}/%{name}/vscan-trend.conf +%doc %{vfsdir}/%{vscandir}/INSTALL +%endif + +%exclude %{_mandir}/man1/smbsh*.1* + +%changelog +* Fri Dec 05 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.1-0.pre3.5mdk +- Allow winbind to start if old winbind ranges are used (ease upgrades) + +* Tue Nov 18 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.1-0.pre3.4mdk +- Fix build as system on 8.2 (and probably earlier) + +* Sun Nov 16 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.1-0.pre3.3mdk +- Ensure printer drivers keep permissions by default (setgid and inherit perms) + +* Fri Nov 14 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.1-0.pre3.2mdk +- 3.0.1pre3 +- Add support for Mandrake 10.0 (as system samba) +- Fix alternatives triggers +- Fix obsoletes + +* Mon Nov 10 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.1-0.pre2.2mdk +- 3.0.1pre2 +- misc spec files (pointed out by Luca Olivetti) +- Fix path to smbldap-passwd.pl +- Only allow one copy of winbind and nss_wins +- Add trigger for alternatives + +* Sun Oct 12 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.1-0.pre1.2mdk +- 3.0.1pre1 +- remove buildroot patch (p3), fixed upstream + +* Thu Sep 25 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.0-2mdk +- 3.0.0 final + +* Sat Sep 13 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.0-0.rc4.2mdk +- rc4 +- Don't update alternatives in pre/post scripts when not using alternatives +- Fix case of --with-system without alternatives +- Final fixes to smbldap-tools for non-system case +- Remove duplicate docs (really - 1 character typo ...) +- Update configs (fix winbind init script, add example scripts in smb.conf) + +* Tue Sep 09 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.0-0.rc3.2mdk +- rc3 +- Fix mount.smb{,fs} alternatives (spotted by Laurent Culioli) + +* Thu Sep 04 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.0-0.rc2.3mdk +- Fix alternatives +- Fix libname (can I blame guillomovitch's evil line-wrapping spec mode?) +- Fix smbldap-tools package/use names when not system samba +- Don't conflict samba3-client with samba-client for now so we can install it + +* Fri Aug 29 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.0-0.rc2.2mdk +- rc2 +- Remove patches 100-102 (upstream) +- Fix libname +- Alternatavise client +- Better solution to avoid rpath + +* Fri Aug 22 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.0-0.rc1.3mdk +- Fix build with test package (p100), but not by default (too big) +- Fix (p101) for SID resolution when member of samba-2.2.x domain +- Fix libsmbclient packages (thanks Gotz) +- version mount.cifs, patch from CVS (p102), and setuid it +- Clean up docs (guillomovitch spam ;-) + +* Sat Aug 16 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.0-0.rc1.2mdk +- rc1 +- disable test subpackage since it's broken again + +* Mon Jul 28 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.0-0.beta3.3mdk +- Rebuild for kerberos-1.3 on cooker +- Put printer directories back +- Add mount.cifs +- Go back to standard optimisations + +* Thu Jul 17 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.0-0.beta3.2mdk +- beta3 +- remove -g from cflags to avoid large static libraries +- drop optimisation from O2 to O1 for gcc 3.3.1 +- own some directories for distriblint's benefit +- use chrpath on distro's that have it to drastically reduce rpmlint score + +* Mon Jul 14 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.0-0.beta2.3mdk +- place non-conditional excludes at the end of files list, to prevent causing + rpm in Mandrake <=8.2 from segfaulting when processing files. +- Update default config + +* Wed Jul 02 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.0-0.beta2.2mdk +- 3.0.0beta2 +- manually build editreg +- Add some new man pages + +* Tue Jun 10 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.0-0.beta1.3mdk +- add provision for passdb-ldap subpackage (it doesn't build like that yet) +- avoid debugging info on cooker/9.2 for the moment +- We probably don't need to autoconf (and can thus build on 8.1) +- We can probably build without kerberos support (and thus on 8.0) +- Don't require mysql-devel on alpha's (maybe we want to be able to disable + mysql support for other arches?) +- We shouldn't need to specifically add openssl to include path, since ssl + support is deprecated. +- png icons, change menu title to not conflict with ksambaplugin +- update to samba-vscan-0.3.3beta1, but it still does not build the vscan + modules. +- add -static-devel package +- Add buildrequires for lib packages that are picked up if installed + (ncurses, popt) in an attempt to get slbd to build samba3 +- Fix default config (P100) + +* Sun Jun 08 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.0-0.beta1.2mdk +- Get packages into cooker (klama doesn't want to build this package ..) +- samba-vscan-0.3.2b + +* Fri Jun 06 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0-0.alpha24.2mdk +- Rename debug package to test and other fixes for rpm-4.2 +- prepare for beta1 + +* Wed Apr 30 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0-0.alpha24.1mdk +- Remove some files removed upstream +- In builds from source, don't terminate on missing docs or unpackaged files + (if only we could do it for other missing files ...) + +* Mon Apr 28 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0-0.alpha24.0mdk +- Reenable debug package by (--without debug to not build it), fixed post-a23 +- Add bugzilla note for builds from source (also intended for packages made + available on samba FTP site) at samba team request +- Fix build from CVS (run autogen.sh, pass options to all rpm commands) +- Appease distriblint, but not much to be done about /usr/share/swat3/ since + samba-doc owns some subdirs, and samba-swat others, and they can be installed + independantly. +- Apply kaspersky vscan build fix from samba2 +- Final for alpha24 + +* Wed Apr 23 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0-0.alpha23.3mdk +- Small fixes in preparation for testing as system samba +- Make debug package optional (--with debug) since it's often broken +- Add support for 9.2 (including in-line smbd quota patch for glibc2.3) +- Add --with options option, which will just show you the available options and exit + +* Sun Apr 06 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0-0.alpha23.2mdk +- Alpha23 +- buildrequire autconf2.5 +- samba-vscan 0.3.2a +- Remove patch 102 (upstreamed) + +* Thu Mar 06 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0-0.alpha22.2mdk +- Alpha22 +- Add profiles binary to server and ntlm_auth to common +- smbwrapper and torture target broken (only in 9.0?) +- remove unused source 2 + +* Tue Mar 04 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0-0.alpha21.4mdk +- Don't provide samba-{server,client,common} when not system samba (bug #2617) +- Don't build libsmbclient packages when not system samba +- Fix conflict between samba-server and samba3-server (pam_smbpass) +- Fix smbwrapper (from 2.2.7a-5mdk for bug #2356) +- Fix codepage/charset example (bug #1574) + +* Thu Jan 23 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0-0.alpha21.3mdk +- samba-vscan 0.3.1 (and make it build again), including required inline edits +- Make all vscan packages provide samba(3)-vscan +- Build all vscan except kav (requires kaspersky lib) with --with-scanners +- Add vscan-(scanner).conf files +- Explicitly add ldapsam for 2.2 compatability when building --with ldap, + default build now uses new ldap passdb backend (ie you always get ldap) +- Enable (experimental) tdb passdb backend +- Fix file ownership conflicts between server and common +- Cleanup configure, to match order of --help +- Fix libdir location, was being overridden by --with-fhs +- Split off a libsmbclient and -devel package +- Add wins replication init script (patch 102) +- Workaround passdb/pdb_xml.c not compiling +- Workaround missing install targets for smbsh/smbwrapper.so in cvs +- Inline patch smbd/quotas.c for Mandrake >9.0 + +* Wed Nov 27 2002 Buchan Milne <bgmilne@linux-mandrake.com> 3.0-0.alpha21.2mdk +- Remove patch 20,21,22,23,25,26 (upstream) +- New destdir patch from cvs (18) +- package installed but non-packaged files +- new debug subpackage for vfstest and related files (it was that or nuke the + manpage ;-)) +- use _libdir for libdir instead of _sysconfdir +- Update samba-vscan (untested) + +* Mon Oct 28 2002 Buchan Milne <bgmilne@linux-mandrake.com> 3.0-0.alpha20.3mdk +- Fix mount.smbfs3 pointing to smbmount not in package +- Remove unnecessary lines from install (now done by make) +- Build with ldap and ads on all releases by default +- Put av-stuff back + +* Mon Oct 21 2002 Buchan Milne <bgmilne@linux-mandrake.com> 3.0-0.alpha20.2mdk +- When not building as system samba, avoid conflicting with system samba +- Macro-ize as much as possible for above (aka finish cleanups) +- Fix paths in init scripts and logrotate and xinetd +- Fix provides and obsoletes so as to provide samba, but not obsolete + current stable until we have a stable release (when it's the system samba). +- Add warnings to descriptions when not system samba. +- This is now parallel installable with the normal samba release, for easy + testing. It shouldn't touch existing installations. Of course, only + one samba at a time on the same interface! + +* Sat Sep 28 2002 Buchan Milne <bgmilne@linux-mandrake.com> 3.0-0.alpha20.1mdk +- Merge with 2.2.6pre2.2mdk +- Detect alpha- and beta-, along with pre-releases + +* Tue Feb 05 2002 Buchan Milne <bgmilne@cae.co.za> 3.0-alpha14-0.1mdk +- Sync with 2.2.3-2mdk (new --without options, detect when + building for a different distribution. + +* Mon Feb 04 2002 Buchan Milne <bgmilne@cae.co.za> 3.0-alpha14-0.0mdk +- Sync with 2.2.2-10mdk, which added build-time options --with ldap, + winbind, acl, wins, mdk72, mdk80, mdk81, mdk82, cooker. Added + warning in description if built with these options. + +* Wed Jan 23 2002 Buchan Milne <bgmilne@cae.co.za> 3.0-alpha13-0.2mdk +- Added if's for build_ads, which hopefully will add Active Directory + Support (by request). + +* Thu Jan 17 2002 Buchan Milne <bgmilne@cae.co.za> 3.0-alpha13-0.1mdk +- More syncing with 2.2 rpm (post and postun scripts) +- Testing without ldap + +* Thu Jan 17 2002 Buchan Milne <bgmilne@cae.co.za> 3.0-alpha13-0.0mdk +- 3.0-alpha13 +- Fixed installman.sh patch. + +* Wed Jan 09 2002 Buchan Milne <bgmilne@cae.co.za> 3.0-alpha12-0.1mdk +- Fixed %post and %preun for nss_wins, added %post and %preun for + samba-winbind (chkconfig and winbind entries in nsswitch.conf) + +* Sun Dec 23 2001 Buchan Milne <bgmilne@cae.co.za> 3.0-alpha12-0.0mdk +- 3.0-alpha12 +- Sync up with changes made in 2.2.2 to support Mandrake 8.0, 7.2 +- Added new subpackage for swat +- More if's for ldap. + +* Thu Dec 20 2001 Buchan Milne <bgmilne@cae.co.za> 3.0-alpha11-0.0mdk +- 3.0-alpha11 + +* Wed Dec 19 2001 Buchan Milne <bgmilne@cae.co.za> 3.0alpha10-0.0mdk +- 3.0-alpha10 + +* Tue Dec 18 2001 Buchan Milne <bgmilne@cae.co.za> 3.0alpha9-0.0mdk +- 3.0-alpha9 + +* Mon Dec 17 2001 Buchan Milne <bgmilne@cae.co.za> 3.0alpha8-0.1mdk +- Added net command to %files common, pdbedit and smbgroupedit to + %files, s/%{prefix}\/bin/%{_bindir}/ (the big cleanup). + Added patch to smb.init from 2.2.2 (got missed with 3.0-alpha1 patches) + +* Sun Dec 16 2001 Buchan Milne <bgmilne@cae.co.za> 3.0alpha8-0.0mdk +- Patch for installman.sh to handle lang=en correctly (p24) +- added --with-manpages-langs=en,ja,pl (translated manpages), but there + aren't any manpages for these languages yet ... so we still + need %dir and %doc entries for them ... +- patch (p25) to configure.in to support more than 2 languages. +- addtosmbpass seems to have returned for now, but make_* have disappeared! + +* Fri Dec 14 2001 Buchan Milne <bgmilne@cae.co.za> 3.0alpha6-0.0mdk +- DESTDIR patch for Makefile.in (p23), remove a lot of %%install scripts + this forces move of smbcontrol and smbmnt to %{prefix}/bin + removed --with-pam_smbpass as it doesn't compile. + +* Thu Dec 06 2001 Buchan Milne <bgmilne@cae.co.za> 3.0-0.0alpha1mdk +- Samba 3.0alpha1 released (we missed Samba 3.0alpha0!) +- Redid smbmount-sbin patch and smb.conf patch (20), removed xfs quota patch + (applied upstream), removed ook-patch (codepage directory totally different). +- Added winbind.init (21) and system-auth-winbind.pamd (22). Patches 20-23 + should be applied upstream before 3.0 ships ... + +* Wed Dec 05 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.2-6mdk +- fixed typo in system-auth-winbind.pamd (--Thanks J. Gluck). +- fixed %post xxx problem (smb not started in chkconfig --Thanks Viet & B. Kenworthy). + +* Fri Nov 23 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.2-5mdk +- Had to remove the network recycle bin patch: it seems to mess up + file deletion from windows (files appear to be "already in use") + +* Tue Nov 13 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.2-4mdk +- added network recycle bin patch: + <http://www.amherst.edu/~bbstone/howto/samba.html> +- added "recycle bin = .recycled" parameter in smb.conf [homes]. +- fixed winbind/nss_wins perms (oh no I don't own that stuff ;o) + +* Mon Nov 12 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.2-3mdk +- added %build 8.0 and 7.2, for tweakers to play around. +- changed configure options: + . removed --with-mmap, --with-netatalk (obsolete). + . added --with-msdfs, --with-vfs (seems stable, but still need testing). + +* Mon Nov 12 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.2-2mdk +- rebuilt with winbind and nss_wins enabled. + +* Wed Oct 31 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.2-1mdk +- Rebuilt on cooker. + +* Wed Oct 31 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.2-0.992mdk +- Patch for smb.conf to fix incorrect lpq command, typo in winbind, + and add sample linpopup command. Added print driver directories. +- New XFS quota patch (untested!, samba runs, but do quotas work? We + can't check yet since the kernel doesn't seem to support XFS quotas!) + +* Fri Oct 19 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.2-0.99mdk +- New samba.spec, almost ready for winbind operations. OLA for Buchan Milne + Who did a tremendous integration work on 2.2.2. + Rebuild on cooker, please test XFS (ACLs and quotas) again... + +* Mon Oct 15 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.2-0.9mdk +- Samba-2.2.2. released! Use %defines to determine which subpackages + are built and which Mandrake release we are buiding on/for (hint: define + build_mdk81 1 for Mandrake 8.1 updates) + +* Sun Oct 14 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.2-0.20011014mdk +- %post and %postun for nss_wins + +* Wed Oct 10 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.2-0.20011010mdk +- New CVS snapshot, /etc/pam.d/system-auth-winbind added + with configuration to allow easy winbind setup. + +* Sun Oct 7 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.2-0.20011007mdk +- Added new package nss_wins and moved smbpasswd to common (required by + winbind). + +* Sat Oct 6 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.2-0.20011006mdk +- Added new package winbind. + +* Mon Oct 1 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.2-0.20011001mdk +- Removed patch to smb init.d file (applied in cvs) + +* Sun Sep 30 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.2-0.20010930mdk +- Added winbind init script, which still needs to check for running nmbd. + +* Thu Sep 27 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.2-0.20010927mdk +- Built from samba-2.2.2-pre cvs, added winbindd, wbinfo, nss_winbind and + pam_winbind, moved pam_smbpass from samba-common to samba. We still + need a start-up script for winbind, or need to modify existing one. + +* Mon Sep 10 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1a-15mdk +- Enabled acl support (XFS acls now supported by kernel-2.4.8-21mdk thx Chmou) + Added smbd patch to support XFS quota (Nathan Scott) + +* Mon Sep 10 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1a-14mdk +- Oops! smbpasswd created in wrong directory... + +* Tue Sep 06 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1a-13mdk +- Removed a wrong comment in smb.conf. + Added creation of smbpasswd during install. + +* Mon Aug 27 2001 Pixel <pixel@mandrakesoft.com> 2.2.1a-12mdk +- really less verbose %%post + +* Sat Aug 25 2001 Geoffrey Lee <snailtalk@mandrakesoft.com> 2.2.1a-11mdk +- Fix shared libs in /usr/bin silliness. + +* Thu Aug 23 2001 Pixel <pixel@mandrakesoft.com> 2.2.1a-10mdk +- less verbose %%post + +* Wed Aug 22 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.1a-9mdk +- Added smbcacls (missing in %files), modification to smb.conf: ([printers] + is still needed, even with point-and-print!, user add script should + use name and not gid, since we may not get the gid . New script for + putting manpages in place (still need to be added in %files!). Moved + smbcontrol to sbin and added it and its man page to %files. + +* Wed Aug 22 2001 Pixel <pixel@mandrakesoft.com> 2.2.1a-8mdk +- cleanup /var/lib/samba/codepage/src + +* Tue Aug 21 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1a-7mdk +- moved codepage generation to %%install and codepage dir to /var/lib/samba + +* Tue Aug 21 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1a-6mdk +- /lib/* was in both samba and samba-common + Introducing samba-doc: "alas, for the sake of thy modem, shalt thou remember + when Samba was under the Megabyte..." + +* Fri Aug 03 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1a-5mdk +- Added "the gc touch" to smbinit through the use of killall -0 instead of + grep cupsd | grep -v grep (too many greps :o) + +* Wed Jul 18 2001 Stefan van der Eijk <stefan@eijk.nu> 2.2.1a-4mdk +- BuildRequires: libcups-devel +- Removed BuildRequires: openssl-devel + +* Fri Jul 13 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1a-3mdk +- replace chkconfig --add/del with --level 35 on/reset. + +* Fri Jul 13 2001 Geoffrey Lee <snailtalk@mandrakesoft.cm> 2.2.1a-2mdk +- Replace discription s/inetd/xinetd/, we all love xinetd, blah. + +* Thu Jul 12 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.1a-1mdk +- Bugfix release. Fixed add user script, added print$ share and printer admin + We need to test interaction of new print support with CUPS, but printer + driver uploads should work. + +* Wed Jul 11 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1-17mdk +- fixed smb.conf a bit, rebuilt on cooker. + +* Tue Jul 10 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.1-16mdk +- Finally, samba 2.2.1 has actually been release. At least we were ready! + Cleaned up smb.conf, and added some useful entries for domain controlling. + Migrated changes made in samba's samba2.spec for 2.2.1 to this file. + Added groupadd command in post to create a group for samba machine accounts. + (We should still check the postun, samba removes pam, logs and cache) + +* Tue Jun 26 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1-15mdk +- fixed smbwrapper compile options. + +* Tue Jun 26 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1-14mdk +- added LFS support. + added smbwrapper support (smbsh) + +* Wed Jun 20 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1-13mdk +- /sbin/mount.smb and /sbin/mount.smbfs now point to the correct location + of smbmount (/usr/bin/smbmount) + +* Tue Jun 19 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1-12mdk +- smbmount and smbumount are now in /usr/bin and SUID. + added ||: to triggerpostun son you don't get error 1 anymore when rpm -e + Checked the .bz2 sources with file *: everything is OK now (I'm so stupid ;o)! + +* Tue Jun 19 2001 Geoffrey Lee <snailtalk@mandrakesoft.com> 2.2.1-11mdk +- s/Copyright/License/; +- Stop Sylvester from pretending .gz source to be .bz2 source via filename + aka really bzip2 the source. + +* Mon Jun 18 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1-10mdk +- changed Till's startup script modifications: now samba is being reloaded + automatically 1 minute after it has started (same reasons as below in 9mdk) + added _post_ and _preun_ for service smb + fixed creation of /var/lib/samba/{netlogon,profiles} (%dir was missing) + +* Thu Jun 14 2001 Till Kamppeter <till@mandrakesoft.com> 2.2.1-9mdk +- Modified the Samba startup script so that in case of CUPS being used as + printing system Samba only starts when the CUPS daemon is ready to accept + requests. Otherwise the CUPS queues would not appear as Samba shares. + +* Mon Jun 11 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1-8mdk +- patched smbmount.c to have it call smbmnt in sbin (thanks Seb). + +* Wed May 30 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1-7mdk +- put SWAT menu icons back in place. + +* Mon May 28 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1-6mdk +- OOPS! fixed smbmount symlinks + +* Mon May 28 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1-5mdk +- removed inetd postun script, replaced with xinetd. + updated binary list (smbcacls...) + cleaned samba.spec + +* Mon May 28 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.1-4mdk +- Changed configure options to point to correct log and codepage directories, + added crude script to fix logrotate file for new log file names, updated + patches to work with current CVS. + +* Thu May 24 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1-3mdk +- Cleaned and updated the %files section. + +* Sat May 19 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1-2mdk +- Moved all samba files from /etc to /etc/samba (Thanks DomS!). + Fixed fixinit patch (/etc/samba/smb.conf) + +* Fri May 18 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.1-1mdk +- Now use packaging/Mandrake/smb.conf, removed unused and obsolete + patches, moved netlogon and profile shares to /var/lib/samba in the + smb.conf to match the spec file. Added configuration for ntlogon to + smb.conf. Removed pam-foo, fixinit and makefilepath patches. Removed + symlink I introduced in 2.2.0-1mdk + +* Thu May 3 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.0-5mdk +- Added more configure options. Changed Description field (thx John T). + +* Wed Apr 25 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.0-4mdk +- moved netlogon and profiles to /var/lib/samba by popular demand ;o) + +* Tue Apr 24 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.0-3mdk +- moved netlogon and profiles back to /home. + +* Fri Apr 20 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.0-2mdk +- fixed post inetd/xinetd script& + +* Thu Apr 19 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.0-1mdk +- Upgrade to 2.2.0. Merged most of 2.0.7-25mdk's patches (beware + nasty "ln -sf samba-%{ver} ../samba-2.0.7" hack to force some patches + to take. smbadduser and addtosmbpass seem to have disappeared. Moved + all Mandrake-specific files to packaging/Mandrake and made patches + from those shipped with samba. Moved netlogon to /home/samba and added + /home/samba/profiles. Added winbind,smbfilter and debug2html to make command. + +* Thu Apr 12 2001 Frederic Crozat <fcrozat@mandrakesoft.com> 2.0.7-25mdk +- Fix menu entry and provide separate menu entry for GNOME + (nautilus doesn't support HTTP authentication yet) +- Add icons in package + +* Fri Mar 30 2001 Frederic Lepied <flepied@mandrakesoft.com> 2.0.7-24mdk +- use new server macros + +* Wed Mar 21 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.0.7-23mdk +- check whether /etc/inetd.conf exists (upgrade) or not (fresh install). + +* Thu Mar 15 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.0.7-22mdk +- spec cosmetics, added '-r' option to lpr-cups command line so files are + removed from /var/spool/samba after printing. + +* Tue Mar 06 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.0.7-21mdk +- merged last rh patches. + +* Thu Nov 23 2000 Sylvestre Taburet <staburet@mandrakesoft.com> 2.0.7-20mdk +- removed dependencies on cups and cups-devel so one can install samba without using cups +- added /home/netlogon + +* Mon Nov 20 2000 Till Kamppeter <till@mandrakesoft.com> 2.0.7-19mdk +- Changed default print command in /etc/smb.conf, so that the Windows + driver of the printer has to be used on the client. +- Fixed bug in smbspool which prevented from printing from a + Linux-Samba-CUPS client to a Windows server through the guest account. + +* Mon Oct 16 2000 Till Kamppeter <till@mandrakesoft.com> 2.0.7-18mdk +- Moved "smbspool" (Samba client of CUPS) to the samba-client package + +* Sat Oct 7 2000 Stefan van der Eijk <s.vandereijk@chello.nl> 2.0.7-17mdk +- Added RedHat's "quota" patch to samba-glibc21.patch.bz2, this fixes + quota related compile problems on the alpha. + +* Wed Oct 4 2000 Sylvestre Taburet <staburet@mandrakesoft.com> 2.0.7-16mdk +- Fixed 'guest ok = ok' flag in smb.conf + +* Tue Oct 3 2000 Sylvestre Taburet <staburet@mandrakesoft.com> 2.0.7-15mdk +- Allowed guest account to print in smb.conf +- added swat icon in menu + +* Tue Oct 3 2000 Sylvestre Taburet <staburet@mandrakesoft.com> 2.0.7-14mdk +- Removed rh ssl patch and --with-ssl flag: not appropriate for 7.2 + +* Tue Oct 3 2000 Sylvestre Taburet <staburet@mandrakesoft.com> 2.0.7-13mdk +- Changed fixinit patch. +- Changed smb.conf for better CUPS configuration. +- Thanks Fred for doing this ---vvv. + +* Tue Oct 3 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.0.7-12mdk +- menu entry for web configuration tool. +- merge with rh: xinetd + ssl + pam_stack. +- Added smbadduser rh-bugfix w/o relocation of config-files. + +* Mon Oct 2 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.0.7-11mdk +- added build requires on cups-devel and pam-devel. + +* Mon Oct 2 2000 Till Kamppeter <till@mandrakesoft.com> 2.0.7-10mdk +- Fixed smb.conf entry for CUPS: "printcap name = lpstat", "lpstats" was + wrong. + +* Mon Sep 25 2000 Sylvestre Taburet <staburet@mandrakesoft.com> 2.0.7-9mdk +- Cosmetic changes to make rpmlint more happy + +* Wed Sep 11 2000 Sylvestre Taburet <staburet@mandrakesoft.com> 2.0.7-8mdk +- added linkage to the using_samba book in swat + +* Fri Sep 01 2000 Sylvestre Taburet <staburet@mandrakesoft.com> 2.0.7-7mdk +- Added CUPS support to smb.conf +- Added internationalization options to smb.conf [Global] + +* Wed Aug 30 2000 Till Kamppeter <till@mandrakesoft.com> 2.0.7-6mdk +- Put "smbspool" to the files to install + +* Wed Aug 30 2000 Sylvestre Taburet <staburet@mandrakesoft.com> 2.0.7-5mdk +- Did some cleaning in the patches + +* Fri Jul 28 2000 Sylvestre Taburet <staburet@mandrakesoft.com> 2.0.7-4mdk +- relocated man pages from /usr/man to /usr/share/man for compatibility reasons + +* Fri Jul 28 2000 Sylvestre Taburet <staburet@mandrakesoft.com> 2.0.7-3mdk +- added make_unicodemap and build of unicode_map.$i in the spec file + +* Fri Jul 28 2000 Sylvestre Taburet <staburet@mandrakesoft.com> 2.0.7-2mdk +- renamed /etc/codepage/codepage.$i into /etc/codepage/unicode_map.$i to fix smbmount bug. + +* Fri Jul 07 2000 Sylvestre Taburet <staburet@mandrakesoft.com> 2.0.7-1mdk +- 2.0.7 + +* Wed Apr 05 2000 Francis Galiegue <fg@mandrakesoft.com> 2.0.6-4mdk + +- Titi sucks, does not put versions in changelog +- Fixed groups for -common and -client +- /usr/sbin/samba is no config file + +* Thu Mar 23 2000 Thierry Vignaud <tvignaud@mandrakesoft.com> +- fix buggy post install script (pixel) + +* Fri Mar 17 2000 Francis Galiegue <francis@mandrakesoft.com> 2.0.6-2mdk + +- Changed group according to 7.1 specs +- Some spec file changes +- Let spec-helper do its job + +* Thu Nov 25 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com> +- 2.0.6. + +* Tue Nov 2 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com> +- Merge with rh changes. +- Split in 3 packages. + +* Fri Aug 13 1999 Pablo Saratxaga <pablo@@mandrakesoft.com> +- corrected a bug with %post (the $1 parameter is "1" in case of + a first install, not "0". That parameter is the number of packages + of the same name that will exist after running all the steps if nothing + is removed; so it is "1" after first isntall, "2" for a second install + or an upgrade, and "0" for a removal) + +* Wed Jul 28 1999 Pablo Saratxaga <pablo@@mandrakesoft.com> +- made smbmnt and smbumount suid root, and only executable by group 'smb' + add to 'smb' group any user that should be allowed to mount/unmount + SMB shared directories + +* Fri Jul 23 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com> +- 2.0.5a (bug security fix). + +* Wed Jul 21 1999 Axalon Bloodstone <axalon@linux-mandrake.com> +- 2.0.5 +- cs/da/de/fi/fr/it/tr descriptions/summaries + +* Sun Jun 13 1999 Bernhard Rosenkränzer <bero@mandrakesoft.com> +- 2.0.4b +- recompile on a system that works ;) + +* Wed Apr 21 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com> +- Mandrake adaptations. +- Bzip2 man-pages. + +* Fri Mar 26 1999 Bill Nottingham <notting@redhat.com> +- add a mount.smb to make smb mounting a little easier. +- smb filesystems apparently do not work on alpha. Oops. + +* Thu Mar 25 1999 Bill Nottingham <notting@redhat.com> +- always create codepages + +* Tue Mar 23 1999 Bill Nottingham <notting@redhat.com> +- logrotate changes + +* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> +- auto rebuild in the new build environment (release 3) + +* Fri Mar 19 1999 Preston Brown <pbrown@redhat.com> +- updated init script to use graceful restart (not stop/start) + +* Tue Mar 9 1999 Bill Nottingham <notting@redhat.com> +- update to 2.0.3 + +* Thu Feb 18 1999 Bill Nottingham <notting@redhat.com> +- update to 2.0.2 + +* Mon Feb 15 1999 Bill Nottingham <notting@redhat.com> +- swat swat + +* Tue Feb 9 1999 Bill Nottingham <notting@redhat.com> +- fix bash2 breakage in post script + +* Fri Feb 5 1999 Bill Nottingham <notting@redhat.com> +- update to 2.0.0 + +* Mon Oct 12 1998 Cristian Gafton <gafton@redhat.com> +- make sure all binaries are stripped + +* Thu Sep 17 1998 Jeff Johnson <jbj@redhat.com> +- update to 1.9.18p10. +- fix %triggerpostun. + +* Tue Jul 07 1998 Erik Troan <ewt@redhat.com> +- updated postun triggerscript to check $0 +- clear /etc/codepages from %preun instead of %postun + +* Mon Jun 08 1998 Erik Troan <ewt@redhat.com> +- made the %postun script a tad less agressive; no reason to remove + the logs or lock file (after all, if the lock file is still there, + samba is still running) +- the %postun and %preun should only exectute if this is the final + removal +- migrated %triggerpostun from Red Hat's samba package to work around + packaging problems in some Red Hat samba releases + +* Sun Apr 26 1998 John H Terpstra <jht@samba.anu.edu.au> +- minor tidy up in preparation for release of 1.9.18p5 +- added findsmb utility from SGI package + +* Wed Mar 18 1998 John H Terpstra <jht@samba.anu.edu.au> +- Updated version and codepage info. +- Release to test name resolve order + +* Sat Jan 24 1998 John H Terpstra <jht@samba.anu.edu.au> +- Many optimisations (some suggested by Manoj Kasichainula <manojk@io.com> +- Use of chkconfig in place of individual symlinks to /etc/rc.d/init/smb +- Compounded make line +- Updated smb.init restart mechanism +- Use compound mkdir -p line instead of individual calls to mkdir +- Fixed smb.conf file path for log files +- Fixed smb.conf file path for incoming smb print spool directory +- Added a number of options to smb.conf file +- Added smbadduser command (missed from all previous RPMs) - Doooh! +- Added smbuser file and smb.conf file updates for username map diff --git a/packaging/Mandrake/smb.conf b/packaging/Mandrake/smb.conf new file mode 100644 index 00000000000..6c1c05fa52e --- /dev/null +++ b/packaging/Mandrake/smb.conf @@ -0,0 +1,529 @@ + +# This is the main Samba configuration file. You should read the +# smb.conf(5) manual page in order to understand the options listed +# here. Samba has a huge number of configurable options (perhaps too +# many!) most of which are not shown in this example +# +# Any line which starts with a ; (semi-colon) or a # (hash) +# is a comment and is ignored. In this example we will use a # +# for commentry and a ; for parts of the config file that you +# may wish to enable +# +# NOTE: Whenever you modify this file you should run the command "testparm" +# to check that you have not made any basic syntactic errors. +# +#======================= Global Settings ===================================== +[global] + +# 1. Server Naming Options: +# workgroup = NT-Domain-Name or Workgroup-Name + workgroup = MDKGROUP + +# netbios name is the name you will see in "Network Neighbourhood", +# but defaults to your hostname +; netbios name = <name_of_this_server> + +# server string is the equivalent of the NT Description field + server string = Samba Server %v + +# Message command is run by samba when a "popup" message is sent to it. +# The example below is for use with LinPopUp: +; message command = /usr/bin/linpopup "%f" "%m" %s; rm %s + +# 2. Printing Options: +# CHANGES TO ENABLE PRINTING ON ALL CUPS PRINTERS IN THE NETWORK +# (as cups is now used in linux-mandrake 7.2 by default) +# if you want to automatically load your printer list rather +# than setting them up individually then you'll need this + printcap name = lpstat + load printers = yes + +# It should not be necessary to spell out the print system type unless +# yours is non-standard. Currently supported print systems include: +# bsd, sysv, plp, lprng, aix, hpux, qnx, cups + printing = cups + +# Samba 2.2 supports the Windows NT-style point-and-print feature. To +# use this, you need to be able to upload print drivers to the samba +# server. The printer admins (or root) may install drivers onto samba. +# Note that this feature uses the print$ share, so you will need to +# enable it below. +# printer admin = @<group> <user> +; printer admin = @adm +# This should work well for winbind: +; printer admin = @"Domain Admins" + +# 3. Logging Options: +# this tells Samba to use a separate log file for each machine +# that connects + log file = /var/log/samba/log.%m + +# Put a capping on the size of the log files (in Kb). + max log size = 50 + +# Set the log (verbosity) level (0 <= log level <= 10) +; log level = 3 + +# 4. Security and Domain Membership Options: +# This option is important for security. It allows you to restrict +# connections to machines which are on your local network. The +# following example restricts access to two C class networks and +# the "loopback" interface. For more examples of the syntax see +# the smb.conf man page. Do not enable this if (tcp/ip) name resolution does +# not work for all the hosts in your network. +; hosts allow = 192.168.1. 192.168.2. 127. + +# Uncomment this if you want a guest account, you must add this to /etc/passwd +# otherwise the user "nobody" is used +; guest account = pcguest +# Allow users to map to guest: + map to guest = bad user + +# Security mode. Most people will want user level security. See +# security_level.txt for details. + security = user +# Use password server option only with security = server or security = domain +# When using security = domain, you should use password server = * +; password server = <NT-Server-Name> +; password server = * + +# Password Level allows matching of _n_ characters of the password for +# all combinations of upper and lower case. +; password level = 8 +; username level = 8 + +# You may wish to use password encryption. Please read +# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation. +# Do not enable this option unless you have read those documents +# Encrypted passwords are required for any use of samba in a Windows NT domain +# The smbpasswd file is only required by a server doing authentication, thus +# members of a domain do not need one. + encrypt passwords = yes + smb passwd file = /etc/samba/smbpasswd + +# The following are needed to allow password changing from Windows to +# also update the Linux system password. +# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above. +# NOTE2: You do NOT need these to allow workstations to change only +# the encrypted SMB passwords. They allow the Unix password +# to be kept in sync with the SMB password. +; unix password sync = Yes +# You either need to setup a passwd program and passwd chat, or +# enable pam password change +; pam password change = yes +; passwd program = /usr/bin/passwd %u +; passwd chat = *New*UNIX*password* %n\n *Re*ype*new*UNIX*password* %n\n \ +;*passwd:*all*authentication*tokens*updated*successfully* + +# Unix users can map to different SMB User names +; username map = /etc/samba/smbusers + +# Using the following line enables you to customise your configuration +# on a per machine basis. The %m gets replaced with the netbios name +# of the machine that is connecting +; include = /etc/samba/smb.conf.%m + +# Options for using winbind. Winbind allows you to do all account and +# authentication from a Windows or samba domain controller, creating +# accounts on the fly, and maintaining a mapping of Windows RIDs to unix uid's +# and gid's. winbind uid and winbind gid are the only required parameters. +# +# winbind uid is the range of uid's winbind can use when mapping RIDs to uid's +; winbind uid = 10000-20000 +# +# winbind gid is the range of uid's winbind can use when mapping RIDs to gid's +; winbind gid = 10000-20000 +# +# winbind separator is the character a user must use between their domain +# name and username, defaults to "\" +; winbind separator = + +# +# winbind use default domain allows you to have winbind return usernames +# in the form user instead of DOMAIN+user for the domain listed in the +# workgroup parameter. +; winbind use default domain = yes +# +# template homedir determines the home directory for winbind users, with +# %D expanding to their domain name and %U expanding to their username: +; template homedir = /home/%D/%U + +# When using winbind, you may want to have samba create home directories +# on the fly for authenticated users. Ensure that /etc/pam.d/samba is +# using 'service=system-auth-winbind' in pam_stack modules, and then +# enable obedience of pam restrictions below: +; obey pam restrictions = yes + +# +# template shell determines the shell users authenticated by winbind get +; template shell = /bin/bash + +# 5. Browser Control and Networking Options: +# Most people will find that this option gives better performance. +# See speed.txt and the manual pages for details + socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 + +# Configure Samba to use multiple interfaces +# If you have multiple network interfaces then you must list them +# here. See the man page for details. +; interfaces = 192.168.12.2/24 192.168.13.2/24 + +# Configure remote browse list synchronisation here +# request announcement to, or browse list sync from: +# a specific host or from / to a whole subnet (see below) +; remote browse sync = 192.168.3.25 192.168.5.255 +# Cause this host to announce itself to local subnets here +; remote announce = 192.168.1.255 192.168.2.44 + +# set local master to no if you don't want Samba to become a master +# browser on your network. Otherwise the normal election rules apply +; local master = no + +# OS Level determines the precedence of this server in master browser +# elections. The default value should be reasonable +; os level = 33 + +# Domain Master specifies Samba to be the Domain Master Browser. This +# allows Samba to collate browse lists between subnets. Don't use this +# if you already have a Windows NT domain controller doing this job +; domain master = yes + +# Preferred Master causes Samba to force a local browser election on startup +# and gives it a slightly higher chance of winning the election +; preferred master = yes + +# 6. Domain Control Options: +# Enable this if you want Samba to be a domain logon server for +# Windows95 workstations or Primary Domain Controller for WinNT and Win2k +; domain logons = yes + +# if you enable domain logons then you may want a per-machine or +# per user logon script +# run a specific logon batch file per workstation (machine) +; logon script = %m.bat +# run a specific logon batch file per username +; logon script = %U.bat + +# Where to store roaming profiles for WinNT and Win2k +# %L substitutes for this servers netbios name, %U is username +# You must uncomment the [Profiles] share below +; logon path = \\%L\Profiles\%U + +# Where to store roaming profiles for Win9x. Be careful with this as it also +# impacts where Win2k finds it's /HOME share +; logon home = \\%L\%U\.profile + + +# The add user script is used by a domain member to add local user accounts +# that have been authenticated by the domain controller, or when adding +# users via the Windows NT Tools (ie User Manager for Domains). + +# Scripts for file (passwd, smbpasswd) backend: +; add user script = /usr/sbin/useradd -s /bin/false '%u' +; delete user script = /usr/sbin/userdel '%s' +; add user to group script = /usr/bin/gpasswd -a '%u' '%g' +; delete user from group script = /usr/bin/gpasswd -d '%u' '%g' +; set primary group script = /usr/sbin/usermod -g '%g' '%u' +; add group script = /usr/sbin/groupadd %g && getent group '%g'|awk -F: '{print $3}' +; delete group script = /usr/sbin/groupdel '%g' + +# Scripts for LDAP backend (assumes nss_ldap is in use on the domain controller, +# and needs configuration in smbldap_conf.pm +; add user script = /usr/share/samba/scripts/smbldap-useradd.pl '%u' +; delete user script = /usr/share/samba/scripts/smbldap-userdel.pl '%u' +; add user to group script = /usr/share/samba/scripts/smbldap-groupmod.pl -m '%u' '%g' +; delete user from group script = /usr/share/samba/scripts/smbldap-groupmod.pl -x '%u' '%g' +; set primary group script = /usr/share/samba/scripts/smbldap-usermod.pl -g '%g' '%u' +; add group script = /usr/share/samba/scripts/smbldap-groupadd.pl '%g' && /usr/share/samba/scripts/smbldap-groupshow.pl %g|awk '/^gidNumber:/ {print $2}' +; delete group script = /usr/share/samba/scripts/smbldap-userdel.pl '%g' + + +# The add machine script is use by a samba server configured as a domain +# controller to add local machine accounts when adding machines to the domain. +# The script must work from the command line when replacing the macros, +# or the operation will fail. Check that groups exist if forcing a group. +# Script for domain controller for adding machines: +; add machine script = /usr/sbin/useradd -d /dev/null -g machines -c 'Machine Account' -s /bin/false -M %u +# Script for domain controller with LDAP backend for adding machines (please +# configure in /etc/samba/smbldap_conf.pm first): +; add machine script = /usr/share/samba/scripts/smbldap-useradd.pl -w -d /dev/null -g machines -c 'Machine Account' -s /bin/false %u + +# Domain groups: +# Domain groups are now configured by using the 'net groupmap' tool + +# Samba Password Database configuration: +# Samba now has runtime-configurable password database backends. Multiple +# passdb backends may be used, but users will only be added to the first one +# Default: +; passdb backend = smbpasswd guest +# TDB backen with fallback to smbpasswd and guest +; passdb backend = tdbsam smbpasswd guest +# LDAP with fallback to smbpasswd guest +# Enable SSL by using an ldaps url, or enable tls with 'ldap ssl' below. +; passdb backend = ldapsam:ldaps://ldap.mydomain.com smbpasswd guest +# Use the samba2 LDAP schema: +; passdb backend = ldapsam_compat:ldaps://ldap.mydomain.com smbpasswd guest + +# Idmap settings: +# Idmap backend to use: +; idmap backend = ldap:ldap://ldap.mydomain.com + +# This is a range of unix user-id's that samba will map non-unix RIDs to, +# such as when using Winbind +; idmap uid = 10000-20000 +; idmap gid = 10000-20000 + +# LDAP configuration for Domain Controlling: +# The account (dn) that samba uses to access the LDAP server +# This account needs to have write access to the LDAP tree +# You will need to give samba the password for this dn, by +# running 'smbpasswd -w mypassword' +; ldap admin dn = cn=root,dc=mydomain,dc=com +; ldap ssl = start_tls +# start_tls should run on 389, but samba defaults incorrectly to 636 +; ldap port = 389 +; ldap suffix = dc=mydomain,dc=com +# Seperate suffixes are available for machines, users, groups, and idmap, if +# ldap suffix appears first, it is appended to the specific suffix. +# Example for a unix-ish directory layout: +; ldap machine suffix = ou=Hosts +; ldap user suffix = ou=People +; ldap group suffix = ou=Group +; ldap idmap suffix = ou=Idmap +# Example for AD-ish layout: +; ldap machine suffix = cn=Computers +; ldap user suffix = cn=Users +; ldap group suffix = cn=Groups +; ldap idmap suffix = cn=Idmap + + +# 7. Name Resolution Options: +# All NetBIOS names must be resolved to IP Addresses +# 'Name Resolve Order' allows the named resolution mechanism to be specified +# the default order is "host lmhosts wins bcast". "host" means use the unix +# system gethostbyname() function call that will use either /etc/hosts OR +# DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf +# and the /etc/resolv.conf file. "host" therefore is system configuration +# dependant. This parameter is most often of use to prevent DNS lookups +# in order to resolve NetBIOS names to IP Addresses. Use with care! +# The example below excludes use of name resolution for machines that are NOT +# on the local network segment +# - OR - are not deliberately to be known via lmhosts or via WINS. +; name resolve order = wins lmhosts bcast + +# Windows Internet Name Serving Support Section: +# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server +; wins support = yes + +# WINS Server - Tells the NMBD components of Samba to be a WINS Client +# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both +; wins server = w.x.y.z + +# WINS Proxy - Tells Samba to answer name resolution queries on +# behalf of a non WINS capable client, for this to work there must be +# at least one WINS Server on the network. The default is NO. +; wins proxy = yes + +# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names +# via DNS nslookups. The built-in default for versions 1.9.17 is yes, +# this has been changed in version 1.9.18 to no. + dns proxy = no + +# 8. File Naming Options: +# Case Preservation can be handy - system default is _no_ +# NOTE: These can be set on a per share basis +; preserve case = no +; short preserve case = no +# Default case is normally upper case for all DOS files +; default case = lower +# Be very careful with case sensitivity - it can break things! +; case sensitive = no + +# Enabling internationalization: +# you can match a Windows code page with a UNIX character set. +# Windows: 437 (US), 737 (GREEK), 850 (Latin1 - Western European), +# 852 (Eastern Eu.), 861 (Icelandic), 932 (Cyrillic - Russian), +# 936 (Japanese - Shift-JIS), 936 (Simpl. Chinese), 949 (Korean Hangul), +# 950 (Trad. Chin.). +# UNIX: ISO8859-1 (Western European), ISO8859-2 (Eastern Eu.), +# ISO8859-5 (Russian Cyrillic), KOI8-R (Alt-Russ. Cyril.) +# This is an example for french users: +; dos charset = 850 +; unix charset = ISO8859-1 + + +#============================ Share Definitions ============================== +[homes] + comment = Home Directories + browseable = no + writable = yes +# You can enable VFS recycle bin on a per share basis: +# Uncomment the next 2 lines (make sure you create a +# .recycle folder in the base of the share and ensure +# all users will have write access to it. See +# examples/VFS/recycle/REAME in samba-doc for details +; vfs object = /usr/lib/samba/vfs/recycle.so + +# Un-comment the following and create the netlogon directory for Domain Logons +; [netlogon] +; comment = Network Logon Service +; path = /var/lib/samba/netlogon +; guest ok = yes +; writable = no + +#Uncomment the following 2 lines if you would like your login scripts to +#be created dynamically by ntlogon (check that you have it in the correct +#location (the default of the ntlogon rpm available in contribs) +;root preexec = /usr/bin/ntlogon -u %U -g %G -o %a -d /var/lib/samba/netlogon +;root postexec = rm -f /var/lib/samba/netlogon/%U.bat + +# Un-comment the following to provide a specific roving profile share +# the default is to use the user's home directory +;[Profiles] +; path = /var/lib/samba/profiles +; browseable = no +; guest ok = yes +# This script can be enabled to create profile directories on the fly +# You may want to turn off guest acces if you enable this, as it +# hasn't been thoroughly tested. +;root preexec = PROFILE=/var/lib/samba/profiles/%u; if [ ! -e $PROFILE ]; \ +; then mkdir -pm700 $PROFILE; chown %u.%g $PROFILE;fi + +# NOTE: If you have a CUPS print system there is no need to +# specifically define each individual printer. +# You must configure the samba printers with the appropriate Windows +# drivers on your Windows clients or upload the printer driver to the +# server from Windows (NT/2000/XP). On the Samba server no filtering is +# done. If you wish that the server provides the driver and the clients +# send PostScript ("Generic PostScript Printer" under Windows), you have +# to use 'printcap name = cups' or swap the 'print command' line below +# with the commented one. Note that print commands only work if not using +# 'printing=cups' +[printers] + comment = All Printers + path = /var/spool/samba + browseable = no +# to allow user 'guest account' to print. + guest ok = yes + writable = no + printable = yes + create mode = 0700 +# ===================================== +# print command: see above for details. +# ===================================== + print command = lpr-cups -P %p -o raw %s -r # using client side printer drivers. +; print command = lpr-cups -P %p %s # using cups own drivers (use generic PostScript on clients). + +# This share is used for Windows NT-style point-and-print support. +# To be able to install drivers, you need to be either root, or listed +# in the printer admin parameter above. Note that you also need write access +# to the directory and share definition to be able to upload the drivers. +# For more information on this, please see the Printing Support Section of +# /usr/share/doc/samba-<version>/docs/Samba-HOWTO-Collection.pdf +# +# A special case is using the CUPS Windows Postscript driver, which allows +# all features available via CUPS on the client, by publishing the ppd file +# and the cups driver by using the 'cupsaddsmb' tool. This requires the +# installation of the CUPS driver (http://www.cups.org/windows.php) +# on the server, but doesn't require you to use Windows at all :-). +[print$] + path = /var/lib/samba/printers + browseable = yes + write list = @adm root + guest ok = yes + inherit permissions = yes + # Settings suitable for Winbind: + ; write list = @"Domain Admins" root + ; force group = +@"Domain Admins" + +# A useful application of samba is to make a PDF-generation service +# To streamline this, install windows postscript drivers (preferably colour) +# on the samba server, so that clients can automatically install them. +# Note that this only works if 'printing' is *not* set to 'cups' + +[pdf-generator] + path = /var/tmp + guest ok = No + printable = Yes + comment = PDF Generator (only valid users) + #print command = /usr/share/samba/scripts/print-pdf file path win_path recipient IP & + print command = /usr/share/samba/scripts/print-pdf %s ~%u //%L/%u %m %I "%J" & + +# This one is useful for people to share files +;[tmp] +; comment = Temporary file space +; path = /tmp +; read only = no +; public = yes + +# A publicly accessible directory, but read only, except for people in +# the "staff" group +;[public] +; comment = Public Stuff +; path = /home/samba/public +; public = yes +; writable = no +; write list = @staff +# Audited directory through experimental VFS audit.so module: +# Uncomment next line. +; vfs object = /usr/lib/samba/vfs/audit.so + +# Other examples. +# +# A private printer, usable only by Fred. Spool data will be placed in Fred's +# home directory. Note that fred must have write access to the spool directory, +# wherever it is. +;[fredsprn] +; comment = Fred's Printer +; valid users = fred +; path = /homes/fred +; printer = freds_printer +; public = no +; writable = no +; printable = yes + +# A private directory, usable only by Fred. Note that Fred requires write +# access to the directory. +;[fredsdir] +; comment = Fred's Service +; path = /usr/somewhere/private +; valid users = fred +; public = no +; writable = yes +; printable = no + +# a service which has a different directory for each machine that connects +# this allows you to tailor configurations to incoming machines. You could +# also use the %u option to tailor it by user name. +# The %m gets replaced with the machine name that is connecting. +;[pchome] +; comment = PC Directories +; path = /usr/pc/%m +; public = no +; writable = yes + +# A publicly accessible directory, read/write to all users. Note that all files +# created in the directory by users will be owned by the default user, so +# any user with access can delete any other user's files. Obviously this +# directory must be writable by the default user. Another user could of course +# be specified, in which case all files would be owned by that user instead. +;[public] +; path = /usr/somewhere/else/public +; public = yes +; only guest = yes +; writable = yes +; printable = no + +# The following two entries demonstrate how to share a directory so that two +# users can place files there that will be owned by the specific users. In this +# setup, the directory should be writable by both users and should have the +# sticky bit set on it to prevent abuse. Obviously this could be extended to +# as many users as required. +;[myshare] +; comment = Mary's and Fred's stuff +; path = /usr/somewhere/shared +; valid users = mary fred +; public = no +; writable = yes +; printable = no +; create mask = 0765 + diff --git a/packaging/Mandrake/smb.init b/packaging/Mandrake/smb.init new file mode 100755 index 00000000000..c5d3c8dc21e --- /dev/null +++ b/packaging/Mandrake/smb.init @@ -0,0 +1,100 @@ +#!/bin/sh +# +# chkconfig: 35 91 9 +# description: Starts and stops the Samba smbd and nmbd daemons \ +# used to provide SMB network services. + +# 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 0 +fi + +# Source networking configuration. +. /etc/sysconfig/network + +# Check that networking is up. +[ ${NETWORKING} = "no" ] && exit 0 + +# Check that smb.conf exists. +[ -f /etc/samba/smb.conf ] || exit 0 + +RETVAL=0 + + +start() { + # If CUPS is used as printing system, reload smb after a 1 minute delay + # to allow the printers to appear properly as samba shares. + if killall -0 cupsd 2>/dev/null; then + ( sleep 60 && killproc smbd -HUP 1>/dev/null) & + fi + export TMPDIR="/var/tmp" + echo -n "Starting SMB services: " + daemon smbd -D + RETVAL=$? + echo + echo -n "Starting NMB services: " + daemon nmbd -D + RETVAL2=$? + echo + [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && touch /var/lock/subsys/smb || \ + RETVAL=1 + return $RETVAL +} +stop() { + echo -n "Shutting down SMB services: " + killproc smbd + RETVAL=$? + echo + echo -n "Shutting down NMB services: " + killproc nmbd + RETVAL2=$? + [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && rm -f /var/lock/subsys/smb + echo "" + return $RETVAL +} +restart() { + stop + start +} +reload() { + export TMPDIR="/var/tmp" + echo -n "Reloading smb.conf file: " + killproc smbd -HUP + RETVAL=$? + echo + return $RETVAL +} +mdkstatus() { + status smbd + status nmbd +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + reload) + reload + ;; + status) + mdkstatus + ;; + condrestart) + [ -f /var/lock/subsys/smb ] && restart || : + ;; + *) + echo "Usage: $0 {start|stop|restart|status|condrestart}" + exit 1 +esac + +exit $? diff --git a/packaging/Mandrake/smbprint b/packaging/Mandrake/smbprint new file mode 100755 index 00000000000..b5f689f2912 --- /dev/null +++ b/packaging/Mandrake/smbprint @@ -0,0 +1,77 @@ +#!/bin/sh + +# This script is an input filter for printcap printing on a unix machine. It +# uses the smbclient program to print the file to the specified smb-based +# server and service. +# For example you could have a printcap entry like this +# +# smb:lp=/dev/null:sd=/usr/spool/smb:sh:if=/usr/local/samba/smbprint +# +# which would create a unix printer called "smb" that will print via this +# script. You will need to create the spool directory /usr/spool/smb with +# appropriate permissions and ownerships for your system. + +# Set these to the server and service you wish to print to +# In this example I have a WfWg PC called "lapland" that has a printer +# exported called "printer" with no password. + +# +# Script further altered by hamiltom@ecnz.co.nz (Michael Hamilton) +# so that the server, service, and password can be read from +# a /var/spool/lpd/PRINTNAME/.config file. +# +# In order for this to work the /etc/printcap entry must include an +# accounting file (af=...): +# +# cdcolour:\ +# :cm=CD IBM Colorjet on 6th:\ +# :sd=/var/spool/lpd/cdcolour:\ +# :af=/var/spool/lpd/cdcolour/acct:\ +# :if=/usr/local/etc/smbprint:\ +# :mx=0:\ +# :lp=/dev/null: +# +# The /usr/var/spool/lpd/PRINTNAME/.config file should contain: +# server=PC_SERVER +# service=PR_SHARENAME +# password="password" +# +# E.g. +# server=PAULS_PC +# service=CJET_371 +# password="" + +# +# Debugging log file, change to /dev/null if you like. +# +# logfile=/tmp/smb-print.log +logfile=/dev/null + + +# +# The last parameter to the filter is the accounting file name. +# Extract the directory name from the file name. +# Concat this with /.config to get the config file. +# +eval acct_file=\${$#} +spool_dir=`dirname $acct_file` +config_file=$spool_dir/.config + +# Should read the following variables set in the config file: +# server +# service +# password +eval `cat $config_file` + +# +# Some debugging help, change the >> to > if you want to same space. +# +echo "server $server, service $service" >> $logfile + +( +# NOTE You may wish to add the line `echo translate' if you want automatic +# CR/LF translation when printing. +# echo translate + echo "print -" + cat +) | /usr/bin/smbclient "//$server/$service" $password -U $server -N >> $logfile diff --git a/packaging/Mandrake/smbusers b/packaging/Mandrake/smbusers new file mode 100644 index 00000000000..ae3389f53f8 --- /dev/null +++ b/packaging/Mandrake/smbusers @@ -0,0 +1,3 @@ +# Unix_name = SMB_name1 SMB_name2 ... +root = administrator admin +nobody = guest pcguest smbguest diff --git a/packaging/Mandrake/smbw.patch b/packaging/Mandrake/smbw.patch new file mode 100644 index 00000000000..0abbfdf73f6 --- /dev/null +++ b/packaging/Mandrake/smbw.patch @@ -0,0 +1,10 @@ +--- samba-2.0.0/source/smbwrapper/smbsh.in.orig Mon Oct 5 22:37:01 1998 ++++ samba-2.0.0/source/smbwrapper/smbsh.in Mon Oct 5 22:37:51 1998 +@@ -1,6 +1,6 @@ + #! /bin/sh + +-SMBW_LIBDIR=${SMBW_LIBDIR-@builddir@/smbwrapper} ++SMBW_LIBDIR=${SMBW_LIBDIR-/usr/bin} + + if [ ! -f ${SMBW_LIBDIR}/smbwrapper.so ]; then + echo You need to set LIBDIR in smbsh diff --git a/packaging/Mandrake/swat_16.png.bz2 b/packaging/Mandrake/swat_16.png.bz2 Binary files differnew file mode 100644 index 00000000000..25522cab06b --- /dev/null +++ b/packaging/Mandrake/swat_16.png.bz2 diff --git a/packaging/Mandrake/swat_32.png.bz2 b/packaging/Mandrake/swat_32.png.bz2 Binary files differnew file mode 100644 index 00000000000..737d16034fa --- /dev/null +++ b/packaging/Mandrake/swat_32.png.bz2 diff --git a/packaging/Mandrake/swat_48.png.bz2 b/packaging/Mandrake/swat_48.png.bz2 Binary files differnew file mode 100644 index 00000000000..3e921c1feb5 --- /dev/null +++ b/packaging/Mandrake/swat_48.png.bz2 diff --git a/packaging/Mandrake/system-auth-winbind.pamd b/packaging/Mandrake/system-auth-winbind.pamd new file mode 100644 index 00000000000..af859af72b2 --- /dev/null +++ b/packaging/Mandrake/system-auth-winbind.pamd @@ -0,0 +1,17 @@ +#%PAM-1.0 + +auth required /lib/security/pam_env.so +auth sufficient /lib/security/pam_winbind.so +auth sufficient /lib/security/pam_unix.so likeauth nullok use_first_pass +auth required /lib/security/pam_deny.so + +account sufficient /lib/security/pam_winbind.so +account required /lib/security/pam_unix.so + +password required /lib/security/pam_cracklib.so retry=3 +password sufficient /lib/security/pam_unix.so nullok use_authtok md5 shadow +password required /lib/security/pam_deny.so + +session required /lib/security/pam_mkhomedir.so skel=/etc/skel/ umask=0022 +session required /lib/security/pam_limits.so +session required /lib/security/pam_unix.so diff --git a/packaging/Mandrake/winbind.init b/packaging/Mandrake/winbind.init new file mode 100644 index 00000000000..06e5b375d0c --- /dev/null +++ b/packaging/Mandrake/winbind.init @@ -0,0 +1,93 @@ +#!/bin/sh +# +# chkconfig: 345 81 45 +# description: Starts and stops the Samba winbind daemon to provide \ +# user and group information from a domain controller to linux. + +# 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 0 +fi + +# Source networking configuration. +. /etc/sysconfig/network + +# Check that networking is up. +[ ${NETWORKING} = "no" ] && exit 0 + +# Check that smb.conf exists. +[ -f /etc/samba/smb.conf ] || exit 0 + +RETVAL=0 + + +start() { + echo -n "Starting Winbind services: " + RETVAL=1 + if [ "`grep -i -E '(idmap|winbind) uid' /etc/samba/smb.conf | egrep -v [\#\;]`" -a "`grep -i -E '(idmap|winbind) gid' /etc/samba/smb.conf | egrep -v [\#\;]`" ]; then + daemon winbindd + RETVAL=$? + else + echo "Winbind is not configured in /etc/samba/smb.conf, not starting" + fi + echo + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/winbind || \ + RETVAL=1 + return $RETVAL +} +stop() { + echo -n "Shutting down Winbind services: " + RETVAL=1 + if [ "`grep -i 'winbind uid' /etc/samba/smb.conf | egrep -v [\#\;]`" -a "`grep -i 'idmap gid' /etc/samba/smb.conf | egrep -v [\#\;]`" ]; then + killproc winbindd + RETVAL=$? + fi + echo + [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/winbind + return $RETVAL +} +restart() { + stop + start +} +reload() { + export TMPDIR="/var/tmp" + echo -n "Checking domain trusts: " + killproc winbindd -HUP + RETVAL=$? + echo + return $RETVAL +} +mdkstatus() { + status winbindd +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + reload) + reload + ;; + status) + mdkstatus + ;; + condrestart) + [ -f /var/lock/subsys/winbindd ] && restart || : + ;; + *) + echo "Usage: $0 {start|stop|restart|status|condrestart}" + exit 1 +esac + +exit $? diff --git a/packaging/Mandrake/wrepld.init b/packaging/Mandrake/wrepld.init new file mode 100644 index 00000000000..b8057f5f40a --- /dev/null +++ b/packaging/Mandrake/wrepld.init @@ -0,0 +1,93 @@ +#!/bin/sh +# +# chkconfig: 345 81 45 +# description: Starts and stops the Samba wrepld daemon to provide \ +# WINS replication services between WINS partner servers. + +# 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 0 +fi + +# Source networking configuration. +. /etc/sysconfig/network + +# Check that networking is up. +[ ${NETWORKING} = "no" ] && exit 0 + +# Check that smb.conf exists. +[ -f /etc/samba/smb.conf ] || exit 0 + +RETVAL=0 + + +start() { + echo -n "Starting WINS Replication services: " + RETVAL=1 + if [ "`grep -i 'wins partners' /etc/samba/smb.conf | egrep -v [\#\;]`" ]; then + daemon wrepld + RETVAL=$? + else + echo "WINS replication is not configured in /etc/samba/smb.conf, not starting" + fi + echo + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/wrepld || \ + RETVAL=1 + return $RETVAL +} +stop() { + echo -n "Shutting down WINS replication services: " + RETVAL=1 + if [ "`grep -i 'wins partners' /etc/samba/smb.conf | egrep -v [\#\;]`" ]; then + killproc wrepld + RETVAL=$? + fi + echo + [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/wrepld + return $RETVAL +} +restart() { + stop + start +} +reload() { + export TMPDIR="/var/tmp" + echo -n "Reloading WINS replication: " + killproc wrepld -HUP + RETVAL=$? + echo + return $RETVAL +} +mdkstatus() { + status wrepld +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + reload) + reload + ;; + status) + mdkstatus + ;; + condrestart) + [ -f /var/lock/subsys/wrepld ] && restart || : + ;; + *) + echo "Usage: $0 {start|stop|restart|status|condrestart}" + exit 1 +esac + +exit $? diff --git a/packaging/README b/packaging/README new file mode 100644 index 00000000000..74445508e0b --- /dev/null +++ b/packaging/README @@ -0,0 +1,32 @@ +Copyright (C) 1997-2003 Samba-Team +Date: November 16, 1998 +Updates: First Release - 19970819 + 19981116 + 20030329 + 20030905 +=============================================================================== + +Note: +===== +This directory is a public repository for platform specific files including +build files for binary package distributions for specific operating systems +as well as for source file distribution packages for those systems. + +The Example directory should be used as a guide for preparation of binary +packages for distribution via the official samba ftp sites. + +The files contained here are intended for use only by those wishing to build +distribution packages and are NOT considered suitable material for anyone who +wants to just install Samba from the pristine source files contained under +the ../source directory. + +All contributions / modifications / additions / etc. to the packaging files +should be logged in https://bugzilla.samba.org/. + +In the event that anyone wishes to contribute package build information please +indicate in your response how we may access a suitable system to ensure our +ability to keep the binary distribution itself current with the released source. + +The future of cooperatively developed software such as Samba depends on the +willingness of all partners to share the fruit of their labours. + diff --git a/packaging/RedHat/.cvsignore b/packaging/RedHat/.cvsignore new file mode 100644 index 00000000000..4ce9d934e6e --- /dev/null +++ b/packaging/RedHat/.cvsignore @@ -0,0 +1,6 @@ +makefile-path.patch +makerpms.sh +samba2.spec +smbadduser +smbw.patch +samba2.rpm?.spec
\ No newline at end of file diff --git a/packaging/RedHat/README b/packaging/RedHat/README new file mode 100644 index 00000000000..646b10dbbbf --- /dev/null +++ b/packaging/RedHat/README @@ -0,0 +1,13 @@ +Preparer: Gerald Carter <jerry@samba.org> + +Instructions: Preparing Samba Packages for Red Hat Linux +=============================================================== + +We provide support only for the latest stable release of major +branches (e.g 6.2, 7.3, and 8.0). The makerpms.sh script +supports rpm version 2.x, 3.x, and 4.x + +To produce the RPMS simply type: + + root# sh makerpms.sh + diff --git a/packaging/RedHat/filter-requires-samba_rh8.sh b/packaging/RedHat/filter-requires-samba_rh8.sh new file mode 100755 index 00000000000..8428a6ad013 --- /dev/null +++ b/packaging/RedHat/filter-requires-samba_rh8.sh @@ -0,0 +1,2 @@ +#!/bin/sh +/usr/lib/rpm/find-requires $* | egrep -v '(Net::LDAP|CGI)' diff --git a/packaging/RedHat/filter-requires-samba_rh9.sh b/packaging/RedHat/filter-requires-samba_rh9.sh new file mode 100755 index 00000000000..8378523bceb --- /dev/null +++ b/packaging/RedHat/filter-requires-samba_rh9.sh @@ -0,0 +1,2 @@ +#!/bin/sh +/usr/lib/rpm/perl.req $* | egrep -v '(Net::LDAP|CGI)' diff --git a/packaging/RedHat/makerpms.sh.tmpl b/packaging/RedHat/makerpms.sh.tmpl new file mode 100644 index 00000000000..a37e03a1447 --- /dev/null +++ b/packaging/RedHat/makerpms.sh.tmpl @@ -0,0 +1,71 @@ +#!/bin/sh +# Copyright (C) John H Terpstra 1998-2002 +# Updated for RPM 3 by Jochen Wiedmann, joe@ispsoft.de +# Changed for a generic tar file rebuild by abartlet@pcug.org.au +# Changed by John H Terpstra to build on RH7.2 - should also work for earlier versions jht@samba.org + +# The following allows environment variables to override the target directories +# the alternative is to have a file in your home directory calles .rpmmacros +# containing the following: +# %_topdir /home/mylogin/redhat +# +# Note: Under this directory rpm expects to find the same directories that are under the +# /usr/src/redhat directory +# + +SPECDIR=`rpm --eval %_specdir` +SRCDIR=`rpm --eval %_sourcedir` + +# At this point the SPECDIR and SRCDIR vaiables must have a value! + +USERID=`id -u` +GRPID=`id -g` +VERSION='PVERSION' +SPECFILE="samba3.spec" +RPMVER=`rpm --version | awk '{print $3}'` +RPM="rpm" +echo The RPM Version on this machine is: $RPMVER + +## +## fix the mandir macro +## +case $RPMVER in + [23]*) + sed -e "s/MANDIR_MACRO/\%\{prefix\}\/man/g" < samba.spec > $SPECFILE + ;; + 4*) + sed -e "s/MANDIR_MACRO/\%\{_mandir\}/g" < samba.spec > $SPECFILE + ;; + *) + echo "Unknown RPM version: `rpm --version`" + exit 1 + ;; +esac + +## +## now catch the right command to build an RPM (defaults ro 'rpm' +## +case $RPMVER in + 4.[12]*) + RPM="rpmbuild" + ;; +esac + +echo "RPM build command is \"$RPM\"" + +( cd ../../source; if [ -f Makefile ]; then make distclean; fi ) +( cd ../../.. ; chown -R ${USERID}.${GRPID} samba-${VERSION} ) + +( cd ../../.. ; tar --exclude=CVS -cf - samba-${VERSION}/. | bzip2 > ${SRCDIR}/samba-${VERSION}.tar.bz2 ) + +/bin/cp -p filter-requires-samba_rh8.sh ${SRCDIR} +/bin/cp -p filter-requires-samba_rh9.sh ${SRCDIR} +chmod 755 ${SRCDIR}/filter-requires-samba_rh?.sh +/bin/cp -av $SPECFILE ${SPECDIR} + +echo Getting Ready to build release package +cd ${SPECDIR} +${RPM} -ba --clean --rmsource $SPECFILE + +echo Done. + diff --git a/packaging/RedHat/samba.log b/packaging/RedHat/samba.log new file mode 100644 index 00000000000..4b244099c4f --- /dev/null +++ b/packaging/RedHat/samba.log @@ -0,0 +1,11 @@ +/var/log/samba/log.nmbd { + postrotate + /usr/bin/killall -HUP nmbd + endscript +} + +/var/log/samba/log.smbd { + postrotate + /usr/bin/killall -HUP smbd + endscript +} diff --git a/packaging/RedHat/samba.pamd b/packaging/RedHat/samba.pamd new file mode 100644 index 00000000000..bf7a5b392ca --- /dev/null +++ b/packaging/RedHat/samba.pamd @@ -0,0 +1,4 @@ +auth required /lib/security/pam_pwdb.so nullok +account required /lib/security/pam_pwdb.so +session required /lib/security/pam_pwdb.so +password required /lib/security/pam_pwdb.so # shadow md5 nullok audit diff --git a/packaging/RedHat/samba.pamd.stack b/packaging/RedHat/samba.pamd.stack new file mode 100644 index 00000000000..6a948f92cbd --- /dev/null +++ b/packaging/RedHat/samba.pamd.stack @@ -0,0 +1,6 @@ +#%PAM-1.0 +auth required pam_nologin.so +auth required pam_stack.so service=system-auth +account required pam_stack.so service=system-auth +session required pam_stack.so service=system-auth +password required pam_stack.so service=system-auth diff --git a/packaging/RedHat/samba.spec.tmpl b/packaging/RedHat/samba.spec.tmpl new file mode 100644 index 00000000000..787fe87d4ae --- /dev/null +++ b/packaging/RedHat/samba.spec.tmpl @@ -0,0 +1,457 @@ +## grab the major and minor version of rpm +%define rpm_version `rpm --version | awk '{print $3}' | awk -F. '{print $1$2}'` + +Summary: Samba SMB client and server +Vendor: Samba Team +Name: samba +Version: PVERSION +Release: PRELEASE +License: GNU GPL version 2 +Group: Networking +Source: http://download.samba.org/samba/ftp/samba-%{version}.tar.bz2 + +# Don't depend on Net::LDAP +# one filter for RH 8 and one for 9 +Source998: filter-requires-samba_rh8.sh +Source999: filter-requires-samba_rh9.sh + +Packager: Gerald Carter [Samba-Team] <jerry@samba.org> +Requires: pam >= 0.72 kernel >= 2.2.1 glibc >= 2.1.2 +Prereq: chkconfig fileutils /sbin/ldconfig +Provides: samba = %{version} +Obsoletes: samba-common, samba-client, samba-swat +BuildRoot: %{_tmppath}/%{name}-%{version}-root +Prefix: /usr + +%description +Samba provides an SMB/CIFS server which can be used to provide +network file and print services to SMB/CIFS clients, including +various versions of MS Windows, OS/2, and other Linux machines. +Samba also provides some SMB clients, which complement the +built-in SMB filesystem in Linux. Samba uses NetBIOS over TCP/IP +(NetBT) protocols and does NOT need NetBEUI (Microsoft Raw NetBIOS +frame) protocol. + +Samba 3.0 also introduces UNICODE support and kerberos/ldap +integration as a member server in a Windows 2000 domain. + +Please refer to the WHATSNEW.txt document for fixup information. +docs directory for implementation details. + +%changelog +* Mon Nov 18 2002 Gerald Carter <jerry@samba.org> + - removed change log entries since history + is being maintained in CVS + +%prep +%setup + +%build + +# Working around perl dependency problem from docs +# Only > RH 8.0 seems to care here + +echo "rpm_version == %{rpm_version}" +if [ "%{rpm_version}" == "42" ]; then + %define __perl_requires %{SOURCE999} + echo "%{__perl_requires}" +elif [ "%{rpm_version}" == "41" ]; then + %define __find_requires %{SOURCE998} + echo "%{__find_requires}" +fi + +## Build main Samba source +cd source + +%ifarch ia64 +libtoolize --copy --force # get it to recognize IA-64 +autoheader +autoconf +EXTRA="-D_LARGEFILE64_SOURCE" +%endif + +## Get number of cpu's, default for 1 cpu on error +NUMCPU=`grep processor /proc/cpuinfo | wc -l` +if [ $NUMCPU -eq 0 ]; then + NUMCPU=1; +fi + +## run autogen if missing the configure script +if [ ! -f "configure" ]; then + ./autogen.sh +fi + +CFLAGS="$RPM_OPT_FLAGS $EXTRA" ./configure \ + --prefix=%{prefix} \ + --localstatedir=/var \ + --with-configdir=/etc/samba \ + --with-privatedir=/etc/samba \ + --with-fhs \ + --with-quotas \ + --with-smbmount \ + --with-pam \ + --with-pam_smbpass \ + --with-syslog \ + --with-utmp \ + --with-sambabook=%{prefix}/share/swat/using_samba \ + --with-swatdir=%{prefix}/share/swat \ + --with-libsmbclient +make -j${NUMCPU} proto +make -j${NUMCPU} all nsswitch/libnss_wins.so +make -j${NUMCPU} debug2html + +# Remove some permission bits to avoid to many dependencies +find examples docs -type f | xargs -r chmod -x + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT/sbin +mkdir -p $RPM_BUILD_ROOT/etc/samba +mkdir -p $RPM_BUILD_ROOT/etc/{logrotate.d,pam.d,samba} +mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d +mkdir -p $RPM_BUILD_ROOT%{prefix}/{bin,sbin} +mkdir -p $RPM_BUILD_ROOT%{prefix}/share/swat/{images,help,include,using_samba} +mkdir -p $RPM_BUILD_ROOT%{prefix}/share/swat/using_samba/{figs,gifs} +mkdir -p $RPM_BUILD_ROOTMANDIR_MACRO +mkdir -p $RPM_BUILD_ROOT/var/lib/samba +mkdir -p $RPM_BUILD_ROOT/var/{log,run}/samba +mkdir -p $RPM_BUILD_ROOT/var/spool/samba +mkdir -p $RPM_BUILD_ROOT/lib/security +mkdir -p $RPM_BUILD_ROOT%{prefix}/lib/samba/vfs +mkdir -p $RPM_BUILD_ROOT%{prefix}/{lib,include} + +# Install standard binary files +for i in nmblookup smbclient smbpasswd smbstatus testparm testprns \ + rpcclient smbspool smbcacls smbcontrol wbinfo smbmnt net \ + smbcacls pdbedit tdbbackup smbtree ntlm_auth smbcquotas +do + install -m755 source/bin/$i $RPM_BUILD_ROOT%{prefix}/bin +done + +for i in mksmbpasswd.sh smbtar findsmb +do + install -m755 source/script/$i $RPM_BUILD_ROOT%{prefix}/bin +done + +# Install secure binary files +for i in smbd nmbd swat smbmount smbumount debug2html winbindd +do + install -m755 source/bin/$i $RPM_BUILD_ROOT%{prefix}/sbin +done + +# we need a symlink for mount to recognise the smb and smbfs filesystem types +ln -sf %{prefix}/sbin/smbmount $RPM_BUILD_ROOT/sbin/mount.smbfs +ln -sf %{prefix}/sbin/smbmount $RPM_BUILD_ROOT/sbin/mount.smb + +# This allows us to get away without duplicating code that +# sombody else can maintain for us. +cd source +make DESTDIR=$RPM_BUILD_ROOT \ + BASEDIR=/usr \ + CONFIGDIR=/etc/samba \ + LIBDIR=%{prefix}/lib/samba \ + VARDIR=/var \ + SBINDIR=%{prefix}/sbin \ + BINDIR=%{prefix}/bin \ + MANDIR=MANDIR_MACRO \ + SWATDIR=%{prefix}/share/swat \ + SAMBABOOK=%{prefix}/share/swat/using_samba \ + installman installswat installdat installmodules +cd .. + +# Install the nsswitch wins library +install -m755 source/nsswitch/libnss_wins.so $RPM_BUILD_ROOT/lib +( cd $RPM_BUILD_ROOT/lib; ln -sf libnss_wins.so libnss_wins.so.2 ) + +# Install winbind shared libraries +install -m755 source/nsswitch/libnss_winbind.so $RPM_BUILD_ROOT/lib +( cd $RPM_BUILD_ROOT/lib; ln -sf libnss_winbind.so libnss_winbind.so.2 ) +install -m755 source/nsswitch/pam_winbind.so $RPM_BUILD_ROOT/lib/security + +# Install pam_smbpass.so +install -m755 source/bin/pam_smbpass.so $RPM_BUILD_ROOT/lib/security + +# libsmbclient +install -m 755 source/bin/libsmbclient.so $RPM_BUILD_ROOT%{prefix}/lib/ +install -m 755 source/bin/libsmbclient.a $RPM_BUILD_ROOT%{prefix}/lib/ +install -m 644 source/include/libsmbclient.h $RPM_BUILD_ROOT%{prefix}/include/ + +# Install the miscellany +install -m755 packaging/RedHat/smbprint $RPM_BUILD_ROOT%{prefix}/bin +install -m755 packaging/RedHat/smb.init $RPM_BUILD_ROOT/etc/rc.d/init.d/smb +install -m755 packaging/RedHat/winbind.init $RPM_BUILD_ROOT/etc/rc.d/init.d/winbind +install -m755 packaging/RedHat/smb.init $RPM_BUILD_ROOT%{prefix}/sbin/samba +install -m644 packaging/RedHat/samba.log $RPM_BUILD_ROOT/etc/logrotate.d/samba +install -m644 packaging/RedHat/smb.conf $RPM_BUILD_ROOT/etc/samba/smb.conf +install -m644 packaging/RedHat/smbusers $RPM_BUILD_ROOT/etc/samba/smbusers +install -m644 packaging/RedHat/samba.pamd $RPM_BUILD_ROOT/etc/pam.d/samba +install -m644 packaging/RedHat/samba.pamd.stack $RPM_BUILD_ROOT/etc/samba/samba.stack +install -m644 packaging/RedHat/samba.xinetd $RPM_BUILD_ROOT/etc/samba/samba.xinetd +echo 127.0.0.1 localhost > $RPM_BUILD_ROOT/etc/samba/lmhosts + +# Remove "*.old" files +find $RPM_BUILD_ROOT -name "*.old" -exec rm -f {} \; + +## +## Clean out man pages for tools not installed here +## +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}/man8/mount.cifs.8* + + +%clean +rm -rf $RPM_BUILD_ROOT + +%post +## +## only needed if this is a new install (not an upgrade) +## +if [ "$1" -eq "1" ]; then + /sbin/chkconfig --add smb + /sbin/chkconfig --add winbind + /sbin/chkconfig smb off + /sbin/chkconfig winbind off +fi + +## +## we only have to wory about this if we are upgrading +## +if [ "$1" -eq "2" ]; then + if [ -f /etc/smb.conf -a ! -f /etc/samba/smb.conf ]; then + echo "Moving old /etc/smb.conf to /etc/samba/smb.conf" + mv /etc/smb.conf /etc/samba/smb.conf + fi + + if [ -f /etc/smbusers -a ! -f /etc/samba/smbusers ]; then + echo "Moving old /etc/smbusers to /etc/samba/smbusers" + mv /etc/smbusers /etc/samba/smbusers + fi + + if [ -f /etc/lmhosts -a ! -f /etc/samba/lmhosts ]; then + echo "Moving old /etc/lmhosts to /etc/samba/lmhosts" + mv /etc/lmhosts /etc/samba/lmhosts + fi + + if [ -f /etc/MACHINE.SID -a ! -f /etc/samba/MACHINE.SID ]; then + echo "Moving old /etc/MACHINE.SID to /etc/samba/MACHINE.SID" + mv /etc/MACHINE.SID /etc/samba/MACHINE.SID + fi + + if [ -f /etc/smbpasswd -a ! -f /etc/samba/smbpasswd ]; then + echo "Moving old /etc/smbpasswd to /etc/samba/smbpasswd" + mv /etc/smbpasswd /etc/samba/smbpasswd + fi + + # + # For 2.2.1 we move the tdb files from /var/lock/samba to /var/cache/samba + # to preserve across reboots. + # + for i in /var/lock/samba/*.tdb; do + if [ -f $i ]; then + newname="/var/lib/samba/`basename $i`" + echo "Moving $i to $newname" + mv $i $newname + fi + done + + # + # For 3.0.1 we move the tdb files from /var/cache/samba to /var/lib/samba + # + echo "Moving tdb files in /var/cache/samba/*.tdb to /var/lib/samba/*.tdb" + for i in /var/cache/samba/*.tdb; do + if [ -f $i ]; then + newname="/var/lib/samba/`basename $i`" + echo "Moving $i to $newname" + mv $i $newname + fi + done +fi + +## +## New things +## + +# Add swat entry to /etc/services if not already there. +if [ ! "`grep ^\s**swat /etc/services`" ]; then + echo 'swat 901/tcp # Add swat service used via inetd' >> /etc/services +fi + +# Add swat entry to /etc/inetd.conf if needed. +if [ -f /etc/inetd.conf ]; then + if [ ! "`grep ^\s*swat /etc/inetd.conf`" ]; then + echo 'swat stream tcp nowait.400 root %{prefix}/sbin/swat swat' >> /etc/inetd.conf + killall -HUP inetd || : + fi +fi + +# Add swat entry to xinetd.d if needed. +if [ -d /etc/xinetd.d -a ! -f /etc/xinetd.d/swat ]; then + mv /etc/samba/samba.xinetd /etc/xinetd.d/swat +else + rm -f /etc/samba/samba.xinetd +fi + +# Install the correct version of the samba pam file +if [ -f /lib/security/pam_stack.so ]; then + echo "Installing stack version of /etc/pam.d/samba..." + mv /etc/samba/samba.stack /etc/pam.d/samba +else + echo "Installing non-stack version of /etc/pam.d/samba..." + rm -f /etc/samba/samba.stack +fi + +## call ldconfig to create the version symlink for libsmbclient.so +/sbin/ldconfig + +%preun +if [ "$1" -eq "0" ] ; then + /sbin/chkconfig --del smb + /sbin/chkconfig --del winbind + + # We want to remove the browse.dat and wins.dat files + # so they can not interfer with a new version of samba! + if [ -e /var/lib/samba/browse.dat ]; then + rm -f /var/lib/samba/browse.dat + fi + if [ -e /var/lib/samba/wins.dat ]; then + rm -f /var/lib/samba/wins.dat + fi + + # Remove the transient tdb files. + if [ -e /var/lib/samba/brlock.tdb ]; then + rm -f /var/lib/samba/brlock.tdb + fi + + if [ -e /var/lib/samba/unexpected.tdb ]; then + rm -f /var/lib/samba/unexpected.tdb + fi + + if [ -e /var/lib/samba/connections.tdb ]; then + rm -f /var/lib/samba/connections.tdb + fi + + if [ -e /var/lib/samba/locking.tdb ]; then + rm -f /var/lib/samba/locking.tdb + fi + + if [ -e /var/lib/samba/messages.tdb ]; then + rm -f /var/lib/samba/messages.tdb + fi +fi + +%postun +# Only delete remnants of samba if this is the final deletion. +if [ "$1" -eq "0" ] ; then + if [ -x /etc/pam.d/samba ]; then + rm -f /etc/pam.d/samba + fi + + if [ -e /var/log/samba ]; then + rm -rf /var/log/samba + fi + + if [ -e /var/lib/samba ]; then + rm -rf /var/lib/samba + fi + + # Remove swat entries from /etc/inetd.conf and /etc/services + cd /etc + tmpfile=/etc/tmp.$$ + if [ -f /etc/inetd.conf ]; then + # preserve inetd.conf permissions. + cp -p /etc/inetd.conf $tmpfile + sed -e '/^[:space:]*swat.*$/d' /etc/inetd.conf > $tmpfile + mv $tmpfile inetd.conf + fi + + # preserve services permissions. + cp -p /etc/services $tmpfile + sed -e '/^[:space:]*swat.*$/d' /etc/services > $tmpfile + mv $tmpfile /etc/services + + # Remove swat entry from /etc/xinetd.d + if [ -f /etc/xinetd.d/swat ]; then + rm -r /etc/xinetd.d/swat + fi +fi + +/sbin/ldconfig + +%files +%defattr(-,root,root) +%doc README COPYING Manifest Read-Manifest-Now +%doc WHATSNEW.txt Roadmap +%doc docs +%doc examples +%{prefix}/sbin/smbd +%{prefix}/sbin/nmbd +%{prefix}/sbin/swat +%{prefix}/bin/smbmnt +%{prefix}/sbin/smbmount +%{prefix}/sbin/smbumount +%{prefix}/sbin/winbindd +%{prefix}/sbin/samba +%{prefix}/sbin/debug2html +/sbin/mount.smbfs +/sbin/mount.smb +%{prefix}/bin/mksmbpasswd.sh +%{prefix}/bin/smbclient +%{prefix}/bin/smbspool +%{prefix}/bin/rpcclient +%{prefix}/bin/testparm +%{prefix}/bin/testprns +%{prefix}/bin/findsmb +%{prefix}/bin/smbstatus +%{prefix}/bin/nmblookup +%{prefix}/bin/smbpasswd +%{prefix}/bin/smbtar +%{prefix}/bin/smbprint +%{prefix}/bin/smbcontrol +%{prefix}/bin/wbinfo +%{prefix}/bin/net +%{prefix}/bin/ntlm_auth +%{prefix}/bin/smbcquotas +%{prefix}/bin/smbcacls +%{prefix}/bin/pdbedit +%{prefix}/bin/tdbbackup +%{prefix}/bin/smbtree +%attr(755,root,root) /lib/libnss_wins.s* +%attr(755,root,root) %{prefix}/lib/samba/vfs/*.so +%attr(755,root,root) %{prefix}/lib/samba/charset/*.so +#%attr(755,root,root) %{prefix}/lib/samba/pdb/*.so +%attr(755,root,root) %{prefix}/lib/samba/*.dat +%attr(755,root,root) %{prefix}/lib/samba/*.msg +%{prefix}/include/libsmbclient.h +%{prefix}/lib/libsmbclient.a +%{prefix}/lib/libsmbclient.so +%{prefix}/share/swat/help/* +%{prefix}/share/swat/images/* +%{prefix}/share/swat/include/*.html +%{prefix}/share/swat/lang/*/help/* +%{prefix}/share/swat/lang/*/images/* +%{prefix}/share/swat/lang/*/include/*.html +%{prefix}/share/swat/using_samba/* +%config(noreplace) /etc/samba/lmhosts +%config(noreplace) /etc/samba/smb.conf +%config(noreplace) /etc/samba/smbusers +/etc/samba/samba.stack +/etc/samba/samba.xinetd +/etc/rc.d/init.d/smb +/etc/rc.d/init.d/winbind +/etc/logrotate.d/samba +%config(noreplace) /etc/pam.d/samba +MANDIR_MACRO/man1/* +MANDIR_MACRO/man5/* +MANDIR_MACRO/man7/* +MANDIR_MACRO/man8/* +%attr(755,root,root) %dir /var/lib/samba +%dir /var/log/samba +%dir /var/run/samba +%attr(1777,root,root) %dir /var/spool/samba +%attr(-,root,root) /lib/libnss_winbind.so* +%attr(-,root,root) /lib/security/pam_winbind.so +%attr(-,root,root) /lib/security/pam_smbpass.so diff --git a/packaging/RedHat/samba.xinetd b/packaging/RedHat/samba.xinetd new file mode 100644 index 00000000000..8c38b354218 --- /dev/null +++ b/packaging/RedHat/samba.xinetd @@ -0,0 +1,15 @@ +# default: off +# description: SWAT is the Samba Web Admin Tool. Use swat \ +# to configure your Samba server. To use SWAT, \ +# connect to port 901 with your favorite web browser. +service swat +{ + port = 901 + socket_type = stream + wait = no + only_from = localhost + user = root + server = /usr/sbin/swat + log_on_failure += USERID + disable = yes +} diff --git a/packaging/RedHat/smb.conf b/packaging/RedHat/smb.conf new file mode 100644 index 00000000000..74806da16bb --- /dev/null +++ b/packaging/RedHat/smb.conf @@ -0,0 +1,286 @@ +# This is the main Samba configuration file. You should read the +# smb.conf(5) manual page in order to understand the options listed +# here. Samba has a huge number of configurable options (perhaps too +# many!) most of which are not shown in this example +# +# Any line which starts with a ; (semi-colon) or a # (hash) +# is a comment and is ignored. In this example we will use a # +# for commentry and a ; for parts of the config file that you +# may wish to enable +# +# NOTE: Whenever you modify this file you should run the command "testparm" +# to check that you have not made any basic syntactic errors. +# +#======================= Global Settings ===================================== +[global] + +# workgroup = NT-Domain-Name or Workgroup-Name + workgroup = MYGROUP + +# server string is the equivalent of the NT Description field + server string = Samba Server + +# This option is important for security. It allows you to restrict +# connections to machines which are on your local network. The +# following example restricts access to two C class networks and +# the "loopback" interface. For more examples of the syntax see +# the smb.conf man page +; hosts allow = 192.168.1. 192.168.2. 127. + +# if you want to automatically load your printer list rather +# than setting them up individually then you'll need this + printcap name = /etc/printcap + load printers = yes + +# It should not be necessary to spell out the print system type unless +# yours is non-standard. Currently supported print systems include: +# bsd, sysv, plp, lprng, aix, hpux, qnx +; printing = bsd + +# Uncomment this if you want a guest account, you must add this to /etc/passwd +# otherwise the user "nobody" is used +; guest account = pcguest + +# this tells Samba to use a separate log file for each machine +# that connects + log file = /var/log/samba/log.%m + +# Put a capping on the size of the log files (in Kb). + max log size = 50 + +# Security mode. Most people will want user level security. See +# security_level.txt for details. + security = user +# Use password server option only with security = server +; password server = <NT-Server-Name> + +# Password Level allows matching of _n_ characters of the password for +# all combinations of upper and lower case. +; password level = 8 +; username level = 8 + +# You may wish to use password encryption. Please read +# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation. +# Do not enable this option unless you have read those documents +; encrypt passwords = yes +; smb passwd file = /etc/samba/smbpasswd + +# The following are needed to allow password changing from Windows to +# update the Linux system password also. +# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above. +# NOTE2: You do NOT need these to allow workstations to change only +# the encrypted SMB passwords. They allow the Unix password +# to be kept in sync with the SMB password. +; unix password sync = Yes +; passwd program = /usr/bin/passwd %u +; passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully* + +# Unix users can map to different SMB User names +; username map = /etc/samba/smbusers + +# Using the following line enables you to customise your configuration +# on a per machine basis. The %m gets replaced with the netbios name +# of the machine that is connecting +; include = /etc/samba/smb.conf.%m + +# Most people will find that this option gives better performance. +# See speed.txt and the manual pages for details + socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 + +# Configure Samba to use multiple interfaces +# If you have multiple network interfaces then you must list them +# here. See the man page for details. +; interfaces = 192.168.12.2/24 192.168.13.2/24 + +# Configure remote browse list synchronisation here +# request announcement to, or browse list sync from: +# a specific host or from / to a whole subnet (see below) +; remote browse sync = 192.168.3.25 192.168.5.255 +# Cause this host to announce itself to local subnets here +; remote announce = 192.168.1.255 192.168.2.44 + +# Browser Control Options: +# set local master to no if you don't want Samba to become a master +# browser on your network. Otherwise the normal election rules apply +; local master = no + +# OS Level determines the precedence of this server in master browser +# elections. The default value should be reasonable +; os level = 33 + +# Domain Master specifies Samba to be the Domain Master Browser. This +# allows Samba to collate browse lists between subnets. Don't use this +# if you already have a Windows NT domain controller doing this job +; domain master = yes + +# Preferred Master causes Samba to force a local browser election on startup +# and gives it a slightly higher chance of winning the election +; preferred master = yes + +# Enable this if you want Samba to be a domain logon server for +# Windows95 workstations. +; domain logons = yes + +# if you enable domain logons then you may want a per-machine or +# per user logon script +# run a specific logon batch file per workstation (machine) +; logon script = %m.bat +# run a specific logon batch file per username +; logon script = %U.bat + +# Where to store roving profiles (only for Win95 and WinNT) +# %L substitutes for this servers netbios name, %U is username +# You must uncomment the [Profiles] share below +; logon path = \\%L\Profiles\%U + +# All NetBIOS names must be resolved to IP Addresses +# 'Name Resolve Order' allows the named resolution mechanism to be specified +# the default order is "host lmhosts wins bcast". "host" means use the unix +# system gethostbyname() function call that will use either /etc/hosts OR +# DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf +# and the /etc/resolv.conf file. "host" therefore is system configuration +# dependant. This parameter is most often of use to prevent DNS lookups +# in order to resolve NetBIOS names to IP Addresses. Use with care! +# The example below excludes use of name resolution for machines that are NOT +# on the local network segment +# - OR - are not deliberately to be known via lmhosts or via WINS. +; name resolve order = wins lmhosts bcast + +# Windows Internet Name Serving Support Section: +# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server +; wins support = yes + +# WINS Server - Tells the NMBD components of Samba to be a WINS Client +# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both +; wins server = w.x.y.z + +# WINS Proxy - Tells Samba to answer name resolution queries on +# behalf of a non WINS capable client, for this to work there must be +# at least one WINS Server on the network. The default is NO. +; wins proxy = yes + +# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names +# via DNS nslookups. The built-in default for versions 1.9.17 is yes, +# this has been changed in version 1.9.18 to no. + dns proxy = no + +# Case Preservation can be handy - system default is _no_ +# NOTE: These can be set on a per share basis +; preserve case = no +; short preserve case = no +# Default case is normally upper case for all DOS files +; default case = lower +# Be very careful with case sensitivity - it can break things! +; case sensitive = no + +#============================ Share Definitions ============================== +[homes] + comment = Home Directories + browseable = no + writable = yes + +# Un-comment the following and create the netlogon directory for Domain Logons +; [netlogon] +; comment = Network Logon Service +; path = /home/netlogon +; guest ok = yes +; writable = no +; share modes = no + + +# Un-comment the following to provide a specific roving profile share +# the default is to use the user's home directory +;[Profiles] +; path = /home/profiles +; browseable = no +; guest ok = yes + + +# NOTE: If you have a BSD-style print system there is no need to +# specifically define each individual printer +[printers] + comment = All Printers + path = /var/spool/samba + browseable = no +# Set public = yes to allow user 'guest account' to print + guest ok = no + writable = no + printable = yes + +# This one is useful for people to share files +;[tmp] +; comment = Temporary file space +; path = /tmp +; read only = no +; public = yes + +# A publicly accessible directory, but read only, except for people in +# the "staff" group +;[public] +; comment = Public Stuff +; path = /home/samba +; public = yes +; read only = yes +; write list = @staff + +# Other examples. +# +# A private printer, usable only by fred. Spool data will be placed in fred's +# home directory. Note that fred must have write access to the spool directory, +# wherever it is. +;[fredsprn] +; comment = Fred's Printer +; valid users = fred +; path = /homes/fred +; printer = freds_printer +; public = no +; writable = no +; printable = yes + +# A private directory, usable only by fred. Note that fred requires write +# access to the directory. +;[fredsdir] +; comment = Fred's Service +; path = /usr/somewhere/private +; valid users = fred +; public = no +; writable = yes +; printable = no + +# a service which has a different directory for each machine that connects +# this allows you to tailor configurations to incoming machines. You could +# also use the %u option to tailor it by user name. +# The %m gets replaced with the machine name that is connecting. +;[pchome] +; comment = PC Directories +; path = /usr/pc/%m +; public = no +; writable = yes + +# A publicly accessible directory, read/write to all users. Note that all files +# created in the directory by users will be owned by the default user, so +# any user with access can delete any other user's files. Obviously this +# directory must be writable by the default user. Another user could of course +# be specified, in which case all files would be owned by that user instead. +;[public] +; path = /usr/somewhere/else/public +; public = yes +; only guest = yes +; writable = yes +; printable = no + +# The following two entries demonstrate how to share a directory so that two +# users can place files there that will be owned by the specific users. In this +# setup, the directory should be writable by both users and should have the +# sticky bit set on it to prevent abuse. Obviously this could be extended to +# as many users as required. +;[myshare] +; comment = Mary's and Fred's stuff +; path = /usr/somewhere/shared +; valid users = mary fred +; public = no +; writable = yes +; printable = no +; create mask = 0765 + + diff --git a/packaging/RedHat/smb.init b/packaging/RedHat/smb.init new file mode 100755 index 00000000000..79f4f322d03 --- /dev/null +++ b/packaging/RedHat/smb.init @@ -0,0 +1,59 @@ +#!/bin/sh +# +# chkconfig: 345 81 35 +# description: Starts and stops the Samba smbd and nmbd daemons \ +# used to provide SMB network services. + +# Source function library. +. /etc/rc.d/init.d/functions + +# Source networking configuration. +. /etc/sysconfig/network + +# Check that networking is up. +[ ${NETWORKING} = "no" ] && exit 0 + +CONFIG=/etc/samba/smb.conf + +# Check that smb.conf exists. +[ -f $CONFIG ] || exit 0 + +# See how we were called. +case "$1" in + start) + echo -n "Starting SMB services: " + daemon smbd -D + daemon nmbd -D + echo + touch /var/lock/subsys/smb + ;; + stop) + echo -n "Shutting down SMB services: " + + ## we have to get all the smbd process here instead of just the + ## main parent (i.e. killproc) because it can take a long time + ## for an individual process to process a TERM signal + smbdpids=`ps guax | grep smbd | grep -v grep | awk '{print $2}'` + for pid in $smbdpids; do + kill -TERM $pid + done + ## nmbd is ok to kill using killproc() + killproc nmbd -TERM + rm -f /var/lock/subsys/smb + echo "" + ;; + status) + status smbd + status nmbd + ;; + restart) + echo -n "Restarting SMB services: " + $0 stop + $0 start + echo "done." + ;; + *) + echo "Usage: smb {start|stop|restart|status}" + exit 1 +esac + diff --git a/packaging/RedHat/smbprint b/packaging/RedHat/smbprint new file mode 100755 index 00000000000..a0fd2e481b5 --- /dev/null +++ b/packaging/RedHat/smbprint @@ -0,0 +1,77 @@ +#!/bin/sh + +# This script is an input filter for printcap printing on a unix machine. It +# uses the smbclient program to print the file to the specified smb-based +# server and service. +# For example you could have a printcap entry like this +# +# smb:lp=/dev/null:sd=/usr/spool/smb:sh:if=/usr/local/samba/smbprint +# +# which would create a unix printer called "smb" that will print via this +# script. You will need to create the spool directory /usr/spool/smb with +# appropriate permissions and ownerships for your system. + +# Set these to the server and service you wish to print to +# In this example I have a WfWg PC called "lapland" that has a printer +# exported called "printer" with no password. + +# +# Script further altered by hamiltom@ecnz.co.nz (Michael Hamilton) +# so that the server, service, and password can be read from +# a /var/spool/lpd/PRINTNAME/.config file. +# +# In order for this to work the /etc/printcap entry must include an +# accounting file (af=...): +# +# cdcolour:\ +# :cm=CD IBM Colorjet on 6th:\ +# :sd=/var/spool/lpd/cdcolour:\ +# :af=/var/spool/lpd/cdcolour/acct:\ +# :if=/usr/local/etc/smbprint:\ +# :mx=0:\ +# :lp=/dev/null: +# +# The /usr/var/spool/lpd/PRINTNAME/.config file should contain: +# server=PC_SERVER +# service=PR_SHARENAME +# password="password" +# +# E.g. +# server=PAULS_PC +# service=CJET_371 +# password="" + +# +# Debugging log file, change to /dev/null if you like. +# +# logfile=/tmp/smb-print.log +logfile=/dev/null + + +# +# The last parameter to the filter is the accounting file name. +# Extract the directory name from the file name. +# Concat this with /.config to get the config file. +# +eval acct_file=\${$#} +spool_dir=`dirname $acct_file` +config_file=$spool_dir/.config + +# Should read the following variables set in the config file: +# server +# service +# password +eval `cat $config_file` + +# +# Some debugging help, change the >> to > if you want to same space. +# +echo "server $server, service $service" >> $logfile + +( +# NOTE You may wish to add the line `echo translate' if you want automatic +# CR/LF translation when printing. +# echo translate + echo "print -" + cat +) | /usr/bin/smbclient "\\\\$server\\$service" $password -U $server -N >> $logfile diff --git a/packaging/RedHat/smbusers b/packaging/RedHat/smbusers new file mode 100644 index 00000000000..ae3389f53f8 --- /dev/null +++ b/packaging/RedHat/smbusers @@ -0,0 +1,3 @@ +# Unix_name = SMB_name1 SMB_name2 ... +root = administrator admin +nobody = guest pcguest smbguest diff --git a/packaging/RedHat/winbind.init b/packaging/RedHat/winbind.init new file mode 100644 index 00000000000..1635dca93be --- /dev/null +++ b/packaging/RedHat/winbind.init @@ -0,0 +1,90 @@ +#!/bin/sh +# +# chkconfig: 345 91 45 +# description: Starts and stops the Samba winbind daemon to provide \ +# user and group information from a domain controller to linux. + +# 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 0 +fi + +# Source networking configuration. +. /etc/sysconfig/network + +# Check that networking is up. +[ ${NETWORKING} = "no" ] && exit 0 + +CONFIG=/etc/samba/smb.conf + +# Check that smb.conf exists. +[ -f $CONFIG ] || exit 0 + +start() { + echo -n "Starting Winbind services: " + RETVAL=1 + if [ "`egrep -i '(idmap.*uid|winbind.*uid)' $CONFIG | egrep -v [\#\;]`" ]; then + daemon winbindd + RETVAL=$? + fi + echo + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/winbind || \ + RETVAL=1 + return $RETVAL +} +stop() { + echo -n "Shutting down Winbind services: " + RETVAL=1 + if [ "`egrep -i '(idmap.*uid|winbind.*uid)' $CONFIG | egrep -v [\#\;]`" ]; then + killproc winbindd + RETVAL=$? + fi + echo + [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/winbind + return $RETVAL +} +restart() { + stop + start +} +reload() { + export TMPDIR="/var/tmp" + echo -n "Checking domain trusts: " + killproc winbindd -HUP + RETVAL=$? + echo + return $RETVAL +} +mdkstatus() { + status winbindd +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + reload) + reload + ;; + status) + mdkstatus + ;; + condrestart) + [ -f /var/lock/subsys/winbindd ] && restart || : + ;; + *) + echo "Usage: $0 {start|stop|restart|status|condrestart}" + exit 1 +esac + +exit $? diff --git a/packaging/SGI/.cvsignore b/packaging/SGI/.cvsignore new file mode 100644 index 00000000000..7b74def5aea --- /dev/null +++ b/packaging/SGI/.cvsignore @@ -0,0 +1,8 @@ +bins +catman +html +codepages +swat +Makefile +samba.idb +samba.spec diff --git a/packaging/SGI/README b/packaging/SGI/README new file mode 100644 index 00000000000..f13164af4a7 --- /dev/null +++ b/packaging/SGI/README @@ -0,0 +1,44 @@ +This directory contains sample files for using Samba on an IRIX +system. These were taken from a system running IRIX 6.2. The +client machines were running Win95 and connected via the Ethernet +using TCP/IP and DNS. Consult the Samba documentation for tips +on configuring Samba "properly"; this smb.conf file is very simple. +Consult the Microsoft help/documentation to understand how to +configure the networking support on the PC clients (Win95, WfW, +etc.). + +This distribution is configured so that various Samba configuration, +binary, and log files are placed in the /usr/samba file hierarchy. +Man pages are placed in the /usr/share/catman/u_man hierarchy. + +The version number of the distribution is a 10 digit number that +is created from the samba version number. Each section of the samba +version number forms 2 digits of the version number (with leading +zeros if necessary). The alpha versions add 00 and 2 digits for +the alpha number. The first release adds 0100. Patch releases add +2 digits for the patch level plus 1 and 00. + +samba version 1.9.18alpha9 would become 0109180009 +samba version 1.9.18 would become 0109180100 +samba version 1.9.18p9 would become 0109181000 + +You can enable all printers on your system to be used by samba +by running the script /usr/samba/mkprintcap.sh + +This distribution automatically configures samba to run as deamons +by the script /etc/init.d/samba and the file /etc/config/samba +(used by chkconfig). If you would prefer to have samba started by +inetd you can run the script /usr/samba/inetd.sh. + +To create a Samba distribution you must have the Documenter's WorkBench +package installed to format the manual pages. In addition you need +to have the Software Packager software (inst_dev) installed to +generate the inst images, and Perl to generate the spec and idb files. + +From /usr/samba/packaging/SGI directory run the mkrelease.sh script. +There is one optional argument which is the major release number of the +OS version (4, 5, or 6) you desire. If no number is specified it defaults +to 6. This script uses Perl to generate the Makefile with the proper +defines and the packaging files samba.spec and samba.idb. The binary +package files will be placed in ./bins + diff --git a/packaging/SGI/findsmb b/packaging/SGI/findsmb new file mode 100755 index 00000000000..336ff07c16f --- /dev/null +++ b/packaging/SGI/findsmb @@ -0,0 +1,141 @@ +#!/bin/perl +# +# Prints info on all smb responding machines on a subnet. +# This script needs to be run on a machine without nmbd running and be +# run as root to get correct info from WIN95 clients. +# +# syntax: +# findsmb [subnet broadcast address] +# +# with no agrument it will list machines on the current subnet +# +# There will be a "+" in front of the workgroup name for machines that are +# local master browsers for that workgroup. There will be an "*" in front +# of the workgroup name for machines that are the domain master browser for +# that workgroup. +# + +$SAMBABIN = "/usr/samba/bin"; + +for ($i = 0; $i < 2; $i++) { # test for -d option and broadcast address + $_ = shift; + if (m/-d|-D/) { + $DEBUG = 1; + } else { + if ($_) { + $BCAST = "-B $_"; + } + } +} + +sub ipsort # do numeric sort on last field of IP address +{ + @t1 = split(/\./,$a); + @t2 = split(/\./,$b); + @t1[3] <=> @t2[3]; +} + +# look for all machines that respond to a name lookup + +open(NMBLOOKUP,"$SAMBABIN/nmblookup $BCAST '*'|") || + die("Can't run nmblookup '*'.\n"); + +# get rid of all lines that are not a response IP address, +# strip everything but IP address and sort by last field in address + +@ipaddrs = sort ipsort grep(s/ \*<00>.*$//,<NMBLOOKUP>); + +# print header info + +print "\nIP ADDR NETBIOS NAME WORKGROUP/OS/VERSION $BCAST\n"; +print "---------------------------------------------------------------------\n"; + +foreach $ip (@ipaddrs) # loop through each IP address found +{ + $ip =~ s/\n//; # strip newline from IP address + +# find the netbios names registered by each machine + + open(NMBLOOKUP,"$SAMBABIN/nmblookup -r -A $ip|") || + die("Can't get nmb name list.\n"); + @nmblookup = <NMBLOOKUP>; + close NMBLOOKUP; + +# get the first <00> name + + @name = grep(/<00> - /,@nmblookup); + $_ = @name[0]; + if ($_) { # we have a netbios name + if (/GROUP/) { # is it a group name + ($name, $aliases, $type, $length, @addresses) = + gethostbyaddr(pack('C4',split('\.',$ip)),2); + if (! $name) { # could not get name + $name = "unknown nis name"; + } + } else { + /(.{1,15})\s+<00>\s+/; + $name = $1; + } + +# do an smbclient command on the netbios name. + + open(SMB,"$SAMBABIN/smbclient -N -L $name -I $ip -U% |") || + die("Can't do smbclient command.\n"); + @smb = <SMB>; + close SMB; + + if ($DEBUG) { # if -d flag print results of nmblookup and smbclient + print "===============================================================\n"; + print @nmblookup; + print @smb; + } + +# look for the OS= string + + @info = grep(/OS=/,@smb); + $_ = @info[0]; + if ($_) { # we found response + s/.*Domain=|OS=|Server=|\n//g; # strip out descriptions to make line shorter + + } else { # no OS= string in response (WIN95 client) + +# for WIN95 clients get workgroup name from nmblookup response + @name = grep(/<00> - <GROUP>/,@nmblookup); + $_ = @name[0]; + if ($_) { + /(.{1,15})\s+<00>\s+/; + $_ = "[$1]"; + } else { + $_ = "Unknown Workgroup"; + } + } + +# see if machine registered a local master browser name + if (grep(/<1d>/,@nmblookup)) { + $master = '+'; # indicate local master browser + if (grep(/<1b>/,@nmblookup)) { # how about domain master browser? + $master = '*'; # indicate domain master browser + } + } else { + $master = ' '; # not a browse master + } + +# line up info in 3 columns + + print "$ip".' 'x(16-length($ip))."$name".' 'x(14-length($name))."$master"."$_\n"; + + } else { # no netbios name found +# try getting the host name + ($name, $aliases, $type, $length, @addresses) = + gethostbyaddr(pack('C4',split('\.',$ip)),2); + if (! $name) { # could not get name + $name = "unknown nis name"; + } + if ($DEBUG) { # if -d flag print results of nmblookup + print "===============================================================\n"; + print @nmblookup; + } + print "$ip".' 'x(16-length($ip))."$name\n"; + } +} + diff --git a/packaging/SGI/idb.pl b/packaging/SGI/idb.pl new file mode 100755 index 00000000000..529695b14b2 --- /dev/null +++ b/packaging/SGI/idb.pl @@ -0,0 +1,378 @@ +#!/usr/bin/perl +require "pwd.pl" || die "Required pwd.pl not found"; + +# This perl script automatically generates the idb file + +$PKG = 'samba'; +$SRCDIR = '../..'; +$SRCPFX = '.'; + +&initpwd; +$curdir = $ENV{"PWD"}; + +if ($PKG eq "samba_irix") { + open(BOOKS,"IDB.books") || die "Unable to open IDB.books file\n"; + @books = sort idbsort <BOOKS>; + close BOOKS; +} + +# We don't want the files listed in .cvsignore in the source tree +open(IGNORES,"$SRCDIR/source/.cvsignore") || die "Unable to open .cvsignore file\n"; +while (<IGNORES>) { + chop; + next if /cvs\.log/; + $ignores{$_}++; +} +close IGNORES; + +# We don't want the files listed in .cvsignore in the source/include tree +open(IGNORES,"$SRCDIR/source/include/.cvsignore") || die "Unable to open include/.cvsignore file\n"; +while (<IGNORES>) { + chop; + $ignores{$_}++; +} +close IGNORES; + +# get the names of all the binary files to be installed +open(MAKEFILE,"$SRCDIR/source/Makefile") || die "Unable to open Makefile\n"; +while (not eof(MAKEFILE)) { + $_ = <MAKEFILE>; + chomp; + last if /^# object file lists/ ; + if (/^EXEEXT/) { + /^.*=(.*)/; + $EXEEXT = $1; + } + if (/^srcdir/) { + /^.*=(.*)/; + $srcdir = $1; + } + if (/^builddir/) { + /^.*=(.*)/; + $builddir = $1; + } + if (/^SBIN_PROGS/) { @sbinprogs = get_line($_); } + if (/^BIN_PROGS1/) { @binprogs1 = get_line($_); } + if (/^BIN_PROGS2/) { @binprogs2 = get_line($_); } + if (/^BIN_PROGS3/) { @binprogs3 = get_line($_); } + if (/^BIN_PROGS/) { @binprogs = get_line($_); } + if (/^SCRIPTS/) { @scripts = get_line($_); } + if (/^TORTURE_PROGS/) { @tortureprogs = get_line($_); } + if (/^SHLIBS/) { @shlibs = get_line($_); } +} +close MAKEFILE; + +# add my local files to the list of binaries to install +@bins = sort byfilename (@sbinprogs,@binprogs,@binprogs1,@binprogs2,@binprogs3,@scripts,("sambalp","smbprint")); + +@nsswitch = sort byfilename (@shlibs); + +# install the swat files +chdir "$SRCDIR/source"; +system("chmod +x ./script/installswat.sh"); +system("./script/installswat.sh ../packaging/SGI/swat ./ ../packaging/SGI/swat/using_samba"); +system("cp -f ../swat/README ../packaging/SGI/swat"); +chdir $curdir; + +# get a complete list of all files in the tree +chdir "$SRCDIR/"; +&dodir('.'); +chdir $curdir; + +# the files installed in docs include all the original files in docs plus all +# the "*.doc" files from the source tree +@docs = sort bynextdir grep (!/CVS/ & (/^source\/.*\.doc$/ | /^docs\/\w/),@allfiles); +@docs = grep(!/htmldocs/ & !/manpages/, @docs); +@docs = grep(!/docbook/, @docs); + +@libfiles = sort byfilename (grep (/^source\/codepages\/\w/,@allfiles),("packaging/SGI/smb.conf","source/bin/libsmbclient.a","source/bin/libsmbclient.so")); + +@swatfiles = sort grep(/^packaging\/SGI\/swat/, @allfiles); +@catman = sort grep(/^packaging\/SGI\/catman/ & !/\/$/, @allfiles); +@catman = sort bydirnum @catman; + +# strip out all the generated directories and the "*.o" files from the source +# release +@allfiles = grep(!/^.*\.o$/ & !/^.*\.po$/ & !/^.*\.po32$/ & !/^.*\.so$/ & !/^source\/bin/ & !/^packaging\/SGI\/bins/ & !/^packaging\/SGI\/catman/ & !/^packaging\/SGI\/html/ & !/^packaging\/SGI\/codepages/ & !/^packaging\/SGI\/swat/, @allfiles); + +open(IDB,"> $curdir/$PKG.idb") || die "Unable to open $PKG.idb for output\n"; + +print IDB "f 0644 root sys etc/config/samba $SRCPFX/packaging/SGI/samba.config $PKG.sw.base config(update)\n"; +print IDB "f 0644 root sys etc/config/winbind $SRCPFX/packaging/SGI/winbindd.config $PKG.sw.base config(update)\n"; +print IDB "f 0755 root sys etc/init.d/samba $SRCPFX/packaging/SGI/samba.rc $PKG.sw.base\n"; +print IDB "f 0755 root sys etc/init.d/winbind $SRCPFX/packaging/SGI/winbindd.rc $PKG.sw.base\n"; +print IDB "l 0000 root sys etc/rc0.d/K36winbind $SRCPFX/packaging/SGI $PKG.sw.base symval(../init.d/winbind)\n"; +print IDB "l 0000 root sys etc/rc0.d/K37samba $SRCPFX/packaging/SGI $PKG.sw.base symval(../init.d/samba)\n"; +print IDB "l 0000 root sys etc/rc2.d/S81samba $SRCPFX/packaging/SGI $PKG.sw.base symval(../init.d/samba)\n"; +print IDB "l 0000 root sys etc/rc2.d/S82winbind $SRCPFX/packaging/SGI $PKG.sw.base symval(../init.d/winbind)\n"; + +if ($PKG eq "samba_irix") { + print IDB "d 0755 root sys usr/relnotes/samba_irix $SRCPFX/packaging/SGI $PKG.man.relnotes\n"; + print IDB "f 0644 root sys usr/relnotes/samba_irix/TC relnotes/TC $PKG.man.relnotes\n"; + print IDB "f 0644 root sys usr/relnotes/samba_irix/ch1.z relnotes/ch1.z $PKG.man.relnotes\n"; + print IDB "f 0644 root sys usr/relnotes/samba_irix/ch2.z relnotes/ch2.z $PKG.man.relnotes\n"; + print IDB "f 0644 root sys usr/relnotes/samba_irix/ch3.z relnotes/ch3.z $PKG.man.relnotes\n"; +} +else { + @copyfile = grep (/^COPY/,@allfiles); + print IDB "d 0755 root sys usr/relnotes/samba $SRCPFX/packaging/SGI $PKG.man.relnotes\n"; + print IDB "f 0644 root sys usr/relnotes/samba/@copyfile[0] $SRCPFX/@copyfile[0] $PKG.man.relnotes\n"; + print IDB "f 0644 root sys usr/relnotes/samba/legal_notice.html $SRCPFX/packaging/SGI/legal_notice.html $PKG.man.relnotes\n"; + print IDB "f 0644 root sys usr/relnotes/samba/samba-relnotes.html $SRCPFX/packaging/SGI/relnotes.html $PKG.man.relnotes\n"; +} + +print IDB "d 0755 root sys usr/samba $SRCPFX/packaging/SGI $PKG.sw.base\n"; + +print IDB "d 0755 root sys usr/samba/bin $SRCPFX/packaging/SGI $PKG.sw.base\n"; +while(@bins) { + $nextfile = shift @bins; + ($filename = $nextfile) =~ s/^.*\///;; + + if (index($nextfile,'$')) { + if ($filename eq "smbpasswd") { + print IDB "f 0755 root sys usr/samba/bin/$filename $SRCPFX/source/$nextfile $PKG.sw.base \n"; + } + elsif ($filename eq "swat") { + print IDB "f 4755 root sys usr/samba/bin/$filename $SRCPFX/source/$nextfile $PKG.sw.base preop(\"chroot \$rbase /etc/init.d/samba stop\") exitop(\"chroot \$rbase /usr/samba/scripts/startswat.sh\") removeop(\"chroot \$rbase /sbin/cp /etc/inetd.conf /etc/inetd.conf.O ; chroot \$rbase /sbin/sed -e '/^swat/D' -e '/^#SWAT/D' /etc/inetd.conf.O >/etc/inetd.conf; /etc/killall -HUP inetd || true\")\n"; + } + elsif ($filename eq "sambalp") { + print IDB "f 0755 root sys usr/samba/bin/$filename $SRCPFX/packaging/SGI/$filename $PKG.sw.base \n"; + } + elsif ($filename eq "smbprint") { + print IDB "f 0755 root sys usr/samba/bin/$filename $SRCPFX/packaging/SGI/$filename $PKG.sw.base\n"; + } + elsif ($filename eq "smbd") { + print IDB "f 0755 root sys usr/samba/bin/$filename $SRCPFX/source/$nextfile $PKG.sw.base \n"; + if (-e "$SRCDIR/source/$nextfile.noquota") { + print IDB "f 0755 root sys usr/samba/bin/$filename.noquota $SRCPFX/source/$nextfile.noquota $PKG.sw.base \n"; + } + if (-e "$SRCDIR/source/$nextfile.profile") { + print IDB "f 0755 root sys usr/samba/bin/$filename.profile $SRCPFX/source/$nextfile.profile $PKG.sw.base \n"; + } + } + elsif ($filename eq "nmbd") { + print IDB "f 0755 root sys usr/samba/bin/$filename $SRCPFX/source/$nextfile $PKG.sw.base \n"; + if (-e "$SRCDIR/source/$nextfile.profile") { + print IDB "f 0755 root sys usr/samba/bin/$filename.profile $SRCPFX/source/$nextfile.profile $PKG.sw.base \n"; + } + } + else { + print IDB "f 0755 root sys usr/samba/bin/$filename $SRCPFX/source/$nextfile $PKG.sw.base \n"; + } + } +} + +print IDB "d 0755 root sys usr/samba/docs $SRCPFX/docs $PKG.man.doc\n"; +while (@docs) { + $nextfile = shift @docs; + ($junk,$file) = split(/\//,$nextfile,2); + if (grep(/\/$/,$nextfile)) { + $file =~ s/\/$//; + $nextfile =~ s/\/$//; + print IDB "d 0755 root sys usr/samba/docs/$file $SRCPFX/$nextfile $PKG.man.doc\n"; + } + else { + print IDB "f 0644 root sys usr/samba/docs/$file $SRCPFX/$nextfile $PKG.man.doc\n"; + } +} + +print IDB "d 0755 root sys usr/samba/include $SRCPFX/packaging/SGI $PKG.sw.base\n"; +print IDB "f 0644 root sys usr/samba/include/libsmbclient.h $SRCPFX/source/include/libsmbclient.h $PKG.sw.base\n"; + +print IDB "d 0755 root sys usr/samba/lib $SRCPFX/packaging/SGI $PKG.sw.base\n"; +while (@libfiles) { + $nextfile = shift @libfiles; + ($file = $nextfile) =~ s/.*\///; + if ($file eq "smb.conf") { + print IDB "f 0644 root sys usr/samba/lib/$file $SRCPFX/$nextfile $PKG.sw.base config(suggest)\n"; + } else { + print IDB "f 0644 root sys usr/samba/lib/$file $SRCPFX/$nextfile $PKG.sw.base nostrip \n"; + } +} + +print IDB "d 0755 lp sys usr/samba/printer $SRCPFX/packaging/SGI $PKG.sw.base\n"; +print IDB "d 0755 lp sys usr/samba/printer/W32ALPHA $SRCPFX/packaging/SGI $PKG.sw.base\n"; +print IDB "d 0755 lp sys usr/samba/printer/W32MIPS $SRCPFX/packaging/SGI $PKG.sw.base\n"; +print IDB "d 0755 lp sys usr/samba/printer/W32PPC $SRCPFX/packaging/SGI $PKG.sw.base\n"; +print IDB "d 0755 lp sys usr/samba/printer/W32X86 $SRCPFX/packaging/SGI $PKG.sw.base\n"; +print IDB "d 0755 lp sys usr/samba/printer/WIN40 $SRCPFX/packaging/SGI $PKG.sw.base\n"; + +print IDB "d 0644 root sys usr/samba/private $SRCPFX/packaging/SGI $PKG.sw.base\n"; +print IDB "f 0600 root sys usr/samba/private/smbpasswd $SRCPFX/packaging/SGI/smbpasswd $PKG.sw.base config(suggest)\n"; + +print IDB "d 0755 root sys usr/samba/scripts $SRCPFX/packaging/SGI $PKG.src.samba\n"; +print IDB "f 0755 root sys usr/samba/scripts/inetd.sh $SRCPFX/packaging/SGI/inetd.sh $PKG.sw.base\n"; +print IDB "f 0755 root sys usr/samba/scripts/inst.msg $SRCPFX/packaging/SGI/inst.msg $PKG.sw.base exitop(\"chroot \$rbase /usr/samba/scripts/inst.msg\")\n"; +print IDB "f 0755 root sys usr/samba/scripts/mkprintcap.sh $SRCPFX/packaging/SGI/mkprintcap.sh $PKG.sw.base\n"; +print IDB "f 0755 root sys usr/samba/scripts/removeswat.sh $SRCPFX/packaging/SGI/removeswat.sh $PKG.sw.base\n"; +print IDB "f 0755 root sys usr/samba/scripts/startswat.sh $SRCPFX/packaging/SGI/startswat.sh $PKG.sw.base\n"; + +print IDB "d 0755 root sys usr/samba/src $SRCPFX/packaging/SGI $PKG.src.samba\n"; +@sorted = sort(@allfiles); +while (@sorted) { + $nextfile = shift @sorted; + ($file = $nextfile) =~ s/^.*\///; + next if grep(/packaging\/SGI/& (/Makefile/ | /samba\.spec/ | /samba\.idb/),$nextfile); + next if grep(/source/,$nextfile) && ($ignores{$file}); + next if ($nextfile eq "CVS"); + if (grep(/\/$/,$nextfile)) { + $nextfile =~ s/\/$//; + print IDB "d 0755 root sys usr/samba/src/$nextfile $SRCPFX/$nextfile $PKG.src.samba\n"; + } + else { + if (grep((/\.sh$/ | /configure$/ | /configure\.developer/ | /config\.guess/ | /config\.sub/ | /\.pl$/ | /mkman$/ | /pcp\/Install/ | /pcp\/Remove/),$nextfile)) { + print IDB "f 0755 root sys usr/samba/src/$nextfile $SRCPFX/$nextfile $PKG.src.samba\n"; + } + else { + print IDB "f 0644 root sys usr/samba/src/$nextfile $SRCPFX/$nextfile $PKG.src.samba\n"; + } + } +} + +print IDB "d 0755 root sys usr/samba/swat $SRCPFX/packaging/SGI/swat $PKG.sw.base\n"; +while (@swatfiles) { + $nextfile = shift @swatfiles; + ($file = $nextfile) =~ s/^packaging\/SGI\/swat\///; + next if !$file; + if (grep(/\/$/,$file)) { + $file =~ s/\/$//; + print IDB "d 0755 root sys usr/samba/swat/$file $SRCPFX/packaging/SGI/swat/$file $PKG.sw.base\n"; + } + else { + print IDB "f 0444 root sys usr/samba/swat/$file $SRCPFX/packaging/SGI/swat/$file $PKG.sw.base\n"; + } +} + +print IDB "d 0755 root sys usr/samba/var $SRCPFX/packaging/SGI $PKG.sw.base\n"; +print IDB "d 0755 root sys usr/samba/var/locks $SRCPFX/packaging/SGI $PKG.sw.base\n"; + +if ($PKG eq "samba_irix") { + while(@books) { + $nextfile = shift @books; + print IDB $nextfile; + } +} + +print IDB "d 0755 root sys usr/share/catman/u_man $SRCPFX/packaging/SGI $PKG.man.manpages\n"; +$olddirnum = "0"; +while (@catman) { + $nextfile = shift @catman; + ($file = $nextfile) =~ s/^packaging\/SGI\/catman\///; + ($dirnum = $file) =~ s/^[\D]*//; + $dirnum =~ s/\.z//; + if ($dirnum ne $olddirnum) { + print IDB "d 0755 root sys usr/share/catman/u_man/cat$dirnum $SRCPFX/packaging/SGI $PKG.man.manpages\n"; + $olddirnum = $dirnum; + } + print IDB "f 0664 root sys usr/share/catman/u_man/cat$dirnum/$file $SRCPFX/$nextfile $PKG.man.manpages\n"; +} + +if (@nsswitch) { + print IDB "d 0755 root sys var/ns/lib $SRCPFX/packaging/SGI $PKG.sw.base\n"; + while(@nsswitch) { + $nextfile = shift @nsswitch; + next if $nextfile eq 'libsmbclient'; + ($filename = $nextfile) =~ s/^.*\///; + $filename =~ s/libnss/libns/; + print IDB "f 0644 root sys var/ns/lib/$filename $SRCPFX/source/$nextfile $PKG.sw.base \n"; + } +} + +print IDB "d 01777 lp sys var/spool/samba $SRCPFX/packaging/SGI $PKG.sw.base\n"; + +close IDB; +print "\n\n$PKG.idb file has been created\n"; + +sub dodir { + local($dir, $nlink) = @_; + local($dev,$ino,$mode,$subcount); + + ($dev,$ino,$mode,$nlink) = stat('.') unless $nlink; + + opendir(DIR,'.') || die "Can't open current directory"; + local(@filenames) = sort readdir(DIR); + closedir(DIR); + + if ($nlink ==2) { # This dir has no subdirectories. + for (@filenames) { + next if $_ eq '.'; + next if $_ eq '..'; + $this = substr($dir,2)."/$_"; + push(@allfiles,$this); + } + } + else { + $subcount = $nlink -2; + for (@filenames) { + next if $_ eq '.'; + next if $_ eq '..'; + next if $_ eq 'CVS'; + ($dev,$ino,$mode,$nlink) = lstat($_); + $name = "$dir/$_"; + $this = substr($name,2); + $this .= '/' if -d; + push(@allfiles,$this); + next if $subcount == 0; # seen all the subdirs? + + next unless -d _; + + chdir $_ || die "Can't cd to $name"; + &dodir($name,$nlink); + chdir '..'; + --$subcount; + } + } +} + +sub bynextdir { + ($f0,$f1) = split(/\//,$a,2); + ($f0,$f2) = split(/\//,$b,2); + $f1 cmp $f2; +} + +sub byfilename { + ($f0,$f1) = split(/.*\//,$a,2); + if ($f1 eq "") { $f1 = $f0 }; + ($f0,$f2) = split(/.*\//,$b,2); + if ($f2 eq "") { $f2 = $f0 }; + $f1 cmp $f2; +} + +sub bydirnum { + ($f1 = $a) =~ s/^.*\///; + ($f2 = $b) =~ s/^.*\///; + ($dir1 = $a) =~ s/^[\D]*//; + ($dir2 = $b) =~ s/^[\D]*//; + if (!($dir1 <=> $dir2)) { + $f1 cmp $f2; + } + else { + $dir1 <=> $dir2; + } +} + +sub idbsort { + ($f0,$f1,$f2,$f3) = split(/ /,$a,4); + ($f0,$f1,$f2,$f4) = split(/ /,$b,4); + $f3 cmp $f4; +} + +sub get_line { + local ($line) = @_; + + $line =~ s/^.*=//; + while (($cont = index($line,"\\")) > 0) { + $_ = <MAKEFILE>; + chomp; + s/^\s*/ /; + substr($line,$cont,1) = $_; + } + $line =~ s/\$\(EXEEXT\)/$EXEEXT/g; + $line =~ s/\$\(srcdir\)//g; + $line =~ s/\$\(builddir\)//g; + $line =~ s/\$\(\S*\)\s*//g; + $line =~ s/\s\s*/ /g; + @line = split(' ',$line); + return @line; +} + diff --git a/packaging/SGI/inetd.sh b/packaging/SGI/inetd.sh new file mode 100755 index 00000000000..1d403978aec --- /dev/null +++ b/packaging/SGI/inetd.sh @@ -0,0 +1,37 @@ +#! /bin/sh +# +# kill any running samba processes +# +/etc/killall smbd nmbd +chkconfig samba off + +# +# add SAMBA deamons to inetd.conf +# +cp /etc/inetd.conf /etc/inetd.conf.O + +if [ $? -ne 0 ]; then exit 1; fi +if [ ! -r /etc/inetd.conf.O -o ! -w /etc/inetd.conf ]; then exit 1; fi + +sed -e "/^netbios/D" -e "/^#SAMBA/D" /etc/inetd.conf.O > /etc/inetd.conf +echo '#SAMBA services' >> /etc/inetd.conf +echo netbios-ssn stream tcp nowait root /usr/samba/bin/smbd smbd >> /etc/inetd.conf +echo netbios-ns dgram udp wait root /usr/samba/bin/nmbd nmbd -S >> /etc/inetd.conf + +# +# add SAMBA service ports to /etc/services +# +cp /etc/services /etc/services.O + +if [ $? -ne 0 ]; then exit 1; fi +if [ ! -r /etc/services.O -o ! -w /etc/services ]; then exit 1; fi + +sed -e "/^netbios/D" -e "/^#SAMBA/D" /etc/services.O > /etc/services +echo '#SAMBA services' >> /etc/services +echo 'netbios-ns 137/udp # SAMBA' >> /etc/services +echo 'netbios-ssn 139/tcp # SAMBA' >> /etc/services + +# +# restart inetd to start SAMBA +# +/etc/killall -HUP inetd diff --git a/packaging/SGI/inst.msg b/packaging/SGI/inst.msg new file mode 100755 index 00000000000..4d8bab389cb --- /dev/null +++ b/packaging/SGI/inst.msg @@ -0,0 +1,31 @@ +#! /bin/sh + +echo +echo +echo Samba has been installed on your system. +echo +echo Your /etc/services and /etc/inetd.conf files have +echo been modified to automatically start the +echo Samba Web Administration Tool \(SWAT\) when you +echo connect with a web browser to +echo +echo http://`hostname`:901 +echo +echo The original versions of /etc/services and +echo /etc/inetd.conf were saved with a .O extension. +echo +echo If you do not wish SWAT to be enabled you may +echo run the script /usr/samba/scripts/removeswat.sh +echo which will remove the entries from /etc/services +echo and /etc/inetd.conf +echo +echo Please review your configuration settings by +echo connecting to SWAT or editing the file +echo /usr/samba/lib/smb.conf and then starting +echo the smbd and nmbd daemons to complete the +echo installation. You may start the daemons from +echo the SWAT "Status" page or by executing the +echo following command as root. +echo +echo /etc/init.d/samba start +echo diff --git a/packaging/SGI/legal_notice.html b/packaging/SGI/legal_notice.html new file mode 100644 index 00000000000..fdb76456289 --- /dev/null +++ b/packaging/SGI/legal_notice.html @@ -0,0 +1,53 @@ +<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> +<HTML VERSION="2.0"> +<HEAD> +<TITLE>Silicon Graphics Freeware Legal Notice</TITLE> +</HEAD> + +<BODY> +<H1><A NAME="LEGAL">Silicon Graphics Freeware Legal Notice</A></H1> +<HR> +Copyright 1995, Silicon Graphics, Inc. -- ALL RIGHTS RESERVED +<P> +You may copy, modify, use and distribute this software, (i) +provided that you include the entirety of this reservation of +rights notice in all such copies, and (ii) you comply with any +additional or different obligations and/or use restrictions +specified by any third party owner or supplier of the software +in other notices that may be included with the software. + +<P> +SGI DISCLAIMS ALL WARRANTIES WITH RESPECT TO THIS SOFTWARE, +EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, +ALL WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE OR NONINFRINGEMENT. SGI SHALL NOT BE LIABLE FOR ANY +SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING, +WITHOUT LIMITATION, LOST REVENUES, LOST PROFITS, OR LOSS OF +PROSPECTIVE ECONOMIC ADVANTAGE, RESULTING FROM THE USE OR MISUSE +OF THIS SOFTWARE. + +<P> +U.S. GOVERNMENT RESTRICTED RIGHTS LEGEND: + +<P> + +Use, duplication or disclosure by the Government is subject to +restrictions as set forth in FAR 52.227.19(c)(2) or subparagraph +(c)(1)(ii) of the Rights in Technical Data and Computer Software +clause at DFARS 252.227-7013 and/or in similar or successor +clauses in the FAR, or the DOD or NASA FAR Supplement. +Unpublished - rights reserved under the Copyright Laws of United +States. Contractor/manufacturer is Silicon Graphics, Inc., 2011 +N. Shoreline Blvd. Mountain View, CA 94039-7311. + +<H3><A NAME="SUPPORT">Product Support</A></H3> + +<P> +Freeware products are not supported by Silicon Graphics or any +of its support providers. The software contained in this package +is made available through the generous efforts of their authors. +Although they are interested in your feedback, they are under no +obligation to address bugs, enhancements, or answer questions. + +</BODY> +</HTML> diff --git a/packaging/SGI/mkman b/packaging/SGI/mkman new file mode 100755 index 00000000000..a39ed9fdd0c --- /dev/null +++ b/packaging/SGI/mkman @@ -0,0 +1,18 @@ +#!/bin/sh + +if [ ! -d catman ]; then + mkdir catman +fi + + +FILES="*.?" + +cd ../../docs/manpages +for FILE in $FILES ; do + if [ "$FILE" = "smbmnt.8" ]; then continue; fi; + if [ "$FILE" = "smbmount.8" -o "$FILE" = "smbumount.8" ]; then continue; fi; + if [ "$FILE" = "smbrun.1" ]; then continue; fi; + neqn $FILE | tbl | nroff -man > ../../packaging/SGI/catman/`basename $FILE` + pack -f ../../packaging/SGI/catman/`basename $FILE` +done +cd ../../packaging/SGI diff --git a/packaging/SGI/mkprintcap.sh b/packaging/SGI/mkprintcap.sh new file mode 100755 index 00000000000..f610e757f06 --- /dev/null +++ b/packaging/SGI/mkprintcap.sh @@ -0,0 +1,15 @@ +#! /bin/sh +# +# create printcap file +# +if [ -r /usr/samba/printcap ] +then + cp /usr/samba/printcap /usr/samba/printcap.O +fi + +echo "#" > /usr/samba/printcap +echo "# Samba printcap file" >> /usr/samba/printcap +echo "# Alias names are separated by |, any name with spaces is taken as a comment" >> /usr/samba/printcap +echo "#" >> /usr/samba/printcap +lpstat -a | sed -e "s/ .*//" >> /usr/samba/printcap + diff --git a/packaging/SGI/mkrelease.sh b/packaging/SGI/mkrelease.sh new file mode 100755 index 00000000000..89854300aaf --- /dev/null +++ b/packaging/SGI/mkrelease.sh @@ -0,0 +1,126 @@ +#!/bin/sh + +# This file goes through all the necessary steps to build a release package. +# syntax: +# mkrelease.sh [clean] +# +# You can specify clean to do a make clean before building. Make clean +# will also run configure and generate the required Makefile. +# +# This will build an smbd.noquota, smbd.profile, nmbd.profile and the +# entire package with quota support and acl support. + +doclean="" +SGI_ABI=-n32 +ISA=-mips3 +CC=cc + +if [ ! -f ../../source/Makefile ]; then + doclean="clean" +fi + +if [ "$1" = "clean" ] || [ "$1" = "cleanonly" ]; then + doclean=$1 + shift +fi + +export SGI_ABI ISA CC + +if [ "$doclean" = "clean" ] || [ "$doclean" = "cleanonly" ]; then + cd ../../source + if [ -f Makefile ]; then + make distclean + fi + rm -rf bin/*.profile bin/*.noquota + cd ../packaging/SGI + rm -rf bins catman html codepages swat samba.idb samba.spec + if [ "$doclean" = "cleanonly" ]; then exit 0 ; fi +fi + +# create the catman versions of the manual pages +# +if [ "$doclean" = "clean" ]; then + echo Making manual pages + ./mkman + errstat=$? + if [ $errstat -ne 0 ]; then + echo "Error $errstat making manual pages\n"; + exit $errstat; + fi +fi + +cd ../../source +if [ "$doclean" = "clean" ]; then + echo Create SGI specific Makefile + ./configure --prefix=/usr/samba --sbindir=/usr/samba/bin --mandir=/usr/share/catman --with-acl-support --with-quotas --with-smbwrapper + errstat=$? + if [ $errstat -ne 0 ]; then + echo "Error $errstat creating Makefile\n"; + exit $errstat; + fi +fi + + +# build the sources +# +echo Making binaries + +echo "===================== Making Profile versions =======================" +make clean +make headers +make -P "CFLAGS=-O -g3 -woff 1188 -D WITH_PROFILE" bin/smbd bin/nmbd +errstat=$? +if [ $errstat -ne 0 ]; then + echo "Error $errstat building profile sources\n"; + exit $errstat; +fi +mv bin/smbd bin/smbd.profile +mv bin/nmbd bin/nmbd.profile + +echo "===================== Making No Quota versions =======================" +make clean +make headers +make -P "CFLAGS=-O -g3 -woff 1188 -D QUOTAOBJS=smbd/noquotas.o" bin/smbd +errstat=$? +if [ $errstat -ne 0 ]; then + echo "Error $errstat building noquota sources\n"; + exit $errstat; +fi +mv bin/smbd bin/smbd.noquota + +echo "===================== Making Regular versions =======================" +make -P "CFLAGS=-O -g3 -woff 1188" all libsmbclient +errstat=$? +if [ $errstat -ne 0 ]; then + echo "Error $errstat building sources\n"; + exit $errstat; +fi + +cd ../packaging/SGI + +# generate the packages +# +echo Generating Inst Packages +./spec.pl # create the samba.spec file +errstat=$? +if [ $errstat -ne 0 ]; then + echo "Error $errstat creating samba.spec\n"; + exit $errstat; +fi + +./idb.pl # create the samba.idb file +errstat=$? +if [ $errstat -ne 0 ]; then + echo "Error $errstat creating samba.idb\n"; + exit $errstat; +fi +sort +4 samba.idb > xxx +mv xxx samba.idb + +if [ ! -d bins ]; then + mkdir bins +fi + +# do the packaging +/usr/sbin/gendist -rbase / -sbase ../.. -idb samba.idb -spec samba.spec -dist ./bins -all + diff --git a/packaging/SGI/printcap b/packaging/SGI/printcap new file mode 100644 index 00000000000..b67b9cb167c --- /dev/null +++ b/packaging/SGI/printcap @@ -0,0 +1,5 @@ +# +# Sample printcap file +# Alias names are separated by |, any name with spaces is taken as a comment +# +lp4js|lp12|LaserJet on the third floor by the coffee machine diff --git a/packaging/SGI/relnotes.html b/packaging/SGI/relnotes.html new file mode 100644 index 00000000000..afcf5796776 --- /dev/null +++ b/packaging/SGI/relnotes.html @@ -0,0 +1,233 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> +<HTML> +<HEAD> + <TITLE>Samba Release Notes</TITLE> +</HEAD> +<BODY> + +<H1>Samba Release Notes</H1> + +<P> +<HR></P> + +<H2>Table of Contents</H2> + +<MENU> +<LI><B><A HREF="#WHATIS">What is Samba?</A></B> </LI> + +<LI><B><A HREF="#Support">Support Policy</A> </B></LI> + +<LI><B><A HREF="#Installation">Installation Information</A> </B></LI> + +<LI><B><A HREF="legal_notice.html">Silicon +Graphics Legal Notice</A> </B></LI> + +<LI><B><A HREF="#AUTHORNOTES">Author's Notice(s)</A> </B></LI> + +<LI><B><A HREF="#Documentation">Documentation Information</A> </B></LI> +</MENU> + +<P> +<HR></P> + +<H2><A NAME="WHATIS"></A>What is Samba?</H2> + +<P>Samba is an SMB client and server for Unix. It makes it possible for +client machines running Windows 95 and Windows for Workgroups to access +files and/or print services on a Unix system. Samba includes an SMB server +to provide LanManager-style file and print services to PCs, a Netbios (RFC10001/1002) +name server, and an FTP-like client application for accessing PC resources +from Unix. </P> + +<P>To make Samba work you'll need to configure your server host to run +<B>smbd</B> and <B>nmbd</B> whenever you connect to a certain Internet +port from the client machine. <B>Smbd</B> and <B>nmbd</B> can be started +either as daemons or from inetd.</P> + +<P>By default <B>smbd</B> and <B>nmbd</B> are started as daemons by the +file <I>/etc/init.d/samba</I> in conjunction with the chkconfig variable +samba being set to on. If you set chkconfig samba off then the deamons +will not be automatically started on reboot. In this case you must type +the following at a shell prompt to start samba after a reboot: </P> + +<PRE><B> chkconfig samba on + /etc/init.d/samba start</B> +</PRE> + +<P>If you make changes to your configuration files, <B>smbd</B> and <B>nmbd</B> +may be restarted by typing the following at a shell prompt: </P> + +<PRE><B> /etc/init.d/samba start</B> +</PRE> + +<P><B>smbd</B> and <B>nmbd</B> may be killed by typing the following at +a shell prompt: </P> + +<PRE><B> /etc/init.d/samba stop</B> +</PRE> + +<P>To have <B>smbd</B> and <B>nmbd</B> started by inetd you can execute +the shell script <I>/usr/samba/inetd.sh</I> to automatically configure +the various files and start the processes. This shell script first kills +any running <B>smbd</B> and <B>nmbd</B> processes. It then removes any +existing entries for "netbios*" from <I>/etc/inetd.conf</I> and +adds the following lines </P> + +<PRE><B> netbios-ssn stream tcp nowait root /usr/samba/bin/smbd smbd + netbios-ns dgram udp wait root /usr/samba/bin/nmbd nmbd -S</B> +</PRE> + +<P>It then removes any existing entries for "netbios*" from <I>/etc/services</I> +and adds the following lines </P> + +<PRE><B> netbios-ns 137/udp # SAMBA + netbios-ssn 139/tcp # SAMBA</B> +</PRE> + +<P><I>Inetd</I> is then restarted by executing:</P> + +<PRE><B> /etc/killall -HUP inetd</B> +</PRE> + +<P>If you make changes to your configuration files, <B>smbd</B> and <B>nmbd</B> +may be restarted by typing the following at a shell prompt: </P> + +<PRE><B> /etc/killall smbd nmbd + /etc/killall -HUP inetd</B> +</PRE> + +<H3><A NAME="AUTHORNOTES"></A>Author's Notice(s):</H3> + +<P>The author of this product is: Andrew Tridgell </P> + +<P>Samba is distributed freely under the <A HREF="COPYING">GNU +public license</A>. </P> + +<H3><A NAME="Support"></A>Support:</H3> + +<P>The software in this package is considered unsupported by Silicon Graphics. +Neither the authors or Silicon Graphics are compelled to help resolve problems +you may encounter in the installation, setup, or execution of this software. +To be more to the point, if you call us with an issue regarding products +in the Freeware package, we'll have to gracefully terminate the call. The +<A HREF="http://samba.org/pub/samba/"> +Samba Web Page</A> has a listing of companies and individuals that offer +commercial support for a fee. +</P> + +<H2><A NAME="Installation"></A>Installation Information</H2> + +<P>Samba includes these subsystems: </P> + +<TABLE> +<TR> +<TD ALIGN=LEFT><B>samba.sw.base</B> (<I>default</I>)</TD> + +<TD>Execution environment for Samba.</TD> +</TR> + +<TR> +<TD ALIGN=left><B>samba.man.manpages</B>(<I>default</I>)</TD> + +<TD>Samba's online manual pages (preformatted).</TD> +</TR> + +<TR> +<TD ALIGN=LEFT VALIGN=TOP><B>samba.man.doc</B> (<I>default</I>)</TD> + +<TD>Samba documentation: hints on installation and configuration, an FAQ +(Frequently Asked Questions), help in diagnosing problems, etc..</TD> +</TR> + +<TR> +<TD ALIGN=left><B>samba.man.relnotes</B> (<I>default</I>) </TD> + +<TD>Samba online release notes.</TD> +</TR> + +<TR> +<TD ALIGN=LEFT VALIGN=TOP><B>samba.src.samba</B> </TD> + +<TD>The Samba software distribution from which this product was +built (including the packaging/SGI directory which will allow this distribution +to be rebuilt).</TD> +</TR> +</TABLE> + +<H3>Installation Method</H3> + +<P>All of the subsystems for Samba can be installed using IRIX. You do +not need to use the miniroot. Refer to the <I>Software Installation Administrator's +Guide</I> for complete installation instructions. </P> + +<H3>Prerequisites</H3> + +<P>Your workstation must be running IRIX 5.3 or later in order to use this +product. </P> + +<H3>Configuration Files</H3> + +<P>Because configuration files often contain modifications, inst treats +them specially during the installation process. If they have not been modified, +inst removes the old file and installs the new version during software +updates. For configuration files that have been modified, the new version +is installed and the old version is renamed by adding the suffix .O (for +older) to the name. The no-suffix version contains changes that are required +for compatibility with the rest of the newly installed software, that increase +functionality, or that fix bugs. You should use diff(1) or gdiff(1) to +compare the two versions of the files and transfer information that you +recognize as machine or site-specific from the .O version to the no-suffix +version. </P> + +<DL> +<DT><B>/usr/samba/lib/smb.conf</B> </DT> + +<DD>Configuration definitions for the <B>smbd</B> program; the SMB server +process. The default configuration sets up password-based access to home +directories on a machine as well as open access to to all printers and +/tmp. The workgroup is set by default to "workgroup". It is highly +recommended that administrators review the content of this file when installing +Samba for the first time.</DD> + +<DT><B>/usr/samba/printcap</B> </DT> + +<DD>A file that specifies the available printers on a system. It is included +as an example; administrators may want to replace it or override the reference +to it in the <B>smb.conf</B> file. The script <B>/usr/samba/mkprintcap.sh</B> +was used by inst to create a printcap file that contains all printers on +your system. You may wish to remove some printers or add a comment to each +printer name to describe its location.</DD> +</DL> + +<H2><A NAME="Documentation"></A>Documentation Information</H2> + +<P>Preformatted manual pages are installed by default as are the contents +of the <B>docs</B> directory from the Samba distribution; consult <I>samba</I>(7) +for an introduction. </P> + +<P>There is a mailing list for discussion of Samba. To subscribe send mail +to <A HREF="mailto:listproc@samba.org">listproc@samba.org</A> +with a body of "subscribe samba Your Name" </P> + +<P>To send mail to everyone on the list mail to <A HREF="mailto:samba@samba.org">samba@samba.org</A>. +</P> + +<P>There is also an announcement mailing list where new versions are announced. +To subscribe send mail to <A HREF="mailto:listproc@samba.org">listproc@samba.org</A> +with a body of "subscribe samba-announce Your Name". All announcements +also go to the samba list. </P> + +<P>You might also like to look at the Usenet news group <A HREF="news:comp.protocols.smb">comp.protocols.smb</A> +as it often contains lots of useful info and is frequented by lots of Samba +users. The newsgroup was initially setup by people on the Samba mailing +list. It is not, however, exclusive to Samba, it is a forum for discussing +the SMB protocol (which Samba implements). </P> + +<P>A Samba WWW site has been setup with lots of useful info. Connect to: +<A HREF="http://samba.org/pub/samba/">http://samba.org/pub/samba/</A>. +It is maintained by Paul Blackman (thanks Paul!). You can contact him at +<A HREF="mailto:ictinus@lake.canberra.edu.au">ictinus@lake.canberra.edu.au</A>. +</P> + +</BODY> +</HTML> diff --git a/packaging/SGI/removeswat.sh b/packaging/SGI/removeswat.sh new file mode 100755 index 00000000000..7a4745345be --- /dev/null +++ b/packaging/SGI/removeswat.sh @@ -0,0 +1,25 @@ +#! /bin/sh +# +# remove SWAT deamon from inetd.conf +# +cp /etc/inetd.conf /etc/inetd.conf.O + +if [ $? -ne 0 ]; then exit 1; fi +if [ ! -r /etc/inetd.conf.O -o ! -w /etc/inetd.conf ]; then exit 1; fi + +sed -e "/^swat/D" -e "/^#SWAT/D" /etc/inetd.conf.O > /etc/inetd.conf + +# +# remove SWAT service port from /etc/services +# +cp /etc/services /etc/services.O + +if [ $? -ne 0 ]; then exit 1; fi +if [ ! -r /etc/services.O -o ! -w /etc/services ]; then exit 1; fi + +sed -e "/^swat/D" -e "/^#SWAT/D" /etc/services.O > /etc/services + +# +# restart inetd to reread config files +# +/etc/killall -HUP inetd diff --git a/packaging/SGI/samba.config b/packaging/SGI/samba.config new file mode 100644 index 00000000000..b3d86404ab5 --- /dev/null +++ b/packaging/SGI/samba.config @@ -0,0 +1 @@ +on diff --git a/packaging/SGI/samba.rc b/packaging/SGI/samba.rc new file mode 100644 index 00000000000..bc0f90ee77f --- /dev/null +++ b/packaging/SGI/samba.rc @@ -0,0 +1,43 @@ +#! /bin/sh + +# +# Samba server control +# + +IS_ON=/etc/chkconfig +KILLALL=/sbin/killall + +SAMBAD=/usr/samba/bin/smbd +#SAMBA_OPTS=-d2 +NMBD=/usr/samba/bin/nmbd +#NMBD_OPTS=-d1 + +if test ! -x $IS_ON ; then + IS_ON=true +fi + +if $IS_ON verbose ; then + ECHO=echo +else # For a quiet startup and shutdown + ECHO=: +fi + +case $1 in +'start') + if $IS_ON samba && test -x $SAMBAD; then + $KILLALL -15 smbd nmbd + $ECHO "Samba:\c" + $SAMBAD $SAMBA_OPTS -D; $ECHO " smbd\c" + $NMBD $NMBD_OPTS -D; $ECHO " nmbd\c" + $ECHO "." + fi + ;; +'stop') + $ECHO "Stopping Samba Servers." + $KILLALL -15 smbd nmbd + exit 0 + ;; +*) + echo "usage: /etc/init.d/samba {start|stop}" + ;; +esac diff --git a/packaging/SGI/sambalp b/packaging/SGI/sambalp new file mode 100644 index 00000000000..61e62215c91 --- /dev/null +++ b/packaging/SGI/sambalp @@ -0,0 +1,157 @@ +#!/bin/perl +# +# Hacked by Alan Stebbens <aks@sgi.com> to setuid to the username if +# valid on this system. Written as a secure Perl script. To enable, +# +# chown root /usr/samba/bin/sambalp +# chmod u+s,+x /usr/samba/bin/sambalp +# +# If setuidshells is not enabled on your system, you must also do this: +# +# systune -i +# nosuidshells = 0 +# y +# quit +# +# reboot +# +# This script will still work as a normal user; it will not try +# to setuid in this case. +# +# If the "$PSFIX" variable is set below... +# +# Workaround Win95 printer driver/Impressario bug by removing +# the PS check for available virtual memory. Note that this +# bug appears to be in all Win95 print drivers that generate +# PostScript; but is for certain there with a QMS-PS 810 (the +# printer type I configure on the Win95-side for printing with +# Samba). +# +# the perl script fixes 3 different bugs. +# 1. remove the JCL statements added by some HP printer drivers to the +# beginning of the postscript output. +# 2. Fix a bug in output from word files with long filenames. A non-printing +# character added to the end of the title comment by word is +# removed. +# 3. The VM fix described above. +# +# +# Modified for Perl4 compatibility. +# + +$PROG = "sambalp"; + +$PSFIX = 1; # set to 0 if you don't want to run + # the "psfix" portion + +# Untaint the PATH variable +@PATH = split(' ',<<EOF); + /usr/sbin /usr/bsd /sbin /usr/bin /bin /usr/lib /usr/local/bin +EOF +$ENV{'PATH'} = join(':',@PATH); + +if ($#ARGV < 3) { + print STDERR "usage: $PROG printer file user system\n"; + exit; +} + +$printer = $ARGV[0]; +$file = $ARGV[1]; +$user = $ARGV[2]; +$system = $ARGV[3]; + +open(LPSTAT,"/usr/bin/lpstat -t|") || die("Can't get printer list.\n"); +@printers = (); +while (<LPSTAT>) { + next unless /^printer (\w+)/; + push(@printers,$1); +} +close LPSTAT; +# Create a hash list +@printers{@printers} = @printers; + +# Untaint the printer name +if (defined($prtname = $printers{$printer})) { + $printer = $prtname; +} else { + die("Unknown printer: \"$printer\"\n"); +} + +if ($> == 0) { # are we root? + # yes -- then perform a taint checks and possibly do a suid check + + # Untaint the file and system names (pretend to filter them) + $file = $file =~ /^(.*)/ ? $1 : die("Bad file: $file\n"); + $system = $system =~ /^(.*)/ ? $1 : die("Bad system: $system\n"); + + # Get the valid users + setpwent; + %users = (); + while (@pwe = getpwent()) { + $uids{$pwe[0]} = $pwe[2]; + $users{$pwe[2]} = $pwe[0]; + } + endpwent(); + + # Check out the user -- if the user is a real user on this system, + # then become that user so that the printer header page looks right + # otherwise, remain as the default user (probably "nobody"). + + if (defined($uid = $uids{$user})) { + + # before we change UID, we must ensure that the file is still + # readable after the UID change. + chown($uid, 9, $file); # make the file owned by the user + + # Now, go ahead and become the user + $name = $users{$uid}; + $> = $uid; # become the user + $< = $uid; + } else { # do untaint filtering + $name = $user =~ /^(\w+)/ ? $1 : die("Bad user: $user\n"); + } +} else { # otherwise, just be me + $name = $user; # whomever that is +} + +$lpcommand = "/usr/bin/lp -c -d$printer -t'$name on $system'"; + +# This code is from the original "psfix" but it has been completely +# rewritten for speed. + +if ($PSFIX) { # are we running a "psfix"? + open(FILE, $file) || die("Can't read $file: $!\n"); + open(LP, "|$lpcommand -") || die("Can't open pipe to \"lp\": $!\n"); + select(LP); + while (<FILE>) { # + $_ =~ s/^\004//; # strip any ctrl-d's + if (/^\e%/) { # get rid of any non-postscript commands + while (<FILE>) { # remove text until next %!PS + s/^\001M//; # lenmark driver prefixes Ctrl-A M to %!PS + last if /^%!PS/; + } + last if eof(FILE); + } elsif (/^%%Title:/) { # fix bug in long titles from MS Word + s/.\r$/\r/; # remove trailing character on the title + } elsif (/^\/VM\?/) { # remove VM test + print "/VM? { pop } bind def\r\n"; + while (<FILE>) { last if /def\r/; } + next; # don't print + } + print; + } + close FILE; + close LP; +} else { # we're not running psfix? + system("$lpcommand $file"); +} + +if ($file =~ m(^/)) { + # $file is a fully specified path + # Remove the file only if it lives in a directory ending in /tmp. + unlink($file) if ($file =~ m(/tmp/[^/]+$)); +} else { + # $file is NOT a fully specified path + # Remove the file only if current directory ends in /tmp. + unlink($file) if (`pwd` =~ m(/tmp$)); +} diff --git a/packaging/SGI/smb.conf b/packaging/SGI/smb.conf new file mode 100644 index 00000000000..03f2a4c9f81 --- /dev/null +++ b/packaging/SGI/smb.conf @@ -0,0 +1,135 @@ +; Configuration file for smbd. +; ============================================================================ +; For the format of this file and comprehensive descriptions of all the +; configuration option, please refer to the man page for smb.conf(5). + +; This is a sample configuration for IRIX 6.x systems +; +; The following configuration should suit most systems for basic usage and +; initial testing. It gives all clients access to their home directories and +; /usr/tmp and allows access to all printers returned by lpstat. +; +[global] + comment = Samba %v + workgroup = workgroup + printing = sysv +; +; The default for printcap name is lpstat which will export all printers. +; If you want to limit the printers that are visible to clients, you can +; use a printcap file. The script mkprintcap.sh will create a printcap +; file that contains all your printers. Edit this file to only contain the +; printers that you wish to be visible. Names longer than 15 characters +; in the printcap file will not be visible to clients. +; +; printcap name = /usr/samba/printcap + printcap name = lpstat +; +; If you are using Impressario 1.x then you'll want to use the +; sambalp script provided with this package. It works around +; a problem in the PostScript generated by the standard Windows +; drivers--there is a check to verify sufficient virtual memory +; is available in the printer to print the job, but this fails +; under Impressario because of a bug in Impressario 1.x. The sambalp +; script strips out the vmstatus check. BTW, when using this +; setup to print be sure to configure a Windows printer driver +; that generates PostScript--QMS-PS 810 is one that should work +; with the sambalp script. This version of sambalp (if installed +; as a setuid script - see the comments at the beginning of the +; script) will setuid to the username if valid on the system. This +; makes the banner pages print the proper username. You can disable +; the PostScript fixes by changing a variable in sambalp. +; + print command = /usr/samba/bin/sambalp %p %s %U %m +; print command = /usr/bin/lp -c -d%p -t"%U on machine %m" %s ; rm %s + +; clear the default lppause and lpresume commands since these are not +; supported in IRIX + lppause command = + lpresume command = + + load printers = yes + guest account = nobody + browseable = yes + +; this tells Samba to use a separate log file for each machine +; that connects - default is single file named /usr/samba/var/log.smb +; log file = /usr/samba/var/log.%m + +; Set a max size for log files in Kb + max log size = 50 + +; You will need a world readable lock directory +; if you want to support the file sharing modes for multiple users +; of the same files + locking = yes + lock directory = /usr/samba/var/locks + + security = user + +; You need to test to see if this makes a difference on your system + socket options = TCP_NODELAY + +; Set the os level to > 32 if there is no NT server for your workgroup + os level = 0 + preferred master = no + domain master = no + local master = no + wins support = no + wins server = + + preserve case = yes + short preserve case = yes + +; These are the settings required for IRIX password sync + passwd program = /usr/bin/passwd %u + passwd chat = *ew*password:* %n\n *e-enter*new*password:* %n\n + +; Uncomment the following if you wish to use encrypted passwords. +; encrypt passwords = yes + +; Uncomment the following if you wish to sync unix and smbpasswd +; unix password sync = yes + +; Printer admin account to allow uploading printer drivers + printer admin = lp + +; Sample winbindd configuration parameters - uncomment and +; change if necessary for your desired configuration +; winbind uid = 50000-60000 +; winbind gid = 50000-60000 +; winbind separator = + +; winbind cache time = 10 +; password server = * + +; Sample add user command for automatically adding machine accounts +; add user script = /usr/sbin/passmgmt -a -h/dev/null -g20 -s/usr/bin/false %u + +[homes] + comment = Home Directories + browseable = no + writeable = yes + +; Share for printer drivers for automatic driver download +; +[print$] + comment = printer driver directory + path = /usr/samba/printer + guest ok = yes + browseable = yes + read only = yes + write list = lp + +[printers] + comment = All Printers + path = /var/spool/samba + browseable = no + printable = yes + guest ok = yes + writeable = no + create mask = 0700 + +[tmp] + comment = Temporary file space + path = /usr/tmp + writeable = yes + guest ok = yes diff --git a/packaging/SGI/smbpasswd b/packaging/SGI/smbpasswd new file mode 100644 index 00000000000..8e7ab34cadd --- /dev/null +++ b/packaging/SGI/smbpasswd @@ -0,0 +1 @@ +# Samba SMB password file diff --git a/packaging/SGI/smbprint b/packaging/SGI/smbprint new file mode 100644 index 00000000000..07923a42b1e --- /dev/null +++ b/packaging/SGI/smbprint @@ -0,0 +1,54 @@ +#!/bin/sh +# +# @(#) smbprint.sysv version 1.0 Ross Wakelin <r.wakelin@march.co.uk> +# +# Version 1.0 13 January 1995 +# modified from the original smbprint (bsd) script +# +# this script is a System 5 printer interface script. It uses the smbclient +# program to print the file to the specified smb-based server and service. +# +# To add this to your lp system, modify the server and service variables +# and then execute the following command (as root): +# +# lpadmin -punixprintername -v/dev/null -i/usr/samba/bin/smbprint +# +# where unixprintername is the name that the printer will be known as +# on your unix box. +# +# the script smbprint will be copied into your printer administration +# directory (/usr/spool/lp) as a new interface (interface/unixprintername) +# Then you have to execute the following commands: +# +# enable unixprintername +# accept unixprintername +# +# This script will then be called by the lp service to print the files. +# This script will have 6 or more parameters passed to it by the lp service. +# The first five will contain details of the print job, who queued it etc, +# while parameters 6 onwards are a list of files to print. We just +# cat these to the samba client. +# +# clear out the unwanted parameters + +shift;shift;shift;shift;shift + +# now the argument list is just the files to print + +# Set these to the server and service you wish to print to +# In this example I have a PC called "admin" that has a printer +# exported called "hplj2" with no password. +# +server=admin +service=hplj2 +password="" + +# NOTE: The line `echo translate' provides automatic CR/LF translation +# when printing. +( + echo translate + echo "print -" + cat $* +) | /usr/samba/bin/smbclient "//$server/$service" $password -N > /dev/null +exit $? + diff --git a/packaging/SGI/spec.pl b/packaging/SGI/spec.pl new file mode 100755 index 00000000000..d581db7043f --- /dev/null +++ b/packaging/SGI/spec.pl @@ -0,0 +1,97 @@ +#!/usr/bin/perl + +# This perl script generates the samba.spec file based on the version +# information in the version.h file in the source tree + +open (VER,'../../source/include/version.h') || die "Unable to open version.h\n"; +while ( <VER> ) { + chomp; + if ( /SAMBA_VERSION_OFFICIAL_STRING/ ) { + s/^.*SAMBA_VERSION_OFFICIAL_STRING "//; + s/".*$//; + $SambaVersion = $_; + } +} +close (VER); + +# create the package name +$vername = " id \"Samba Version ".$SambaVersion."\"\n"; + +$_ = $SambaVersion; +s/^.* //; +$patch = 0; +#create the subsystem version numbers +if (/alpha/) { + $_ =~ s/alpha/.00./; +} +elsif (/-HEAD/) { + $_ =~ s/-HEAD/.01/; + $_ .= '.99'; +} +elsif (/pre-/) { + $_ =~ s/pre-//; + $_ .= '.00'; +} +elsif (/p/) { + $_ =~ s/p/./; + $_ .= '.00'; + $patch = 1; +} +else { + $_ .='.01.00'; +} + +($v1,$v2,$v3,$v4,$v5) = split('\.'); +$v4 = $v4 + $patch; +$vernum = sprintf(" version %02d%02d%02d%02d%02d\n",$v1,$v2,$v3,$v4,$v5); + +# generate the samba.spec file +open(SPEC,">samba.spec") || die "Unable to open samba.spec for output\n"; +print SPEC "product samba\n"; +print SPEC $vername; +print SPEC " image sw\n"; +print SPEC " id \"Samba Execution Environment\"\n"; +print SPEC $vernum; +print SPEC " order 0\n"; +print SPEC " subsys base default\n"; +print SPEC " id \"Samba Execution Environment\"\n"; +print SPEC " replaces fw_samba.sw.base 0 9999999999\n"; +print SPEC " replaces fw_samba.sw.samba 0 9999999999\n"; +print SPEC " exp samba.sw.base\n"; +print SPEC " endsubsys\n"; +print SPEC " endimage\n"; +print SPEC " image man\n"; +print SPEC " id \"Samba Online Documentation\"\n"; +print SPEC $vernum; +print SPEC " order 1\n"; +print SPEC " subsys manpages default\n"; +print SPEC " id \"Samba Man Page\"\n"; +print SPEC " replaces fw_samba.man.manpages 0 9999999999\n"; +print SPEC " replaces fw_samba.man.samba 0 9999999999\n"; +print SPEC " exp samba.man.manpages\n"; +print SPEC " endsubsys\n"; +print SPEC " subsys doc default\n"; +print SPEC " id \"Samba Documentation\"\n"; +print SPEC " replaces fw_samba.man.doc 0 9999999999\n"; +print SPEC " exp samba.man.doc\n"; +print SPEC " endsubsys\n"; +print SPEC " subsys relnotes default\n"; +print SPEC " id \"Samba Release Notes\"\n"; +print SPEC " replaces fw_samba.man.relnotes 0 9999999999\n"; +print SPEC " exp samba.man.relnotes\n"; +print SPEC " endsubsys\n"; +print SPEC " endimage\n"; +print SPEC " image src\n"; +print SPEC " id \"Samba Source Code\"\n"; +print SPEC $vernum; +print SPEC " order 2\n"; +print SPEC " subsys samba\n"; +print SPEC " id \"Samba Source Code\"\n"; +print SPEC " replaces fw_samba.src.samba 0 9999999999\n"; +print SPEC " exp samba.src.samba\n"; +print SPEC " endsubsys\n"; +print SPEC " endimage\n"; +print SPEC "endproduct\n"; +close SPEC || die "Error on close of samba.spec\n"; + +print "\nsamba.spec file has been created\n\n"; diff --git a/packaging/SGI/startswat.sh b/packaging/SGI/startswat.sh new file mode 100755 index 00000000000..2a0333020fb --- /dev/null +++ b/packaging/SGI/startswat.sh @@ -0,0 +1,29 @@ +#! /bin/sh +# +# add SWAT deamon to inetd.conf +# +cp /etc/inetd.conf /etc/inetd.conf.O + +if [ $? -ne 0 ]; then exit 1; fi +if [ ! -r /etc/inetd.conf.O -o ! -w /etc/inetd.conf ]; then exit 1; fi + +sed -e "/^swat/D" -e "/^#SWAT/D" /etc/inetd.conf.O > /etc/inetd.conf +echo '#SWAT services' >> /etc/inetd.conf +echo swat stream tcp nowait root /usr/samba/bin/swat swat >> /etc/inetd.conf + +# +# add SWAT service port to /etc/services +# +cp /etc/services /etc/services.O + +if [ $? -ne 0 ]; then exit 1; fi +if [ ! -r /etc/services.O -o ! -w /etc/services ]; then exit 1; fi + +sed -e "/^swat/D" -e "/^#SWAT/D" /etc/services.O > /etc/services +echo '#SWAT services' >> /etc/services +echo 'swat 901/tcp # SWAT' >> /etc/services + +# +# restart inetd to start SWAT +# +/etc/killall -HUP inetd diff --git a/packaging/SGI/winbindd.config b/packaging/SGI/winbindd.config new file mode 100644 index 00000000000..cfb931e4705 --- /dev/null +++ b/packaging/SGI/winbindd.config @@ -0,0 +1 @@ +off diff --git a/packaging/SGI/winbindd.rc b/packaging/SGI/winbindd.rc new file mode 100644 index 00000000000..deb4708c667 --- /dev/null +++ b/packaging/SGI/winbindd.rc @@ -0,0 +1,38 @@ +#! /bin/sh + +# +# winbindd control +# + +IS_ON=/etc/chkconfig +KILLALL=/sbin/killall + +WINBINDD=/usr/samba/bin/winbindd + +if test ! -x $IS_ON ; then + IS_ON=true +fi + +if $IS_ON verbose ; then + ECHO=echo +else # For a quiet startup and shutdown + ECHO=: +fi + +case $1 in +'start') + if $IS_ON winbind && test -x $WINBINDD; then + $KILLALL -15 winbindd + $ECHO "winbindd:\c" + $WINBINDD ; $ECHO " winbindd." + fi + ;; +'stop') + $ECHO "Stopping winbindd." + $KILLALL -15 winbindd + exit 0 + ;; +*) + echo "usage: /etc/init.d/winbind {start|stop}" + ;; +esac diff --git a/packaging/Solaris/.cvsignore b/packaging/Solaris/.cvsignore new file mode 100644 index 00000000000..3adf27434de --- /dev/null +++ b/packaging/Solaris/.cvsignore @@ -0,0 +1,4 @@ +inetd.conf +pkginfo +prototype +samba.server diff --git a/packaging/Solaris/README b/packaging/Solaris/README new file mode 100644 index 00000000000..b918cf91732 --- /dev/null +++ b/packaging/Solaris/README @@ -0,0 +1,18 @@ + +INSTRUCTIONS: Preparing Samba packages for Solaris + +To produce a package: + +* Build the binaries (by running ./configure; make; in the source directory) +* Type sh makepkg.sh + +The package will be created in the /tmp directory. + +By default, the package will be built to install samba in /usr/local +To change the default, modify the INSTALL_BASE variable in makepkg.sh +This is after you have configured samba with a --prefix option of the +alternate samba location and then created the binaries. + +Shirish Kalele <kalele@samba.org> +Date: 2000.01.12 + diff --git a/packaging/Solaris/copyright b/packaging/Solaris/copyright new file mode 100644 index 00000000000..1792668d174 --- /dev/null +++ b/packaging/Solaris/copyright @@ -0,0 +1 @@ +Copyright (C) 2001 Samba Team diff --git a/packaging/Solaris/i.swat b/packaging/Solaris/i.swat new file mode 100644 index 00000000000..d07d2798d85 --- /dev/null +++ b/packaging/Solaris/i.swat @@ -0,0 +1,44 @@ +while read src dest +do + sed -e '/^swat.*swat$/d' $dest >/tmp/$$swat || exit 2 + cat $src >>/tmp/$$swat || exit 2 + + # Use cp;rm instead of mv because $dest might be a symlink + cp -f /tmp/$$swat $dest || exit 2 + rm -f /tmp/$$swat +done + +if [ "$1" = ENDOFCLASS ] +then + + # If local install, restart inetd + if [ -z "${PKG_INSTALL_ROOT}" ] + then + TARGET=`hostname` + kill -HUP `ps -e -o pid,comm | grep inetd | awk '{print $1}'` + else + TARGET="<servername>" + fi + + cat <<EOF +The Samba Web Administration Tool (SWAT) has been installed on your system. +You can connect to it from a web browser on TCP port 901 at +http://${TARGET}:901/. + +If you use NIS/NIS+, check the ${PKG_INSTALL_ROOT}/etc/nsswitch.conf file +to verify that the local services file is being used as a backend for the +services database, or you won't be able to connect to the Samba Admin Tool. + +EOF + + if [ ! -z "$PKG_INSTALL_ROOT" ] + then + cat <<EOF +The SWAT settings will not take effect till you send a hangup (HUP) signal +to inetd on the target system. + +EOF + fi + +fi + diff --git a/packaging/Solaris/inetd.conf.master b/packaging/Solaris/inetd.conf.master new file mode 100644 index 00000000000..b11fb7c3db2 --- /dev/null +++ b/packaging/Solaris/inetd.conf.master @@ -0,0 +1 @@ +swat stream tcp nowait.400 root __BASEDIR__/samba/bin/swat swat diff --git a/packaging/Solaris/makepkg.sh.tmpl b/packaging/Solaris/makepkg.sh.tmpl new file mode 100755 index 00000000000..2a46321f818 --- /dev/null +++ b/packaging/Solaris/makepkg.sh.tmpl @@ -0,0 +1,176 @@ +#!/bin/sh +# +# Copyright (C) Shirish A Kalele 2000 +# +# Builds a Samba package from the samba distribution. +# By default, the package will be built to install samba in /usr/local +# Change the INSTALL_BASE variable to change this: will modify the pkginfo +# and samba.server files to point to the new INSTALL_BASE +# +INSTALL_BASE=/usr/local + +add_dynamic_entries() +{ + # Add the binaries, docs and SWAT files + + echo "#\n# Binaries \n#" + cd $DISTR_BASE/source/bin + for binfile in * + do + if [ -f $binfile ]; then + case $file in + CP*.so) + echo echo f none samba/lib/charset/$binfile=source/bin/$binfile 0755 root other + ;; + *) + echo f none samba/bin/$binfile=source/bin/$binfile 0755 root other + ;; + esac + fi + done + + # Add the scripts to bin/ + echo "#\n# Scripts \n#" + cd $DISTR_BASE/source/script + for shfile in * + do + if [ -f $shfile ]; then + echo f none samba/bin/$shfile=source/script/$shfile 0755 root other + fi + done + + # add libraries to /lib for winbind + echo "#\n# Libraries \n#" + if [ -f $DISTR_BASE/source/nsswitch/libnss_winbind.so ] ; then + echo f none /usr/lib/libnss_winbind.so=source/nsswitch/libnss_winbind.so 0755 root other + echo s none /usr/lib/libnss_winbind.so.1=/usr/lib/libnss_winbind.so 0755 root other + echo s none /usr/lib/libnss_winbind.so.2=/usr/lib/libnss_winbind.so 0755 root other + echo s none /usr/lib/nss_winbind.so.1=/usr/lib/libnss_winbind.so 0755 root other + echo s none /usr/lib/nss_winbind.so.2=/usr/lib/libnss_winbind.so 0755 root other + fi + + # add the .dat codepages + echo "#\n# Codepages \n#" + for file in $DISTR_BASE/source/codepages/*.dat ; do + bfile=`basename $file` + echo f none /usr/local/samba/lib/$bfile=source/codepages/$bfile + done + + # Add the manpages + echo "#\n# man pages \n#" + echo d none /usr ? ? ? + echo d none /usr/share ? ? ? + echo d none /usr/share/man ? ? ? + + # Create directories for man page sections if nonexistent + cd $DISTR_BASE/docs/manpages + for i in 1 2 3 4 5 6 7 8 9 + do + manpages=`ls *.$i 2>/dev/null` + if [ $? -eq 0 ] + then + echo d none /usr/share/man/man$i ? ? ? + for manpage in $manpages + do + echo f none /usr/share/man/man${i}/${manpage}=docs/manpages/$manpage 0644 root other + done + fi + done + + echo "#\n# HTML documentation \n#" + cd $DISTR_BASE + list=`find docs/htmldocs -type d | grep -v "/CVS$"` + for docdir in $list + do + if [ -d $docdir ]; then + echo d none samba/$docdir 0755 root other + fi + done + + list=`find docs/htmldocs -type f | grep -v /CVS/` + for htmldoc in $list + do + if [ -f $htmldoc ]; then + echo f none samba/$htmldoc=$htmldoc 0644 root other + fi + done + + # Create a symbolic link to the Samba book in docs/ for beginners + echo 's none samba/docs/samba_book=htmldocs/using_samba' + + echo "#\n# SWAT \n#" + cd $DISTR_BASE + list=`find swat -type d | grep -v "/CVS$"` + for i in $list + do + echo "d none samba/$i 0755 root other" + done + list=`find swat -type f | grep -v /CVS/` + for i in $list + do + echo "f none samba/$i=$i 0644 root other" + done + # add the .msg files for SWAT + echo "#\n# msg files \n#" + for file in $DISTR_BASE/source/po/*.msg ; do + bfile=`basename $file` + echo f none /usr/local/samba/lib/$bfile=source/po/$bfile + done + + echo "#\n# HTML documentation for SWAT\n#" + cd $DISTR_BASE/docs/htmldocs + for htmldoc in * + do + if [ -f $htmldoc ]; then + echo f none samba/swat/help/$htmldoc=docs/htmldocs/$htmldoc 0644 root other + fi + done + + echo "#\n# Using Samba Book files for SWAT\n#" + cd $DISTR_BASE/docs/htmldocs + +# set up a symbolic link instead of duplicating the book tree + echo 's none samba/swat/using_samba=../docs/htmldocs/using_samba' + +} + +if [ $# = 0 ] +then + # Try to guess the distribution base.. + CURR_DIR=`pwd` + DISTR_BASE=`echo $CURR_DIR | sed 's|\(.*\)/packaging.*|\1|'` + echo "Assuming Samba distribution is rooted at $DISTR_BASE.." +else + DISTR_BASE=$1 +fi + +# +if [ ! -d $DISTR_BASE ]; then + echo "Source build directory $DISTR_BASE does not exist." + exit 1 +fi + +# Set up the prototype file from prototype.master +if [ -f prototype ]; then + rm prototype +fi + +# Setup version from version.h +VERSION=PVERSION +sed -e "s|__VERSION__|$VERSION|" -e "s|__ARCH__|`uname -p`|" -e "s|__BASEDIR__|$INSTALL_BASE|g" pkginfo.master >pkginfo + +sed -e "s|__BASEDIR__|$INSTALL_BASE|g" inetd.conf.master >inetd.conf +sed -e "s|__BASEDIR__|$INSTALL_BASE|g" samba.server.master >samba.server + +cp prototype.master prototype + +# Add the dynamic part to the prototype file +(add_dynamic_entries >> prototype) + +# Create the package +pkgmk -o -d /tmp -b $DISTR_BASE -f prototype +if [ $? = 0 ] +then + pkgtrans /tmp samba.pkg samba +fi +echo The samba package is in /tmp diff --git a/packaging/Solaris/pkg-specs/pkginfo b/packaging/Solaris/pkg-specs/pkginfo new file mode 100644 index 00000000000..d24ecaefe81 --- /dev/null +++ b/packaging/Solaris/pkg-specs/pkginfo @@ -0,0 +1,12 @@ +PKG=samba +NAME=SMB based file/printer sharing +ARCH=sparc +VERSION=3.0.0beta3 +CATEGORY=system +VENDOR=Samba Group +DESC=File and printer sharing for NT workstations +HOTLINE=Please contact your local UNIX support group +EMAIL=samba@samba.org +CLASSES=none +BASEDIR=/usr/local +INTONLY=1 diff --git a/packaging/Solaris/pkginfo.master b/packaging/Solaris/pkginfo.master new file mode 100644 index 00000000000..33e7cdb471d --- /dev/null +++ b/packaging/Solaris/pkginfo.master @@ -0,0 +1,12 @@ +PKG=samba +NAME=SMB based file/printer sharing +ARCH=__ARCH__ +VERSION=__VERSION__ +CATEGORY=system +VENDOR=Samba Team +DESC=File and printer sharing for Windows workstations +HOTLINE=Please contact your local UNIX support group +EMAIL=samba@samba.org +CLASSES=none +BASEDIR=__BASEDIR__ +INTONLY=1 diff --git a/packaging/Solaris/postinstall b/packaging/Solaris/postinstall new file mode 100644 index 00000000000..0b7f40a85d0 --- /dev/null +++ b/packaging/Solaris/postinstall @@ -0,0 +1,21 @@ +cat <<EOF +___________________________________________________________________________ + +INSTALLATION COMPLETE. + +All files comprising the Samba Server have been installed. + +You can configure Samba by creating a configuration file at +${BASEDIR}/samba/lib/smb.conf. For details on configuration, +refer to the Samba man pages under ${PKG_INSTALL_ROOT}/usr/share/man +and the documentation at ${BASEDIR}/samba/docs. + +BEGINNERS: +Beginners can also refer to the excellent "Using Samba" book published +by O'Reilly and Associates and officially supported by the Samba Team. +This book is supplied with this package and can be accessed at +${BASEDIR}/samba/docs/samba_book/index.html +___________________________________________________________________________ + +EOF + diff --git a/packaging/Solaris/preremove b/packaging/Solaris/preremove new file mode 100644 index 00000000000..28e8d75c298 --- /dev/null +++ b/packaging/Solaris/preremove @@ -0,0 +1,12 @@ +#!/bin/sh + +# If this is a local deinstall, stop samba +if [ -z "$PKG_INSTALL_ROOT" ] +then + SMBD=`ps -e -o pid,comm | grep smbd | awk '{print $1}'` + NMBD=`ps -e -o pid,comm | grep nmbd | awk '{print $1}'` + [ ! -z "$SMBD" ] && kill $SMBD + [ ! -z "$NMBD" ] && kill $NMBD + sleep 2 +fi + diff --git a/packaging/Solaris/prototype.master b/packaging/Solaris/prototype.master new file mode 100644 index 00000000000..6c5aa3e28ab --- /dev/null +++ b/packaging/Solaris/prototype.master @@ -0,0 +1,54 @@ +# +# The static master prototype file for the Samba package. +# For files that can't be dynamically added to the prototype file at +# package build time +# +# Information files. +# +i pkginfo=./pkginfo +i copyright=./copyright +i request=./request +i preremove=./preremove +i postinstall=./postinstall +i i.swat=./i.swat +i r.swat=./r.swat +# +# Stuff that goes into the system areas of the filesystem. +# +d none /etc ? ? ? +d initscript /etc/init.d ? ? ? +f initscript /etc/init.d/samba.server=packaging/Solaris/samba.server 0744 root sys +d initscript /etc/rc3.d ? ? ? +s initscript /etc/rc3.d/S99samba.server=../init.d/samba.server +# +# Stuff to set up SWAT +# +d swat /etc/inet ? ? ? +e swat /etc/inet/services=packaging/Solaris/services ? ? ? +e swat /etc/inet/inetd.conf=packaging/Solaris/inetd.conf ? ? ? +# +# Create the samba subtree. (Usually /usr/local/samba ) +# +d none samba 0755 root other +d none samba/var 0755 root other +d none samba/bin 0755 root other +d none samba/lib 0755 root other +d none samba/docs 0755 root other +# +# Stuff that goes into lib +# +d none samba/lib/charset 0755 root other +f none samba/lib/smb.conf.example=examples/smb.conf.default 0644 root other +d none samba/lib/regeditscripts 0755 root other +f none samba/lib/regeditscripts/NT4_PlainPassword.reg=docs/Registry/NT4_PlainPassword.reg 0444 root other +f none samba/lib/regeditscripts/Win95_PlainPassword.reg=docs/Registry/Win95_PlainPassword.reg 0444 root other +f none samba/lib/regeditscripts/Win98_PlainPassword.reg=docs/Registry/Win98_PlainPassword.reg 0444 root other +f none samba/lib/regeditscripts/WinME_PlainPassword.reg=docs/Registry/WinME_PlainPassword.reg 0444 root other +f none samba/lib/regeditscripts/Win2000_PlainPassword.reg=docs/Registry/Win2000_PlainPassword.reg 0444 root other +f none samba/lib/regeditscripts/WinXP_PlainPassword.reg=docs/Registry/WinXP_PlainPassword.reg 0444 root other +# +# Random files +f none samba/docs/Samba-HOWTO-Collection.pdf=docs/Samba-HOWTO-Collection.pdf 0644 root other +# +# Static part of prototype file ends. +# diff --git a/packaging/Solaris/r.swat b/packaging/Solaris/r.swat new file mode 100644 index 00000000000..11c776646da --- /dev/null +++ b/packaging/Solaris/r.swat @@ -0,0 +1,16 @@ +while read dest +do + sed -e '/^swat.*swat$/d' $dest >/tmp/$$swat || exit 2 + # Use cp;rm; instead of mv because $dest might be a symlink + cp -f /tmp/$$swat $dest || exit 2 + rm -f /tmp/$$swat +done + +if [ "$1" = ENDOFCLASS ] +then + if [ -z "$PKG_INSTALL_ROOT" ] + then + kill -HUP `ps -e -o pid,comm | grep inetd | awk '{print $1}'` + fi +fi + diff --git a/packaging/Solaris/request b/packaging/Solaris/request new file mode 100644 index 00000000000..59cdd0ab22a --- /dev/null +++ b/packaging/Solaris/request @@ -0,0 +1,17 @@ +trap 'exit 3' 15 + +VALSTR=/usr/sadm/bin/valstr + +resp=`ckyorn -d y -p "Do you wish to have Samba start whenever the system boots up? (default:y) " -Q` +$VALSTR -r "^[yY]" $resp +[ $? -eq 0 ] && CLASSES="$CLASSES initscript" + +resp=`ckyorn -d y -p "Do you wish to set up the Samba Web Admin Tool (SWAT)? (default:y) " -Q` +$VALSTR -r "^[yY]" $resp +[ $? -eq 0 ] && CLASSES="$CLASSES swat" + +cat >$1 <<! +CLASSES=$CLASSES +! +exit 0 + diff --git a/packaging/Solaris/samba.server.master b/packaging/Solaris/samba.server.master new file mode 100755 index 00000000000..d8bea2421c3 --- /dev/null +++ b/packaging/Solaris/samba.server.master @@ -0,0 +1,48 @@ +#!/bin/sh +#ident "@(#)samba.server 1.0 96/06/19 TK" /* SVr4.0 1.1.13.1*/ +# +# Please send info on modifications to knuutila@cs.utu.fi +# +# This file should have uid root, gid sys and chmod 744 +# +if [ ! -d /usr/bin ] +then # /usr not mounted + exit +fi + +killproc() { # kill the named process(es) + pid=`/usr/bin/ps -e | + /usr/bin/grep -w $1 | + /usr/bin/sed -e 's/^ *//' -e 's/ .*//'` + [ "$pid" != "" ] && kill $pid +} + +# Start/stop processes required for samba server + +case "$1" in + +'start') +# +# Edit these lines to suit your installation (paths, workgroup, host) +# + BASE=__BASEDIR__/samba + $BASE/bin/smbd -D -s$BASE/lib/smb.conf + $BASE/bin/nmbd -D -s$BASE/lib/smb.conf + ;; +'stop') + killproc nmbd + killproc smbd + ;; + +'restart') + killproc nmbd + killproc smbd + BASE=__BASEDIR__/samba + $BASE/bin/smbd -D -s$BASE/lib/smb.conf + $BASE/bin/nmbd -D -l$BASE/var/log -s$BASE/lib/smb.conf + ;; + +*) + echo "Usage: /etc/init.d/samba.server { start | stop | restart }" + ;; +esac diff --git a/packaging/Solaris/services b/packaging/Solaris/services new file mode 100644 index 00000000000..fc691200c8d --- /dev/null +++ b/packaging/Solaris/services @@ -0,0 +1 @@ +swat 901/tcp # Samba Web Admin Tool - swat diff --git a/packaging/SuSE/README b/packaging/SuSE/README new file mode 100644 index 00000000000..5d0af9944aa --- /dev/null +++ b/packaging/SuSE/README @@ -0,0 +1,18 @@ +Date: March 29, 2003 + +Note: The current packaging files are NOT officially supported files. +--------------------------------------------------------------------- + +While the SPEC file shows who the original author was, these files imply no warranty of +fitness what so ever. These files are NOT official SuSE files and are NOT supported by +them. If you have ANY problems with the use of these files then please email jht@samba.org +and NOT SuSE support. + + +These files may be used to build Samba-3.0 packages for SuSE Linux 8.1 and/or for +UnitedLinux 1.0 systems. + +Note2: You most likely will need to update to heimdal-0.5.1 or later if you intend to +use any Kerberos functionality. + +- John T. diff --git a/packaging/SuSE/samba-3.0.0.files.tar.bz2 b/packaging/SuSE/samba-3.0.0.files.tar.bz2 Binary files differnew file mode 100644 index 00000000000..1e8fc9baf0c --- /dev/null +++ b/packaging/SuSE/samba-3.0.0.files.tar.bz2 diff --git a/packaging/SuSE/samba-mutual-auth.diff b/packaging/SuSE/samba-mutual-auth.diff new file mode 100644 index 00000000000..865f91682a3 --- /dev/null +++ b/packaging/SuSE/samba-mutual-auth.diff @@ -0,0 +1,247 @@ +--- source/configure.in 22 Feb 2003 12:19:18 -0000 1.409 ++++ source/configure.in 24 Feb 2003 06:04:25 -0000 +@@ -627,6 +627,15 @@ + fi + + ############################################ ++# support for using Kerberos keytab instead of secrets database ++ ++AC_ARG_ENABLE(keytab, ++[ --enable-keytab Turn on support for Kerberos keytabs in lieu of secrets DB (default=no)], ++ [if eval "test x$enable_keytab = xyes"; then ++ AC_DEFINE(USE_KEYTAB,1,[Use Kerberos keytab]) ++ fi]) ++ ++############################################ + # we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the plugin loading code + AC_SEARCH_LIBS(dlopen, [dl]) + # dlopen/dlclose/dlsym/dlerror will be checked again later and defines will be set then +--- source/passdb/secrets.c 1 Feb 2003 04:39:15 -0000 1.54 ++++ source/passdb/secrets.c 24 Feb 2003 06:04:26 -0000 +@@ -221,6 +221,72 @@ + return True; + } + ++#ifdef USE_KEYTAB ++/************************************************************************ ++ Read local secret from the keytab ++************************************************************************/ ++ ++static BOOL secrets_fetch_keytab_password(uint8 ret_pwd[16], time_t *pass_last_set_time) ++{ ++ char spn[MAXHOSTNAMELEN + 2], *p; ++ krb5_context context; ++ krb5_error_code ret; ++ krb5_principal princ; ++ krb5_keyblock *key; ++ ++ ret = krb5_init_context(&context); ++ if (ret) { ++ DEBUG(1, ("secrets_fetch_keytab_password: failed to initialize Kerberos context\n")); ++ return False; ++ } ++ ++ spn[sizeof(spn) - 1] = '\0'; ++ if (gethostname(spn, sizeof(spn) - 2) < 0) { ++ DEBUG(1, ("secrets_fetch_keytab_password: could not determine local hostname\n")); ++ krb5_free_context(context); ++ return False; ++ } ++ ++ for (p = spn; *p && *p != '.'; p++) ++ *p = toupper(*p); ++ *p++ = '$'; ++ *p = '\0'; ++ ++ ret = krb5_parse_name(context, spn, &princ); ++ if (ret) { ++ DEBUG(1, ("secrets_fetch_keytab_password: failed to parse name %s\n", spn)); ++ krb5_free_context(context); ++ return False; ++ } ++ ++#ifdef ENCTYPE_ARCFOUR_HMAC ++ ret = krb5_kt_read_service_key(context, NULL, princ, 0, ENCTYPE_ARCFOUR_HMAC, &key); ++#elif defined(HAVE_ENCTYPE_ARCFOUR_HMAC_MD5) ++ ret = krb5_kt_read_service_key(context, NULL, princ, 0, ENCTYPE_ARCFOUR_HMAC_MD5, &key); ++#else ++#error ENCTYPE_ARCFOUR_HMAC or ENCTYPE_ARCFOUR_HMAC_MD5 required for keytab secret storage ++#endif ++ if (ret) { ++ DEBUG(1, ("secrets_fetch_keytab_password: failed to read secret for %s\n", spn)); ++ krb5_free_context(context); ++ return False; ++ } ++ if (key->keyvalue.length != 16) { ++ DEBUG(1, ("secrets_fetch_keytab_password: key is incorrect length\n")); ++ krb5_free_context(context); ++ return False; ++ } ++ ++ memcpy(ret_pwd, key->keyvalue.data, key->keyvalue.length); ++ time(pass_last_set_time); /* XXX */ ++ ++ krb5_free_keyblock(context, key); ++ krb5_free_context(context); ++ ++ return True; ++} ++#endif /* USE_KEYTAB */ ++ + /************************************************************************ + Routine to get the trust account password for a domain. + The user of this function must have locked the trust password file using +@@ -243,6 +309,12 @@ + pass_last_set_time = 0; + return True; + } ++ ++#ifdef USE_KEYTAB ++ if (is_myworkgroup(domain)) { ++ return secrets_fetch_keytab_password(ret_pwd, pass_last_set_time); ++ } ++#endif /* USE_KEYTAB */ + + if (!(pass = secrets_fetch(trust_keystr(domain), &size))) { + DEBUG(5, ("secrets_fetch failed!\n")); + +--- source/libsmb/clikrb5.c 2003-07-02 00:32:55.000000000 +0200 ++++ source/libsmb/clikrb5.c 2003-07-02 00:37:22.000000000 +0200 +@@ -316,11 +316,13 @@ + krb5_enctype enc_types[] = { + #ifdef ENCTYPE_ARCFOUR_HMAC + ENCTYPE_ARCFOUR_HMAC, ++#elif defined(HAVE_ENCTYPE_ARCFOUR_HMAC_MD5) ++ ENCTYPE_ARCFOUR_HMAC_MD5, + #endif + ENCTYPE_DES_CBC_MD5, + ENCTYPE_DES_CBC_CRC, + ENCTYPE_NULL}; +- ++ + retval = krb5_init_context(&context); + if (retval) { + DEBUG(1,("krb5_init_context failed (%s)\n", +@@ -367,24 +369,26 @@ + + BOOL get_krb5_smb_session_key(krb5_context context, krb5_auth_context auth_context, uint8 session_key[16]) + { +-#ifdef ENCTYPE_ARCFOUR_HMAC + krb5_keyblock *skey; +-#endif + BOOL ret = False; + + memset(session_key, 0, 16); + +-#ifdef ENCTYPE_ARCFOUR_HMAC ++#if defined(ENCTYPE_ARCFOUR_HMAC) || defined(HAVE_ENCTYPE_ARCFOUR_HMAC_MD5) + if (krb5_auth_con_getremotesubkey(context, auth_context, &skey) == 0 && skey != NULL) { + if (KRB5_KEY_TYPE(skey) == ++# ifdef ENCTYPE_ARCFOUR_HMAC + ENCTYPE_ARCFOUR_HMAC ++# else ++ ENCTYPE_ARCFOUR_HMAC_MD5 ++# endif /* ENCTYPE_ARCFOUR_HMAC */ + && KRB5_KEY_LENGTH(skey) == 16) { + memcpy(session_key, KRB5_KEY_DATA(skey), KRB5_KEY_LENGTH(skey)); + ret = True; + } + krb5_free_keyblock(context, skey); + } +-#endif /* ENCTYPE_ARCFOUR_HMAC */ ++#endif /* ENCTYPE_ARCFOUR_HMAC || HAVE_ENCTYPE_ARCFOUR_HMAC_MD5 */ + + return ret; + } +@@ -395,5 +399,12 @@ + DEBUG(0,("NO KERBEROS SUPPORT\n")); + return data_blob(NULL, 0); + } ++BOOL krb5_get_smb_session_key(krb5_context context, krb5_auth_context ac, uint8 session_key[16]) ++ { ++ DEBUG(0,("NO KERBEROS SUPPORT\n")); ++ memset(session_key, 0, 16); ++ return False; ++ } ++ //#endif + + #endif +--- source/libads/kerberos_verify.c 2003-06-28 23:40:55.000000000 +0200 ++++ source/libads/kerberos_verify.c 2003-07-02 00:50:13.000000000 +0200 +@@ -38,7 +38,9 @@ + krb5_keytab keytab = NULL; + krb5_data packet; + krb5_ticket *tkt = NULL; +- int ret, i; ++ int ret; ++#ifndef USE_KEYTAB ++ int i; + krb5_keyblock * key; + krb5_principal host_princ; + char *host_princ_s; +@@ -46,8 +48,10 @@ + char *password_s; + krb5_data password; + krb5_enctype *enctypes = NULL; ++#endif /* USE_KEYTAB */ + BOOL auth_ok = False; + ++#ifndef USE_KEYTAB + if (!secrets_init()) { + DEBUG(1,("secrets_init failed\n")); + return NT_STATUS_LOGON_FAILURE; +@@ -61,6 +65,7 @@ + + password.data = password_s; + password.length = strlen(password_s); ++#endif /* USE_KEYTAB */ + + ret = krb5_init_context(&context); + if (ret) { +@@ -82,7 +87,16 @@ + DEBUG(1,("krb5_auth_con_init failed (%s)\n", error_message(ret))); + return NT_STATUS_LOGON_FAILURE; + } ++#ifdef USE_KEYTAB ++ packet.length = ticket->length; ++ packet.data = (krb5_pointer)ticket->data; + ++ if (!(ret = krb5_rd_req(context, &auth_context, &packet, ++ NULL, keytab, NULL, &tkt))) { ++ auth_ok = True; ++ } ++ ++#else + fstrcpy(myname, global_myname()); + strlower(myname); + asprintf(&host_princ_s, "HOST/%s@%s", myname, lp_realm()); +@@ -121,6 +135,9 @@ + } + } + ++ SAFE_FREE(key); ++#endif /* USE_KEYTAB */ ++ + if (!auth_ok) { + DEBUG(3,("krb5_rd_req with auth failed (%s)\n", + error_message(ret))); +--- source/Makefile.in 2003-07-01 23:35:49.000000000 +0200 ++++ source/Makefile.in 2003-07-02 01:20:09.000000000 +0200 +@@ -806,7 +806,7 @@ + + bin/pdbedit@EXEEXT@: $(PDBEDIT_OBJ) @BUILD_POPT@ bin/.dummy + @echo Linking $@ +- @$(CC) $(FLAGS) -o $@ $(IDMAP_LIBS) $(PDBEDIT_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) @POPTLIBS@ $(PASSDBLIBS) ++ @$(CC) $(FLAGS) -o $@ $(IDMAP_LIBS) $(PDBEDIT_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) @POPTLIBS@ $(PASSDBLIBS) $(KRB5LIBS) + + bin/samtest@EXEEXT@: $(SAMTEST_OBJ) @BUILD_POPT@ bin/.dummy + @echo Linking $@ +@@ -1062,7 +1062,7 @@ + + bin/wbinfo@EXEEXT@: $(WBINFO_OBJ) @BUILD_POPT@ bin/.dummy + @echo Linking $@ +- @$(LINK) -o $@ $(WBINFO_OBJ) $(LIBS) @POPTLIBS@ ++ @$(LINK) -o $@ $(WBINFO_OBJ) $(LIBS) @POPTLIBS@ $(KRB5LIBS) + + bin/ntlm_auth@EXEEXT@: $(NTLM_AUTH_OBJ) $(PARAM_OBJ) $(LIB_OBJ) \ + $(UBIQX_OBJ) @BUILD_POPT@ bin/.dummy diff --git a/packaging/SuSE/samba-vscan-0.3.2b.tar.bz2 b/packaging/SuSE/samba-vscan-0.3.2b.tar.bz2 Binary files differnew file mode 100755 index 00000000000..2680bed82f0 --- /dev/null +++ b/packaging/SuSE/samba-vscan-0.3.2b.tar.bz2 diff --git a/packaging/SuSE/samba3-3.0.0-Makefiles-heimdal.diff b/packaging/SuSE/samba3-3.0.0-Makefiles-heimdal.diff new file mode 100644 index 00000000000..13da47e7409 --- /dev/null +++ b/packaging/SuSE/samba3-3.0.0-Makefiles-heimdal.diff @@ -0,0 +1,22 @@ +--- examples/pdb/Makefile Thu Sep 5 02:11:41 2002 ++++ examples/pdb/Makefile Thu Sep 5 02:11:59 2002 +@@ -8,7 +8,7 @@ + SAMBA_INCL = ../../source/include + UBIQX_SRC = ../../source/ubiqx + SMBWR_SRC = ../../source/smbwrapper +-CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -Wall -g ++CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -Wall -g -I/usr/include/heimdal + PDB_OBJS = pdb_test.so + + # Default target +--- examples/VFS/Makefile.in 2003-06-04 15:13:41.000000000 +0200 ++++ examples/VFS/Makefile.in 2003-06-04 22:07:03.000000000 +0200 +@@ -7,7 +7,7 @@ + SAMBA_SOURCE = @SAMBA_SOURCE@ + SHLIBEXT = @SHLIBEXT@ + OBJEXT = @OBJEXT@ +-FLAGS = $(CFLAGS) -Iinclude -I$(SAMBA_SOURCE)/include -I$(SAMBA_SOURCE)/ubiqx -I$(SAMBA_SOURCE)/smbwrapper -I. $(CPPFLAGS) -I$(SAMBA_SOURCE) ++FLAGS = $(CFLAGS) -Iinclude -I$(SAMBA_SOURCE)/include -I$(SAMBA_SOURCE)/ubiqx -I$(SAMBA_SOURCE)/smbwrapper -I. $(CPPFLAGS) -I$(SAMBA_SOURCE) -I/usr/include/heimdal + + + prefix = @prefix@ diff --git a/packaging/SuSE/samba3-3.0.0-heimdal-06.diff b/packaging/SuSE/samba3-3.0.0-heimdal-06.diff new file mode 100644 index 00000000000..87dd3e1824c --- /dev/null +++ b/packaging/SuSE/samba3-3.0.0-heimdal-06.diff @@ -0,0 +1,14 @@ +--- source/include/ads.h 2003-06-10 08:51:03.000000000 +0200 ++++ source/include/ads.h 2003-06-22 23:14:24.000000000 +0200 +@@ -215,9 +215,11 @@ + #define ENCTYPE_ARCFOUR_HMAC ENCTYPE_ARCFOUR_HMAC_MD5 + #endif + ++#if 0 + /* The older versions of heimdal that don't have this + define don't seem to use it anyway. I'm told they + always use a subkey */ + #ifndef AP_OPTS_USE_SUBKEY + #define AP_OPTS_USE_SUBKEY 0 + #endif ++#endif diff --git a/packaging/SuSE/samba3-3.0.0-pdb.diff b/packaging/SuSE/samba3-3.0.0-pdb.diff new file mode 100644 index 00000000000..0c811b57c52 --- /dev/null +++ b/packaging/SuSE/samba3-3.0.0-pdb.diff @@ -0,0 +1,13 @@ +--- examples/pdb/pdb_test.c 26 Sep 2002 18:37:54 -0000 1.1.2.3 ++++ examples/pdb/pdb_test.c 22 Apr 2003 20:06:31 -0000 +@@ -142,8 +142,6 @@ + int init_module(void); + + int init_module() { +- if(smb_register_passdb("testsam", testsam_init, PASSDB_INTERFACE_VERSION)) +- return 0; +- +- return 1; ++ smb_register_passdb(PASSDB_INTERFACE_VERSION, "testsam", testsam_init); ++ return True; + } diff --git a/packaging/SuSE/samba3-Makefile.diff b/packaging/SuSE/samba3-Makefile.diff new file mode 100644 index 00000000000..bc1ad142d9f --- /dev/null +++ b/packaging/SuSE/samba3-Makefile.diff @@ -0,0 +1,16 @@ +--- source/Makefile.in 2003-04-23 10:43:06.000000000 +0200 ++++ source/Makefile.in 2003-04-23 10:45:39.000000000 +0200 +@@ -673,6 +673,13 @@ + @echo "Using FLAGS = $(FLAGS)" + @echo " FLAGS32 = $(FLAGS32)" + @echo " LIBS = $(LIBS)" ++ @echo " TERMLIBS = $(TERMLIBS)" ++ @echo " PRINTLIBS = $(PRINTLIBS)" ++ @echo " AUTHLIBS = $(AUTHLIBS)" ++ @echo " ACLLIBS = $(ACLLIBS)" ++ @echo " PASSDBLIBS = $(PASSDBLIBS)" ++ @echo " ADSLIBS = $(ADSLIBS)" ++ @echo " KRB5LIBS = $(KRB5_LIBS)" + @echo " LDSHFLAGS = $(LDSHFLAGS)" + @echo " LDFLAGS = $(LDFLAGS)" + diff --git a/packaging/SuSE/samba3-com_err.diff b/packaging/SuSE/samba3-com_err.diff new file mode 100644 index 00000000000..c5d04cebe19 --- /dev/null +++ b/packaging/SuSE/samba3-com_err.diff @@ -0,0 +1,60 @@ +--- source/libads/kerberos.c 23 Oct 2002 00:02:26 -0000 1.18 ++++ source/libads/kerberos.c 1 Jul 2003 21:30:17 -0000 +@@ -126,6 +126,7 @@ + return KRB5_LIBOS_CANTREADPWD; + } + ++ initialize_krb5_error_table(); + ret = kerberos_kinit_password(s, ads->auth.password, ads->auth.time_offset); + + if (ret) { +--- source/libads/kerberos_verify.c 6 Jun 2003 14:53:22 -0000 1.10.2.1 ++++ source/libads/kerberos_verify.c 1 Jul 2003 21:30:17 -0000 +@@ -62,6 +62,7 @@ + password.data = password_s; + password.length = strlen(password_s); + ++ initialize_krb5_error_table(); + ret = krb5_init_context(&context); + if (ret) { + DEBUG(1,("krb5_init_context failed (%s)\n", error_message(ret))); +--- source/libads/krb5_setpw.c 6 Jun 2003 14:53:22 -0000 1.16.2.1 ++++ source/libads/krb5_setpw.c 1 Jul 2003 21:30:17 -0000 +@@ -470,6 +470,7 @@ + krb5_creds creds, *credsp; + krb5_ccache ccache; + ++ initialize_krb5_error_table(); + ret = krb5_init_context(&context); + if (ret) { + DEBUG(1,("Failed to init krb5 context (%s)\n", error_message(ret))); +@@ -584,6 +585,7 @@ + krb5_creds creds; + char *chpw_princ = NULL, *password; + ++ initialize_krb5_error_table(); + ret = krb5_init_context(&context); + if (ret) { + DEBUG(1,("Failed to init krb5 context (%s)\n", error_message(ret))); +--- source/libsmb/clikrb5.c 1 Jul 2003 14:40:37 -0000 1.36.2.2 ++++ source/libsmb/clikrb5.c 1 Jul 2003 21:30:20 -0000 +@@ -320,7 +320,8 @@ + ENCTYPE_DES_CBC_MD5, + ENCTYPE_DES_CBC_CRC, + ENCTYPE_NULL}; +- ++ ++ initialize_krb5_error_table(); + retval = krb5_init_context(&context); + if (retval) { + DEBUG(1,("krb5_init_context failed (%s)\n", +--- source/utils/net_lookup.c 1 Jul 2003 14:40:47 -0000 1.8.2.1 ++++ source/utils/net_lookup.c 1 Jul 2003 21:30:24 -0000 +@@ -177,6 +177,7 @@ + krb5_data realm; + char **realms; + ++ initialize_krb5_error_table(); + rc = krb5_init_context(&ctx); + if (rc) { + DEBUG(1,("krb5_init_context failed (%s)\n", diff --git a/packaging/SuSE/samba3-net_ads_password.diff b/packaging/SuSE/samba3-net_ads_password.diff new file mode 100644 index 00000000000..cc800fb7bfd --- /dev/null +++ b/packaging/SuSE/samba3-net_ads_password.diff @@ -0,0 +1,58 @@ +Index: source/utils/net_ads.c +=================================================================== +RCS file: /cvsroot/samba/source/utils/net_ads.c,v +retrieving revision 1.37.2.22 +diff -u -r1.37.2.22 net_ads.c +--- source/utils/net_ads.c 10 Jun 2003 04:15:55 -0000 1.37.2.22 ++++ source/utils/net_ads.c 20 Jun 2003 19:59:36 -0000 +@@ -44,9 +44,9 @@ + "\n\tdump the machine account details to stdout\n" + "\nnet ads lookup"\ + "\n\tperform a CLDAP search on the server\n" +-"\nnet ads password <username@realm> -Uadmin_username@realm%%admin_pass"\ ++"\nnet ads password <username@realm> <password> -Uadmin_username@realm%%admin_pass"\ + "\n\tchange a user's password using an admin account"\ +-"\n\t(note: use realm in UPPERCASE)\n"\ ++"\n\t(note: use realm in UPPERCASE, prompts if password is obmitted)\n"\ + "\nnet ads changetrustpw"\ + "\n\tchange the trust account password of this machine in the AD tree\n"\ + "\nnet ads printer [info | publish | remove] <printername> <servername>"\ +@@ -909,7 +909,7 @@ + } + + +- if (argc != 1) { ++ if (argc < 1) { + d_printf("ERROR: You must say which username to change password for\n"); + return -1; + } +@@ -941,22 +941,24 @@ + return -1; + } + +- asprintf(&prompt, "Enter new password for %s:", user); +- +- new_password = getpass(prompt); ++ if (argv[1]) { ++ new_password = (char *)argv[1]; ++ } else { ++ asprintf(&prompt, "Enter new password for %s:", user); ++ new_password = getpass(prompt); ++ free(prompt); ++ } + + ret = kerberos_set_password(ads->auth.kdc_server, auth_principal, + auth_password, user, new_password, ads->auth.time_offset); + if (!ADS_ERR_OK(ret)) { + d_printf("Password change failed :-( ...\n"); + ads_destroy(&ads); +- free(prompt); + return -1; + } + + d_printf("Password change for %s completed.\n", user); + ads_destroy(&ads); +- free(prompt); + + return 0; + } diff --git a/packaging/SuSE/samba3-smbwrapper.diff b/packaging/SuSE/samba3-smbwrapper.diff new file mode 100644 index 00000000000..0f7b391de0d --- /dev/null +++ b/packaging/SuSE/samba3-smbwrapper.diff @@ -0,0 +1,11 @@ +--- source/smbwrapper/smbsh.c.orig 2003-05-04 19:47:39.000000000 +0200 ++++ source/smbwrapper/smbsh.c 2003-05-04 19:47:47.000000000 +0200 +@@ -36,7 +36,7 @@ + int main(int argc, char *argv[]) + { + char *p, *u; +- const char *libd = dyn_BINDIR; ++ const char *libd = dyn_LIBDIR; + pstring line, wd; + int opt; + extern char *optarg; diff --git a/packaging/SuSE/samba3-vscan.diff b/packaging/SuSE/samba3-vscan.diff new file mode 100644 index 00000000000..330b470af2c --- /dev/null +++ b/packaging/SuSE/samba3-vscan.diff @@ -0,0 +1,269 @@ +--- examples/VFS/samba-vscan-0.3.2b/fprot/Makefile 2003-01-14 00:42:15.000000000 +0100 ++++ examples/VFS/samba-vscan-0.3.2b/fprot/Makefile 2003-04-09 20:21:37.000000000 +0200 +@@ -14,7 +14,7 @@ + SMBWR_SRC = ../../../../source/smbwrapper + SMBVS_INCL = ../include + SMBVS_GLB = ../global +-CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(SMBVS_INCL) -Wall -g -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC ++CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(SMBVS_INCL) -Wall -g -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -I/usr/include/heimdal + VFS_OBJS = vscan-fprotd.so + SOURCES = $(SMBVS_GLB)/vscan-functions.c $(SMBVS_GLB)/vscan-message.c $(SMBVS_GLB)/vscan-quarantine.c $(SMBVS_GLB)/vscan-fileaccesslog.c vscan-fprotd.c vscan-fprotd_core.c vscan-fprotd.h vscan-fprotd_core.h + OBJS = vscan-functions.lo vscan-message.lo vscan-quarantine.lo vscan-fileaccesslog.lo vscan-fprotd.lo vscan-fprotd_core.lo +--- examples/VFS/samba-vscan-0.3.2b/fprot/vscan-fprotd.c 2003-02-21 21:37:44.000000000 +0100 ++++ examples/VFS/samba-vscan-0.3.2b/fprot/vscan-fprotd.c 2003-04-09 20:25:25.000000000 +0200 +@@ -432,14 +432,14 @@ + rc = vscan_do_infected_file_action(&default_vfs_ops, conn, filepath, quarantine_dir, quarantine_prefix, infected_file_action); + + /* add/update file. mark file as infected! */ +- lrufiles_add(filepath, stat_buf.st_mtime, TRUE); ++ lrufiles_add(filepath, stat_buf.st_mtime, True); + + /* virus found, deny acces */ + errno = EACCES; + return -1; + } else if ( retval == 0 ) { + /* file is clean, add to lrufiles */ +- lrufiles_add(filepath, stat_buf.st_mtime, FALSE); ++ lrufiles_add(filepath, stat_buf.st_mtime, False); + } + } + +--- examples/VFS/samba-vscan-0.3.2b/fprot/vscan-fprotd_core.c 2003-01-25 18:40:57.000000000 +0100 ++++ examples/VFS/samba-vscan-0.3.2b/fprot/vscan-fprotd_core.c 2003-04-09 20:23:31.000000000 +0200 +@@ -110,7 +110,7 @@ + pstring fprotdCommand; /* the command line to be send to daemon */ + char *str; + FILE *fpin, *fpout; +- bool received_data = FALSE; /* indicates, if any response from deamon was received */ ++ bool received_data = False; /* indicates, if any response from deamon was received */ + + /* open stream sockets */ + fpin = fdopen(sockfd, "r"); +@@ -159,7 +159,7 @@ + + while ( (fgets(recvline, MAXLINE, fpin)) != NULL ) { + +- received_data = TRUE; ++ received_data = True; + + /* ignore the HTTP response header, remove any leading + white spaces */ +--- examples/VFS/samba-vscan-0.3.2b/icap/Makefile 2003-01-30 00:53:02.000000000 +0100 ++++ examples/VFS/samba-vscan-0.3.2b/icap/Makefile 2003-04-09 20:21:37.000000000 +0200 +@@ -15,7 +15,7 @@ + SMBWR_SRC = ../../../../source/smbwrapper + SMBVS_INCL = ../include + SMBVS_GLB = ../global +-CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(SMBVS_INCL) -Wall -g -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC ++CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(SMBVS_INCL) -Wall -g -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -I/usr/include/heimdal + VFS_OBJS = vscan-icap.so + SOURCES = $(SMBVS_GLB)/vscan-functions.c $(SMBVS_GLB)/vscan-message.c $(SMBVS_GLB)/vscan-quarantine.c $(SMBVS_GLB)/vscan-fileaccesslog.c vscan-icap.c vscan-icap_core.c vscan-icap.h vscan-icap_core.h + OBJS = vscan-functions.lo vscan-message.lo vscan-quarantine.lo vscan-fileaccesslog.lo vscan-icap.lo vscan-icap_core.lo +--- examples/VFS/samba-vscan-0.3.2b/icap/vscan-icap.c 2003-02-21 21:37:50.000000000 +0100 ++++ examples/VFS/samba-vscan-0.3.2b/icap/vscan-icap.c 2003-04-09 20:32:20.000000000 +0200 +@@ -413,14 +413,14 @@ + rc = vscan_do_infected_file_action(&default_vfs_ops, conn, filepath, quarantine_dir, quarantine_prefix, infected_file_action); + + /* add/update file. mark file as infected! */ +- lrufiles_add(filepath, stat_buf.st_mtime, TRUE); ++ lrufiles_add(filepath, stat_buf.st_mtime, True); + + /* virus found, deny acces */ + errno = EACCES; + return -1; + } else if ( retval == 0 ) { + /* file is clean, add to lrufiles */ +- lrufiles_add(filepath, stat_buf.st_mtime, FALSE); ++ lrufiles_add(filepath, stat_buf.st_mtime, False); + } + } + +--- examples/VFS/samba-vscan-0.3.2b/icap/vscan-icap_core.c 2003-01-15 00:19:18.000000000 +0100 ++++ examples/VFS/samba-vscan-0.3.2b/icap/vscan-icap_core.c 2003-04-09 20:30:56.000000000 +0200 +@@ -114,8 +114,8 @@ + char buf[BUFLEN]; + char recvline[MAXLINE + 1]; + char *str; +- bool first_line = FALSE; /* first line we've received? */ +- bool infected = FALSE; /* an infected found? */ ++ bool first_line = False; /* first line we've received? */ ++ bool infected = False; /* an infected found? */ + + + /* get file length */ +@@ -213,7 +213,7 @@ + /* set line buffering */ + setvbuf(fpin, (char *)NULL, _IOLBF, 0); + +- first_line = TRUE; ++ first_line = True; + while ( (fgets(recvline, MAXLINE, fpin)) != NULL ) { + str = recvline; + if ( first_line ) { +@@ -226,7 +226,7 @@ + return(0); + } + else if ( strncmp("403", str, 3) == 0 ) { +- infected = TRUE; ++ infected = True; + } else { + if ( verbose_file_logging ) + vscan_syslog("ERROR: file %s not found, not readable or an error occured", scan_file); +@@ -241,7 +241,7 @@ + return(-1); + } + +- first_line = FALSE; ++ first_line = False; + } + if ( infected ) { + if ( strncmp("X-Infection-Found", str, 17) == 0 ) { +--- examples/VFS/samba-vscan-0.3.2b/include/vscan-global.h 2002-11-25 16:48:10.000000000 +0100 ++++ examples/VFS/samba-vscan-0.3.2b/include/vscan-global.h 2003-04-09 20:21:37.000000000 +0200 +@@ -93,7 +93,7 @@ + */ + + #ifndef SAMBA_VERSION_MAJOR +-# define SAMBA_VERSION_MAJOR 2 ++# define SAMBA_VERSION_MAJOR 3 + #endif + + #ifndef SAMBA_VERSION_MINOR +--- examples/VFS/samba-vscan-0.3.2b/kaspersky/Makefile 2003-02-20 15:41:32.000000000 +0100 ++++ examples/VFS/samba-vscan-0.3.2b/kaspersky/Makefile 2003-04-09 20:21:37.000000000 +0200 +@@ -23,9 +23,9 @@ + VFS_OBJS = vscan-kavp.so + + ifdef USE_DEBUG +-CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(SMBVS_INCL) -Wall -g -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC ++CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(SMBVS_INCL) -Wall -g -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -I/usr/include/heimdal + else +-CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(SMBVS_INCL) -Wall -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC ++CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(SMBVS_INCL) -Wall -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -I/usr/include/heimdal + endif + + ifndef USE_KAVPSHAREDLIB +--- examples/VFS/samba-vscan-0.3.2b/mks/Makefile 2003-01-19 18:09:53.000000000 +0100 ++++ examples/VFS/samba-vscan-0.3.2b/mks/Makefile 2003-04-09 20:21:37.000000000 +0200 +@@ -16,10 +16,10 @@ + SMBWR_SRC = ../../../../source/smbwrapper + SMBVS_INCL = ../include + SMBVS_GLB = ../global +-CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(SMBVS_INCL) -Wall -g -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC ++CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(SMBVS_INCL) -Wall -g -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -I/usr/include/heimdal + + ifdef USE_INCLMKSDLIB +-CFLAGS=-I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(SMBVS_INCL) -Wall -g -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_USE_INCL_MKSD_LIB=1 -fPIC ++CFLAGS=-I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(SMBVS_INCL) -Wall -g -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_USE_INCL_MKSD_LIB=1 -fPIC -I/usr/include/heimdal + endif + + VFS_OBJS = vscan-mksd.so +--- examples/VFS/samba-vscan-0.3.2b/mks/vscan-mksd.c 2003-02-21 21:37:50.000000000 +0100 ++++ examples/VFS/samba-vscan-0.3.2b/mks/vscan-mksd.c 2003-04-09 20:38:16.000000000 +0200 +@@ -393,14 +393,14 @@ + rc = vscan_do_infected_file_action(&default_vfs_ops, conn, filepath, quarantine_dir, quarantine_prefix, infected_file_action); + + /* add/update file. mark file as infected! */ +- lrufiles_add(filepath, stat_buf.st_mtime, TRUE); ++ lrufiles_add(filepath, stat_buf.st_mtime, True); + + /* virus found, deny acces */ + errno = EACCES; + return -1; + } else if ( retval == 0 ) { + /* file is clean, add to lrufiles */ +- lrufiles_add(filepath, stat_buf.st_mtime, FALSE); ++ lrufiles_add(filepath, stat_buf.st_mtime, False); + } + } + +--- examples/VFS/samba-vscan-0.3.2b/openantivirus/Makefile 2003-01-30 00:53:08.000000000 +0100 ++++ examples/VFS/samba-vscan-0.3.2b/openantivirus/Makefile 2003-04-09 20:21:37.000000000 +0200 +@@ -15,7 +15,7 @@ + SMBWR_SRC = ../../../../source/smbwrapper + SMBVS_INCL = ../include + SMBVS_GLB = ../global +-CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(SMBVS_INCL) -Wall -g -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC ++CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(SMBVS_INCL) -Wall -g -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -I/usr/include/heimdal + VFS_OBJS = vscan-oav.so + SOURCES = $(SMBVS_GLB)/vscan-functions.c $(SMBVS_GLB)/vscan-message.c $(SMBVS_GLB)/vscan-quarantine.c $(SMBVS_GLB)/vscan-fileaccesslog.c vscan-oav.c vscan-oav_core.c vscan-oav.h vscan-oav_core.h + OBJS = vscan-functions.lo vscan-message.lo vscan-quarantine.lo vscan-fileaccesslog.lo vscan-oav.lo vscan-oav_core.lo +--- examples/VFS/samba-vscan-0.3.2b/openantivirus/vscan-oav.c 2003-02-21 21:37:51.000000000 +0100 ++++ examples/VFS/samba-vscan-0.3.2b/openantivirus/vscan-oav.c 2003-04-09 20:40:53.000000000 +0200 +@@ -417,14 +417,14 @@ + rc = vscan_do_infected_file_action(&default_vfs_ops, conn, filepath, quarantine_dir, quarantine_prefix, infected_file_action); + + /* add/update file. mark file as infected! */ +- lrufiles_add(filepath, stat_buf.st_mtime, TRUE); ++ lrufiles_add(filepath, stat_buf.st_mtime, True); + + /* virus found, deny acces */ + errno = EACCES; + return -1; + } else if ( retval == 0 ) { + /* file is clean, add to lrufiles */ +- lrufiles_add(filepath, stat_buf.st_mtime, FALSE); ++ lrufiles_add(filepath, stat_buf.st_mtime, False); + } + } + +--- examples/VFS/samba-vscan-0.3.2b/sophos/Makefile 2003-01-30 00:53:08.000000000 +0100 ++++ examples/VFS/samba-vscan-0.3.2b/sophos/Makefile 2003-04-09 20:21:37.000000000 +0200 +@@ -15,7 +15,7 @@ + SMBWR_SRC = ../../../../source/smbwrapper + SMBVS_INCL = ../include + SMBVS_GLB = ../global +-CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(SMBVS_INCL) -Wall -g -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC ++CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(SMBVS_INCL) -Wall -g -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -I/usr/include/heimdal + VFS_OBJS = vscan-sophos.so + SOURCES = $(SMBVS_GLB)/vscan-functions.c $(SMBVS_GLB)/vscan-message.c $(SMBVS_GLB)/vscan-quarantine.c $(SMBVS_GLB)/vscan-fileaccesslog.c vscan-sophos.c vscan-sophos_core.c vscan-sophos.h vscan-sophos_core.h + OBJS = vscan-functions.lo vscan-message.lo vscan-quarantine.lo vscan-fileaccesslog.lo vscan-sophos.lo vscan-sophos_core.lo +--- examples/VFS/samba-vscan-0.3.2b/sophos/vscan-sophos.c 2003-02-21 21:37:51.000000000 +0100 ++++ examples/VFS/samba-vscan-0.3.2b/sophos/vscan-sophos.c 2003-04-09 20:43:11.000000000 +0200 +@@ -399,14 +399,14 @@ + rc = vscan_do_infected_file_action(&default_vfs_ops, conn, filepath, quarantine_dir, quarantine_prefix, infected_file_action); + + /* add/update file. mark file as infected! */ +- lrufiles_add(filepath, stat_buf.st_mtime, TRUE); ++ lrufiles_add(filepath, stat_buf.st_mtime, True); + + /* deny access */ + errno = EACCES; + return -1; + } else if ( retval == 0 ) { + /* file is clean, add to lrufiles */ +- lrufiles_add(filepath, stat_buf.st_mtime, FALSE); ++ lrufiles_add(filepath, stat_buf.st_mtime, False); + } + } + +--- examples/VFS/samba-vscan-0.3.2b/trend/Makefile 2003-01-30 01:03:38.000000000 +0100 ++++ examples/VFS/samba-vscan-0.3.2b/trend/Makefile 2003-04-09 20:21:37.000000000 +0200 +@@ -15,7 +15,7 @@ + SMBWR_SRC = ../../../../source/smbwrapper + SMBVS_INCL = ../include + SMBVS_GLB = ../global +-CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(SMBVS_INCL) -Wall -g -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC ++CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(SMBVS_INCL) -Wall -g -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -I/usr/include/heimdal + VFS_OBJS = vscan-trend.so + SOURCES = $(SMBVS_GLB)/vscan-functions.c $(SMBVS_GLB)/vscan-message.c $(SMBVS_GLB)/vscan-quarantine.c $(SMBVS_GLB)/vscan-fileaccesslog.c vscan-trend.c vscan-trend_core.c vscan-trend.h vscan-trend_core.h + OBJS = vscan-functions.lo vscan-message.lo vscan-quarantine.lo vscan-fileaccesslog.lo vscan-trend.lo vscan-trend_core.lo +--- examples/VFS/samba-vscan-0.3.2b/trend/vscan-trend.c 2003-02-21 21:37:52.000000000 +0100 ++++ examples/VFS/samba-vscan-0.3.2b/trend/vscan-trend.c 2003-04-09 20:46:07.000000000 +0200 +@@ -409,14 +409,14 @@ + rc = vscan_do_infected_file_action(&default_vfs_ops, conn, filepath, quarantine_dir, quarantine_prefix, infected_file_action); + + /* add/update file. mark file as infected! */ +- lrufiles_add(filepath, stat_buf.st_mtime, TRUE); ++ lrufiles_add(filepath, stat_buf.st_mtime, True); + + /* deny access */ + errno = EACCES; + return -1; + } else if ( retval == 0 ) { + /* file is clean, add to lrufiles */ +- lrufiles_add(filepath, stat_buf.st_mtime, FALSE); ++ lrufiles_add(filepath, stat_buf.st_mtime, False); + } + } + diff --git a/packaging/SuSE/samba3.spec b/packaging/SuSE/samba3.spec new file mode 100644 index 00000000000..37d8a4d36f8 --- /dev/null +++ b/packaging/SuSE/samba3.spec @@ -0,0 +1,766 @@ +# +# spec file for package samba3 (Version 3.0.0rc1cvs) +# +# Copyright (c) 2003 SuSE Linux AG, Nuernberg, Germany. +# This file and all modifications and additions to the pristine +# package are under the same license as the package itself. +# +# Please submit bugfixes or comments via http://www.suse.de/feedback/ +# +# Note: The Samba3 tarball should be called: samba3-3.0.0.tar.bz2 +# + +# neededforbuild XFree86-libs autoconf automake cups-devel cups-libs dialog docbook-utils docbook-xsl-stylesheets docbook_4 ed freetype2 ghostscript-fonts-std ghostscript-library ghostscript-x11 glib heimdal heimdal-devel heimdal-lib iso_ent libacl libacl-devel libattr libattr-devel libgimpprint libpng libtiff libxml2 libxml2-devel libxslt mysql-devel mysql-shared openldap2 openldap2-client openldap2-devel openssl openssl-devel popt popt-devel python python-devel readline readline-devel te_etex te_latex te_pdf tetex xmlcharent +# usedforbuild aaa_base acl attr bash bind9-utils bison coreutils cpio cpp cvs cyrus-sasl2 db devs diffutils e2fsprogs file filesystem fillup findutils flex gawk gdbm-devel glibc glibc-devel glibc-locale gpm grep groff gzip info insserv kbd less libacl libattr libgcc libstdc++ libxcrypt m4 make man mktemp modutils ncurses ncurses-devel net-tools netcfg pam pam-devel pam-modules patch permissions ps rcs readline sed sendmail shadow strace syslogd sysvinit tar texinfo timezone unzip util-linux vim zlib zlib-devel XFree86-libs autoconf automake binutils bzip2 cracklib cups-devel cups-libs dialog docbook-utils docbook-xsl-stylesheets docbook_4 ed freetype2 gcc gdbm gettext ghostscript-fonts-std ghostscript-library ghostscript-x11 glib heimdal heimdal-devel heimdal-lib iso_ent libacl-devel libattr-devel libgimpprint libpng libtiff libtool libxml2 libxml2-devel libxslt mysql-devel mysql-shared openldap2 openldap2-client openldap2-devel openssl openssl-devel perl popt popt-devel python python-devel readline-devel rpm te_ams te_etex te_latex te_pdf tetex xmlcharent + +Name: samba3 +Vendor: Samba Team +License: GPL +Group: Productivity/Networking/Samba +Url: http://www.samba.org +Provides: samba smbfs samba3 +Requires: samba3-client +Obsoletes: samba-classic samba-ldap +Autoreqprov: on +%define krb_heimdal_05 0 +%define new_heimdal /opt/heimdal +%define new_sasl /opt/sasl +%define new_openldap /opt/openldap +%define new_glibc 0 +Version: 3.0.0 +Release: %(date +%%j) +%define head 0 +%define samba_ver 3.0.0 +%define samba_release 0 +%define ul_version 0 +%define suse_ver 820 +%define python_ver python2.2 +%if %{suse_ver} > 810 +%define new_glibc 1 +%endif +%if %{suse_ver} > 821 +%define python_ver python2.3 +%endif +%define make_cifsvfs 1 +%define make_devel 0 +%define make_doc 0 +%define make_python 1 +%define make_shared_mod 0 +%define make_smbwrap 1 +# vscan has not yet updated to the new vfs-api +%define make_vscan 0 +%define make_wrepld 1 +%define use_keytab 0 +Summary: samba3 +Source: %{name}-%{version}.tar.bz2 +Source10: %{name}-%{version}.files.tar.bz2 +Source50: samba-vscan-%{vscan_ver}.tar.bz2 +Patch1: %{name}-%{version}-Makefiles-heimdal.diff +Patch2: samba-mutual-auth.diff +Patch29: %{name}-com_err.diff +Patch30: %{name}-%{version}-heimdal-06.diff +Patch31: %{name}-%{version}-pdb.diff +Patch32: %{name}-net_ads_password.diff +Patch33: %{name}-Makefile.diff +Patch34: %{name}-smbwrapper.diff +Patch51: %{name}-vscan.diff +BuildRoot: %{_tmppath}/%{name}-%{version}-build +%define DOCDIR %{_defaultdocdir}/%{name} +%define DOCBOOKDIR %{_defaultdocdir}/%{name}/docbook +%define SWATDIR %{_datadir}/samba/swat +%define vscan_ver 0.3.2b +%define vscan_modules fprot icap mks openantivirus sophos trend +#not pdb_nisplussam +%define pdb_modules pdb_xml,pdb_mysql,pdb_ldap,pdb_smbpasswd,pdb_tdbsam,pdb_unix,pdb_guest,pdb_nisplussam +%define rpc_modules rpc_lsa,rpc_samr,rpc_reg,rpc_wks,rpc_net,rpc_dfs,rpc_srv,rpc_spoolss +%define auth_modules auth_rhosts,auth_sam,auth_unix,auth_winbind,auth_server,auth_domain,auth_builtin +%define vfs_modules vfs_recycle,vfs_audit,vfs_extd_audit,vfs_netatalk,vfs_fake_perms +%define idmap_modules idmap_winbind,idmap_ldap,idmap_tdb +%define charset_modules charset_weird +%package client +Summary: samba3-client +Autoreqprov: on +Requires: cups-libs +Obsoletes: smbclnt samba-classic-client samba-ldap-client +Provides: samba-client samba3-client +Group: Productivity/Networking/Samba +%package winbind +Requires: samba-client samba +Summary: samba3-winbind +Autoreqprov: on +Group: Productivity/Networking/Samba +%package utils +Summary: samba3-utils +Autoreqprov: on +Group: Productivity/Networking/Samba +%package doc +Summary: samba3-doc +Autoreqprov: on +Group: Productivity/Networking/Samba +%package docbook +Summary: samba3-docbook +Autoreqprov: on +Group: Productivity/Networking/Samba +%package pdb +Summary: samba3-pdb +Autoreqprov: on +Group: Productivity/Networking/Samba +%if %{make_cifsvfs} +%package cifsmount +Summary: samba3-cifsmount +Autoreqprov: on +Group: Productivity/Networking/Samba +Url: http://us1.samba.org/samba/Linux_CIFS_client.html +%endif +%if %{make_vscan} +%package vscan +Summary: samba3-vscan +Autoreqprov: on +Group: Productivity/Networking/Samba +Version: 0.3.2a +Release: 0 +Url: http://www.openantivirus.org/ +%endif +%if %{make_wrepld} +%package wrepld +Summary: samba3-wrepld +Autoreqprov: on +Group: Productivity/Networking/Samba +%endif +%if %{make_python} +%package python +Summary: samba3-python +Autoreqprov: on +Group: Productivity/Networking/Samba +%endif +%package -n libsmbclient +Summary: Samba client library +Autoreqprov: on +Group: System/Libraries +%package -n libsmbclient-devel +Summary: Libraries and header files to develop programs with smbclient support +Autoreqprov: on +Group: Development/Libraries/C and C++ +%prep +[ $RPM_BUILD_ROOT = "/" ] && (echo "your buildroot is /" && exit 0) || rm -rf $RPM_BUILD_ROOT +mkdir $RPM_BUILD_ROOT +%setup -n %{name}-%{samba_ver} +%setup -T -D -a 50 +cp -ar samba-vscan-%{vscan_ver} examples/VFS/ +# untar my configs +%setup -T -D -a 10 +########### +### PATCHES +########### +# Makefiles-heimdal.diff +%patch1 +%if %{use_keytab} +# luke howards keytab-patch +%patch2 +%endif +# some com_err fixes +%patch29 +%if %{suse_ver} > 821 +%patch30 +%endif +# vscan patch +%patch51 +# net ads password +%patch32 +# temp Makefile (show more libs) +%patch33 +# temp pdb-test.c +%patch31 +# smbwrapper should use LIBDIR not BINDIR +%patch34 +#find . -name CVS -print | xargs rm -rf +#find . -name ".cvsignore" -print | xargs rm -rf +find . -name "*.gd" -print | xargs rm -rvf +find . -name "*.orig" -print | xargs rm -rvf +%if %{ul_version} >= 1 + echo '#define VERSION "%samba_ver-UL"' > source/include/version.h +%else + echo '#define VERSION "%samba_ver-SuSE"' > source/include/version.h +%endif + +%build %{name}-%{samba_ver} +%{?suse_update_config:%{suse_update_config -f}} +cd source +./autogen.sh +export CFLAGS="$RPM_OPT_FLAGS -Wall -O -D_GNU_SOURCE -D_LARGEFILE64_SOURCE" +# debugging symbols +%if %{make_devel} +export CFLAGS="$RPM_OPT_FLAGS -g -Wall -O -D_GNU_SOURCE -D_LARGEFILE64_SOURCE" +%endif +%if %{krb_heimdal_05} +export CFLAGS="$CFLAGS -I./include -I%{new_heimdal}/include " +export CFLAGS="$CFLAGS -I%{new_openldap}/include " +export CFLAGS="$CFLAGS -I%{new_sasl}/include " +export LDFLAGS="$LDFLAGS -Wl,-rpath %{new_heimdal}/lib" +export LDFLAGS="$LDFLAGS -Wl,-rpath %{new_openldap}/lib" +export LDFLAGS="$LDFLAGS -Wl,-rpath %{new_sasl}/lib" +%endif +%ifarch ppc64 +export CFLAGS="$CFLAGS -mminimal-toc" +%endif +CONF_OPTS="\ + --enable-cups \ + --libdir=/usr/lib/samba \ + --localstatedir=/var/lib/samba \ + --mandir=%{_mandir} \ + --prefix=/usr \ + --sbindir=/usr/sbin \ + --sysconfdir=/etc/samba \ + --with-acl-support \ + --with-automount \ + --with-configdir=/etc/samba \ + --with-lockdir=/var/lib/samba \ + --with-logfilebase=/var/log/samba \ + --with-msdfs \ + --with-pam \ + --with-pam_smbpass \ + --with-piddir=/var/run/samba \ + --with-privatedir=/etc/samba \ + --with-quotas \ + --with-smbmount \ + --with-swatdir=/usr/share/samba/swat \ + --with-syslog \ + --with-utmp \ + --with-vfs \ + --with-winbind \ + --with-tdbsam \ + --with-expsam=xml,mysql \ + --with-profiling-data \ +%if %{use_keytab} + --enable-keytab \ +%endif +%if %{make_smbwrap} + --with-smbwrapper \ +%endif +%if %{make_python} + --with-python=%{python_ver} \ +%endif +%if %{make_shared_mod} + --with-shared-modules=%{pdb_modules},%{rpc_modules} \ +%endif +%if %{make_devel} + --enable-developer \ + --enable-krb5developer \ +%endif +" +# --with-nisplus-home \ +# make sure we have a chance to find the krb5-config-tool +export PATH="$PATH:/usr/lib/heimdal/bin" +./configure $CONF_OPTS +make \ + all \ + torture \ + nsswitch/libnss_wins.so \ + debug2html \ + libsmbclient \ + everything \ + bin/editreg +# everything = nsswitch smbwrapper smbtorture debug2html smbfilter nsswitch/libnss_wins.so +make modules +make -C tdb tdbdump tdbtest tdbtool tdbtorture +make talloctort +%if %{make_wrepld} +make bin/wrepld +%endif +%if %{make_doc} +pushd `pwd` +cd ../docs/docbook +autoconf -f +./configure +# gracefully ignore errors... +make -i manpages html html-single pdf htmlfaq htmlman +# ps is not necessary, txt neither +# everything = manpages ps pdf html-single html htmlman txt htmlfaq +popd +%endif +# make examples in VFS,PDB +pushd `pwd` +cd ../examples/VFS/ +sh -x autogen.sh +./configure +popd +EXAMPLEDIRS="pdb VFS" +for i in $EXAMPLEDIRS; do make -C ../examples/$i; done +%if %{make_vscan} +export USE_KAVPSHAREDLIB=0 +export USE_INCLMKSDLIB=1 +for module in %{vscan_modules}; do + make -C ../examples/VFS/samba-vscan-%{vscan_ver}/${module}; +done +%endif +%if %{make_python} +make python_ext +%endif +%if %{make_cifsvfs} +cd client +export CFLAGS="$RPM_OPT_FLAGS -Wall -O -D_GNU_SOURCE -D_LARGEFILE64_SOURCE" +gcc mount.cifs.c -o mount.cifs +cd .. +%endif + +%install +mkdir -p \ + $RPM_BUILD_ROOT/%{DOCDIR} \ + $RPM_BUILD_ROOT/%{DOCDIR}-vscan \ + $RPM_BUILD_ROOT/%{DOCDIR}/docbook \ + $RPM_BUILD_ROOT/etc/{pam.d,init.d,samba} \ + $RPM_BUILD_ROOT/lib/security \ + $RPM_BUILD_ROOT/sbin \ + $RPM_BUILD_ROOT/usr/include \ + $RPM_BUILD_ROOT/usr/lib/%{python_ver}/lib-dynload \ + $RPM_BUILD_ROOT/usr/lib/samba/{vfs,pdb,vscan,rpc,auth,charset,idmap} \ + $RPM_BUILD_ROOT/usr/share/{man,samba/swat} \ + $RPM_BUILD_ROOT/usr/{bin,sbin} \ + $RPM_BUILD_ROOT/var/adm \ + $RPM_BUILD_ROOT/var/lib/samba/{netlogon,drivers/{W32X86,WIN40,W32ALPHA,W32MIPS,W32PPC},profiles} \ + $RPM_BUILD_ROOT/var/log/samba \ + $RPM_BUILD_ROOT/var/run/samba \ + $RPM_BUILD_ROOT/var/spool/samba +cd source/ +make install \ + LIBDIR=$RPM_BUILD_ROOT/usr/lib/samba \ + LOGFILEBASE=$RPM_BUILD_ROOT/var/log/samba \ + CONFIGFILE=$RPM_BUILD_ROOT/etc/samba/smb.conf \ + LMHOSTSFILE=$RPM_BUILD_ROOT/etc/samba/lmhosts \ + SWATDIR=$RPM_BUILD_ROOT/usr/share/samba/swat \ + SBINDIR=$RPM_BUILD_ROOT/usr/sbin \ + LOCKDIR=$RPM_BUILD_ROOT/var/lib/samba \ + DRIVERFILE=$RPM_BUILD_ROOT/etc/samba/printers.def \ + BINDIR=$RPM_BUILD_ROOT/usr/bin \ + SMB_PASSWD_FILE=$RPM_BUILD_ROOT/etc/samba/smbpasswd \ + MANDIR=$RPM_BUILD_ROOT/usr/share/man +make installmodules \ + LIBDIR=$RPM_BUILD_ROOT/usr/lib/samba +cd .. +# utility scripts +%if %{head} +scripts="creategroup cvslog.pl scancvslog.pl" +%else +scripts="scancvslog.pl" +%endif +mkdir -p examples/scripts +for i in $scripts; do + cp -a source/script/$i examples/scripts/ +done +# configuration files +%if %{ul_version} >= 1 + SUFFIX="UnitedLinux" +%else + SUFFIX="SuSE" +%endif +cat smb.conf.vendor | egrep -v '(^$$|^#)' > smb.conf +mv smb.conf.vendor examples/smb.conf.${SUFFIX} +install -m 644 smb.conf* $RPM_BUILD_ROOT/etc/samba/ +install -m 644 lmhosts $RPM_BUILD_ROOT/etc/samba/ +install -m 644 smbusers $RPM_BUILD_ROOT/etc/samba/ +install -m 600 smbpasswd -o root -g root $RPM_BUILD_ROOT/etc/samba/ +install -m 600 smbfstab -o root -g root $RPM_BUILD_ROOT/etc/samba/ +# pam +install -m 644 samba.pamd $RPM_BUILD_ROOT/etc/pam.d/samba +# sambamount +ln -sf /usr/bin/smbmount $RPM_BUILD_ROOT/sbin/mount.smbfs +#cifsmount +%if %{make_cifsvfs} +install -m755 source/client/mount.cifs $RPM_BUILD_ROOT/sbin +%endif +# start scripts +install rc.smb $RPM_BUILD_ROOT/etc/init.d/smb +ln -sf ../../etc/init.d/smb $RPM_BUILD_ROOT/usr/sbin/rcsmb +install rc.nmb $RPM_BUILD_ROOT/etc/init.d/nmb +ln -sf ../../etc/init.d/nmb $RPM_BUILD_ROOT/usr/sbin/rcnmb +install rc.smbfs $RPM_BUILD_ROOT/etc/init.d/smbfs +ln -sf ../../etc/init.d/smbfs $RPM_BUILD_ROOT/usr/sbin/rcsmbfs +install rc.winbind $RPM_BUILD_ROOT/etc/init.d/winbind +ln -sf ../../etc/init.d/winbind $RPM_BUILD_ROOT/usr/sbin/rcwinbind +%if %{make_wrepld} +install rc.wrepl $RPM_BUILD_ROOT/etc/init.d/wrepl +ln -sf ../../etc/init.d/wrepl $RPM_BUILD_ROOT/usr/sbin/rcwrepl +cp -a source/bin/wrepld $RPM_BUILD_ROOT/usr/sbin/ +%endif +# libnss_wins.so +cp source/nsswitch/libnss_wins.so $RPM_BUILD_ROOT/lib/libnss_wins.so.2 +ln -sf /lib/libnss_wins.so.2 $RPM_BUILD_ROOT/lib/libnss_wins.so +# winbind stuff +cp -a source/nsswitch/pam_winbind.so $RPM_BUILD_ROOT/lib/security/ +cp -a source/nsswitch/libnss_winbind.so $RPM_BUILD_ROOT/lib/libnss_winbind.so.2 +cp -a source/bin/winbindd $RPM_BUILD_ROOT/usr/sbin/ +ln -s /lib/libnss_winbind.so.2 $RPM_BUILD_ROOT/lib/libnss_winbind.so +# pam_smbpass +cp -a source/bin/pam_smbpass.so $RPM_BUILD_ROOT/lib/security/ +# smbfilter +cp -a source/bin/smbfilter $RPM_BUILD_ROOT/usr/bin/ +# editreg +cp -a source/bin/editreg $RPM_BUILD_ROOT/usr/bin/ +# install libsmbclient +install -m0755 source/bin/libsmbclient.a $RPM_BUILD_ROOT/%{_libdir} +install -m0755 source/bin/libsmbclient.so $RPM_BUILD_ROOT/%{_libdir}/libsmbclient.so.0 +ln -s /usr/lib/libsmbclient.so.0 $RPM_BUILD_ROOT/%{_libdir}/libsmbclient.so +install -m0644 source/include/libsmbclient.h $RPM_BUILD_ROOT/%{_includedir} +# install nsswitch-headers (for squid, etc.) +mkdir -p $RPM_BUILD_ROOT/%{_includedir}/samba/nsswitch +cp source/nsswitch/*.h $RPM_BUILD_ROOT/%{_includedir}/samba/nsswitch/ +# install smbtorture and other test-programs +install -m0755 source/bin/smbtorture $RPM_BUILD_ROOT/usr/bin/ +install -m0755 source/bin/talloctort $RPM_BUILD_ROOT/usr/bin/ +install -m0755 source/bin/{msgtest,masktest,locktest*} $RPM_BUILD_ROOT/usr/bin/ +install -m0755 source/bin/{vfstest,nsstest} $RPM_BUILD_ROOT/usr/bin/ +# install tdb tools +install -m0755 source/tdb/{tdbdump,tdbtest,tdbtool,tdbtorture} $RPM_BUILD_ROOT/usr/bin/ +# install VFS-modules +install -m0755 examples/VFS/*.so $RPM_BUILD_ROOT/%{_libdir}/samba/vfs/ +# install PDB-modules +install -m0755 examples/pdb/pdb_test.so $RPM_BUILD_ROOT/%{_libdir}/samba/pdb/ +%if %{make_vscan} +# install VSCAN-vfs-modules +install -m0755 examples/VFS/samba-vscan-%{vscan_ver}/*/*.so $RPM_BUILD_ROOT/%{_libdir}/samba/vscan/ +%endif +# make examples clean +VFS="$RPM_BUILD_DIR/%{name}-%{samba_ver}/examples/VFS" +VSCAN="$VFS/samba-vscan-%{vscan_ver}" +PDB="$RPM_BUILD_DIR/%{name}-%{samba_ver}/examples/pdb" +dirs="$PDB $SAM $VFS" +(for i in $dirs; do make -C $i clean; done) +%if %{make_vscan} +(for i in %{vscan_modules}; do make -C $VSCAN/$i clean; done) +%endif +# install python +%if %{make_python} +cp -a source/build/lib.*/samba $RPM_BUILD_ROOT/usr/lib/%{python_ver}/lib-dynload/ +find source/python -name CVS -print | xargs rm -rf +find source/python -name ".cvsignore" -print | xargs rm -rf +%endif +# whats this ? +install -m0755 source/bin/debug2html $RPM_BUILD_ROOT/usr/bin/ +# install smbwrapper +%if %{make_smbwrap} +install -m0755 source/bin/smbwrapper.so $RPM_BUILD_ROOT/%{_libdir}/samba/ +install -m0755 source/bin/smbsh $RPM_BUILD_ROOT/usr/bin/ +%endif +############## +# cleanup docs +############## +#chmod 644 `find docs examples -type f` +#chmod 755 `find docs examples -type d` +#find . -name CVS -print | xargs rm -rf +#find . -name ".cvsignore" -print | xargs rm -rf +mv COPYING Manifest README Read-Manifest-Now Roadmap WHATSNEW.txt $RPM_BUILD_ROOT/%{DOCDIR}/ +cp source/msdfs/README $RPM_BUILD_ROOT/%{DOCDIR}/README.msdfs +cp source/smbwrapper/README $RPM_BUILD_ROOT/%{DOCDIR}/README.smbwrapper +%if %{ul_version} >= 1 + SUFFIX="UnitedLinux" +%else + SUFFIX="SuSE" +%endif +cp README.vendor ${RPM_BUILD_ROOT}/%{DOCDIR}/README.${SUFFIX} +# pam_smbpass is missing +cp -a source/pam_smbpass/samples examples/pam_smbpass/ +cp -a source/pam_smbpass/{CHANGELOG,INSTALL,README,TODO} examples/pam_smbpass/ +# prepare docbook package +cp -a docs/docbook/* $RPM_BUILD_ROOT/%{DOCBOOKDIR} +#make -C $RPM_BUILD_ROOT/%{DOCBOOKDIR} clean +rm -rf $RPM_BUILD_ROOT/%{DOCBOOKDIR}/autom4te.cache +rm -rf $RPM_BUILD_ROOT/%{DOCBOOKDIR}/config.* +# this is empty +rm -rf docs/yodldocs +rm -rf examples/VFS/samba-vscan-%{vscan_ver} +# zip manpages at least +gzip -f docs/manpages/*.[1-9] +cp -a docs/* $RPM_BUILD_ROOT/%{DOCDIR} +cp -a examples/ $RPM_BUILD_ROOT/%{DOCDIR} +# save space... +rm -r $RPM_BUILD_ROOT/%{SWATDIR}/using_samba +ln -s %{DOCDIR}/htmldocs/using_samba $RPM_BUILD_ROOT/%{SWATDIR} +# hm... +cp $RPM_BUILD_ROOT/%{SWATDIR}/help/welcome.html $RPM_BUILD_ROOT/%{DOCDIR}/htmldocs/ +rm -r $RPM_BUILD_ROOT/%{SWATDIR}/help +ln -s %{DOCDIR}/htmldocs $RPM_BUILD_ROOT/%{SWATDIR}/help +# remove cvs +find $RPM_BUILD_ROOT/%{DOCDIR} -name CVS -print | xargs rm -rf +find $RPM_BUILD_ROOT/%{DOCDIR} -name ".cvsignore" -print | xargs rm -rf +# finally build a file-list +for file in $( find ${RPM_BUILD_ROOT}%{DOCDIR} -maxdepth 1); do + # exclude %{DOCDIR} and docbook + case "${file#${RPM_BUILD_ROOT}}" in + %{DOCDIR}|%{DOCDIR}/docbook) continue ;; + esac + echo "%doc ${file#${RPM_BUILD_ROOT}}" >> ${RPM_BUILD_DIR}/%{name}-%{samba_ver}/filelist-doc +done + +%post +%{fillup_and_insserv smb} +mkdir -p $RPM_BUILD_ROOT/var/adm/notify/messages +cat << EOF > var/adm/notify/messages/samba-notify +Achtung! +This is %{name}-%{samba_ver}. Please do not run on production systems. +You have been warned. +EOF + +%post client +%{fillup_and_insserv -fpy smbfs} +%{fillup_only -ans samba client} + +%post winbind +%{fillup_and_insserv winbind} + +%postun +%{insserv_cleanup} + +%postun client +%{insserv_cleanup} + +%postun winbind +%{insserv_cleanup} + +%clean +#make -C source realclean + +%files +#/usr/bin/addtosmbpass +#/usr/bin/convert_smbpasswd +%dir /etc/samba +%dir /usr/lib/samba +%config /etc/init.d/nmb +%config /etc/init.d/smb +%config /etc/pam.d/samba +%config(noreplace) /etc/samba/smbpasswd +%config(noreplace) /etc/samba/smbusers +%doc %{_mandir}/man1/smbcontrol.1.gz +%doc %{_mandir}/man1/smbstatus.1.gz +%doc %{_mandir}/man1/testparm.1.gz +%doc %{_mandir}/man1/testprns.1.gz +%doc %{_mandir}/man5/smbpasswd.5.gz +%doc %{_mandir}/man7/samba.7.gz +%doc %{_mandir}/man8/nmbd.8.gz +%doc %{_mandir}/man8/pdbedit.8.gz +%doc %{_mandir}/man8/smbd.8.gz +%doc %{_mandir}/man8/smbpasswd.8.gz +%doc %{_mandir}/man8/swat.8.gz +%doc %{_mandir}/man8/tdbbackup.8.gz +%{_includedir}/samba +/lib/security/pam_smbpass.so +/usr/bin/pdbedit +/usr/bin/smbcontrol +/usr/bin/smbpasswd +/usr/bin/smbstatus +/usr/bin/tdbbackup +/usr/bin/tdbdump +/usr/bin/tdbtest +/usr/bin/tdbtool +/usr/bin/testparm +/usr/bin/testprns +/usr/lib/samba/rpc +/usr/lib/samba/vfs +/usr/sbin/nmbd +/usr/sbin/rcnmb +/usr/sbin/rcsmb +/usr/sbin/smbd +/usr/sbin/swat +/usr/share/samba +/var/lib/samba +/var/log/samba +/var/run/samba +/var/spool/samba + +%files client +%config /etc/init.d/smbfs +%config(noreplace) /etc/samba/lmhosts +%config(noreplace) /etc/samba/smb.conf +%config(noreplace) /etc/samba/smbfstab +%dir /etc/samba +%dir /usr/lib/samba +%doc %{_mandir}/man1/editreg.1.gz +%doc %{_mandir}/man1/findsmb.1.gz +%doc %{_mandir}/man1/nmblookup.1.gz +%doc %{_mandir}/man1/profiles.1.gz +%doc %{_mandir}/man1/rpcclient.1.gz +%doc %{_mandir}/man1/smbcacls.1.gz +%doc %{_mandir}/man1/smbclient.1.gz +%doc %{_mandir}/man1/smbcquotas.1.gz +%doc %{_mandir}/man1/smbtar.1.gz +%doc %{_mandir}/man1/smbtree.1.gz +%doc %{_mandir}/man5/lmhosts.5.gz +%doc %{_mandir}/man5/smb.conf.5.gz +%doc %{_mandir}/man7/Samba.7.gz +%doc %{_mandir}/man8/net.8.gz +%doc %{_mandir}/man8/smbmnt.8.gz +%doc %{_mandir}/man8/smbmount.8.gz +%doc %{_mandir}/man8/smbspool.8.gz +%doc %{_mandir}/man8/smbumount.8.gz +/sbin/mount.smbfs +/usr/bin/editreg +/usr/bin/findsmb +/usr/bin/net +/usr/bin/nmblookup +/usr/bin/profiles +/usr/bin/rpcclient +/usr/bin/smbcacls +/usr/bin/smbclient +/usr/bin/smbcquotas +/usr/bin/smbfilter +/usr/bin/smbmnt +/usr/bin/smbmount +/usr/bin/smbspool +/usr/bin/smbtar +/usr/bin/smbtree +/usr/bin/smbumount +/usr/lib/samba/lowcase.dat +/usr/lib/samba/upcase.dat +/usr/lib/samba/valid.dat +/usr/sbin/rcsmbfs +%if %{make_smbwrap} +/usr/bin/smbsh +%doc %{_mandir}/man1/smbsh.1.gz +/usr/lib/samba/smbwrapper.so +%endif + +%files winbind +%config /etc/init.d/winbind +%config(noreplace) /etc/samba/smb.conf +%dir /etc/samba +%doc %{_mandir}/man1/wbinfo.1.gz +%doc %{_mandir}/man8/winbindd.8.gz +%doc %{_mandir}/man1/ntlm_auth.1.gz +/lib/libnss_winbind.so* +/lib/libnss_wins.so* +/lib/security/pam_winbind.so +/usr/bin/ntlm_auth +/usr/bin/wbinfo +/usr/sbin/rcwinbind +/usr/sbin/winbindd + +%files utils +%doc %{_mandir}/man1/vfstest.1.gz +/usr/bin/debug2html +/usr/bin/locktest +/usr/bin/locktest2 +/usr/bin/masktest +/usr/bin/msgtest +/usr/bin/nsstest +/usr/bin/smbtorture +/usr/bin/talloctort +/usr/bin/tdbtorture +/usr/bin/vfstest + +%files doc -f filelist-doc +%dir /usr/share/doc/packages/samba3 + +%files docbook +%docdir %{DOCBOOKDIR} +%{DOCBOOKDIR} +%dir /usr/share/doc/packages/samba3 + +%files pdb +/usr/lib/samba/pdb +%doc examples/pdb/{Makefile,README,pdb_test.c} +%doc examples/pdb/{mysql/mysql.dump,mysql/smb.conf} +%if %{make_cifsvfs} + +%files cifsmount +/sbin/mount.cifs +%endif +%if %{make_wrepld} + +%files wrepld +%config /etc/init.d/wrepl +/usr/sbin/rcwrepl +/usr/sbin/wrepld +%endif +%if %{make_vscan} + +%files vscan +/usr/lib/samba/vscan +%doc samba-vscan-%{vscan_ver}/{AUTHORS,COPYING,ChangeLog,FAQ,NEWS,README,TODO} +%endif +%if %{make_python} + +%files python +%doc source/python/README +%doc source/python/examples +%doc source/python/gprinterdata +%doc source/python/gtdbtool +%doc source/python/gtkdictbrowser.py +/usr/lib/%{python_ver}/lib-dynload/samba +%endif + +%files -n libsmbclient +%{_libdir}/libsmbclient.so.* + +%files -n libsmbclient-devel +%{_includedir}/libsmbclient.h +%{_libdir}/libsmbclient.a +%{_libdir}/libsmbclient.so + +%description +samba3 + + +%description client +samba3-client + + +%description winbind +samba3-winbind + + +%description utils +samba3-utils + + +%description doc +samba3-doc + + +%description docbook +samba3-docbook + + +%description pdb +samba3-pdb + +%if %{make_cifsvfs} + +%description cifsmount +samba3-cifsmount + +%endif +%if %{make_vscan} + +%description vscan +samba3-vscan + +%endif +%if %{make_python} + +%description python +samba3-python + +%endif +%if %{make_wrepld} + +%description wrepld +samba3-wrepld + +%endif + +%description -n libsmbclient +This package includes the libsmbclient library. + +Authors: +-------- + The Samba Team <samba@samba.org> + + +%description -n libsmbclient-devel +This package contains static libraries and header files needed to develop +programs which make use of the smbclient programming interface. + +Authors: +-------- + The Samba Team <samba@samba.org> + + diff --git a/packaging/bin/update-pkginfo b/packaging/bin/update-pkginfo new file mode 100755 index 00000000000..47f3c3c306b --- /dev/null +++ b/packaging/bin/update-pkginfo @@ -0,0 +1,16 @@ +#!/bin/bash + +VERSION=$1 +RELEASE=$2 + +if [ $# -ne 2 ]; then + echo Usage: update-pkginfo VERSION RELEASE + exit 1 +fi + +for f in `du -a | awk '{print $2}' | grep \.tmpl$`; do + f2=`echo $f | sed s/.tmpl//g` + echo $f2 + sed -e s/PVERSION/$VERSION/g -e s/PRELEASE/$RELEASE/g < $f > $f2 +done + |