Merge branch 'master' of ssh://git.samba.org/data/git/samba
authorAndrew Tridgell <tridge@samba.org>
Thu, 26 Mar 2009 22:32:43 +0000 (09:32 +1100)
committerAndrew Tridgell <tridge@samba.org>
Thu, 26 Mar 2009 22:32:43 +0000 (09:32 +1100)
26 files changed:
lib/util/fault.m4
libcli/security/config.mk
libcli/security/display_sec.c [moved from source3/lib/display_sec.c with 80% similarity]
libcli/util/doserr.c
libcli/util/werror.h
selftest/SocketWrapper.pm
selftest/Subunit.pm
selftest/output/buildfarm.pm
selftest/output/html.pm
selftest/output/plain.pm
selftest/selftest.pl
source3/Makefile.in
source3/lib/util_file.c
source3/locking/locking.c
source3/nmbd/nmbd_elections.c
source3/samba4.m4
source4/auth/config.m4
source4/auth/credentials/credentials_krb5.h
source4/auth/kerberos/clikrb5.c
source4/build/m4/public.m4
source4/configure.ac
source4/heimdal_build/replace.c
source4/heimdal_build/roken.h
source4/kdc/kdc.c
source4/libcli/security/config.mk
source4/min_versions.m4

index bac553a1583c3dd63522ee2a7658766073f61240..c22976998ed55b3a893c8c40ed3c34d786cfcea9 100644 (file)
@@ -9,6 +9,8 @@ if test x"$ac_cv_header_execinfo_h" = x"yes" -a x"$ac_cv_func_ext_backtrace" = x
        EXECINFO_CPPFLAGS="$CPPFLAGS"
        EXECINFO_LDFLAGS="$LDFLAGS"
        LIB_REMOVE_USR_LIB(EXECINFO_LDFLAGS)
+       CFLAGS_REMOVE_USR_INCLUDE(EXECINFO_CFLAGS)
+       CFLAGS_REMOVE_USR_INCLUDE(EXECINFO_CPPFLAGS)
 else
        SMB_ENABLE(EXECINFO,NO)
 fi
index 56d8e138ff1c15a4fb8bfc3150c01b2ba563d66e..7ade01510c4061e321cdd68bde15d6ca83a01e33 100644 (file)
@@ -2,4 +2,4 @@
 PRIVATE_DEPENDENCIES = TALLOC
 
 LIBSECURITY_COMMON_OBJ_FILES = $(addprefix $(libclicommonsrcdir)/security/, \
-                                       dom_sid.o)
+                                       dom_sid.o display_sec.o secace.o secacl.o)
similarity index 80%
rename from source3/lib/display_sec.c
rename to libcli/security/display_sec.c
index fe1ae77eddfe111a1638c37cafa0cd4e66a44369..bec657da868756d393aaedeeb73b09d5070d0edb 100644 (file)
 */
 
 #include "includes.h"
+#include "librpc/gen_ndr/security.h"
+#include "libcli/security/secace.h"
+#include "libcli/security/dom_sid.h"
+#include "librpc/ndr/libndr.h"
 
 /****************************************************************************
 convert a security permissions into a string
 ****************************************************************************/
 
-char *get_sec_mask_str(TALLOC_CTX *ctx, uint32 type)
+char *get_sec_mask_str(TALLOC_CTX *ctx, uint32_t type)
 {
        char *typestr = talloc_strdup(ctx, "");
 
@@ -32,77 +36,77 @@ char *get_sec_mask_str(TALLOC_CTX *ctx, uint32 type)
                return NULL;
        }
 
