The branch, master has been updated
       via  44a016c build: we no longer put #if _SAMBA_BUILD_ == 4 in public 
headers
       via  dd491d8 s3-build We no longer require to redefine _SAMBA_BUILD_
       via  7891848 libcli/smb move FILE_TYPE constants in common
       via  6543987 libcli/smb move enum protocol_types to a common header
       via  68e0b26 build: Remove _SAMBA_BUILD == 4 from libgpo
       via  c1f8a74 librpc/ndr remove _SAMBA_BUILD_ conditionals
       via  4ccac70 build: Re-enable the -Wl,--as-needed flag
      from  9a3e2d1 s3:smbd fix a compile warning on AIX 5.3

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 44a016cd89e9421ab5938a0e52ec21774b438c99
Author: Andrew Bartlett <[email protected]>
Date:   Wed Jul 6 13:09:17 2011 +1000

    build: we no longer put #if _SAMBA_BUILD_ == 4 in public headers
    
    Autobuild-User: Andrew Bartlett <[email protected]>
    Autobuild-Date: Wed Jul  6 06:46:50 CEST 2011 on sn-devel-104

commit dd491d8d8c28d40ed6d3af310220dfe933b106db
Author: Andrew Bartlett <[email protected]>
Date:   Wed Jul 6 12:49:11 2011 +1000

    s3-build We no longer require to redefine _SAMBA_BUILD_

commit 7891848357a945581d6c94909b2d783c75afe46e
Author: Andrew Bartlett <[email protected]>
Date:   Wed Jul 6 13:06:14 2011 +1000

    libcli/smb move FILE_TYPE constants in common
    
    This allows us to remove another _SAMBA_BUILD_ conditional
    
    Andrew Bartlett

commit 6543987139197800a3e93b768133474ed0c2d0dc
Author: Andrew Bartlett <[email protected]>
Date:   Wed Jul 6 13:05:45 2011 +1000

    libcli/smb move enum protocol_types to a common header

