svn commit: samba r15164 - in branches/SAMBA_3_0_RELEASE: .
packaging/RHEL packaging/bin source/include source/libsmb
source/nsswitch
jerry at samba.org
jerry at samba.org
Sat Apr 22 20:52:56 GMT 2006
Author: jerry
Date: 2006-04-22 20:52:54 +0000 (Sat, 22 Apr 2006)
New Revision: 15164
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=15164
Log:
grab a few more changes from SAMBA_3_0
Modified:
branches/SAMBA_3_0_RELEASE/WHATSNEW.txt
branches/SAMBA_3_0_RELEASE/packaging/RHEL/makerpms.sh.tmpl
branches/SAMBA_3_0_RELEASE/packaging/RHEL/samba.spec.tmpl
branches/SAMBA_3_0_RELEASE/packaging/bin/update-pkginfo
branches/SAMBA_3_0_RELEASE/source/include/client.h
branches/SAMBA_3_0_RELEASE/source/libsmb/cliconnect.c
branches/SAMBA_3_0_RELEASE/source/libsmb/clireadwrite.c
branches/SAMBA_3_0_RELEASE/source/nsswitch/winbind_nss_aix.c
Changeset:
Modified: branches/SAMBA_3_0_RELEASE/WHATSNEW.txt
===================================================================
--- branches/SAMBA_3_0_RELEASE/WHATSNEW.txt 2006-04-22 17:28:01 UTC (rev 15163)
+++ branches/SAMBA_3_0_RELEASE/WHATSNEW.txt 2006-04-22 20:52:54 UTC (rev 15164)
@@ -1,6 +1,6 @@
==================================
Release Notes for Samba 3.0.23pre1
- Apr 20, 2006
+ Apr 22, 2006
==================================
This is a preview release of the Samba 3.0.23 code base and
@@ -175,6 +175,8 @@
oplocks.
* BUG 3592: Ignore a file in a smbtar output if the first
read fails (inspired by Justin Best).
+ * BUG 3668: Workaround Windows bug with LARGE_READX where if
+ you ask for exactly 64k bytes it returns 0.
o Alexander Bokovoy <ab at samba.org>
@@ -312,8 +314,9 @@
* Find JFS DMAPI libs on Linux when only they are available.
-o William JoJo <jojowil at hvcc.edu>
+o William Jojo <jojowil at hvcc.edu>
* Fix VFS builds on AIX platforms.
+ * Fixes for the AIX version of libnss_winbind.so
o Volker Lendecke <vl at samba.org>
Modified: branches/SAMBA_3_0_RELEASE/packaging/RHEL/makerpms.sh.tmpl
===================================================================
--- branches/SAMBA_3_0_RELEASE/packaging/RHEL/makerpms.sh.tmpl 2006-04-22 17:28:01 UTC (rev 15163)
+++ branches/SAMBA_3_0_RELEASE/packaging/RHEL/makerpms.sh.tmpl 2006-04-22 20:52:54 UTC (rev 15164)
@@ -21,6 +21,7 @@
USERID=`id -u`
GRPID=`id -g`
VERSION='PVERSION'
+REVISION='PREVISION'
SPECFILE="samba.spec"
RPMVER=`rpm --version | awk '{print $3}'`
RPM="rpmbuild"
@@ -38,13 +39,30 @@
;;
esac
-( cd ../../source; if [ -f Makefile ]; then make distclean; fi )
-( cd ../../.. ; chown -R ${USERID}.${GRPID} samba-${VERSION} )
+pushd .
+cd ../../source
+if [ -f Makefile ]; then
+ make distclean
+fi
+popd
+pushd .
+cd ../../../
+chown -R ${USERID}.${GRPID} samba-${VERSION}${REVISION}
+if [ ! -d samba-${VERSION} ]; then
+ ln -s samba-${VERSION}${REVISION} samba-${VERSION} || exit 1
+fi
echo -n "Creating samba-${VERSION}.tar.bz2 ... "
-( cd ../../.. ; tar --exclude=.svn -cf - samba-${VERSION}/. | bzip2 > ${SRCDIR}/samba-${VERSION}.tar.bz2 )
+tar --exclude=.svn -cf - samba-${VERSION}/. | bzip2 > ${SRCDIR}/samba-${VERSION}.tar.bz2
echo "Done."
+if [ $? -ne 0 ]; then
+ echo "Build failed!"
+ exit 1
+fi
+popd
+
+
##
## copy additional source files
##
Modified: branches/SAMBA_3_0_RELEASE/packaging/RHEL/samba.spec.tmpl
===================================================================
--- branches/SAMBA_3_0_RELEASE/packaging/RHEL/samba.spec.tmpl 2006-04-22 17:28:01 UTC (rev 15163)
+++ branches/SAMBA_3_0_RELEASE/packaging/RHEL/samba.spec.tmpl 2006-04-22 20:52:54 UTC (rev 15164)
@@ -6,7 +6,7 @@
Packager: Samba Team <samba at samba.org>
Name: samba
Version: PVERSION
-Release: PRELEASE
+Release: PRELEASEPRPMREV
License: GNU GPL version 2
Group: System Environment/Daemons
URL: http://www.samba.org/
@@ -27,7 +27,7 @@
Prefix: /usr
BuildRoot: %{_tmppath}/%{name}-%{version}-root
-BuildRequires: pam-devel, readline-devel, ncurses-devel, fileutils, libacl-devel, openldap-devel, krb5-devel, cups-devel
+BuildRequires: pam-devel, readline-devel, fileutils, libacl-devel, openldap2-devel, krb5-devel, cups-devel
# Working around perl dependency problem from docs
%define __perl_requires %{SOURCE998}
@@ -109,16 +109,16 @@
/bin/cp setup/filter-requires-samba.sh %{SOURCE998}
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
+# RPM_OPT_FLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64"
+## check for ccache
+ccache -h 2>&1 > /dev/null
+#if [ $? -eq 0 ]; then
+# CC="ccache gcc"
+#else
+ CC="gcc"
+#fi
+
## always run autogen.sh
./autogen.sh
@@ -184,7 +184,6 @@
# Create the target build directory hierarchy
mkdir -p $RPM_BUILD_ROOT%{_datadir}/swat/{help,include,using_samba/{figs,gifsa}}
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/swat/using_samba
mkdir -p $RPM_BUILD_ROOT%{_includedir}
mkdir -p $RPM_BUILD_ROOT%{_initrddir}
mkdir -p $RPM_BUILD_ROOT{%{_libdir},%{_includedir}}
@@ -224,10 +223,6 @@
install -m 755 source/bin/libsmbclient.a $RPM_BUILD_ROOT%{_libdir}/libsmbclient.a
install -m 644 source/include/libsmbclient.h $RPM_BUILD_ROOT%{_includedir}
ln -s %{_libdir}/libsmbclient.so $RPM_BUILD_ROOT%{_libdir}/libsmbclient.so.0
-#if [ %{_libdir} == /usr/lib64 ];then
-# ln -s %{_libdir}/libsmbclient.so $RPM_BUILD_ROOT/usr/lib/libsmbclient.so.0
-# ln -s %{_libdir}/libsmbclient.so $RPM_BUILD_ROOT/usr/lib/libsmbclient.so
-#fi
# make install puts libmsrpc.so in the wrong place on x86_64
rm -f $RPM_BUILD_ROOT/usr/lib*/samba/libmsrpc.so $RPM_BUILD_ROOT/usr/lib*/samba/libmsrpc.a || true
@@ -236,17 +231,17 @@
install -m 644 source/include/libmsrpc.h $RPM_BUILD_ROOT%{_includedir}
rm -f $RPM_BUILD_ROOT%{_libdir}/samba/libmsrpc.*
ln -s /%{_libdir}/libmsrpc.so $RPM_BUILD_ROOT%{_libdir}/libmsrpc.so.0
-#if [ %{_libdir} == /usr/lib64 ];then
-# ln -s %{_libdir}/libmsrpc.so $RPM_BUILD_ROOT/usr/lib/libmsrpc.so.0
-# ln -s %{_libdir}/libmsrpc.so $RPM_BUILD_ROOT/usr/lib/libmsrpc.so
-#fi
# Install pam_smbpass.so
install -m755 source/bin/pam_smbpass.so $RPM_BUILD_ROOT/%{_lib}/security/pam_smbpass.so
+## cleanup
+/bin/rm -rf $RPM_BUILD_ROOT/usr/lib*/samba/security
+
# 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
+ln -sf %{_prefix}/bin/smbmount $RPM_BUILD_ROOT/sbin/mount.smbfs
+ln -sf %{_prefix}/bin/smbmount $RPM_BUILD_ROOT/sbin/mount.smb
+/bin/rm -f $RPM_BUILD_ROOT/mount.smbfs
# Install the miscellany
echo 127.0.0.1 localhost > $RPM_BUILD_ROOT%{_sysconfdir}/samba/lmhosts
@@ -264,6 +259,8 @@
install -m755 source/client/umount.cifs $RPM_BUILD_ROOT/sbin/umount.cifs
install -m755 source/script/mksmbpasswd.sh $RPM_BUILD_ROOT%{_bindir}
+/bin/rm $RPM_BUILD_ROOT%{_sbindir}/*mount.cifs
+
ln -s ../..%{initdir}/smb $RPM_BUILD_ROOT%{_sbindir}/samba
ln -s ../..%{initdir}/winbind $RPM_BUILD_ROOT%{_sbindir}/winbind
@@ -399,6 +396,7 @@
%doc examples/autofs examples/LDAP examples/libsmbclient examples/misc examples/printer-accounting
%doc examples/printing
%doc %{_datadir}/swat/help
+%doc %{_datadir}/swat/using_samba
##########
Modified: branches/SAMBA_3_0_RELEASE/packaging/bin/update-pkginfo
===================================================================
--- branches/SAMBA_3_0_RELEASE/packaging/bin/update-pkginfo 2006-04-22 17:28:01 UTC (rev 15163)
+++ branches/SAMBA_3_0_RELEASE/packaging/bin/update-pkginfo 2006-04-22 20:52:54 UTC (rev 15164)
@@ -2,15 +2,21 @@
VERSION=$1
RELEASE=$2
+REVISION=$3
-if [ $# -ne 2 ]; then
- echo Usage: update-pkginfo VERSION RELEASE
+if [ $# -ne 3 ]; then
+ echo Usage: update-pkginfo VERSION RELEASE REVISION
exit 1
fi
+# PREV=`echo ${REVISION} | sed 's/[^0-9]//g'`
+# PREV="."`echo ${REVISION} | sed 's/[0-9]//g'`".${PREV}"
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
+ sed -e s/PVERSION/$VERSION/g \
+ -e s/PRELEASE/$RELEASE/g \
+ -e s/PREVISION/${REVISION}/g \
+ -e s/PRPMREV/.${REVISION}/g < $f > $f2
done
Modified: branches/SAMBA_3_0_RELEASE/source/include/client.h
===================================================================
--- branches/SAMBA_3_0_RELEASE/source/include/client.h 2006-04-22 17:28:01 UTC (rev 15163)
+++ branches/SAMBA_3_0_RELEASE/source/include/client.h 2006-04-22 20:52:54 UTC (rev 15164)
@@ -27,7 +27,8 @@
overlap on the wire. This size gives us a nice read/write size, which
will be a multiple of the page size on almost any system */
#define CLI_BUFFER_SIZE (0xFFFF)
-#define CLI_MAX_LARGE_READX_SIZE (127*1024)
+#define CLI_SAMBA_MAX_LARGE_READX_SIZE (127*1024) /* Works for Samba servers */
+#define CLI_WINDOWS_MAX_LARGE_READX_SIZE ((64*1024)-2) /* Windows servers are broken.... */
/*
* These definitions depend on smb.h
@@ -143,6 +144,7 @@
unsigned int bufsize;
int initialised;
int win95;
+ BOOL is_samba;
uint32 capabilities;
BOOL dfsroot;
Modified: branches/SAMBA_3_0_RELEASE/source/libsmb/cliconnect.c
===================================================================
--- branches/SAMBA_3_0_RELEASE/source/libsmb/cliconnect.c 2006-04-22 17:28:01 UTC (rev 15163)
+++ branches/SAMBA_3_0_RELEASE/source/libsmb/cliconnect.c 2006-04-22 20:52:54 UTC (rev 15164)
@@ -199,6 +199,10 @@
p += clistr_pull(cli, cli->server_type, p, sizeof(fstring), -1, STR_TERMINATE);
p += clistr_pull(cli, cli->server_domain, p, sizeof(fstring), -1, STR_TERMINATE);
+ if (strstr(cli->server_type, "Samba")) {
+ cli->is_samba = True;
+ }
+
fstrcpy(cli->user_name, "");
return True;
@@ -263,6 +267,10 @@
p += clistr_pull(cli, cli->server_domain, p, sizeof(fstring), -1, STR_TERMINATE);
fstrcpy(cli->user_name, user);
+ if (strstr(cli->server_type, "Samba")) {
+ cli->is_samba = True;
+ }
+
return True;
}
@@ -408,6 +416,10 @@
p += clistr_pull(cli, cli->server_type, p, sizeof(fstring), -1, STR_TERMINATE);
p += clistr_pull(cli, cli->server_domain, p, sizeof(fstring), -1, STR_TERMINATE);
+ if (strstr(cli->server_type, "Samba")) {
+ cli->is_samba = True;
+ }
+
fstrcpy(cli->user_name, user);
if (session_key.data) {
@@ -873,6 +885,10 @@
}
}
+ if (strstr(cli->server_type, "Samba")) {
+ cli->is_samba = True;
+ }
+
return True;
}
@@ -1159,9 +1175,9 @@
if (cli->capabilities & (CAP_LARGE_READX|CAP_LARGE_WRITEX)) {
SAFE_FREE(cli->outbuf);
SAFE_FREE(cli->inbuf);
- cli->outbuf = (char *)SMB_MALLOC(CLI_MAX_LARGE_READX_SIZE+SAFETY_MARGIN);
- cli->inbuf = (char *)SMB_MALLOC(CLI_MAX_LARGE_READX_SIZE+SAFETY_MARGIN);
- cli->bufsize = CLI_MAX_LARGE_READX_SIZE;
+ cli->outbuf = (char *)SMB_MALLOC(CLI_SAMBA_MAX_LARGE_READX_SIZE+SAFETY_MARGIN);
+ cli->inbuf = (char *)SMB_MALLOC(CLI_SAMBA_MAX_LARGE_READX_SIZE+SAFETY_MARGIN);
+ cli->bufsize = CLI_SAMBA_MAX_LARGE_READX_SIZE;
}
} else if (cli->protocol >= PROTOCOL_LANMAN1) {
Modified: branches/SAMBA_3_0_RELEASE/source/libsmb/clireadwrite.c
===================================================================
--- branches/SAMBA_3_0_RELEASE/source/libsmb/clireadwrite.c 2006-04-22 17:28:01 UTC (rev 15163)
+++ branches/SAMBA_3_0_RELEASE/source/libsmb/clireadwrite.c 2006-04-22 20:52:54 UTC (rev 15164)
@@ -76,7 +76,11 @@
*/
if (cli->capabilities & CAP_LARGE_READX) {
- readsize = CLI_MAX_LARGE_READX_SIZE;
+ if (cli->is_samba) {
+ readsize = CLI_SAMBA_MAX_LARGE_READX_SIZE;
+ } else {
+ readsize = CLI_WINDOWS_MAX_LARGE_READX_SIZE;
+ }
} else {
readsize = (cli->max_xmit - (smb_size+32)) & ~1023;
}
Modified: branches/SAMBA_3_0_RELEASE/source/nsswitch/winbind_nss_aix.c
===================================================================
--- branches/SAMBA_3_0_RELEASE/source/nsswitch/winbind_nss_aix.c 2006-04-22 17:28:01 UTC (rev 15163)
+++ branches/SAMBA_3_0_RELEASE/source/nsswitch/winbind_nss_aix.c 2006-04-22 20:52:54 UTC (rev 15164)
@@ -632,19 +632,17 @@
results[i].attr_un.au_char = strdup(pwd->pw_passwd);
} else if (strcmp(attributes[i], S_HOME) == 0) {
results[i].attr_un.au_char = strdup(pwd->pw_dir);
- } else if (strcmp(attributes[0], S_SHELL) == 0) {
+ } else if (strcmp(attributes[i], S_SHELL) == 0) {
results[i].attr_un.au_char = strdup(pwd->pw_shell);
- } else if (strcmp(attributes[0], S_REGISTRY) == 0) {
+ } else if (strcmp(attributes[i], S_REGISTRY) == 0) {
results[i].attr_un.au_char = strdup("WINBIND");
- } else if (strcmp(attributes[0], S_GECOS) == 0) {
+ } else if (strcmp(attributes[i], S_GECOS) == 0) {
results[i].attr_un.au_char = strdup(pwd->pw_gecos);
- } else if (strcmp(attributes[0], S_PGRP) == 0) {
+ } else if (strcmp(attributes[i], S_PGRP) == 0) {
results[i] = pwd_to_group(pwd);
- } else if (strcmp(attributes[0], S_GECOS) == 0) {
- results[i].attr_un.au_char = strdup(pwd->pw_gecos);
- } else if (strcmp(attributes[0], S_GROUPSIDS) == 0) {
+ } else if (strcmp(attributes[i], S_GROUPS) == 0) {
results[i] = pwd_to_groupsids(pwd);
- } else if (strcmp(attributes[0], "SID") == 0) {
+ } else if (strcmp(attributes[i], "SID") == 0) {
results[i] = pwd_to_sid(pwd);
} else {
logit("Unknown user attribute '%s'\n", attributes[i]);
More information about the samba-cvs
mailing list