1
0
mirror of https://github.com/samba-team/samba.git synced 2025-10-28 03:33:13 +03:00
Commit Graph

51 Commits

Author SHA1 Message Date
Jelmer Vernooij
3468952e77 r25446: Merge some changes I made on the way home from SFO:
2007-09-29 More higher-level passing around of lp_ctx.
2007-09-29 Fix warning.
2007-09-29 Pass loadparm contexts on a higher level.
2007-09-29 Avoid using global loadparm context.
2007-10-10 15:07:34 -05:00
Jelmer Vernooij
5085c53fcf r25027: Fix more warnings. 2007-10-10 15:05:41 -05:00
Jelmer Vernooij
7a1eec6358 r24667: Finally merge the registry improvements that Wilco Baan Hofman and I have
been working on for at least half a year now. Contains the following
improvements:

 * proper layering (finally!) for the registry library. Distinction is
   now made between 'real' backends (local, remote, wine, etc) and
   the low-level hive backends (regf, creg, ldb, ...) that are only used
   by the local registry backend
 * tests for all important hive and registry operations
 * re-enable RPC-WINREG tests (still needs more work though, as
							   some return values aren't checked yet)
 * write support for REGF files
 * dir backend now supports setting/reading values, creating keys
 * support for storing security descriptors
 * remove CREG backend as it was incomplete, didn't match the data model
   and wasn't used at all anyway
 * support for parsing ADM files as used by the policy editor (see lib/policy)
 * support for parsing PREG files (format used by .POL files)
 * new streaming interface for registry diffs (improves speed and memory usage
	for regdiff/regpatch significantly)

   ... and fixes a large number of bugs in the registry code
2007-10-10 15:02:34 -05:00
Andrew Tridgell
fcf38a38ac r23792: convert Samba4 to GPLv3
There are still a few tidyups of old FSF addresses to come (in both s3
and s4). More commits soon.
2007-10-10 14:59:12 -05:00
Stefan Metzmacher
df7863ea1c r22993: - make it possible to load a dsdb_schema from ldif via the ejs bindings
- make it possible to set ntds_objectGUID and ntds_invocationId via the ejy bindings

metze
2007-10-10 14:52:37 -05:00
Andrew Bartlett
2b3df7f38d r21496: A number of ldb control and LDAP changes, surrounding the
'phantom_root' flag in the search_options control

- Add in support for LDB controls to the js layer
- Test the behaviour
- Implement support for the 'phantom_root' flag in the partitions module
- Make the LDAP server set the 'phantom_root' flag in the search_options control
  - This replaces the global_catalog flag passed down as an opaque pointer
- Rework the string-format control parsing function into
  ldb_parse_control_strings(), returning errors by ldb_errorstring()
  method, rather than with printf to stderr
- Rework some of the ldb_control handling logic

Andrew Bartlett
2007-10-10 14:48:44 -05:00
Simo Sorce
35886b4ae6 r21351: Change ldb ejs bindings return codes.
We were returning just true/false and discarding error number and string.

This checking probably breaks swat, will fix it in next round as swat
is what made me look into this as I had no way to get back error messages
to show to the users.

Simo.
2007-10-10 14:48:18 -05:00
Simo Sorce
a580c871d3 r19831: Big ldb_dn optimization and interfaces enhancement patch
This patch changes a lot of the code in ldb_dn.c, and also
removes and add a number of manipulation functions around.

The aim is to avoid validating a dn if not necessary as the
validation code is necessarily slow. This is mainly to speed up
internal operations where input is not user generated and so we
can assume the DNs need no validation. The code is designed to
keep the data as a string if possible.

The code is not yet 100% perfect, but pass all the tests so far.
A memleak is certainly present, I'll work on that next.

Simo.
2007-10-10 14:28:22 -05:00
Andrew Bartlett
9890af534d r19732: The 'res' from ldb_search is only valid if the call returns LDB_SUCCESS.
This seems to show up (as an abort() from talloc) particularly under
ldb_ildap.

Andrew Bartlett
2007-10-10 14:28:15 -05:00
Andrew Tridgell
6978225ffc r19297: fixed a leak in the ejs ldb interface 2007-10-10 14:21:04 -05:00
Andrew Bartlett
0053d06d9f r16168: Make the example match the actual function.
This was very confusing until I really looked at it.

Andrew Bartlett
2007-10-10 14:09:04 -05:00
Andrew Tridgell
c6d20c2245 r15731: module init functions should return NTSTATUS, not void 2007-10-10 14:08:10 -05:00
Jelmer Vernooij
b79092d7ee r15581: Remove unused include 2007-10-10 14:06:00 -05:00
Jelmer Vernooij
1228358767 r13924: Split more prototypes out of include/proto.h + initial work on header
file dependencies
2007-10-10 13:52:24 -05:00
Andrew Bartlett
a6028558dc r12822: Given that talloc gives us this extra level of safety, use it.
Andrew Bartlett
2007-10-10 13:50:02 -05:00
Andrew Bartlett
be9d0cae89 r12746: An initial version of the kludge_acls module.
This should be replaced with real ACLs, which tridge is working on.
In the meantime, the rules are very simple:

- SYSTEM and Administrators can read all.

- Users and anonymous cannot read passwords, can read everything else

- list of 'password' attributes is hard-coded

Most of the difficult work in this was fighting with the C/js
interface to add a system_session() all, as it still doesn't get on
with me :-)

