summaryrefslogtreecommitdiff
path: root/source3/lib/util.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-06-08 22:10:34 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:57:08 -0500
commitfed660877c16562265327c6093ea645cf4176b5c (patch)
treee92ae1356542ba095d806bbe1093fa56fbc8ddcc /source3/lib/util.c
parent66bb4f03c3466205488f72e4878e8801c5bbb295 (diff)
downloadsamba-fed660877c16562265327c6093ea645cf4176b5c.tar.gz
r7415: * big change -- volker's new async winbindd from trunk
(This used to be commit a0ac9a8ffd4af31a0ebc423b4acbb2f043d865b8)
Diffstat (limited to 'source3/lib/util.c')
-rw-r--r--source3/lib/util.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 00b08af7c39..297eeb4d030 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -2668,6 +2668,29 @@ void name_to_fqdn(fstring fqdn, const char *name)
}
}
+/**********************************************************************
+ Extension to talloc_get_type: Abort on type mismatch
+***********************************************************************/
+
+void *talloc_check_name_abort(const void *ptr, const char *name)
+{
+ void *result;
+
+ if (ptr == NULL)
+ return NULL;
+
+ result = talloc_check_name(ptr, name);
+ if (result != NULL)
+ return result;
+
+ DEBUG(0, ("Talloc type mismatch, expected %s, got %s\n",
+ name, talloc_get_name(ptr)));
+ smb_panic("aborting");
+ /* Keep the compiler happy */
+ return NULL;
+}
+
+
#ifdef __INSURE__
/*******************************************************************