1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-14 12:23:52 +03:00
Commit Graph

50 Commits

Author SHA1 Message Date
Andrew Tridgell
6e7754abd0 r4591: - converted the other _p talloc functions to not need _p
- added #if TALLOC_DEPRECATED around the _p functions

- fixes the code that broke from the above

while doing this I fixed quite a number of places that were
incorrectly using the non type-safe talloc functions to use the type
safe ones. Some were even doing multiplies for array allocation, which
is potentially unsafe.
2007-10-10 13:08:30 -05:00
Andrew Tridgell
89b74b5354 r4549: got rid of a lot more uses of plain talloc(), instead using
talloc_size() or talloc_array_p() where appropriate.

also fixed a memory leak in pvfs_copy_file() (failed to free a memory
context)
2007-10-10 13:08:25 -05:00
Andrew Bartlett
14b650c85d r4460: Add a new GENSEC module: gensec_gssapi
(disabled by default, set parametric option: gensec:gssapi=yes to enable).

This module backs directly onto GSSAPI, and allows us to sign and seal
GSSAPI/Krb5 connections in particular.  This avoids me reinventing the
entire GSSAPI wheel.

Currently a lot of things are left as default - we will soon start
specifiying OIDs as well as passwords (it uses the keytab only at the
moment).  Tested with our LDAP-* torture tests against Win2k3.

My hope is to use this module to access the new SPNEGO implementation
in Heimdal, to avoid having to standards-verify our own.

Andrew Bartlett
2007-10-10 13:07:53 -05:00
Andrew Bartlett
13aa88ed65 r4386: Grr, fix copy-and-paste bug.
Andrew Bartlett
2007-10-10 13:07:41 -05:00
Andrew Bartlett
722f59c7c8 r4385: Set the correct target service.
Andrew Bartlett
2007-10-10 13:07:41 -05:00
Stefan Metzmacher
6f3eb7bc03 r4079: implement the gensec_have_feature() correctly by asking
the backend what is actually in use

metze
2007-10-10 13:06:23 -05:00
Andrew Tridgell
eec698254f r4055: fixed more places to use type safe allocation macros 2007-10-10 13:06:20 -05:00
Andrew Tridgell
80d15fa340 r4052: fixed a bunch of code to use the type safe _p allocation macros 2007-10-10 13:06:18 -05:00
Jelmer Vernooij
64826da834 r3733: More build system fixes/features:
- Use .mk files directly (no need for a SMB_*_MK() macro when adding a new SUBSYSTEM, MODULE or BINARY). This allows addition of new modules and subsystems without running configure
 - Add support for generating .dot files with the Samba4 dependency tree (as used by the graphviz and springgraph utilities)
2007-10-10 13:05:47 -05:00
Stefan Metzmacher
9701abfa3a r3585: check sscanf return code
metze
2007-10-10 13:05:35 -05:00
Stefan Metzmacher
4868f1ea85 r3584: fix referral handling
metze
2007-10-10 13:05:35 -05:00
Stefan Metzmacher
1e9c0b68ca r3583: - seperate the ldap client code and the ldap parsing code
(vl: we should only sync the parsing code with trunk)

- use hierachical talloc in the ldap client code

metze
2007-10-10 13:05:35 -05:00
Andrew Tridgell
a7e5bde6be r3475: don't pass a ptr to an enum as a ptr to an int (bug found by tcc) 2007-10-10 13:05:18 -05:00
Andrew Tridgell
b97e395c81 r3463: separated out some more headers (asn_1.h, messages.h, dlinklist.h and ioctl.h) 2007-10-10 13:05:17 -05:00
Andrew Tridgell
7b7477ac42 r3453: - split out the auth and popt includes
- tidied up some of the system includes

- moved a few more structures back from misc.idl to netlogon.idl and samr.idl now that pidl
  knows about inter-IDL dependencies