Andrew Bartlett
2007-10-10 13:49:48 -05:00
Andrew Bartlett
874dd09759 r12744: For correctly written scripts, we don't need this anymore. Only use
the cmdline credentials if we ask for it.

Andrew Bartlett
2007-10-10 13:49:48 -05:00
Andrew Bartlett
964f7fc6ca r12708: This is equivilant, but doesn't cause a warning.
Andrew Bartlett
2007-10-10 13:49:44 -05:00
Jelmer Vernooij
10da56fb6c r12699: correctly escape invalid DN characters (reported by Steinar H. Gunderson).
this still doesn't work as a bug in ldb causes it to not understand
escaped characters in DNs when parsing DNs
2007-10-10 13:49:41 -05:00
Andrew Tridgell
b27d81dca9 r12323: fixeed the use of options.get_credentials() for ldb 2007-10-10 13:47:29 -05:00
Andrew Tridgell
de8975bdd3 r12322: automatically use cmdline_credentials if the ldb object doesn't have
its own credentials element
2007-10-10 13:47:29 -05:00
Andrew Bartlett
ae2f3a64ee r12227: I realised that I wasn't yet seeing authenticated LDAP for the ldb
backend.

The idea is that every time we open an LDB, we can provide a
session_info and/or credentials.  This would allow any ldb to be remote
to LDAP.  We should also support provisioning to a authenticated ldap
server.

(They are separate so we can say authenticate as foo for remote, but
here we just want a token of SYSTEM).

Andrew Bartlett
2007-10-10 13:47:22 -05:00
Simo Sorce
22c8c97e6f r11567: Ldb API change patch.
This patch changes the way lsb_search is called and the meaning of the returned integer.
The last argument of ldb_search is changed from struct ldb_message to struct ldb_result
which contains a pointer to a struct ldb_message list and a count of the number of messages.
The return is not the count of messages anymore but instead it is an ldb error value.

I tryed to keep the patch as tiny as possible bu as you can guess I had to change a good
amount of places. I also tried to double check all my changes being sure that the calling
functions would still behave as before. But this patch is big enough that I fear some bug
may have been introduced anyway even if it passes the test suite. So if you are currently
working on any file being touched please give it a deep look and blame me for any error.

