-Index: samba-3.0.24/source/Makefile
-===================================================================
---- samba-3.0.24.orig/source/Makefile 2008-08-07 11:15:02.000000000 +0200
-+++ samba-3.0.24/source/Makefile 2008-08-07 11:18:28.000000000 +0200
-@@ -10,8 +10,6 @@
- SOURCEROOT=$(shell pwd)/../../../..
- SHAREDLIBS=$(SOURCEROOT)/sharedlibs
-
--include ${SHAREDLIBS}/ar7def.mk
--
- # AR7
- # prefix=/usr/local/samba
- prefix=/var/samba
-@@ -22,25 +20,27 @@
- LIBS= -lcrypt -ldl -lpthread
- # AR7
- # CC=gcc
--CC=${TARGET}-gcc
-+CC?=${TARGET}-gcc
- RANLIB = ${TARGET}-ranlib
- AR = ${TARGET}-ar
-
- SHLD=${CC} ${CFLAGS}
- # AR7
- # CFLAGS= -O -D_SAMBA_BUILD_
--CFLAGS= -Os -D_SAMBA_BUILD_ -DAVM_NO_PRINTING
--CFLAGS+= -DAVM_NO_POPT
-+CFLAPGS?=
-+CFLAGS+= -Os -D_SAMBA_BUILD_ -DAVM_NO_PRINTING
-+#CFLAGS+= -DAVM_NO_POPT
- CFLAGS+= -DAVM_SMALLER
--
-+#CFLAGS+= -DSAMBA_DEBUG
- # uncomment this to get debugs
- # CFLAGS += -DSAMBA_DEBUG
-
- # AR7
- # CPPFLAGS= -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
--CPPFLAGS= -D_GNU_SOURCE
-+CPPFLAGS?= -D_GNU_SOURCE
-+CPPFLAGS+= -D_GNU_SOURCE
- EXEEXT=
--LDFLAGS=
-+LDFLAGS?=
- AR=ar
- LDSHFLAGS=-shared -Wl,-Bsymbolic
- WINBIND_NSS_LDSHFLAGS=-shared -Wl,-Bsymbolic
-
-Index: samba-3.0.24/source/popt/popt.c
-===================================================================
---- samba-3.0.24.orig/source/popt/popt.c 2008-08-07 11:15:00.000000000 +0200
-+++ samba-3.0.24/source/popt/popt.c 2008-08-07 11:15:02.000000000 +0200
+--- a/source/popt/popt.c
++++ b/source/popt/popt.c
@@ -10,13 +10,14 @@
#include "system.h"
#ifdef MYDEBUG
/*@unchecked@*/
-@@ -384,7 +385,7 @@
+@@ -388,7 +389,7 @@ static int execCommand(poptContext con)
sprintf(s, "%s/%s", con->execPath, item->argv[0]);
argv[argc] = s;
} else {
}
if (argv[argc++] == NULL) return POPT_ERROR_NOARG;
-@@ -1235,4 +1236,3 @@
+@@ -1246,4 +1247,3 @@ int poptStrippedArgv(poptContext con, in
return numargs;
}
-/*@=boundswrite@*/
-Index: samba-3.0.24/source/smbd/server.c
-===================================================================
---- samba-3.0.24.orig/source/smbd/server.c 2008-08-07 11:15:02.000000000 +0200
-+++ samba-3.0.24/source/smbd/server.c 2008-08-07 11:15:02.000000000 +0200
-@@ -47,7 +47,7 @@
- void _fLog(char *fmt, ...)
- {
- va_list va;
-- FILE *fp = fopen("/var/tmp/smbd.log", "a");
-+ FILE *fp = fopen("/var/log/smbd.log", "a");
- time_t t = time(0); /* LOG */
+--- a/source/modules/vfs_default.c
++++ b/source/modules/vfs_default.c
+@@ -977,7 +977,7 @@ static int vfswrap_linux_setlease(vfs_ha
- if (!fp) return;
-@@ -63,7 +63,7 @@
- void _fDebug(char *fmt, ...)
- {
- va_list va;
-- FILE *fp = fopen("/var/tmp/smbd.log", "a");
-+ FILE *fp = fopen("/var/log/smbd.log", "a");
- time_t t = time(0); /* LOG */
+ START_PROFILE(syscall_linux_setlease);
- if (!fp) return;
+-#ifdef LINUX
++#if defined(LINUX) && defined(HAVE_KERNEL_OPLOCKS_LINUX)
+ /* first set the signal handler */
+ if(linux_set_lease_sighandler(fd) == -1)
+ return -1;