2007-10-10 13:05:13 -05:00
Andrew Tridgell
6b1f86aea8 r3449: more include file reduction
the ldb part isn't ideal, I will have to think of a better solution
2007-10-10 13:05:13 -05:00
Andrew Tridgell
2e25c71853 r3443: the next stage in the include files re-organisation.
I have created the include/system/ directory, which will contain the
wrappers for the system includes for logical subsystems. So far I have
created include/system/kerberos.h and include/system/network.h, which
contain all the system includes for kerberos code and networking code.
These are the included in subsystems that need kerberos or networking
respectively.

Note that this method avoids the mess of #ifdef HAVE_XXX_H in every C
file, instead each C module includes the include/system/XXX.h file for
the logical system support it needs, and the details are kept isolated
in include/system/

This patch also creates a "struct ipv4_addr" which replaces "struct
in_addr" in our code. That avoids every C file needing to import all
the system networking headers.
2007-10-10 13:05:11 -05:00
Stefan Metzmacher
c730d7d638 r3096: typo
metze
2007-10-10 13:02:20 -05:00
Stefan Metzmacher
f1d8f4bc5d r3094: import all LDAP error codes from the RFC 2251
metze
2007-10-10 13:02:20 -05:00
Andrew Bartlett
9c911b361c r3079: make code more pretty :-)
Andrew Bartlett
2007-10-10 13:01:56 -05:00
Stefan Metzmacher
e23dcb1887 r2884: parse LDAP Control messages
metze
2007-10-10 12:59:42 -05:00
Stefan Metzmacher
cc77baf729 r2861: encode and decode BindRequest/Response correct
and some minor changes
- make ldap_encode/decode_response maore usable

metze
2007-10-10 12:59:40 -05:00
Stefan Metzmacher
1dabd04e26 r2853: add torture test to find the defaultNamingContext on the RootDSE
try a sasl sealed CompareRequest

abartlet: we need to check how SINGING only can work,
          it failed for me:-(

metze
2007-10-10 12:59:38 -05:00
Stefan Metzmacher
778cf6d92b r2851: don't destroy the gensec context it's used for sign and seal
check the result of ldap_receive()

metze
2007-10-10 12:59:38 -05:00
Stefan Metzmacher
4233067921 r2750: decode AbandonRequest correct (untested:-)
metze
2007-10-10 12:59:30 -05:00
Stefan Metzmacher
72dfea2b07 r2747: use DATA_BLOB for attribute values
en/decode CompareRequest/Response correct

metze
2007-10-10 12:59:29 -05:00
Simo Sorce
ddd74dae8e r2695: revert "Del" renaming 2007-10-10 12:59:24 -05:00
Simo Sorce
3d587a7141 r2690: deleted by mistake 2007-10-10 12:59:22 -05:00
Simo Sorce
5ed9a6eb18 r2689: Use consistent naming Del -> Delete
Add delete functionality to ldb simple lda server backend
add some const in ldap.h
2007-10-10 12:59:22 -05:00
Andrew Tridgell
8dc23821c9 r2671: we're getting too many errors caused by the talloc_realloc() API not
taking a context (so when you pass a NULL pointer you end up with
memory in a top level context). Fixed it by changing the API to take a
context. The context is only used if the pointer you are reallocing is
NULL.
2007-10-10 12:59:20 -05:00
Andrew Tridgell
f12ee2f241 r2629: convert gensec to the new talloc model
by making our gensec structures a talloc child of the open connection
we can be sure that it will be destroyed when the connection is
dropped.
2007-10-10 12:59:14 -05:00
Stefan Metzmacher
e942f414c5 r2508: - implemented ldap_decode() for UnbindRequest and ExtendedRequest
- fail when we got a wrong tag in ldap_decode()

metze
2007-10-10 12:59:00 -05:00
Andrew Tridgell
cef08d5789 r2432: more string function updates.
btw, the reason I want to use strncasecmp() instead of StrnCaseCmp()
is that the Samba internal functions are built to deal with
multi-byte, whereas in the cases I am converting we know we are
dealing with solely ascii string constants, so going via the slow
conversion libraries is pointless.
2007-10-10 12:58:52 -05:00
Stefan Metzmacher
492a00d909 r2347: merge LDAP ASN.1 fixes from trunk
metze
2007-10-10 12:58:45 -05:00
Volker Lendecke
53f58c053b r2173: Fix asn1 BOOLEANs. Thanks to Love Hornquist-Astrand.
Volker
2007-10-10 12:58:29 -05:00
Andrew Tridgell
e35bb094c5 r1983: a completely new implementation of talloc
This version does the following:

  1) talloc_free(), talloc_realloc() and talloc_steal() lose their
     (redundent) first arguments

  2) you can use _any_ talloc pointer as a talloc context to allocate
     more memory. This allows you to create complex data structures
     where the top level structure is the logical parent of the next
     level down, and those are the parents of the level below
     that. Then destroy either the lot with a single talloc_free() or
     destroy any sub-part with a talloc_free() of that part

  3) you can name any pointer. Use talloc_named() which is just like
     talloc() but takes the printf style name argument as well as the
     parent context and the size.