Simo.
2007-10-10 13:45:53 -05:00
Andrew Tridgell
91dfe304cf r11474: - enable ldb transactions from ejs
- speed up provisioning a bit using a ldb transaction (also means you
  can't end up with a ldb being half done)
2007-10-10 13:45:41 -05:00
Andrew Tridgell
7f797e7097 r11354: - generate a ejs error on bad ldif to add/modify
- fixed a double free error in ldb.close()
2007-10-10 13:45:23 -05:00
Andrew Tridgell
dff660c23c r10252: a recent checkin from simo changed the handling of BASE and SUBTREE
searches in ldb to be more ldap compliant, but broke the wins server
and the ejs ldb code. This fixes those up so 'make test' passes again.
2007-10-10 13:38:11 -05:00
Andrew Tridgell
1f12364a0f r10192: r11631@blu: tridge | 2005-08-30 23:06:37 +1000
added a ldb.close() method in js. Useful for re-opening the db
2007-10-10 13:38:07 -05:00
Jelmer Vernooij
8ff1358f40 r9915: Some more mappings. Fix weird sAMAccountName values. 2007-10-10 13:36:21 -05:00
Jelmer Vernooij
b7992de4b7 r9842: More error checks in the ldb_map modules, extend testsuite 2007-10-10 13:36:17 -05:00
Jelmer Vernooij
d9541535e3 r9770: Couple other bugfixes
Update TODO-list
2007-10-10 13:34:58 -05:00
Jelmer Vernooij
1376a1fe44 r9762: Add support for reading good old smbpasswd files
Fix password support
Make base64 decode/encode functions available to EJS
2007-10-10 13:34:57 -05:00
Andrew Tridgell
a8748cab86 r9706: r11042@blu: tridge | 2005-08-28 12:40:09 +1000
a NULL expression is valid in a ldb search
2007-10-10 13:34:52 -05:00
Andrew Tridgell
7082440a70 r9566: fix an uninitialised variable 2007-10-10 13:34:29 -05:00
Simo Sorce
692e35b779 r9391: Convert all the code to use struct ldb_dn to ohandle ldap like distinguished names
Provide more functions to handle DNs in this form
2007-10-10 13:33:32 -05:00
Andrew Tridgell
d2c29a5a51 r8659: return ldif formatted attributes in the ejs ldb search call, so sids show up as strings
not binary blobs
2007-10-10 13:29:50 -05:00
Andrew Tridgell
6a1ed328e2 r8635: make object inheritance with the builtin objects easy by allowing
callers to optionally supply an existing object to add the properties
to. So you can do:

 var rpc = samr_init();
 lsa_init(rpc);

and you end up with 'rpc' having both the samr and lsa functions and
constants available.
2007-10-10 13:29:47 -05:00
Andrew Tridgell
4c1d6a97c0 r8602: allow options in ldb connect calls 2007-10-10 13:29:44 -05:00
Andrew Tridgell
9af48b8fc2 r8569: delete is a js reserved word, so use del instead 2007-10-10 13:29:39 -05:00
Andrew Tridgell
21ca972d06 r8557: expose ldb_errstring() in ldb ejs code 2007-10-10 13:29:37 -05:00
Simo Sorce
e709e37928 r8516: let us use all parameters of ldbsearch in ldb.search 2007-10-10 13:29:33 -05:00
Simo Sorce
5a6c2170ff r8499: clearer function name 2007-10-10 13:23:10 -05:00
Andrew Tridgell
ccf20b2b13 r8489: neaten up the object handling 2007-10-10 13:23:09 -05:00
Andrew Tridgell
cf35818648 r8488: after discussions with simo, moved to a full OO interface, so you don't need to keep
a 'db' variable around. The ldb object knows what it is connected to.

Added a simple ldb testsuite in testprogs/ldb.js
2007-10-10 13:23:08 -05:00
Andrew Tridgell
98c9c4ecb8 r8486: switched to a separate connection operation in ldb interface
(a suggestion from simo)
2007-10-10 13:23:08 -05:00
Andrew Tridgell
3093057d97 r8481: switched ldb ejs called over to an OO interface, so you do:
var ldb = ldb_init();

res = ldb.search(dbfile, "(objectClass=user)");

you can also do:

ldbSearch = ldb.search;
res = ldbSearch(dbfile, "(objectClass=user)");

if you want the old interface (ie. you can use this to import
functions into the global or local namespace).
2007-10-10 13:23:07 -05:00
Andrew Tridgell
632f99017d r8406: make sure we give an error in ldbAdd() if any record fails 2007-10-10 13:22:58 -05:00
Andrew Tridgell
52db7a052b r8399: move the ejs and esp code closer to the directory layout used by the
upstream sources. This makes it much easier to keep it up to date.

I will separate out the mpr code into lib/appweb/mpr next
2007-10-10 13:22:39 -05:00
Andrew Tridgell
625628a3f6 r8340: - added sys_gmtime()
- added sys_unlink()

- added sys_file_load() and sys_file_save()

- use mprString() instead of mprCreateStringVar() to cope with NULL strings

- removed smbcalls_irpc.c as its not needed any more

- allow ldbAdd() and ldbModify() to take multiple ldif records

- added a sprintf() function to ejs. Quite complex, but very useful!
2007-10-10 13:20:08 -05:00
Andrew Tridgell
322c213783 r8339: added ldbAdd(), ldbModify(), ldbDelete() and ldbRename() to ejs ldb functions 2007-10-10 13:20:08 -05:00
Andrew Tridgell
9c885a7edb r8276: fixed the remaining memory leaks in smbscript. We can now loop doing
lots of rpc calls without memory usage increasing.
2007-10-10 13:19:30 -05:00