-       if (type & GENERIC_ALL_ACCESS) {
+       if (type & SEC_GENERIC_ALL) {
                typestr = talloc_asprintf_append(typestr,
                                "Generic all access ");
                if (!typestr) {
                        return NULL;
                }
        }
-       if (type & GENERIC_EXECUTE_ACCESS) {
+       if (type & SEC_GENERIC_EXECUTE) {
                typestr = talloc_asprintf_append(typestr,
                                "Generic execute access");
                if (!typestr) {
                        return NULL;
                }
        }
-       if (type & GENERIC_WRITE_ACCESS) {
+       if (type & SEC_GENERIC_WRITE) {
                typestr = talloc_asprintf_append(typestr,
                                "Generic write access ");
                if (!typestr) {
                        return NULL;
                }
        }
-       if (type & GENERIC_READ_ACCESS) {
+       if (type & SEC_GENERIC_READ) {
                typestr = talloc_asprintf_append(typestr,
                                "Generic read access ");
                if (!typestr) {
                        return NULL;
                }
        }
-       if (type & MAXIMUM_ALLOWED_ACCESS) {
+       if (type & SEC_FLAG_MAXIMUM_ALLOWED) {
                typestr = talloc_asprintf_append(typestr,
                                "MAXIMUM_ALLOWED_ACCESS ");
                if (!typestr) {
                        return NULL;
                }
        }
-       if (type & SYSTEM_SECURITY_ACCESS) {
+       if (type & SEC_FLAG_SYSTEM_SECURITY) {
                typestr = talloc_asprintf_append(typestr,
                                "SYSTEM_SECURITY_ACCESS ");
                if (!typestr) {
                        return NULL;
                }
        }
-       if (type & SYNCHRONIZE_ACCESS) {
+       if (type & SEC_STD_SYNCHRONIZE) {
                typestr = talloc_asprintf_append(typestr,
                                "SYNCHRONIZE_ACCESS ");
                if (!typestr) {
                        return NULL;
                }
        }
-       if (type & WRITE_OWNER_ACCESS) {
+       if (type & SEC_STD_WRITE_OWNER) {
                typestr = talloc_asprintf_append(typestr,
                                "WRITE_OWNER_ACCESS ");
                if (!typestr) {
                        return NULL;
                }
        }
-       if (type & WRITE_DAC_ACCESS) {
+       if (type & SEC_STD_WRITE_DAC) {
                typestr = talloc_asprintf_append(typestr,
                                "WRITE_DAC_ACCESS ");
                if (!typestr) {
                        return NULL;
                }
        }
-       if (type & READ_CONTROL_ACCESS) {
+       if (type & SEC_STD_READ_CONTROL) {
                typestr = talloc_asprintf_append(typestr,
                                "READ_CONTROL_ACCESS ");
                if (!typestr) {
                        return NULL;
                }
        }
-       if (type & DELETE_ACCESS) {
+       if (type & SEC_STD_DELETE) {
                typestr = talloc_asprintf_append(typestr,
                                "DELETE_ACCESS ");
                if (!typestr) {
@@ -110,7 +114,7 @@ char *get_sec_mask_str(TALLOC_CTX *ctx, uint32 type)
                }
        }
 
-       printf("\t\tSpecific bits: 0x%lx\n", (unsigned long)type&SPECIFIC_RIGHTS_MASK);
+       printf("\t\tSpecific bits: 0x%lx\n", (unsigned long)type&SEC_MASK_SPECIFIC);
 
        return typestr;
 }
@@ -122,7 +126,7 @@ void display_sec_access(uint32_t *info)
 {
        char *mask_str = get_sec_mask_str(NULL, *info);
        printf("\t\tPermissions: 0x%x: %s\n", *info, mask_str ? mask_str : "");
-       TALLOC_FREE(mask_str);
+       talloc_free(mask_str);
 }
 
 /****************************************************************************
@@ -170,9 +174,9 @@ static void disp_sec_ace_object(struct security_ace_object *object)
 /****************************************************************************
  display sec_ace structure
  ****************************************************************************/
-void display_sec_ace(SEC_ACE *ace)
+void display_sec_ace(struct security_ace *ace)
 {
-       fstring sid_str;
+       char *sid_str;
 
        printf("\tACE\n\t\ttype: ");
        switch (ace->type) {
@@ -211,8 +215,9 @@ void display_sec_ace(SEC_ACE *ace)
        printf(" (%d) flags: 0x%02x ", ace->type, ace->flags);
        display_sec_ace_flags(ace->flags);
        display_sec_access(&ace->access_mask);
-       sid_to_fstring(sid_str, &ace->trustee);
+       sid_str = dom_sid_string(NULL, &ace->trustee);
        printf("\t\tSID: %s\n\n", sid_str);
+       talloc_free(sid_str);
 
        if (sec_ace_object(ace->type)) {
                disp_sec_ace_object(&ace->object.object);
@@ -223,7 +228,7 @@ void display_sec_ace(SEC_ACE *ace)
 /****************************************************************************
  display sec_acl structure
  ****************************************************************************/
-void display_sec_acl(SEC_ACL *sec_acl)
+void display_sec_acl(struct security_acl *sec_acl)
 {
        int i;
 
@@ -238,54 +243,52 @@ void display_sec_acl(SEC_ACL *sec_acl)
        }
 }
 
-void display_acl_type(uint16 type)
+void display_acl_type(uint16_t type)
 {
-       fstring typestr="";
-
-       typestr[0] = 0;
+       printf("type: 0x%04x: ", type);
 
        if (type & SEC_DESC_OWNER_DEFAULTED)    /* 0x0001 */
-               fstrcat(typestr, "SEC_DESC_OWNER_DEFAULTED ");
+               printf("SEC_DESC_OWNER_DEFAULTED ");
        if (type & SEC_DESC_GROUP_DEFAULTED)    /* 0x0002 */
-               fstrcat(typestr, "SEC_DESC_GROUP_DEFAULTED ");
+               printf("SEC_DESC_GROUP_DEFAULTED ");
        if (type & SEC_DESC_DACL_PRESENT)       /* 0x0004 */
-               fstrcat(typestr, "SEC_DESC_DACL_PRESENT ");
+               printf("SEC_DESC_DACL_PRESENT ");
        if (type & SEC_DESC_DACL_DEFAULTED)     /* 0x0008 */
-               fstrcat(typestr, "SEC_DESC_DACL_DEFAULTED ");
+               printf("SEC_DESC_DACL_DEFAULTED ");
        if (type & SEC_DESC_SACL_PRESENT)       /* 0x0010 */
-               fstrcat(typestr, "SEC_DESC_SACL_PRESENT ");
+               printf("SEC_DESC_SACL_PRESENT ");
        if (type & SEC_DESC_SACL_DEFAULTED)     /* 0x0020 */
-               fstrcat(typestr, "SEC_DESC_SACL_DEFAULTED ");
+               printf("SEC_DESC_SACL_DEFAULTED ");
        if (type & SEC_DESC_DACL_TRUSTED)       /* 0x0040 */
-               fstrcat(typestr, "SEC_DESC_DACL_TRUSTED ");
+               printf("SEC_DESC_DACL_TRUSTED ");
        if (type & SEC_DESC_SERVER_SECURITY)    /* 0x0080 */
-               fstrcat(typestr, "SEC_DESC_SERVER_SECURITY ");
+               printf("SEC_DESC_SERVER_SECURITY ");
        if (type & SEC_DESC_DACL_AUTO_INHERIT_REQ) /* 0x0100 */
-               fstrcat(typestr, "SEC_DESC_DACL_AUTO_INHERIT_REQ ");
+               printf("SEC_DESC_DACL_AUTO_INHERIT_REQ ");
        if (type & SEC_DESC_SACL_AUTO_INHERIT_REQ) /* 0x0200 */
-               fstrcat(typestr, "SEC_DESC_SACL_AUTO_INHERIT_REQ ");
+               printf("SEC_DESC_SACL_AUTO_INHERIT_REQ ");
        if (type & SEC_DESC_DACL_AUTO_INHERITED) /* 0x0400 */
-               fstrcat(typestr, "SEC_DESC_DACL_AUTO_INHERITED ");
+               printf("SEC_DESC_DACL_AUTO_INHERITED ");
        if (type & SEC_DESC_SACL_AUTO_INHERITED) /* 0x0800 */
-               fstrcat(typestr, "SEC_DESC_SACL_AUTO_INHERITED ");
+               printf("SEC_DESC_SACL_AUTO_INHERITED ");
        if (type & SEC_DESC_DACL_PROTECTED)     /* 0x1000 */
-               fstrcat(typestr, "SEC_DESC_DACL_PROTECTED ");
+               printf("SEC_DESC_DACL_PROTECTED ");
        if (type & SEC_DESC_SACL_PROTECTED)     /* 0x2000 */
-               fstrcat(typestr, "SEC_DESC_SACL_PROTECTED ");
+               printf("SEC_DESC_SACL_PROTECTED ");
        if (type & SEC_DESC_RM_CONTROL_VALID)   /* 0x4000 */
-               fstrcat(typestr, "SEC_DESC_RM_CONTROL_VALID ");
+               printf("SEC_DESC_RM_CONTROL_VALID ");
        if (type & SEC_DESC_SELF_RELATIVE)      /* 0x8000 */
-               fstrcat(typestr, "SEC_DESC_SELF_RELATIVE ");
+               printf("SEC_DESC_SELF_RELATIVE ");
        
-       printf("type: 0x%04x: %s\n", type, typestr);
+       printf("\n");
 }
 
 /****************************************************************************
  display sec_desc structure
  ****************************************************************************/
-void display_sec_desc(SEC_DESC *sec)
+void display_sec_desc(struct security_descriptor *sec)
 {
-       fstring sid_str;
+       char *sid_str;
 
        if (!sec) {
                printf("NULL\n");
@@ -306,12 +309,14 @@ void display_sec_desc(SEC_DESC *sec)
        }
 
        if (sec->owner_sid) {
-               sid_to_fstring(sid_str, sec->owner_sid);
+               sid_str = dom_sid_string(NULL, sec->owner_sid);
                printf("\tOwner SID:\t%s\n", sid_str);
+               talloc_free(sid_str);
        }
 
        if (sec->group_sid) {
-               sid_to_fstring(sid_str, sec->group_sid);
+               sid_str = dom_sid_string(NULL, sec->group_sid);
                printf("\tGroup SID:\t%s\n", sid_str);
+               talloc_free(sid_str);
        }
 }
index 5104c3ee02968880e72879a84115a55f6d3a572d..1a7422e3f6ee05d2120b43d2dc5d58696ddf4dc9 100644 (file)
@@ -124,6 +124,7 @@ static const struct werror_code_struct dos_errs[] =
        { "WERR_DS_DRA_DB_ERROR", WERR_DS_DRA_DB_ERROR },
        { "WERR_DS_DRA_NO_REPLICA", WERR_DS_DRA_NO_REPLICA },
        { "WERR_DS_DRA_ACCESS_DENIED", WERR_DS_DRA_ACCESS_DENIED },
+       { "WERR_DS_DRA_SOURCE_DISABLED", WERR_DS_DRA_SOURCE_DISABLED },
        { "WERR_DS_DNS_LOOKUP_FAILURE", WERR_DS_DNS_LOOKUP_FAILURE },
        { "WERR_DS_WRONG_LINKED_ATTRIBUTE_SYNTAX", WERR_DS_WRONG_LINKED_ATTRIBUTE_SYNTAX },
        { "WERR_DS_NO_MSDS_INTID", WERR_DS_NO_MSDS_INTID },
index d92232706a61c9916309f84ad5668173bab6cda9..a69587f36177aac8d0bb0e87d01a06c091735185 100644 (file)
@@ -248,6 +248,7 @@ typedef uint32_t WERROR;
 #define WERR_DS_DRA_DB_ERROR W_ERROR(0x00002103)
 #define WERR_DS_DRA_NO_REPLICA W_ERROR(0x00002104)
 #define WERR_DS_DRA_ACCESS_DENIED W_ERROR(0x00002105)
+#define WERR_DS_DRA_SOURCE_DISABLED W_ERROR(0x00002108)
 #define WERR_DS_DNS_LOOKUP_FAILURE W_ERROR(0x0000214c)
 #define WERR_DS_WRONG_LINKED_ATTRIBUTE_SYNTAX W_ERROR(0x00002150)
 #define WERR_DS_NO_MSDS_INTID W_ERROR(0x00002194)
index e63605b8dfdbbf165303daf5434de121a7e78ccc..ef8058da79481de205a60db10c3b8edc651291cb 100644 (file)
@@ -1,7 +1,21 @@
 #!/usr/bin/perl
 # Bootstrap Samba and run a number of tests against it.
 # Copyright (C) 2005-2007 Jelmer Vernooij <jelmer@samba.org>
-# Published under the GNU GPL, v3 or later.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+
 
 package SocketWrapper;
 
index 05e51da541206ad2c475de4be255fb9c8cc2dc65..19af636d0bacbaf71e21d4528c3f6024cf1857ba 100644 (file)
@@ -1,3 +1,19 @@
+# Simple Perl module for parsing the Subunit protocol
+# Copyright (C) 2008 Jelmer Vernooij <jelmer@samba.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
 package Subunit;
 
 require Exporter;
index cee6c1e63a8f4609eaabd36b19923eb8420f5289..77ea26621b27b491111b1f8f42fad2b91b7f3327 100644 (file)
@@ -1,4 +1,19 @@
 #!/usr/bin/perl
+# Buildfarm output for selftest
+# Copyright (C) 2008 Jelmer Vernooij <jelmer@samba.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 package output::buildfarm;
 
index 1049527129c50f3296f9daa2be4bc5c3f218d574..e490765d06adee5ef53cf54ac0f3e43644a300fa 100644 (file)
@@ -1,5 +1,19 @@
 #!/usr/bin/perl
-
+# HTML output for selftest
+# Copyright (C) 2008 Jelmer Vernooij <jelmer@samba.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 package output::html;
 use Exporter;
 @ISA = qw(Exporter);
index 82a73ab932426c0b9ce194ddfd7037b2eee3869c..5312a9e27b3416463b47d7f9f057dd737293592f 100644 (file)
@@ -1,5 +1,19 @@
 #!/usr/bin/perl
-
+# Plain text output for selftest
+# Copyright (C) 2008 Jelmer Vernooij <jelmer@samba.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 package output::plain;
 use Exporter;
 @ISA = qw(Exporter);
index ef4c385d33fd0a53713af5af48fb7073830367e7..36535235413fbb627f5f71d4eb2e2d2cffea8926 100755 (executable)
@@ -2,7 +2,19 @@
 # Bootstrap Samba and run a number of tests against it.
 # Copyright (C) 2005-2008 Jelmer Vernooij <jelmer@samba.org>
 # Copyright (C) 2007-2009 Stefan Metzmacher <metze@samba.org>
-# Published under the GNU GPL, v3 or later.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 =pod
 
index 1c9c0c120484533cf22abf9e16370fecf41fd45a..fd753128d4c31070053ad820b2d1ed6f853e0459 100644 (file)
@@ -831,7 +831,7 @@ PDBEDIT_OBJ = utils/pdbedit.o $(PASSWD_UTIL_OBJ) $(PARAM_OBJ) $(PASSDB_OBJ) @LIB
 
 SMBGET_OBJ = utils/smbget.o $(POPT_LIB_OBJ) $(LIBSMBCLIENT_OBJ1) @LIBWBCLIENT_STATIC@
 
-DISPLAY_SEC_OBJ= lib/display_sec.o
+DISPLAY_SEC_OBJ= ../libcli/security/display_sec.o
 
 RPCCLIENT_OBJ1 = rpcclient/rpcclient.o rpcclient/cmd_lsarpc.o \
                 rpcclient/cmd_samr.o rpcclient/cmd_spoolss.o \
index c5a9b7c29afdf59a52ddb711f5ee5f676ee79e99..50ff844762446e462452d23df56bc5b94d4a05a8 100644 (file)
@@ -39,7 +39,7 @@ static char *file_pload(const char *syscmd, size_t *size)
        total = 0;
 
        while ((n = read(fd, buf, sizeof(buf))) > 0) {
-               p = (char *)SMB_REALLOC(p, total + n + 1);
+               p = talloc_realloc(NULL, p, char, total + n + 1);
                if (!p) {
                        DEBUG(0,("file_pload: failed to expand buffer!\n"));
                        close(fd);
index bafb89522affa7752921145fb829dd2f83b093e1..70841225a70db04dc54e4f75f10b538997e3e2ec 100644 (file)
@@ -887,7 +887,8 @@ struct share_mode_lock *fetch_share_mode_unlocked(TALLOC_CTX *mem_ctx,
        }
 
        if (!fill_share_mode_lock(lck, id, servicepath, fname, data, NULL)) {
-               DEBUG(3, ("fill_share_mode_lock failed\n"));
+               DEBUG(10, ("fetch_share_mode_unlocked: no share_mode record "
+                          "around (file not open)\n"));
                TALLOC_FREE(lck);
                return NULL;
        }
index b50d215b91d57c37b5287ceb9f076782c932561a..1ed64f4059f7ce18c42b170e3470a0571c941e69 100644 (file)
@@ -130,9 +130,6 @@ void check_master_browser_exists(time_t t)
        struct subnet_record *subrec;
        const char *workgroup_name = lp_workgroup();
 
-       if (!lastrun)
-               lastrun = t;
-
        if (t < (lastrun + (CHECK_TIME_MST_BROWSE * 60)))
                return;
 
index b5c7c74689ac740a896e8cd261399530440bbc59..568283cd87257edb601206b264e7e699a8e4615e 100644 (file)
@@ -69,14 +69,14 @@ AC_CONFIG_FILES(../source4/librpc/dcerpc_atsvc.pc)
 
 m4_include(../source4/min_versions.m4)
 
-SMB_EXT_LIB_FROM_PKGCONFIG(LIBTALLOC, talloc >= $TALLOC_MIN_VERSION,
+SMB_EXT_LIB_FROM_PKGCONFIG(LIBTALLOC, talloc >= TALLOC_MIN_VERSION,
        [],
        [
                SMB_INCLUDE_MK(../lib/talloc/config.mk)
        ]
 )
 
-SMB_EXT_LIB_FROM_PKGCONFIG(LIBTDB, tdb >= $TDB_MIN_VERSION,
+SMB_EXT_LIB_FROM_PKGCONFIG(LIBTDB, tdb >= TDB_MIN_VERSION,
        [],
        [
                m4_include(../lib/tdb/libtdb.m4)
@@ -86,13 +86,13 @@ SMB_EXT_LIB_FROM_PKGCONFIG(LIBTDB, tdb >= $TDB_MIN_VERSION,
 
 SMB_INCLUDE_MK(../lib/tdb/python.mk) 
 
-SMB_EXT_LIB_FROM_PKGCONFIG(LIBTEVENT, tevent = $TEVENT_REQUIRED_VERSION,
+SMB_EXT_LIB_FROM_PKGCONFIG(LIBTEVENT, tevent = TEVENT_REQUIRED_VERSION,
        [],[m4_include(../lib/tevent/samba.m4)]
 )
 
 SMB_INCLUDE_MK(../lib/tevent/python.mk) 
 
-SMB_EXT_LIB_FROM_PKGCONFIG(LIBLDB, ldb = $LDB_REQUIRED_VERSION,
+SMB_EXT_LIB_FROM_PKGCONFIG(LIBLDB, ldb = LDB_REQUIRED_VERSION,
        [
                SMB_INCLUDE_MK(lib/ldb/ldb_ildap/config.mk)
                SMB_INCLUDE_MK(lib/ldb/tools/config.mk)
index fb9ee58c60faeef47b527fb2b4374c826150deb4..9735b17caca07a0190edea5134f00aba736de7db 100644 (file)
@@ -28,6 +28,8 @@ if test x"$ac_cv_header_sasl_sasl_h" = x"yes" -a x"$ac_cv_lib_ext_sasl2_sasl_cli
        SASL_CPPFLAGS="$CPPFLAGS"
        SASL_LDFLAGS="$LDFLAGS"
        LIB_REMOVE_USR_LIB(SASL_LDFLAGS)
+       CFLAGS_REMOVE_USR_INCLUDE(SASL_CPPFLAGS)
+       CFLAGS_REMOVE_USR_INCLUDE(SASL_CFLAGS)
 else
        SMB_ENABLE(cyrus_sasl,NO)
 fi
index 0d0e9f330fcbcabcb4e72c75da800e031178fd42..5e56752eb4ac40c0b5c1e246b4c0374bd7ff2477 100644 (file)
@@ -24,6 +24,7 @@
 #define __CREDENTIALS_KRB5_H__
 
 #include <gssapi/gssapi.h>
+#include <gssapi/gssapi_krb5.h>
 #include <krb5.h>
 
 struct gssapi_creds_container {
index cf87d13cf2a53ca43a259f0d3ca7bc0af74231f4..68e7eb90cc19540198c3c1405ca17b80c9f0926d 100644 (file)
 
  void kerberos_free_data_contents(krb5_context context, krb5_data *pdata)
 {
-#if defined(HAVE_KRB5_FREE_DATA_CONTENTS)
        if (pdata->data) {
-               krb5_free_data_contents(context, pdata);
+               krb5_data_free(pdata);
        }
-#else
-       SAFE_FREE(pdata->data);
-#endif
 }
 
  krb5_error_code smb_krb5_kt_free_entry(krb5_context context, krb5_keytab_entry *kt_entry)
index bd98a400be488e4af6ac5c0c86bd9c24126e0f9b..2bf63f0ca691ca5714825955e8972d4610f24735 100644 (file)
@@ -102,10 +102,12 @@ AC_DEFUN([SMB_EXT_LIB_FROM_PKGCONFIG],
 
                                ac_cv_$1_libs_only_other="`$PKG_CONFIG --libs-only-other '$2'` `$PKG_CONFIG --libs-only-L '$2'`"
                                LIB_REMOVE_USR_LIB(ac_cv_$1_libs_only_other)
+                               ac_cv_$1_includedir_only="`$PKG_CONFIG --cflags-only-I '$2'`"
+                               CFLAGS_REMOVE_USR_INCLUDE(ac_cv_$1_includedir_only)
                                SMB_EXT_LIB($1, 
                                        [`$PKG_CONFIG --libs-only-l '$2'`], 
                                        [`$PKG_CONFIG --cflags-only-other '$2'`],
-                                       [`$PKG_CONFIG --cflags-only-I '$2'`],
+                                       [$ac_cv_$1_includedir_only],
                                        [$ac_cv_$1_libs_only_other])
                                ac_cv_$1_found=yes
 
index 065a3300cab5d82ffc142be8b8c97980424ee1aa..3c23f27d6879a2c63ce20b8207f7f9a4b2d8b522 100644 (file)
@@ -44,14 +44,14 @@ AC_CONFIG_FILES(librpc/dcerpc_atsvc.pc)
 
 m4_include(min_versions.m4)
 
-SMB_INCLUDED_LIB_PKGCONFIG(LIBTALLOC, talloc >= $TALLOC_MIN_VERSION, [],
+SMB_INCLUDED_LIB_PKGCONFIG(LIBTALLOC, talloc >= TALLOC_MIN_VERSION, [],
        [
                m4_include(../lib/talloc/libtalloc.m4)
                SMB_INCLUDE_MK(../lib/talloc/config.mk)
        ]
 )
 
-SMB_INCLUDED_LIB_PKGCONFIG(LIBTDB, tdb >= $TDB_MIN_VERSION,
+SMB_INCLUDED_LIB_PKGCONFIG(LIBTDB, tdb >= TDB_MIN_VERSION,
        [],
        [
                m4_include(../lib/tdb/libtdb.m4)
@@ -67,7 +67,7 @@ SMB_INCLUDED_LIB_PKGCONFIG(LIBTEVENT, tevent = TEVENT_REQUIRED_VERSION,
 
 SMB_INCLUDE_MK(../lib/tevent/python.mk) 
 
-SMB_INCLUDED_LIB_PKGCONFIG(LIBLDB, ldb = $LDB_REQUIRED_VERSION,
+SMB_INCLUDED_LIB_PKGCONFIG(LIBLDB, ldb = LDB_REQUIRED_VERSION,
        [
                SMB_INCLUDE_MK(lib/ldb/ldb_ildap/config.mk)
                SMB_INCLUDE_MK(lib/ldb/tools/config.mk)
index 41309fea6eccaf94f7d62808b8d322098af6465e..ba43dd94952737ef6fd0c67d95194336e9d526ce 100644 (file)
@@ -84,3 +84,7 @@
        return -1;
 }
 #endif
+
+const char *heimdal_version = "samba-internal-heimdal";
+const char *heimdal_long_version = "samba-interal-heimdal";
+
index 3edeb2fb2e604ef768e485131b5420ad9609985b..e3edd53872b4458f028f47f309d5b21bf6550767 100644 (file)
 #define HAVE_STRNDUP
 #endif
 
+#ifndef HAVE_STRLCPY
+#define HAVE_STRLCPY
+#endif
+
+#ifndef HAVE_STRLCAT
+#define HAVE_STRLCAT
+#endif
+
+#ifndef HAVE_STRCASECMP
+#define HAVE_STRCASECMP
+#endif
+
+#ifndef HAVE_MKSTEMP
+#define HAVE_MKSTEMP
+#endif
+
 #ifndef HAVE_SETENV
 #define HAVE_SETENV
 #endif
 #undef SOCKET_WRAPPER_REPLACE
 #include "heimdal/lib/roken/roken.h.in"
 
+extern const char *heimdal_version;
+extern const char *heimdal_long_version;
+
 #endif
index 1cfe9852f0532a22fd396f60cce0ecb558ea1408..3d1144106213fe75f7d254ef3fa870a04b8d1b54 100644 (file)
@@ -345,7 +345,7 @@ static bool kdc_process(struct kdc_server *kdc,
        }
        if (k5_reply.length) {
                *reply = data_blob_talloc(mem_ctx, k5_reply.data, k5_reply.length);
-               krb5_free_data_contents(kdc->smb_krb5_context->krb5_context, &k5_reply);
+               krb5_data_free(&k5_reply);
        } else {
                *reply = data_blob(NULL, 0);    
        }
index d6d9ad5545e19764e7f5b3c9c2e45682794dceb2..9d23fe95885a95ec3b611501a02e6c231d61bd8f 100644 (file)
@@ -4,7 +4,5 @@ PUBLIC_DEPENDENCIES = LIBNDR LIBSECURITY_COMMON
 LIBSECURITY_OBJ_FILES = $(addprefix $(libclisrcdir)/security/, \
                                           security_token.o security_descriptor.o \
                                           access_check.o privilege.o sddl.o) \
-                                          ../libcli/security/secace.o \
-                                          ../libcli/security/secacl.o
 
 $(eval $(call proto_header_template,$(libclisrcdir)/security/proto.h,$(LIBSECURITY_OBJ_FILES:.o=.c)))
index eaefbd5148f0df44f59027f3f179f5a7392ef1d7..1dd3501b992f09d1ac7538776b800b636689a0ec 100644 (file)
@@ -1,6 +1,6 @@
 # Minimum and exact required versions for various libraries 
 # if we use the ones installed in the system.
-TDB_MIN_VERSION=1.1.3
-TALLOC_MIN_VERSION=1.3.0
-LDB_REQUIRED_VERSION=0.9.3
-TEVENT_REQUIRED_VERSION=0.9.5
+define(TDB_MIN_VERSION,1.1.3)
+define(TALLOC_MIN_VERSION,1.3.0)
+define(LDB_REQUIRED_VERSION,0.9.3)
+define(TEVENT_REQUIRED_VERSION,0.9.5)