The whole thing ends up being a very simple piece of code, although
some of the pointer walking gets hairy.

So far, I'm just using the new talloc() like the old one. The next
step is to actually take advantage of the new interface
properly. Expect some new commits soon that simplify some common
coding styles in samba4 by using the new talloc().
2007-10-10 12:58:14 -05:00
Simo Sorce
8be31e5c85 r1944: put ldif functions in a separate file 2007-10-10 12:58:13 -05:00
Stefan Metzmacher
4c6c4d6bc8 r1881: empty structs are not allowed by all compilers
metze
2007-10-10 12:58:08 -05:00
Stefan Metzmacher
11c866d602 r1862: add invalid_creds ldap error
metze
2007-10-10 12:58:04 -05:00
Stefan Metzmacher
267edf1c0b r1856: - move asn1 functions to asn1.c
- merge some stuff from trunk

metze
2007-10-10 12:58:02 -05:00
Stefan Metzmacher
a2cd725681 r1805: ...I just forgot to say that the sasl bind actually works now:-)
metze
2007-10-10 12:57:58 -05:00
Stefan Metzmacher
d0278c6bef r1804: get a bit closer to a sasl bind
metze
2007-10-10 12:57:58 -05:00
Stefan Metzmacher
f6c4420107 r1803: more progress on sasl binds, but decoding the response still fails
metze
2007-10-10 12:57:58 -05:00
Simo Sorce
10baf58582 r1802: start to support SASL in our ldap libraries
does not work yet but we are close currently we send the right data
on wire and fail to decode the answer
2007-10-10 12:57:58 -05:00
Stefan Metzmacher
a1bfc94ab3 r1798: fix the build
metze
2007-10-10 12:57:58 -05:00
Simo Sorce
d9f8f97c9e r1792: split ldap_setup_connection() and provide an ldap_bind_simple() function 2007-10-10 12:57:57 -05:00
Simo Sorce
44083e3178 r1785: remove unneeded dependencies on openldap client libraries 2007-10-10 12:57:56 -05:00
Simo Sorce
e6a6c0737a r1771: OK Let's add tests for ldap.
Thanks to Metze and Volker for their unvaluable support :)
2007-10-10 12:57:56 -05:00
Simo Sorce
f9d7b731c9 r1761: start porting valuable volker's work on ldap from trunk
all ldb functions has been renamed to ldap_ as we don't
really want to include ldb functions here, let's keep ldap
and ldb separate.
2007-10-10 12:57:54 -05:00
Stefan Metzmacher
48939adca1 r1756: merge volkers ldap client lib to samba4 for simo to start with the
ldap server code

it's not compiled in yet...

metze
2007-10-10 12:57:54 -05:00