[SCM] Samba Shared Repository - branch v4-0-stable updated

Karolin Seeger kseeger at samba.org
Tue Nov 13 01:14:02 MST 2012


The branch, v4-0-stable has been updated
       via  0dd3b9f VERSION: Disable GIT snapshot to prepare rc5 release.
       via  065083c WHATSNEW: Update changes since rc4.
       via  51e6113 WHATSNEW: Update changes since rc4.
       via  ed87e34 samba-tool: Fix typo in --help output.
       via  88bdfcb lib/krb5_wrap: request enc_types in the correct order (bug #9272)
       via  7c92c87 s3-kerberos: add aes enctypes to generated krb5.conf.
       via  3c7f48e s3-krb5: use and request AES keys in kerberos operations.
       via  4cb7d0d doc: describe samlogon cache caveat for winbindd -n
       via  949df3c Revert "s3-winbindd: make sure we obey the -n switch also for samlogon cache access."
       via  c2bafcf ntp_signd: Only allow group access to the ntp signd directory.
       via  fb3f081 ntp_signd: move socket directory to var/lib not var/run for permissions change
       via  3199aa1 s4:dsdb/acl_read: make sure confidential attributes require CONTROL_ACCESS (bug #8620)
       via  0f2b61b s4:dsdb/acl_read: fix whitespace formatting errors
       via  9139694 s4:dsdb/acl: only give administrators access to attributes marked as confidential (bug #8620)
       via  eb1c561 s4:dsdb/acl: reorganize the logic flow in the password filtering checks
       via  4da07b7 s4:dsdb/acl: fix search filter cleanup for password attributes
       via  2f05e8c WHATSNEW: Update changes since rc4.
       via  69cb802 wafsamba.abi: Fix abi_match with both excludes and includes.
       via  a3d7af1 wafsamba.samba_abi: Add basic unit tests.
       via  d280533 buildtools: Remove extra space from global: line
       via  e443b2d wafsamba.samba_abi: Refactor abi_write_vscript to take file argument.
       via  e3a35dc WHATSNEW: Update changes since rc4.
       via  5ed2ca8 s3: Pass down smb_filename to smbacl4_fill_ace4
       via  078b665 s3:nfs4acls filter away inheritance flags on files
       via  16479fe s3:nfs4acls pass down fsp instead of just the filename
       via  ebded09 dsdb: Simplify DsCrackNameOneFilter a bit
       via  bc1a270 dsdb-cracknames: Return DRSUAPI_DS_NAME_STATUS_NO_MAPPING when there is no SID
       via  ae15743 dsdb-cracknames: Always use talloc_zero()
       via  19c33c4 WHATSNEW: Update changes since rc4.
       via  9af6c46 s3:smb2_getinfo ensure proper error for not yet present quota support
       via  75122f7 WHATSNEW: Start release notes for Samba 4.0.0rc5.
       via  e75c9fa s3:vfs_default: optimize vfswrap_asys_finished() and read as much as we can
       via  0bc75df lib/tsocket: optimize syscalls in tstream_readv_pdu_send()
       via  6b051af lib/tsocket: disable the syscall optimization for recvfrom/readv by default
       via  4641555 s3:smbd: pass the current time to make_connection[_smb1]()
       via  6195cb6 docs-xml: fix use of <smbconfoption> tag (fix bug #9345)
       via  6b94f5b s3-param: Move the options needed for running smbd in the AD DC to loadparm
       via  4d7ea03 file_server: put set create mask and directory mask in fileserver.conf
       via  ab78d76 build(waf): fix the cluster(ctdb) build without system talloc installed
       via  fb99d62 build(waf): fix a tab indentation to spaces
       via  5010165 build(waf): Fail "configure --with-cluster-support" if ctdb support is not available.
       via  e8ef7c6 s3-torture:test_ctdbconn: fix the build against older ctdb versions
       via  22bf5ba s3:ctdb library: fix the build against older ctdb versions
       via  e1fc90d build(waf): check if we have ctdb_protocol.h in the cluster checks
       via  b83df67 build(autoconf): check if we have ctdb_protocol.h in the cluster checks
       via  0f31f3c build(autoconf): fix check for ctdb_private.h (bug #9349)
       via  6772b85 auth/kerberos: add HAVE_KRB5 guard to fix non-krb5 build after winbindd pac changes
       via  87d4237 libwbclient: bump ABI to 0.11 as wbcAuthenticateUserEx now provides PAC parsing
       via  b61e8e9 s4-torture: Complete test for winbindd PAC parsing
       via  d2fb91f auth/kerberos: Adjust log level for failed PAC signature verification
       via  b547a8d winbind: Extend wbcAuthenticateUserEx to provide PAC
       via  57907a6 dns_server: Try and use the dns-SERVER account if we were configured with it
       via  64c10e7 s3:winbindd: use PROTOCOL_LATEST instead of PROTOCOL_SMB2_02 (bug #9175)
       via  99817aa s3:winbindd: disconnection after getting NETWORK_SESSION_EXPIRED (bug #9175)
       via  07c279e libcli/smb: add smbXcli_session_set_disconnect_expired() (bug #9175)
       via  0ad1019 s3:smb2_read: fix SMBD_SMB2_NUM_IOV_PER_REQ check for sendfile() support (bug #9341)
       via  37cabc1 provision: No longer use the wheel group in new AD Domains
       via  daaf7f3 util: remove accidently committed hunk
       via  77ec8dc lib/replace: Fix detection of prctl (cherry picked from commit 80f42df4ec9194ff00aeeb3c2cf6acfa1f2ab5c3)
       via  b2a3b7f wscript: Removed executable bit.
       via  e95c162 wafbuild: use WERROR_FLAGS in wscript_configure_system_mitkrb5 (cherry picked from commit 9a03cc93f45a6908c73afe2d059a4ebf5534fdb7)
       via  a39bed9 ntdb: Try to fix the build on Solaris which does not have err (cherry picked from commit 08d3062fc3ece6b5d98e32bad5f1d54c088b0dd0)
       via  0ce2f32 ccan/wafbuild: use WERROR_CFLAGS instead of -Werror (cherry picked from commit fdead585dc11101761ac975935134c6a84ea3b4f)
       via  31993a415 ccan: check for all the used config.h defines
       via  091a98f wafbuild: reorder the Werror checks so that the ambigous w2 option is being checked last (cherry picked from commit 7fcb2532b99ddf65d78dd02ea06ce8a1a6229949)
       via  d45b55d wafbuild: merge the missing IBM compiler Werror flag "-qhalt=w" to waf (cherry picked from commit 51692042d9f898c5e8f1cbc78031e37d23ec032a)
       via  47668fe wfabuild: fix the -errwarn compile flag test
       via  e76ef27 lib/replace: Fix detection of rpcsrv/yp_prot.h on FreeBSD
       via  eb3cea9 lib/replace: Fix configure on FreeBSD: define_ret is not correct here
       via  a77ff57 pidl: Remove depends_on=PIDL_MISC as it sets -I/ into CFLAGS
       via  cca231e build: Remove support for IDL-generated files in git tree
       via  8124f4f build(waf): Fix the --with-cluster build
       via  12dfc7c build: Add #define FREEBSD on FreeBSD
       via  85639a0 waf: Create a libnss_wins.so symlink.
       via  3a3dbb2 waf: Create a libnss_winbind.so symlink.
       via  9b41aa7 wafsamba: If we define a realname and a soname create a symlink.
       via  1b70765 build: Remove --disable-shared
       via  cce83c9 build: Add vfs_media_harmony to the waf build
       via  1ccce52 nsswitch: Build nss_winbind on all supported platforms
       via  4ffd524 selftest: Always build a linux-style nss_winbind for nss_wrapper
       via  f4581f3 Fix release script to build full set of documentation
       via  5f8d574 s3: Fix libnss_winbind.so's build on Illumos/Solaris
       via  914159c build: Remove duplicate check for struct getquota_rslt member getquota_rslt_u
       via  1ff3c5a build: Fix quota tests, including move of sysquotas.c to the top level
       via  6d6cf39 lib/replace: Add test for what flag we need for -Werror behaviour (cherry picked from commit 931ed2509d93110b525f763ffb15ee3feff87fa0)
       via  ccb96ee nsswitch: Add waf tests for solaris special cases
       via  528c9fc build: Remove unused --with-sys-quotas option
       via  8ba6be6 build: Set HAVE_SYS_QUOTAS and WITH_QUOTAS if we have any supported sysquota backend
       via  44336ae build: Remove unused samba_cv_sysquotas_file variable from autoconf configure
       via  f8e1280 build: Add waf configure support for non-linux quotas
       via  6d048c6 lib/util/charset: We do not use fucntions from wchar.h any more
       via  a40f456 lib/util/charset: Try to find iconv on HP-UX
       via  c9e667c build: Fix detection of quotas on macos
       via  51434f1 build: Add missing dep on tdb_compat
       via  5352097 build: Remove unused define UNIXWARE
       via  69e5ad9 lib/replace: Remove unused nap and therefore the SCO define
       via  39fd935 build: Make waf configure match autoconf for HPUX ACLs
       via  1344646 build: Rework waf STAT_ST_BLOCKSIZE to match autoconf, with 512 as the default
       via  3da347e lib/util: Remove unbuilt file util_getent.c and BROKEN_GETGRNAM
       via  1602636 build: Remove unused IRIX and IRIX6 defines
       via  1009e24 build: Fix enabled handling for HAVE_LDAP, we need to use bld.CONFIG_SET
       via  2969547 build: Try not build with LDAP if we do not have ldap.h
       via  13089f7 waf: Make samba "ok" with directories for install being symlinks
       via  1ded192 lib/replace: Look for special flags needed for c99
       via  647830c lib/replace: Improve mkstemp test in autoconf and waf
       via  47cbf54 quota: also log which fs type we found
       via  4a040da autoconf: check for dn_expand also in libinet
       via  74f2e8d wafbuild: check for dn_expand also in libinet
       via  d60bcf3 s3:winbindd:cache: fix offline logons with cached credentials (bug #9321)
       via  f40bfca packaging: Add NetworkManager dispatcher script for winbind.
       via  1ce0680 BUG 9326: Fix net ads join message for the dns domain.
       via  b5a9e17 lib/replace: Return size of xattr if size argument is 0
       via  a210201 s3: vfs_streams_depot: add delete_lost option (bug #9300)
       via  0c454c5 s3: make recursive_rmdir function non-static
       via  7e100a2 WHATSNEW: Correct list of changed parameters.
       via  4309dd1 VERSION: Bump version number up to 4.0.0rc5
      from  8c72009 VERSION: Disable GIT snapshot to prepare rc4 release.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-stable


- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 VERSION                                            |    2 +-
 WHATSNEW.txt                                       |  113 ++++++++-
 auth/kerberos/kerberos_pac.c                       |    2 +-
 auth/kerberos/pac_utils.h                          |    3 +
 buildtools/wafadmin/Utils.py                       |    4 +-
 buildtools/wafsamba/samba_abi.py                   |   32 ++-
 buildtools/wafsamba/samba_bundled.py               |    4 -
 buildtools/wafsamba/samba_install.py               |    2 +
 buildtools/wafsamba/samba_pidl.py                  |   26 +--
 buildtools/wafsamba/tests/test_abi.py              |   67 +++++
 buildtools/wafsamba/wscript                        |   13 +-
 docs-xml/Makefile                                  |    3 +
 docs-xml/build/DTD/samba.entities                  |   13 +-
 docs-xml/manpages/winbindd.8.xml                   |    6 +-
 dynconfig/wscript                                  |    4 +-
 file_server/file_server.c                          |   51 +----
 lib/ccan/libccan.m4                                |   16 ++
 lib/ccan/wscript                                   |   38 ++-
 lib/krb5_wrap/krb5_samba.c                         |    6 +
 lib/ntdb/wscript                                   |    2 +-
 lib/replace/libreplace.m4                          |   21 ++-
 .../{replace-test.h => replace-testsuite.h}        |    0
 lib/replace/replace.c                              |   10 -
 lib/replace/wscript                                |   46 +++-
 lib/replace/xattr.c                                |   15 +-
 lib/tsocket/tsocket.h                              |   42 +++
 lib/tsocket/tsocket_bsd.c                          |   73 +++++-
 lib/tsocket/tsocket_helpers.c                      |   29 ++
 lib/util/charset/wscript_configure                 |   11 +-
 lib/util/util_getent.c                             |  283 --------------------
 libcli/smb/smbXcli_base.c                          |   34 +++
 libcli/smb/smbXcli_base.h                          |    1 +
 librpc/wscript_build                               |    1 -
 .../ABI/{wbclient-0.10.sigs => wbclient-0.11.sigs} |    0
 nsswitch/libwbclient/wbc_pam.c                     |   16 +-
 nsswitch/libwbclient/wbclient.h                    |   45 ++--
 nsswitch/libwbclient/wscript                       |    2 +-
 nsswitch/winbind_nss_solaris.c                     |    6 +
 nsswitch/winbind_struct_protocol.h                 |    1 +
 nsswitch/wscript_build                             |   66 +++++-
 nsswitch/wscript_configure                         |   16 ++
 packaging/NetworkManager/30-winbind-systemd        |   20 ++
 packaging/NetworkManager/README                    |    6 +
 release-scripts/build-docs                         |    3 +-
 selftest/target/Samba.pm                           |    9 +
 selftest/target/Samba3.pm                          |    5 +-
 selftest/target/Samba4.pm                          |    2 +-
 source3/configure.in                               |   32 +--
 source3/lib/ctdb_conn.h                            |    5 +
 source3/lib/sysquotas.c                            |    2 +-
 source3/libads/kerberos.c                          |   28 ++-
 source3/libads/kerberos_keytab.c                   |    8 +-
 source3/modules/nfs4_acls.c                        |   23 ++-
 source3/modules/vfs_default.c                      |   49 +++--
 source3/modules/vfs_streams_depot.c                |   65 +++--
 source3/modules/wscript_build                      |    9 +
 source3/param/loadparm.c                           |   17 ++
 source3/passdb/pdb_nds.c                           |    1 -
 source3/passdb/wscript_build                       |    2 +-
 source3/registry/reg_parse.c                       |    1 -
 source3/smbd/close.c                               |    8 +-
 source3/smbd/proto.h                               |    4 +
 source3/smbd/reply.c                               |    5 +-
 source3/smbd/service.c                             |    9 +-
 source3/smbd/smb2_getinfo.c                        |    4 +
 source3/smbd/smb2_read.c                           |    2 +-
 source3/torture/test_ctdbconn.c                    |    6 +
 source3/utils/net_ads.c                            |    2 +-
 source3/winbindd/winbindd_ads.c                    |    2 +-
 source3/winbindd/winbindd_cache.c                  |   11 +-
 source3/winbindd/winbindd_cm.c                     |   13 +-
 source3/winbindd/winbindd_creds.c                  |    4 -
 source3/winbindd/winbindd_msrpc.c                  |    6 +-
 source3/winbindd/winbindd_pam.c                    |  128 +++++++++-
 source3/winbindd/winbindd_pam_auth_crap.c          |   23 ++
 source3/winbindd/winbindd_proto.h                  |    8 +
 source3/winbindd/wscript_build                     |   12 +-
 source3/wscript                                    |  116 +++++++--
 source3/wscript_build                              |    5 +-
 source4/dns_server/dns_server.c                    |   61 ++++-
 source4/dsdb/samdb/cracknames.c                    |   13 +-
 source4/dsdb/samdb/ldb_modules/acl.c               |  231 ++++++++++++----
 source4/dsdb/samdb/ldb_modules/acl_read.c          |  256 +++++++++---------
 source4/ntp_signd/ntp_signd.c                      |    2 +-
 source4/ntvfs/posix/wscript_build                  |    2 +-
 source4/scripting/bin/samba_upgradedns             |    2 +-
 source4/scripting/python/samba/netcmd/domain.py    |    5 +-
 source4/scripting/python/samba/netcmd/testparm.py  |    2 +-
 .../scripting/python/samba/provision/__init__.py   |   39 ++--
 source4/scripting/python/samba/tests/posixacl.py   |    8 +-
 source4/scripting/python/samba/upgrade.py          |    2 +-
 source4/scripting/python/samba/upgradehelpers.py   |    4 +-
 source4/torture/winbind/winbind.c                  |   92 ++++++-
 {source3/tests => tests}/sysquotas.c               |    4 +-
 wscript_configure_system_mitkrb5                   |    4 +-
 95 files changed, 1656 insertions(+), 851 deletions(-)
 copy lib/replace/{replace-test.h => replace-testsuite.h} (100%)
 delete mode 100644 lib/util/util_getent.c
 copy nsswitch/libwbclient/ABI/{wbclient-0.10.sigs => wbclient-0.11.sigs} (100%)
 create mode 100755 packaging/NetworkManager/30-winbind-systemd
 create mode 100644 packaging/NetworkManager/README
 rename {source3/tests => tests}/sysquotas.c (99%)
 mode change 100755 => 100644 wscript
 mode change 100755 => 100644 wscript_build


Changeset truncated at 500 lines:

diff --git a/VERSION b/VERSION
index 09a4a0f..946f6fa 100644
--- a/VERSION
+++ b/VERSION
@@ -87,7 +87,7 @@ SAMBA_VERSION_PRE_RELEASE=
 # e.g. SAMBA_VERSION_RC_RELEASE=1                      #
 #  ->  "3.0.0rc1"                                      #
 ########################################################
-SAMBA_VERSION_RC_RELEASE=4
+SAMBA_VERSION_RC_RELEASE=5
 
 ########################################################
 # To mark SVN snapshots this should be set to 'yes'    #
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index dc3b1e4..b1a2b7e 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,7 +1,7 @@
 Release Announcements
 =====================
 
-This is the fourth release candidate of Samba 4.0.  This is *not*
+This is the fifth release candidate of Samba 4.0.  This is *not*
 intended for production environments and is designed for testing
 purposes only.  Please report any defects via the Samba bug reporting
 system at https://bugzilla.samba.org/.
@@ -58,7 +58,7 @@ Samba3-like logon services provided over CIFS.  We correctly generate
 the infamous Kerberos PAC, and include it with the Kerberos tickets we
 issue.
 
-Samba 4.0.0rc4 ships with two distinct file servers.  We now use the
+Samba 4.0.0rc5 ships with two distinct file servers.  We now use the
 file server from the Samba 3.x series 'smbd' for all file serving by
 default.
 
@@ -125,8 +125,6 @@ smb.conf changes
    kernel share modes			New
    kpasswd port				New
    krb5 port				New
-   max protocol				Removed
-   min protocol				Removed
    nbt client socket address		New
    nbt port				New
    nsupdate command			New
@@ -166,6 +164,113 @@ smb.conf changes
    winbindd socket directory		New
 
 
+CHANGES SINCE 4.0.0rc4
+======================
+
+With this release candidate the location of the socket samba accepts
+connections from NTPd has changed, as has the enforced permissions.
+
+This means the ntp.conf will need to change from (eg)
+
+ntpsigndsocket /usr/local/samba/var/run/ntp_signd/
+
+to
+
+ntpsigndsocket /usr/local/samba/var/lib/ntp_signd/
+
+To use the socket with ntp on a system with an ntp user and group, you must
+run:
+
+chgrp ntp /usr/local/samba/var/lib/ntp_signd/
+
+o   Michael Adam <obnox at samba.org>
+    * BUG 9321: winbindd:cache: Fix offline logons with cached credentials.
+    * BUG 9339: Build and quota fixes.
+    * BUG 9353: Fix the cluster(ctdb) build without system talloc installed.
+
+
+o   Christian Ambach <ambi at samba.org>
+    * BUG 9208: Cannot migrate files with inheritance flags to share on top of
+      NFSv4 filesystem.
+    * BUG 9361: Quotas management doesn't work with SMB2/3.
+
+
+o   Andrew Bartlett <abartlet at samba.org>
+    * BUG 9317: Cannot easily change to internal DNS server.
+    * BUG 9338: lib/replace: Return size of xattr if size argument is 0.
+    * BUG 9339: Build and quota fixes.
+    * BUG 9340: Do not use the wheel group for 'administrators'.
+    * BUG 9347: winbind: Extend wbcAuthenticateUserEx to provide PAC.
+    * BUG 9352: Fix samba crashes with certain RPC calls.
+    * BUG 9355: Set mask values to 0777 and use fileserver.conf.
+    * BUG 9357: Don't expose more symbols than specified by abi_match setting.
+    * BUG 9379: ntp_signd permissions are too broad.
+
+
+o   Björn Baumbach <bb at sernet.de>
+    * BUG 9300: vfs_streams_depot: Add delete_lost option.
+    * BUG 9348: Fix the build against older ctdb versions.
+    * BUG 9345: fix use of <smbconfoption> tag.
+    * BUG 9349: Fix check for ctdb_private.h
+    * BUG 9351: Fail "configure --with-cluster-support" if ctdb support is not
+      available.
+
+
+o   Ira Cooper <ira at samba.org>
+    * BUG 9339: Build and quota fixes.
+
+
+o   Günther Deschner <gd at samba.org>
+    * BUG 9272: 'net ads join' does not provide AES keys in host keytab.
+
+
+o   David Disseldorp <ddiss at samba.org>
+    * BUG 9125: Revert "s3-winbindd: make sure we obey the -n switch
+      also for samlogon cache access" and describe samlogon cache caveat for
+      'winbindd -n'.
+
+
+o   Björn Jacke <bj at sernet.de>
+    * BUG 7472: Check for dn_expand also in libinet.
+    * BUG 9339: Build and quota fixes.
+
+
+o   Volker Lendecke <vl at samba.org>
+    * BUG 9208: Cannot migrate files with inheritance flags to share on top of
+      NFSv4 filesystem.
+    * BUG 9352: dsdb: Simplify DsCrackNameOneFilter a bit.
+
+
+o   Stefan Metzmacher <metze at samba.org>
+    * BUG 8620: Read ACL are not enabled by default on DS.
+    * BUG 9175: Add smbXcli_session_set_disconnect_expired().
+    * BUG 9341: Fix SMBD_SMB2_NUM_IOV_PER_REQ check for sendfile().
+    * BUG 9359: Optimization needed for SMB2 performance sensitive workloads.
+    * BUG 9360: SMB1 tree connect time is wrong.
+
+
+o   Ricky Nance <ricky.nance at weaubleau.k12.mo.us>
+    * BUG 9339: Build and quota fixes.
+
+
+o   Rusty Russell <rusty at rustcorp.com.au>
+    * BUG 9339: Build and quota fixes.
+
+
+o   Christof Schmitt <christof.schmitt at us.ibm.com>
+    * BUG 9347: winbind: Extend wbcAuthenticateUserEx to provide PAC.
+
+
+o   Andreas Schneider <asn at samba.org>
+    * BUG 9326: Fix 'net ads join' message for the dns domain.
+    * BUG 9336: Add NetworkManager dispatcher script for Winbind.
+    * BUG 9339: Build and quota fixes.
+
+
+o   Jelmer Vernooij <jelmer at samba.org>
+    * BUG 9357: Don't expose more symbols than specified by abi_match setting.
+
+
 CHANGES SINCE 4.0.0rc3
 ======================
 
diff --git a/auth/kerberos/kerberos_pac.c b/auth/kerberos/kerberos_pac.c
index 80f31d8..81f7f21 100644
--- a/auth/kerberos/kerberos_pac.c
+++ b/auth/kerberos/kerberos_pac.c
@@ -322,7 +322,7 @@ NTSTATUS kerberos_decode_pac(TALLOC_CTX *mem_ctx,
 					 context,
 					 service_keyblock);
 		if (ret) {
-			DEBUG(1, ("PAC Decode: Failed to verify the service "
+			DEBUG(5, ("PAC Decode: Failed to verify the service "
 				  "signature: %s\n", error_message(ret)));
 			return NT_STATUS_ACCESS_DENIED;
 		}
diff --git a/auth/kerberos/pac_utils.h b/auth/kerberos/pac_utils.h
index b9b6664..d09e7b6 100644
--- a/auth/kerberos/pac_utils.h
+++ b/auth/kerberos/pac_utils.h
@@ -21,6 +21,8 @@
 #ifndef _PAC_UTILS_H
 #define _PAC_UTILS_H
 
+#ifdef HAVE_KRB5
+
 #include "lib/krb5_wrap/krb5_samba.h"
 #include "lib/krb5_wrap/gss_samba.h"
 
@@ -65,4 +67,5 @@ NTSTATUS gssapi_get_session_key(TALLOC_CTX *mem_ctx,
 char *gssapi_error_string(TALLOC_CTX *mem_ctx,
 			  OM_uint32 maj_stat, OM_uint32 min_stat,
 			  const gss_OID mech);
+#endif /* HAVE_KRB5 */
 #endif /* _PAC_UTILS_H */
diff --git a/buildtools/wafadmin/Utils.py b/buildtools/wafadmin/Utils.py
index 41dad57..91ded93 100644
--- a/buildtools/wafadmin/Utils.py
+++ b/buildtools/wafadmin/Utils.py
@@ -15,7 +15,7 @@ Utilities, the stable ones are the following:
 
 	import stat
 	def h_file(filename):
-		st = os.stat(filename)
+		st = os.lstat(filename)
 		if stat.S_ISDIR(st[stat.ST_MODE]): raise IOError('not a file')
 		m = Utils.md5()
 		m.update(str(st.st_mtime))
@@ -419,7 +419,7 @@ def pprint(col, str, label='', sep='\n'):
 def check_dir(dir):
 	"""If a folder doesn't exists, create it."""
 	try:
-		os.stat(dir)
+		os.lstat(dir)
 	except OSError:
 		try:
 			os.makedirs(dir)
diff --git a/buildtools/wafsamba/samba_abi.py b/buildtools/wafsamba/samba_abi.py
index ed977ba..488dab8 100644
--- a/buildtools/wafsamba/samba_abi.py
+++ b/buildtools/wafsamba/samba_abi.py
@@ -152,22 +152,23 @@ def abi_process_file(fname, version, symmap):
             symmap[symname] = version
     f.close()
 
-def abi_write_vscript(vscript, libname, current_version, versions, symmap, abi_match):
-    '''write a vscript file for a library in --version-script format
 
-    :param vscript: Path to the vscript file
+def abi_write_vscript(f, libname, current_version, versions, symmap, abi_match):
+    """Write a vscript file for a library in --version-script format.
+
+    :param f: File-like object to write to
     :param libname: Name of the library, uppercased
     :param current_version: Current version
     :param versions: Versions to consider
     :param symmap: Dictionary mapping symbols -> version
-    :param abi_match: List of symbols considered to be public in the current version
-    '''
+    :param abi_match: List of symbols considered to be public in the current
+        version
+    """
 
     invmap = {}
     for s in symmap:
         invmap.setdefault(symmap[s], []).append(s)
 
-    f = open(vscript, mode='w')
     last_key = ""
     versions = sorted(versions, key=version_key)
     for k in versions:
@@ -175,8 +176,8 @@ def abi_write_vscript(vscript, libname, current_version, versions, symmap, abi_m
         if symver == current_version:
             break
         f.write("%s {\n" % symver)
-        if k in invmap:
-            f.write("\tglobal: \n")
+        if k in sorted(invmap.keys()):
+            f.write("\tglobal:\n")
             for s in invmap.get(k, []):
                 f.write("\t\t%s;\n" % s);
         f.write("}%s;\n\n" % last_key)
@@ -190,14 +191,13 @@ def abi_write_vscript(vscript, libname, current_version, versions, symmap, abi_m
             f.write("\t\t%s;\n" % x)
     else:
         f.write("\t\t*;\n")
-    if len(local_abi) > 0:
+    if abi_match != ["*"]:
         f.write("\tlocal:\n")
         for x in local_abi:
             f.write("\t\t%s;\n" % x[1:])
-    elif abi_match != ["*"]:
-        f.write("\tlocal: *;\n")
+        if len(global_abi) > 0:
+            f.write("\t\t*;\n")
     f.write("};\n")
-    f.close()
 
 
 def abi_build_vscript(task):
@@ -213,8 +213,12 @@ def abi_build_vscript(task):
         version = basename[len(task.env.LIBNAME)+1:-len(".sigs")]
         versions.append(version)
         abi_process_file(fname, version, symmap)
-    abi_write_vscript(tgt, task.env.LIBNAME, task.env.VERSION, versions, symmap,
-                      task.env.ABI_MATCH)
+    f = open(tgt, mode='w')
+    try:
+        abi_write_vscript(f, task.env.LIBNAME, task.env.VERSION, versions,
+            symmap, task.env.ABI_MATCH)
+    finally:
+        f.close()
 
 
 def ABI_VSCRIPT(bld, libname, abi_directory, version, vscript, abi_match=None):
diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py
index b8a4101..afcf708 100644
--- a/buildtools/wafsamba/samba_bundled.py
+++ b/buildtools/wafsamba/samba_bundled.py
@@ -30,8 +30,6 @@ def target_in_list(target, lst, default):
 def BUILTIN_LIBRARY(bld, name):
     '''return True if a library should be builtin
        instead of being built as a shared lib'''
-    if bld.env.DISABLE_SHARED:
-        return True
     return target_in_list(name, bld.env.BUILTIN_LIBRARIES, False)
 Build.BuildContext.BUILTIN_LIBRARY = BUILTIN_LIBRARY
 
@@ -249,8 +247,6 @@ def CHECK_BUNDLED_SYSTEM_PYTHON(conf, libname, modulename, minversion='0.0.0'):
 
 def NONSHARED_BINARY(bld, name):
     '''return True if a binary should be built without non-system shared libs'''
-    if bld.env.DISABLE_SHARED:
-        return True
     return target_in_list(name, bld.env.NONSHARED_BINARIES, False)
 Build.BuildContext.NONSHARED_BINARY = NONSHARED_BINARY
 
diff --git a/buildtools/wafsamba/samba_install.py b/buildtools/wafsamba/samba_install.py
index 5e53989..aa7f143 100644
--- a/buildtools/wafsamba/samba_install.py
+++ b/buildtools/wafsamba/samba_install.py
@@ -103,6 +103,8 @@ def install_library(self):
     if getattr(self, 'samba_realname', None):
         install_name = self.samba_realname
         install_link = None
+        if getattr(self, 'soname', ''):
+            install_link = self.soname
         if getattr(self, 'samba_type', None) == 'PYTHON':
             inst_name    = bld.make_libname(t.target, nolibprefix=True, python=True)
         else:
diff --git a/buildtools/wafsamba/samba_pidl.py b/buildtools/wafsamba/samba_pidl.py
index ff13971..4056359 100644
--- a/buildtools/wafsamba/samba_pidl.py
+++ b/buildtools/wafsamba/samba_pidl.py
@@ -7,7 +7,6 @@ from samba_utils import *
 def SAMBA_PIDL(bld, pname, source,
                options='',
                output_dir='.',
-               symlink=False,
                generate_tables=True):
     '''Build a IDL file using pidl.
        This will produce up to 13 output files depending on the options used'''
@@ -91,27 +90,7 @@ def SAMBA_PIDL(bld, pname, source,
 
     t.env.PIDL = os.path.join(bld.srcnode.abspath(), 'pidl/pidl')
     t.env.OPTIONS = TO_LIST(options)
-
-    # this rather convoluted set of path calculations is to cope with the possibility
-    # that gen_ndr is a symlink into the source tree. By doing this for the source3
-    # gen_ndr directory we end up generating identical output in gen_ndr for the old
-    # build system and the new one. That makes keeping things in sync much easier.
-    # eventually we should drop the gen_ndr files in git, but in the meanwhile this works
-
-    found_dir = bld.path.find_dir(output_dir)
-    if not 'abspath' in dir(found_dir):
-        Logs.error('Unable to find pidl output directory %s' %
-                   os.path.normpath(os.path.join(bld.curdir, output_dir)))
-        sys.exit(1)
-
-    outdir = bld.path.find_dir(output_dir).abspath(t.env)
-
-    if symlink and not os.path.lexists(outdir):
-        link_source = os.path.normpath(os.path.join(bld.curdir,output_dir))
-        os.symlink(link_source, outdir)
-
-    real_outputdir = os.path.realpath(outdir)
-    t.env.OUTPUTDIR = os_path_relpath(real_outputdir, os.path.dirname(bld.env.BUILD_DIRECTORY))
+    t.env.OUTPUTDIR = bld.bldnode.name + '/' + bld.path.find_dir(output_dir).bldpath(t.env)
 
     if generate_tables and table_header_idx is not None:
         pidl_headers = LOCAL_CACHE(bld, 'PIDL_HEADERS')
@@ -124,11 +103,10 @@ Build.BuildContext.SAMBA_PIDL = SAMBA_PIDL
 def SAMBA_PIDL_LIST(bld, name, source,
                     options='',
                     output_dir='.',
-                    symlink=False,
                     generate_tables=True):
     '''A wrapper for building a set of IDL files'''
     for p in TO_LIST(source):
-        bld.SAMBA_PIDL(name, p, options=options, output_dir=output_dir, symlink=symlink, generate_tables=generate_tables)
+        bld.SAMBA_PIDL(name, p, options=options, output_dir=output_dir, generate_tables=generate_tables)
 Build.BuildContext.SAMBA_PIDL_LIST = SAMBA_PIDL_LIST
 
 
diff --git a/buildtools/wafsamba/tests/test_abi.py b/buildtools/wafsamba/tests/test_abi.py
index 0aa0d56..bba78c1 100644
--- a/buildtools/wafsamba/tests/test_abi.py
+++ b/buildtools/wafsamba/tests/test_abi.py
@@ -17,9 +17,12 @@
 from wafsamba.tests import TestCase
 
 from wafsamba.samba_abi import (
+    abi_write_vscript,
     normalise_signature,
     )
 
+from cStringIO import StringIO
+
 
 class NormaliseSignatureTests(TestCase):
 
@@ -51,3 +54,67 @@ class NormaliseSignatureTests(TestCase):
             'uuid = {time_low = 2324192516, time_mid = 7403, time_hi_and_version = 4553, clock_seq = "\\237\\350", node = "\\b\\000+\\020H`"}, if_version = 2',
             normalise_signature('$244 = {uuid = {time_low = 2324192516, time_mid = 7403, time_hi_and_version = 4553, clock_seq = "\\237\\350", node = "\\b\\000+\\020H`"}, if_version = 2}'))
 
+
+class WriteVscriptTests(TestCase):
+
+    def test_one(self):
+        f = StringIO()
+        abi_write_vscript(f, "MYLIB", "1.0", [], {
+            "old": "1.0",
+            "new": "1.0"}, ["*"])
+        self.assertEquals(f.getvalue(), """\
+1.0 {
+\tglobal:
+\t\t*;
+};
+""")
+
+    def test_simple(self):
+        # No restrictions.
+        f = StringIO()
+        abi_write_vscript(f, "MYLIB", "1.0", ["0.1"], {
+            "old": "0.1",
+            "new": "1.0"}, ["*"])
+        self.assertEquals(f.getvalue(), """\
+MYLIB_0.1 {
+\tglobal:
+\t\told;
+};
+
+1.0 {
+\tglobal:
+\t\t*;
+};
+""")
+
+    def test_exclude(self):
+        f = StringIO()
+        abi_write_vscript(f, "MYLIB", "1.0", [], {
+            "exc_old": "0.1",
+            "old": "0.1",
+            "new": "1.0"}, ["!exc_*"])
+        self.assertEquals(f.getvalue(), """\
+1.0 {
+\tglobal:
+\t\t*;
+\tlocal:
+\t\texc_*;
+};
+""")
+
+    def test_excludes_and_includes(self):
+        f = StringIO()
+        abi_write_vscript(f, "MYLIB", "1.0", [], {
+            "pub_foo": "1.0",
+            "exc_bar": "1.0",
+            "other": "1.0"
+            }, ["pub_*", "!exc_*"])
+        self.assertEquals(f.getvalue(), """\
+1.0 {
+\tglobal:
+\t\tpub_*;
+\tlocal:
+\t\texc_*;
+\t\t*;
+};
+""")
diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript
index 5e1898c..441e727 100755
--- a/buildtools/wafsamba/wscript
+++ b/buildtools/wafsamba/wscript
@@ -50,9 +50,6 @@ def set_options(opt):
                    help=("list of minimum system library versions (LIBNAME1:version,LIBNAME2:version)"),
                    action="store", dest='MINIMUM_LIBRARY_VERSION', default='')
 
-    gr.add_option('--disable-shared',
-                   help=("Disable all use of shared libraries"),
-                   action="store_true", dest='disable_shared', default=False)
     gr.add_option('--disable-rpath',
                    help=("Disable use of rpath for build binaries"),
                    action="store_true", dest='disable_rpath_build', default=False)
@@ -248,7 +245,6 @@ def configure(conf):
     conf.env.BUNDLED_LIBS = Options.options.BUNDLED_LIBS.split(',')
     conf.env.PRIVATE_LIBS = Options.options.PRIVATE_LIBS.split(',')
     conf.env.BUILTIN_LIBRARIES = Options.options.BUILTIN_LIBRARIES.split(',')
-    conf.env.DISABLE_SHARED = Options.options.disable_shared
     conf.env.NONSHARED_BINARIES = Options.options.NONSHARED_BINARIES.split(',')
 
     conf.env.PRIVATE_EXTENSION = Options.options.PRIVATE_EXTENSION
@@ -297,12 +293,8 @@ def configure(conf):
                     headers='stdio.h',
                     msg='Checking simple C program')
 
-    # see if we can build shared libs
-    if not conf.CHECK_LIBRARY_SUPPORT():
-        conf.env.DISABLE_SHARED = True
-
     # check for rpath
-    if not conf.env.DISABLE_SHARED and conf.CHECK_LIBRARY_SUPPORT(rpath=True):
+    if conf.CHECK_LIBRARY_SUPPORT(rpath=True):
         support_rpath = True
         conf.env.RPATH_ON_BUILD   = not Options.options.disable_rpath_build
         conf.env.RPATH_ON_INSTALL = (conf.env.RPATH_ON_BUILD and


-- 
Samba Shared Repository


More information about the samba-cvs mailing list