commit 68e0b262be33a1e25018a2afa1e1280ecc5a96eb
Author: Andrew Bartlett <[email protected]>
Date:   Wed Jul 6 12:39:34 2011 +1000

    build: Remove _SAMBA_BUILD == 4 from libgpo
    
    This code has no hope of building against the samba4 libs (it has been
    disabled for a very long time, and files referenced don't exist etc),
    and with the common build there simply is no need.
    
    Andrew Bartlett

commit c1f8a743201746ccbcd1af5e6f410b2b922c00ba
Author: Andrew Bartlett <[email protected]>
Date:   Wed Jul 6 12:08:52 2011 +1000

    librpc/ndr remove _SAMBA_BUILD_ conditionals

commit 4ccac7030ad24a9053e76eeb391c9e5e8f730343
Author: Andrew Bartlett <[email protected]>
Date:   Wed Jul 6 11:58:10 2011 +1000

    build: Re-enable the -Wl,--as-needed flag

-----------------------------------------------------------------------

Summary of changes:
 lib/util/ms_fnmatch.c                |    1 +
 lib/util/util.h                      |   15 ----------
 libcli/named_pipe_auth/npa_tstream.c |    4 +--
 libcli/smb/smb_constants.h           |   20 ++++++++++++++
 libgpo/gpext/gpext.c                 |    2 -
 libgpo/gpo.h                         |    4 ---
 libgpo/gpo_fetch.c                   |   48 ----------------------------------
 libgpo/gpo_ldap.c                    |    4 ---
 libgpo/gpo_sec.c                     |    6 ----
 libgpo/gpo_util.c                    |   14 ----------
 librpc/ndr/libndr.h                  |    2 -
 librpc/ndr/ndr.c                     |    3 --
 librpc/ndr/ndr_spoolss_buf.c         |    3 --
 source3/include/includes.h           |    5 ---
 source3/include/smb.h                |   20 --------------
 source4/libcli/raw/libcliraw.h       |    1 +
 source4/libcli/raw/smb.h             |    8 -----
 wscript                              |    8 +----
 wscript_build                        |    3 --
 19 files changed, 25 insertions(+), 146 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/ms_fnmatch.c b/lib/util/ms_fnmatch.c
index 1ba5888..ede9eff 100644
--- a/lib/util/ms_fnmatch.c
+++ b/lib/util/ms_fnmatch.c
@@ -29,6 +29,7 @@
  */
 
 #include "includes.h"
+#include "libcli/smb/smb_constants.h"
 
 static int null_match(const char *p)
 {
diff --git a/lib/util/util.h b/lib/util/util.h
index c715440..b9734b0 100644
--- a/lib/util/util.h
+++ b/lib/util/util.h
@@ -762,21 +762,6 @@ _PUBLIC_ int sys_fsusage(const char *path, uint64_t 
*dfree, uint64_t *dsize);
  * @brief MS-style Filename matching
  */
 
-#if _SAMBA_BUILD_ == 4
-/* protocol types. It assumes that higher protocols include lower protocols
-   as subsets. FIXME: Move to one of the smb-specific headers */
-enum protocol_types {
-       PROTOCOL_NONE,
-       PROTOCOL_CORE,
-       PROTOCOL_COREPLUS,
-       PROTOCOL_LANMAN1,
-       PROTOCOL_LANMAN2,
-       PROTOCOL_NT1,
-       PROTOCOL_SMB2
-};
-
-#endif
-
 int ms_fnmatch_protocol(const char *pattern, const char *string, int protocol);
 
 /** a generic fnmatch function - uses for non-CIFS pattern matching */
diff --git a/libcli/named_pipe_auth/npa_tstream.c 
b/libcli/named_pipe_auth/npa_tstream.c
index 2aeea5b..c2eb7bf 100644
--- a/libcli/named_pipe_auth/npa_tstream.c
+++ b/libcli/named_pipe_auth/npa_tstream.c
@@ -24,9 +24,7 @@
 #include "../lib/tsocket/tsocket_internal.h"
 #include "../librpc/gen_ndr/ndr_named_pipe_auth.h"
 #include "../libcli/named_pipe_auth/npa_tstream.h"
-#if _SAMBA_BUILD_ == 4
-#include "libcli/raw/smb.h"
-#endif
+#include "../libcli/smb/smb_constants.h"
 
 static const struct tstream_context_ops tstream_npa_ops;
 
diff --git a/libcli/smb/smb_constants.h b/libcli/smb/smb_constants.h
index 59a6d9e..ed7f6ff 100644
--- a/libcli/smb/smb_constants.h
+++ b/libcli/smb/smb_constants.h
@@ -22,6 +22,18 @@
 #ifndef _SMB_CONSTANTS_H
 #define _SMB_CONSTANTS_H
 
+/* protocol types. It assumes that higher protocols include lower protocols
+   as subsets. */
+enum protocol_types {
+       PROTOCOL_NONE,
+       PROTOCOL_CORE,
+       PROTOCOL_COREPLUS,
+       PROTOCOL_LANMAN1,
+       PROTOCOL_LANMAN2,
+       PROTOCOL_NT1,
+       PROTOCOL_SMB2
+};
+
 /* NT Flags2 bits - cifs6.txt section 3.1.2 */
 #define FLAGS2_LONG_PATH_COMPONENTS    0x0001
 #define FLAGS2_EXTENDED_ATTRIBUTES     0x0002
@@ -59,4 +71,12 @@
                                        FILE_ATTRIBUTE_DIRECTORY|\
                                        FILE_ATTRIBUTE_ARCHIVE)
 
+/* File type flags */
+#define FILE_TYPE_DISK  0
+#define FILE_TYPE_BYTE_MODE_PIPE 1
+#define FILE_TYPE_MESSAGE_MODE_PIPE 2
+#define FILE_TYPE_PRINTER 3
+#define FILE_TYPE_COMM_DEVICE 4
+#define FILE_TYPE_UNKNOWN 0xFFFF
+
 #endif /* _SMB_CONSTANTS_H */
diff --git a/libgpo/gpext/gpext.c b/libgpo/gpext/gpext.c
index 42ab622..1f86b5f 100644
--- a/libgpo/gpext/gpext.c
+++ b/libgpo/gpext/gpext.c
@@ -23,11 +23,9 @@
 #include "librpc/gen_ndr/ndr_misc.h"
 #include "lib/util/dlinklist.h"
 #include "../libcli/registry/util_reg.h"
-#if _SAMBA_BUILD_ == 3
 #include "libgpo/gpo_proto.h"
 #include "registry.h"
 #include "registry/reg_api.h"
-#endif
 
 static struct gp_extension *extensions = NULL;
 
diff --git a/libgpo/gpo.h b/libgpo/gpo.h
index e644382..62e9091 100644
--- a/libgpo/gpo.h
+++ b/libgpo/gpo.h
@@ -20,12 +20,8 @@
 #ifndef __GPO_H__
 #define __GPO_H__
 
-#if _SAMBA_BUILD_ == 4
-#include "source4/libgpo/ads_convenience.h"
-#else
 struct loadparm_context;
 #include "ads.h"
-#endif
 
 enum GPO_LINK_TYPE {
        GP_LINK_UNKOWN  = 0,
diff --git a/libgpo/gpo_fetch.c b/libgpo/gpo_fetch.c
index cae11d5..4e895bf 100644
--- a/libgpo/gpo_fetch.c
+++ b/libgpo/gpo_fetch.c
@@ -22,20 +22,8 @@
 #include "../libgpo/gpo.h"
 #include "../libgpo/gpo_ini.h"
 
-#if _SAMBA_BUILD_ == 4
-#include "param/param.h"
-#include "libcli/resolve/resolve.h"
-#include <tevent.h>
-#include "libcli/libcli.h"
-#include "libcli/raw/libcliraw.h"
-#include "libcli/libcli_proto.h"
-#include "libgpo/ads_convenience.h"
-#include "libgpo/gpo_s4.h"
-#include "lib/util/util.h"
-#else
 #include "libgpo/gpo_proto.h"
 #include "libsmb/libsmb.h"
-#endif
 
 /****************************************************************
  explode the GPO CIFS URI into their components
@@ -82,11 +70,7 @@ NTSTATUS gpo_explode_filesyspath(TALLOC_CTX *mem_ctx,
                                        file_sys_path)) == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
-#if _SAMBA_BUILD_ == 4
-       path = string_sub_talloc(mem_ctx, path, "\\", "/");
-#else
        path = talloc_string_sub(mem_ctx, path, "\\", "/");
-#endif
        if (!path) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -138,10 +122,8 @@ static NTSTATUS gpo_connect_server(ADS_STRUCT *ads, struct 
loadparm_context *lp_
                                    const char *server, const char *service, 
void *ret_cli)
 {
        NTSTATUS result;
-#if _SAMBA_BUILD_ == 3
        struct cli_state *cli;
 
-
        result = cli_full_connection(&cli,
                        lp_netbios_name(),
                        server,
@@ -159,32 +141,6 @@ static NTSTATUS gpo_connect_server(ADS_STRUCT *ads, struct 
loadparm_context *lp_
                return result;
        }
        *(struct cli_state **) ret_cli = cli;
-#else
-       struct smbcli_state *cli = NULL;
-       struct smbcli_options options;
-       struct smbcli_session_options session_options;
-
-       lp_smbcli_options(lp_ctx, &options);
-       lp_smbcli_session_options(lp_ctx, &session_options);
-
-       result = smbcli_full_connection(NULL, &cli,
-                       server,
-                       NULL, service,
-                       NULL /*devtype*/, NULL /* socket options */,
-                       ads->credentials,
-                       lp_resolve_context(lp_ctx),
-                       tevent_context_init(ads),
-                       &options,
-                       &session_options,
-                       lp_iconv_handle(lp_ctx),
-                       lp_gensec_settings(ads, lp_ctx));
-       if (!NT_STATUS_IS_OK(result)) {
-               DEBUG(10,("failed to connect: %s\n",
-                               nt_errstr(result)));
-               return result;
-       }
-       *(struct smbcli_state **) ret_cli = cli;
-#endif
        return NT_STATUS_OK;
 }
 
