ports/opt (2.4): [notify] samba: update to 3.0.30
commit 237b927792f2612ac090f7641f417d678eb733f1 Author: Juergen Daubert <jue@jue.li> Date: Thu May 29 10:14:19 2008 +0200 [notify] samba: update to 3.0.30 See http://www.samba.org/samba/history/samba-3.0.30.html A fix for https://bugzilla.samba.org/show_bug.cgi?id=5285 is included as well. diff --git a/samba/.footprint b/samba/.footprint index cce9527..649f9f9 100644 --- a/samba/.footprint +++ b/samba/.footprint @@ -3,7 +3,7 @@ drwxr-xr-x root/root etc/rc.d/ -rwxr-xr-x root/root etc/rc.d/samba drwxr-xr-x root/root etc/samba/ drwxr-xr-x root/root etc/samba/private/ --rw-r--r-- root/root etc/samba/smb.conf.default +-rw------- root/root etc/samba/smb.conf.default drwxr-xr-x root/root lib/ -rwxr-xr-x root/root lib/libnss_winbind.so lrwxrwxrwx root/root lib/libnss_winbind.so.2 -> libnss_winbind.so diff --git a/samba/.md5sum b/samba/.md5sum index 79c3812..b0c59db 100644 --- a/samba/.md5sum +++ b/samba/.md5sum @@ -1,3 +1,4 @@ 448caca4745aef1a842f4fdb1aa62e1e samba -ac338e28f159e59a8d25cb1d0895cf8e samba-3.0.29.tar.gz +d647ec1f34414fa8691f74536dcccfb5 samba-3.0.30.tar.gz +cfe53ca0212cb551b623a0be23939506 samba-capget.patch fbaccda19afc8f75f6f0123cab82c87e samba-config.patch diff --git a/samba/Pkgfile b/samba/Pkgfile index f75f0fb..4414390 100644 --- a/samba/Pkgfile +++ b/samba/Pkgfile @@ -4,15 +4,16 @@ # Depends on: ncurses, readline name=samba -version=3.0.29 +version=3.0.30 release=1 source=(http://www.samba.org/samba/ftp/stable/$name-$version.tar.gz \ - samba-config.patch samba) + samba-config.patch samba-capget.patch samba) build () { cd $name-$version/source patch -d .. -p1 -i $SRC/samba-config.patch + patch -d .. -p1 -i $SRC/samba-capget.patch ./configure --prefix=/usr \ --with-fhs \ @@ -49,7 +50,6 @@ build () { # cleanup rm -r $PKG/usr/{var,lib/samba/*.msg} - rm $PKG/usr/man/man1/ldb*.1 chmod -x $PKG/usr/include/* # remove swat diff --git a/samba/samba-capget.patch b/samba/samba-capget.patch new file mode 100644 index 0000000..6fe0237 --- /dev/null +++ b/samba/samba-capget.patch @@ -0,0 +1,116 @@ +# https://bugzilla.samba.org/show_bug.cgi?id=5285 + +From: Guenther Deschner <gd@samba.org> +Date: Wed, 28 May 2008 11:20:16 +0000 (+0200) +Subject: Fix Bug #5285. (libcap header mismatch) +X-Git-Url: http://gitweb.samba.org/?p=samba.git;a=commitdiff_plain;h=d48bdc8f5de03b88d7... + +Fix Bug #5285. (libcap header mismatch) + +Can someone with gpfs available test this ? The only codepath using this +function is the modules/gpfs.c module. The fix resolves at least the build +issues Samba has with recent kernel / libcap versions by using the portable +cap_get_proc()/cap_set_proc() interface (instead of using capget/capset). + +Guenther +--- + +diff --git a/source/include/smb.h b/source/include/smb.h +index 46afcde..13e9162 100644 +--- a/source/include/smb.h ++++ b/source/include/smb.h +@@ -1710,7 +1710,8 @@ minimum length == 18. + + enum smbd_capability { + KERNEL_OPLOCK_CAPABILITY, +- DMAPI_ACCESS_CAPABILITY ++ DMAPI_ACCESS_CAPABILITY, ++ LEASE_CAPABILITY + }; + + /* if a kernel does support oplocks then a structure of the following +diff --git a/source/lib/system.c b/source/lib/system.c +index b23aa04..de5f552 100644 +--- a/source/lib/system.c ++++ b/source/lib/system.c +@@ -776,6 +776,11 @@ static BOOL set_process_capability(enum smbd_capability capability, + cap_vals[num_cap_vals++] = CAP_MKNOD; + #endif + break; ++ case LEASE_CAPABILITY: ++#ifdef CAP_LEASE ++ cap_vals[num_cap_vals++] = CAP_LEASE; ++#endif ++ break; + } + + SMB_ASSERT(num_cap_vals <= ARRAY_SIZE(cap_vals)); +diff --git a/source/smbd/oplock_linux.c b/source/smbd/oplock_linux.c +index 14db98c..c6c11a7 100644 +--- a/source/smbd/oplock_linux.c ++++ b/source/smbd/oplock_linux.c +@@ -23,22 +23,6 @@ + + #if HAVE_KERNEL_OPLOCKS_LINUX + +-/* these can be removed when they are in glibc headers */ +-struct cap_user_header { +- uint32 version; +- int pid; +-} header; +-struct cap_user_data { +- uint32 effective; +- uint32 permitted; +- uint32 inheritable; +-} data; +- +-extern int capget(struct cap_user_header * hdrp, +- struct cap_user_data * datap); +-extern int capset(struct cap_user_header * hdrp, +- const struct cap_user_data * datap); +- + static SIG_ATOMIC_T signals_received; + #define FD_PENDING_SIZE 100 + static SIG_ATOMIC_T fd_pending_array[FD_PENDING_SIZE]; +@@ -76,32 +60,6 @@ static void signal_handler(int sig, siginfo_t *info, void *unused) + sys_select_signal(RT_SIGNAL_LEASE); + } + +-/**************************************************************************** +- Try to gain a linux capability. +-****************************************************************************/ +- +-static void set_capability(unsigned capability) +-{ +-#ifndef _LINUX_CAPABILITY_VERSION +-#define _LINUX_CAPABILITY_VERSION 0x19980330 +-#endif +- header.version = _LINUX_CAPABILITY_VERSION; +- header.pid = 0; +- +- if (capget(&header, &data) == -1) { +- DEBUG(3,("Unable to get kernel capabilities (%s)\n", +- strerror(errno))); +- return; +- } +- +- data.effective |= (1<<capability); +- +- if (capset(&header, &data) == -1) { +- DEBUG(3,("Unable to set %d capability (%s)\n", +- capability, strerror(errno))); +- } +-} +- + /* + Call to set the kernel lease signal handler + */ +@@ -127,7 +85,7 @@ int linux_setlease(int fd, int leasetype) + + ret = fcntl(fd, F_SETLEASE, leasetype); + if (ret == -1 && errno == EACCES) { +- set_capability(CAP_LEASE); ++ set_effective_capability(LEASE_CAPABILITY); + ret = fcntl(fd, F_SETLEASE, leasetype); + } +
participants (1)
-
crux@crux.nu