summaryrefslogtreecommitdiff
path: root/source3/lib/util.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-10-11 07:42:52 +0000
committerAndrew Tridgell <tridge@samba.org>2001-10-11 07:42:52 +0000
commit81f56139b6964ddbe2c03232475f87f474136490 (patch)
tree1213ad9ba9f34506f2b4bbc38d925a3bcda2f5de /source3/lib/util.c
parent76745313b16c07092b0198da4d4fc05b38e600f7 (diff)
downloadsamba-81f56139b6964ddbe2c03232475f87f474136490.tar.gz
samba-81f56139b6964ddbe2c03232475f87f474136490.tar.bz2
samba-81f56139b6964ddbe2c03232475f87f474136490.zip
initial kerberos/ADS/SPNEGO support in libsmb and smbclient. To
activate you need to: - install krb5 libraries - run configure - build smbclient - run kinit to get a TGT - run smbclient with the -k option to choose kerberos auth (This used to be commit d33057585644e1337bac743e25ed7653bfb39eef)
Diffstat (limited to 'source3/lib/util.c')
-rw-r--r--source3/lib/util.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 62e08333dd..20422a00c7 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -1893,6 +1893,32 @@ BOOL unix_wild_match(char *pattern, char *string)
return unix_do_match(p2, s2) == 0;
}
+/*******************************************************************
+ construct a data blob, must be freed with data_blob_free()
+*******************************************************************/
+DATA_BLOB data_blob(void *p, size_t length)
+{
+ DATA_BLOB ret;
+
+ if (!p) {
+ ZERO_STRUCT(ret);
+ return ret;
+ }
+
+ ret.data = memdup(p, length);
+ ret.length = length;
+ return ret;
+}
+
+/*******************************************************************
+free a data blob
+*******************************************************************/
+void data_blob_free(DATA_BLOB d)
+{
+ SAFE_FREE(d.data);
+}
+
+
#ifdef __INSURE__
/*******************************************************************