@@ -201,11 +157,7 @@ NTSTATUS gpo_fetch_files(TALLOC_CTX *mem_ctx,
        NTSTATUS result;
        char *server, *service, *nt_path, *unix_path;
        char *nt_ini_path, *unix_ini_path;
-#if _SAMBA_BUILD_ == 3
        struct cli_state *cli;
-#else
-       struct smbcli_state *cli;
-#endif
 
 
        result = gpo_explode_filesyspath(mem_ctx, cache_dir, gpo->file_sys_path,
diff --git a/libgpo/gpo_ldap.c b/libgpo/gpo_ldap.c
index 9d984b5..d46c48f 100644
--- a/libgpo/gpo_ldap.c
+++ b/libgpo/gpo_ldap.c
@@ -20,10 +20,6 @@
 #include "includes.h"
 #include "libgpo/gpo.h"
 #include "auth.h"
-#if _SAMBA_BUILD_ == 4
-#include "libgpo/gpo_s4.h"
-#include "source4/libgpo/ads_convenience.h"
-#endif
 #include "../libcli/security/security.h"
 
 /****************************************************************
diff --git a/libgpo/gpo_sec.c b/libgpo/gpo_sec.c
index 05b011b..c27ca55 100644
--- a/libgpo/gpo_sec.c
+++ b/libgpo/gpo_sec.c
@@ -22,12 +22,6 @@
 #include "../libgpo/gpo.h"
 #include "auth.h"
 #include "../librpc/ndr/libndr.h"
-#if _SAMBA_BUILD_ == 4
-#include "libgpo/ads_convenience.h"
-#include "librpc/gen_ndr/security.h"
-#include "librpc/gen_ndr/ndr_misc.h"
-#include "../libcli/security/secace.h"
-#endif
 
 /****************************************************************
 ****************************************************************/
diff --git a/libgpo/gpo_util.c b/libgpo/gpo_util.c
index 553402a..ca529f8 100644
--- a/libgpo/gpo_util.c
+++ b/libgpo/gpo_util.c
@@ -23,11 +23,6 @@
 #include "../librpc/gen_ndr/ndr_security.h"
 #include "../libgpo/gpo.h"
 #include "../libcli/security/security.h"
-#if _SAMBA_BUILD_ == 4
-#include "auth/auth.h"
-#include <talloc.h>
-#include "source4/libgpo/ads_convenience.h"
-#endif
 #undef strdup
 
 #if 0
@@ -845,11 +840,7 @@ ADS_STATUS gp_get_machine_token(ADS_STRUCT *ads,
 {
        struct security_token *ad_token = NULL;
        ADS_STATUS status;
-#if _SAMBA_BUILD_ == 4
-       struct auth_session_info *info;
-#else
        NTSTATUS ntstatus;
-#endif
 
 #ifndef HAVE_ADS
        return ADS_ERROR_NT(NT_STATUS_NOT_SUPPORTED);
@@ -858,15 +849,10 @@ ADS_STATUS gp_get_machine_token(ADS_STRUCT *ads,
        if (!ADS_ERR_OK(status)) {
                return status;
        }
-#if _SAMBA_BUILD_ == 4
-       info = system_session(mem_ctx, lp_ctx);
-       *token = info->security_token;
-#else
        ntstatus = merge_nt_token(mem_ctx, ad_token, get_system_token(),
                                  token);
        if (!NT_STATUS_IS_OK(ntstatus)) {
                return ADS_ERROR_NT(ntstatus);
        }
-#endif
        return ADS_SUCCESS;
 }
diff --git a/librpc/ndr/libndr.h b/librpc/ndr/libndr.h
index ca3710b..1f65ab4 100644
--- a/librpc/ndr/libndr.h
+++ b/librpc/ndr/libndr.h
@@ -27,10 +27,8 @@
 
 #include <talloc.h>
 #include <sys/time.h>
-#if _SAMBA_BUILD_ == 4
 #include "../lib/util/util.h" /* for discard_const */
 #include "../lib/util/charset/charset.h"
-#endif
 
 /*
   this provides definitions for the libcli/rpc/ MSRPC library
diff --git a/librpc/ndr/ndr.c b/librpc/ndr/ndr.c
index 56d1fab..7cb6e21 100644
--- a/librpc/ndr/ndr.c
+++ b/librpc/ndr/ndr.c
@@ -29,9 +29,6 @@
 #include "includes.h"
 #include "librpc/ndr/libndr.h"
 #include "../lib/util/dlinklist.h"
-#if _SAMBA_BUILD_ == 4
-#include "param/param.h"
-#endif
 
 #define NDR_BASE_MARSHALL_SIZE 1024
 
diff --git a/librpc/ndr/ndr_spoolss_buf.c b/librpc/ndr/ndr_spoolss_buf.c
index 14fb222..8104ffd 100644
--- a/librpc/ndr/ndr_spoolss_buf.c
+++ b/librpc/ndr/ndr_spoolss_buf.c
@@ -25,9 +25,6 @@
 #include "includes.h"
 #include "librpc/gen_ndr/ndr_spoolss.h"
 #include "librpc/gen_ndr/ndr_security.h"
-#if (_SAMBA_BUILD_ >= 4)
-#include "param/param.h"
-#endif
 
 #define NDR_SPOOLSS_PUSH_ENUM_IN(fn) do { \
        if (!r->in.buffer && r->in.offered != 0) {\
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 08d5d96..ac29b7d 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -22,11 +22,6 @@
 
 #include "../replace/replace.h"
 
-#if _SAMBA_BUILD_ == 4
-# undef _SAMBA_BUILD_
-# define _SAMBA_BUILD_ 3
-#endif
-
 /* make sure we have included the correct config.h */
 #ifndef NO_CONFIG_H /* for some tests */
 #ifndef CONFIG_H_IS_FROM_SAMBA
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 4319a10..d41d363 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -1085,14 +1085,6 @@ struct bitmap {
 #define FILE_WAS_CREATED 2
 #define FILE_WAS_OVERWRITTEN 3
 
-/* File type flags */
-#define FILE_TYPE_DISK  0
-#define FILE_TYPE_BYTE_MODE_PIPE 1
-#define FILE_TYPE_MESSAGE_MODE_PIPE 2
-#define FILE_TYPE_PRINTER 3
-#define FILE_TYPE_COMM_DEVICE 4
-#define FILE_TYPE_UNKNOWN 0xFFFF
-
 /* Flag for NT transact rename call. */
 #define RENAME_REPLACE_IF_EXISTS 1
 
@@ -1229,18 +1221,6 @@ 
http://msdn.microsoft.com/en-us/library/cc246334(PROT.13).aspx
 #define CAP_UNIX             0x800000 /* Capabilities for UNIX extensions. 
Created by HP. */
 #define CAP_EXTENDED_SECURITY 0x80000000
 
-/* protocol types. It assumes that higher protocols include lower protocols
-   as subsets */
-enum protocol_types {
-       PROTOCOL_NONE,
-       PROTOCOL_CORE,
-       PROTOCOL_COREPLUS,
-       PROTOCOL_LANMAN1,
-       PROTOCOL_LANMAN2,
-       PROTOCOL_NT1,
-       PROTOCOL_SMB2
-};
-
 /* printing types */
 enum printing_types {PRINT_BSD,PRINT_SYSV,PRINT_AIX,PRINT_HPUX,
                     PRINT_QNX,PRINT_PLP,PRINT_LPRNG,PRINT_SOFTQ,
diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h
index 40813f3..cb8e81c 100644
--- a/source4/libcli/raw/libcliraw.h
+++ b/source4/libcli/raw/libcliraw.h
@@ -22,6 +22,7 @@
 #ifndef __LIBCLI_RAW_H__
 #define __LIBCLI_RAW_H__
 
+#include "libcli/smb/smb_common.h"
 #include "libcli/raw/request.h"
 #include "librpc/gen_ndr/nbt.h"
 
diff --git a/source4/libcli/raw/smb.h b/source4/libcli/raw/smb.h
index 008ab57..c165840 100644
--- a/source4/libcli/raw/smb.h
+++ b/source4/libcli/raw/smb.h
@@ -381,14 +381,6 @@
 #define FILE_WAS_CREATED 2
 #define FILE_WAS_OVERWRITTEN 3
 
-/* File type flags */
-#define FILE_TYPE_DISK  0
-#define FILE_TYPE_BYTE_MODE_PIPE 1
-#define FILE_TYPE_MESSAGE_MODE_PIPE 2
-#define FILE_TYPE_PRINTER 3
-#define FILE_TYPE_COMM_DEVICE 4
-#define FILE_TYPE_UNKNOWN 0xFFFF
-
 /* Flag for NT transact rename call. */
 #define RENAME_REPLACE_IF_EXISTS 1
 
diff --git a/wscript b/wscript
index 32c1c80..0b5e68f 100755
--- a/wscript
+++ b/wscript
@@ -115,12 +115,8 @@ def configure(conf):
     # allows us to find problems on our development hosts faster.
     # It also results in faster load time.
 
-    # However, until the source3 waf build settles down, this needs to
-    # be disabled, as the bugs mentioned above are hitting too many of
-    # our users
-
-    #if sys.platform != "openbsd4":
-    #    conf.env.asneeded_ldflags = conf.ADD_LDFLAGS('-Wl,--as-needed', 
testflags=True)
+    if sys.platform != "openbsd4":
+        conf.env.asneeded_ldflags = conf.ADD_LDFLAGS('-Wl,--as-needed', 
testflags=True)
 
     if not conf.CHECK_NEED_LC("-lc not needed"):
         conf.ADD_LDFLAGS('-lc', testflags=False)
diff --git a/wscript_build b/wscript_build
index a771838..2e75853 100644
--- a/wscript_build
+++ b/wscript_build
@@ -24,9 +24,6 @@ bld.env.build_public_headers = 'include/public'
 # compilation, so they are safe
 bld.env.public_headers_skip = ['param/param_proto.h', 'lib/ldb_compat.h']
 
-# force headers to use SAMBA4 rules
-bld.env.public_headers_replace = { '#if _SAMBA_BUILD_ == 4' : '#if 1 /* 
_SAMBA_BUILD_ == 4 */' }
-
 samba_version.load_version(bld.env, is_install=bld.is_install)
 bld.SAMBA_MKVERSION('version.h')
 


-- 
Samba Shared Repository

Reply via email to