[package] package nmbd, fix smbd and nmbd acquiring the same lock

remove whitespaces (#6389)

git-svn-id: svn://svn.openwrt.org/openwrt/packages@18991 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
florian 2010-01-02 11:54:19 +00:00
parent b4cf4cfde3
commit 180c3644c8
4 changed files with 52 additions and 38 deletions

View File

@ -1,5 +1,5 @@
#
# Copyright (C) 2008 OpenWrt.org
# Copyright (C) 2008-2009 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@ -8,8 +8,8 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=samba3
PKG_VERSION:=3.0.24
PKG_RELEASE:=3
#PKG_MD5SUM:=b51b2975f21006f85f7297f3fb1acde1
PKG_RELEASE:=4
PKG_MD5SUM:=89273f67a6d8067cbbecefaa13747153
PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/samba/old-versions/
PKG_SOURCE:=samba-$(PKG_VERSION).tar.gz
@ -52,7 +52,7 @@ define Build/Compile
CPPFLAGS="$(TARGET_CPPFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
$(MAKE) -C $(PKG_BUILD_DIR)/source \
all bin/smbpasswd
all bin/smbpasswd
endef
define Package/samba3/install
@ -65,6 +65,7 @@ define Package/samba3/install
$(INSTALL_DIR) $(1)/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/smbpasswd $(1)/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/smbd $(1)/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/nmbd $(1)/bin/
endef
$(eval $(call BuildPackage,samba3))

View File

@ -11,16 +11,16 @@ smb_header() {
local workgroup
local description
local homes
config_get name $1 name
config_get workgroup $1 workgroup
config_get description $1 description
config_get homes $1 homes
[ -z "$name" ] && name=openwrt
[ -z "$workgroup" ] && workgroup=openwrt
[ -z "$description" ] && description=openwrt
cp /etc/samba/smb.conf.template /tmp/smb.conf
sed -i "s/|NAME|/$name/g" /tmp/smb.conf
sed -i "s/|WORKGROUP|/$workgroup/g" /tmp/smb.conf
@ -38,7 +38,7 @@ smb_add_share() {
local guest_ok
local create_mask
local dir_mask
config_get name $1 name
config_get path $1 path
config_get users $1 users
@ -46,9 +46,9 @@ smb_add_share() {
config_get guest_ok $1 guest_ok
config_get create_mask $1 create_mask
config_get dir_mask $1 dir_mask
[ -z "$name" -o -z "$path" ] && return
echo -e "\n[$name]\n\tpath = $path" >> /tmp/smb.conf
[ -n "$users" ] && echo -e "\tvalid users = $users" >> /tmp/smb.conf
[ -n "$read_only" ] && echo -e "\tread only = $read_only" >> /tmp/smb.conf
@ -60,7 +60,7 @@ smb_add_share() {
start() {
config_load samba
config_foreach smb_header samba
config_foreach smb_add_share sambashare
config_foreach smb_add_share sambashare
smbd -D
}

View File

@ -2516,7 +2516,7 @@ diff -urN samba-3.0.24.orig/source/lib/iconv.c samba-3.0.24/source/lib/iconv.c
diff -urN samba-3.0.24.orig/source/lib/pidfile.c samba-3.0.24/source/lib/pidfile.c
--- samba-3.0.24.orig/source/lib/pidfile.c 2007-02-04 19:59:17.000000000 +0100
+++ samba-3.0.24/source/lib/pidfile.c 2007-07-17 13:19:05.000000000 +0200
@@ -82,19 +82,20 @@
@@ -82,19 +82,22 @@
{
int fd;
char buf[20];
@ -2535,6 +2535,8 @@ diff -urN samba-3.0.24.orig/source/lib/pidfile.c samba-3.0.24/source/lib/pidfile
+ char *short_configfile = strrchr( dyn_CONFIGFILE, '/');
slprintf( name, sizeof( name)-1, "%s-%s", program_name, short_configfile+1);
}
+#else
+ strncpy( name, program_name, sizeof( name)-1);
+#endif
slprintf(pidFile, sizeof(pidFile)-1, "%s/%s.pid", lp_piddir(), name);
@ -2903,9 +2905,8 @@ diff -urN samba-3.0.24.orig/source/libads/authdata.c samba-3.0.24/source/libads/
}
}
diff -urN samba-3.0.24.orig/source/libsmb/clifile.c samba-3.0.24/source/libsmb/clifile.c
--- samba-3.0.24.orig/source/libsmb/clifile.c 2007-02-04 19:59:20.000000000 +0100
+++ samba-3.0.24/source/libsmb/clifile.c 2007-07-17 13:19:05.000000000 +0200
--- samba-3.0.24/source/libsmb/clifile.c.orig 2009-12-21 07:53:20.000000000 +0100
+++ samba-3.0.24/source/libsmb/clifile.c 2009-12-21 07:51:10.000000000 +0100
@@ -21,6 +21,8 @@
#include "includes.h"
@ -2915,33 +2916,50 @@ diff -urN samba-3.0.24.orig/source/libsmb/clifile.c samba-3.0.24/source/libsmb/c
/****************************************************************************
Hard/Symlink a file (UNIX extensions).
Creates new name (sym)linked to oldname.
@@ -71,6 +73,9 @@
@@ -71,6 +73,8 @@
return True;
}
+#endif /* AVM_SMALLER */
+
+
/****************************************************************************
Map standard UNIX permissions onto wire representations.
****************************************************************************/
@@ -165,6 +170,9 @@
@@ -165,6 +169,8 @@
}
}
+
+#ifndef AVM_SMALLER
+
/****************************************************************************
Do a POSIX getfacl (UNIX extensions).
****************************************************************************/
@@ -1759,3 +1767,6 @@
@@ -785,6 +791,8 @@
return SVAL(cli->inbuf,smb_vwv2);
}
+#endif /* AVM_SMALLER */
+
/****************************************************************************
Close a file.
****************************************************************************/
@@ -813,6 +821,8 @@
+#ifndef AVM_SMALLER
+
/****************************************************************************
send a lock with a specified locktype
this is used for testing LOCKING_ANDX_CANCEL_LOCK
@@ -1760,3 +1770,6 @@
return cli_get_ea_list(cli, setup, param, 6, ctx, pnum_eas, pea_list);
}
+
+#endif /* AVM_SMALLER */
+
diff -urN samba-3.0.24.orig/source/libsmb/namequery.c samba-3.0.24/source/libsmb/namequery.c
--- samba-3.0.24.orig/source/libsmb/namequery.c 2007-02-04 19:59:20.000000000 +0100
+++ samba-3.0.24/source/libsmb/namequery.c 2007-07-17 13:19:05.000000000 +0200
@ -3252,8 +3270,7 @@ diff -urN samba-3.0.24.orig/source/Makefile samba-3.0.24/source/Makefile
+# Also depends on $(SECRETS_OBJ) $(LIBSAMBA_OBJ)
+# Be sure to include them into your application
+
+# AR7 POPT_LIB_OBJ = lib/popt_common.o
+POPT_LIB_OBJ =
+POPT_LIB_OBJ = lib/popt_common.o
+
+UBIQX_OBJ = ubiqx/ubi_BinTree.o ubiqx/ubi_Cache.o ubiqx/ubi_SplayTree.o \
+ ubiqx/ubi_dLinkList.o ubiqx/ubi_sLinkList.o
@ -3279,6 +3296,11 @@ diff -urN samba-3.0.24.orig/source/Makefile samba-3.0.24/source/Makefile
+ libsmb/ntlmssp.o libsmb/ntlmssp_parse.o libsmb/ntlmssp_sign.o
+
+LIBSMB_OBJ = \
+ libsmb/clientgen.o \
+ libsmb/cliconnect.o \
+ libsmb/clirap.o \
+ libsmb/clistr.o \
+ libsmb/clitrans.o \
+ libsmb/clifile.o \
+ lib/util_seaccess.o \
+ libsmb/clikrb5.o \
@ -3537,8 +3559,9 @@ diff -urN samba-3.0.24.orig/source/Makefile samba-3.0.24/source/Makefile
+ nmbd/nmbd_subnetdb.o nmbd/nmbd_winsproxy.o nmbd/nmbd_winsserver.o \
+ nmbd/nmbd_workgroupdb.o nmbd/nmbd_synclists.o
+
+NMBD_OBJ = $(NMBD_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) $(UBIQX_OBJ) \
+ $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(SECRETS_OBJ) $(POPT_LIB_OBJ)
+NMBD_OBJ = $(NMBD_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) \
+ $(KRBCLIENT_OBJ) $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) \
+ $(SECRETS_OBJ) $(POPT_LIB_OBJ)
+
+WREPL_OBJ1 =
+
@ -3813,7 +3836,7 @@ diff -urN samba-3.0.24.orig/source/Makefile samba-3.0.24/source/Makefile
+######################################################################
+# now the rules...
+######################################################################
+all : SHOWFLAGS proto_exists bin/smbd bin/smbpasswd
+all : SHOWFLAGS proto_exists bin/smbd bin/smbpasswd bin/nmbd
+
+pam_smbpass : SHOWFLAGS bin/pam_smbpass.so
+
@ -3935,9 +3958,9 @@ diff -urN samba-3.0.24.orig/source/Makefile samba-3.0.24/source/Makefile
+ dir=bin $(MAKEDIR); fi
+ @: >> $@ || : > $@ # what a fancy emoticon!
+
+bin/smbd: bin/libsmbd.a $(SMBD_OBJ_MAIN) bin/.dummy
+bin/smbd: bin/libsmbd.a $(SMBD_OBJ_MAIN) $(POPT_OBJS) $(POPT_LIB_OBJ) bin/.dummy
+ @echo Linking $@
+ $(CC) $(FLAGS) -o $@ $(SMBD_OBJ_MAIN) $(LDFLAGS) \
+ $(CC) $(FLAGS) -o $@ $(SMBD_OBJ_MAIN) $(POPT_OBJS) $(POPT_LIB_OBJ) $(LDFLAGS) \
+ $(AUTH_LIBS) \
+ -Lbin -lsmbd \
+ -L$(TARGETFS)/lib \

View File

@ -45,17 +45,7 @@ Index: samba-3.0.24/source/Makefile
AR=ar
LDSHFLAGS=-shared -Wl,-Bsymbolic
WINBIND_NSS_LDSHFLAGS=-shared -Wl,-Bsymbolic
@@ -238,7 +238,9 @@
lib/adt_tree.o lib/gencache.o $(TDB_OBJ) \
lib/module.o lib/ldap_escape.o \
lib/privileges.o lib/secdesc.o lib/secace.o lib/secacl.o \
- lib/arc4.o lib/sharesec.o lib/events.o lib/util_nscd.o
+ lib/arc4.o lib/sharesec.o lib/events.o lib/util_nscd.o \
+ popt/poptparse.o popt/popthelp.o popt/poptconfig.o \
+ lib/popt_common.o popt/popt.o
LIB_NONSMBD_OBJ = $(LIB_OBJ) lib/dummysmbd.o lib/dummyroot.o
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