1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-07 17:18:11 +03:00
Commit Graph

699 Commits

Author SHA1 Message Date
Tim Potter
dd8b8dc98a r14881: Unpack ldb_message_element and ldb_val arrays. Python can now access
all parts of a ldb_result:

@BASEINFO has 2 elements
        elt[0]: val[0]: sequenceNumber = 2
        elt[1]: val[0]: distinguishedName = @BASEINFO
name=foo has 2 elements
        elt[0]: val[0]: foo = bar
        elt[1]: val[0]: distinguishedName = name=foo

Cleanup some swig junk that was only necessary when including config.h
and function prototypes that used the PRINTF_ATTRIBUTE() macro.

Add some more comments.
(This used to be commit 9327fd07d6)
2007-10-10 14:00:12 -05:00
Tim Potter
fab7e6605f r14880: Doc.
(This used to be commit 73b233ee1b)
2007-10-10 14:00:12 -05:00
Tim Potter
aae53f673f r14879: Fix bug unpacking ldb_messages.
Start decoding more of ldb_message and ldb_message_result.
(This used to be commit 60f7f14baa)
2007-10-10 14:00:11 -05:00
Tim Potter
574c9fd685 r14878: Write swig wrappers for ldb_init() and ldb_connect().
Start wrapper for ldb_search().  Currently it returns a list of swig
ldb_message objects.  More unpacking of results required.
(This used to be commit 704787978a)
2007-10-10 14:00:11 -05:00
Jelmer Vernooij
733b5af73f r14875: Make better use of the build system
(This used to be commit 12429bb66f)
2007-10-10 14:00:11 -05:00
Tim Potter
e9cf4f3098 r14873: Add skeleton swig ldb interface.
(This used to be commit c6c759e19f)
2007-10-10 14:00:10 -05:00
Tim Potter
0235d37b32 r14871: We don't need to import UserDict anymore.
(This used to be commit c60a233538)
2007-10-10 13:59:45 -05:00
Tim Potter
f586b11f73 r14870: Update to link with dynamic instead of static objects.
(This used to be commit 20d68c60b7)
2007-10-10 13:59:45 -05:00
Stefan Metzmacher
1af925f394 r14860: create libcli/security/security.h
metze
(This used to be commit 9ec706238c)
2007-10-10 13:59:44 -05:00
Tim Potter
e29489d9b6 r14854: Finish off swig wrapper and torture tests for tdb.
(This used to be commit 1c4042e23f)
2007-10-10 13:59:43 -05:00
Tim Potter
61ce5cd1c6 r14804: Start writing a more Pythonic tdb module.
(This used to be commit 4c9af9c149)
2007-10-10 13:59:21 -05:00
Tim Potter
ea5a312938 r14801: Move swig testing makefile fragment into swig's config.mk and out of
main.mk
(This used to be commit 3721072fc5)
2007-10-10 13:59:21 -05:00
Tim Potter
86971ff3b9 r14798: Get swig building again (by commenting out dcerpc stuff for now).
Add the start of a test framework for swigged functionality.
(This used to be commit 3dfd0959f7)
2007-10-10 13:59:20 -05:00
Jelmer Vernooij
dab516d3e7 r14603: Fix building of ejs modules as shared libs
Fix calling of ejs_exception() without requiring --export-dynamic
(This used to be commit 8575e9a490)
2007-10-10 13:58:59 -05:00
Jelmer Vernooij
508f2f5506 r14594: Fix some dependencies (required for shared library build)
(This used to be commit 06f7a8c692)
2007-10-10 13:58:58 -05:00
Jelmer Vernooij
184955ffd7 r14572: Give libraries saner names, remove some .pc files, make some things
subsystems in case a library doesn't make sense.
(This used to be commit ed382873fd)
2007-10-10 13:58:49 -05:00
Jelmer Vernooij
35349a58df r14542: Remove librpc, libndr and libnbt from includes.h
(This used to be commit 51b4270513)
2007-10-10 13:58:42 -05:00
Jelmer Vernooij
2f65012d3d r14500: Make some more functions public
(This used to be commit 867fc48922)
2007-10-10 13:57:34 -05:00
Jelmer Vernooij
5c79bbadd5 r14497: Fix build with shared libraries
(This used to be commit c74fc55831)
2007-10-10 13:57:34 -05:00
Jelmer Vernooij
71b4fd9792 r14477: Remove the NOPROTO property - it's no longer used as proto.h is gone.
(This used to be commit 9c37f847d3)
2007-10-10 13:57:30 -05:00
Jelmer Vernooij
8528016978 r14464: Don't include ndr_BASENAME.h files unless strictly required, instead
try to include just the BASENAME.h files (containing only structs)
(This used to be commit 3dd477ca51)
2007-10-10 13:57:27 -05:00
Jelmer Vernooij
61933e159c r14381: Kill structs.h
(This used to be commit 1ffb82a759)
2007-10-10 13:57:17 -05:00
Jelmer Vernooij
e3f2414cf9 r14380: Reduce the size of structs.h
(This used to be commit 1a16a6f1df)
2007-10-10 13:57:16 -05:00
Jelmer Vernooij
3f16241a1d r14363: Remove credentials.h from the global includes.
(This used to be commit 98c4c30513)
2007-10-10 13:57:14 -05:00
Jelmer Vernooij
e153a8099e r14327: Replace MAJOR_VERSION/MINOR_VERSION/RELEASE_VERSION with two parameters:
- VERSION: should contain the current version. Will be made part of the filename.
 - SO_VERSION: should contain the latest version that this on is compatible to. Will be used for setting the soname of the shared library.

Fix sonames and use them on platforms that support them
Remove symlinking code. ldconfig will take care of creating the symlinks now
that we set the soname.
(This used to be commit 7871b07e21)
2007-10-10 13:57:12 -05:00
Andrew Bartlett
acd190d8f6 r14200: Now we have real USN support, don't force the values in the provision
scripts.

This tests the real module, and avoids duplication.

Andrew Bartlett
(This used to be commit 0859ba59ae)
2007-10-10 13:56:59 -05:00
Stefan Metzmacher
429a23c48d r14110: make ndr interface parsing code libraries,
so it will not included in multiple modules or binaries

metze
(This used to be commit 13c1059747)
2007-10-10 13:56:52 -05:00
Jelmer Vernooij
c6519ad9c0 r14109: Modulify the smbcalls subsystem.
(This used to be commit d538eac9db)
2007-10-10 13:56:51 -05:00
Simo Sorce
e460cf7692 r13985: Slowly start swig_ldb
dcerpc still need fixing, the produced shared library misses some symbols.
Jelmer, can you look at it while you are playing with the build system ?
(This used to be commit af92996e30)
2007-10-10 13:52:34 -05:00
Jelmer Vernooij
ceb6e9717b r13960: Generate makefile rules for installing/removing shared modules.
(This used to be commit 2c74698032)
2007-10-10 13:52:32 -05:00
Jelmer Vernooij
f8fdbc967c r13944: Yet another round of splitups.
(This used to be commit f87debeb12)
2007-10-10 13:52:31 -05:00
Stefan Metzmacher
a8c023ea79 r13942: fix dependencies
metze
(This used to be commit 71d3fbf65c)
2007-10-10 13:52:29 -05:00
Jelmer Vernooij
4ac2be9958 r13924: Split more prototypes out of include/proto.h + initial work on header
file dependencies
(This used to be commit 1228358767)
2007-10-10 13:52:24 -05:00
Simo Sorce
5616971885 r13906: fix swig build
(This used to be commit c5a9ba3e1c)
2007-10-10 13:52:22 -05:00
Jelmer Vernooij
ba564a901e r13903: Don't generate prototypes for modules and binaries in include/proto.h by
default.
(This used to be commit c80a8f1102)
2007-10-10 13:52:21 -05:00
Jelmer Vernooij
26af14c39b r13786: [merge] Add registration functions for LDB modules
Applications that use LDB modules will now have to run ldb_global_init()
before they can use LDB.

The next step will be adding support for loading LDB modules from .so
files. This will also allow us to use one LDB without difference between the
standalone and the Samba-specific build
(This used to be commit 52a2356505)
2007-10-10 13:52:11 -05:00
Stefan Metzmacher
760f5b4b39 r13710: fix compiler warnings
metze
(This used to be commit 6ee7de9bbf)
2007-10-10 13:52:07 -05:00
Jelmer Vernooij
80c8a52286 r13655: Use new name of build header
(This used to be commit bca0e8054f)
2007-10-10 13:52:05 -05:00
Simo Sorce
b56282dec7 r13369: let's have a way to show the samba4 version through ejs
and use it in provisioning to fullfill rfc 3045 requirements
(This used to be commit 3fb9571a76)
2007-10-10 13:51:50 -05:00
Andrew Tridgell
f705108a8a r13102: fixed the vampire code to correctly setup foreign sids and default
unix name mappings
(This used to be commit dc74d8ccf1)
2007-10-10 13:51:25 -05:00
Andrew Tridgell
29478d3c23 r13098: make check for workgroup and realm case insensitive
(This used to be commit 0cacd69dd5)
2007-10-10 13:51:24 -05:00
Andrew Tridgell
0fb2e148d1 r13097: move the creation of the default sam name -> unix name mappings into
the main provision logic, so it can also be used as part of the
vampire process
(This used to be commit 95e90169f4)
2007-10-10 13:51:24 -05:00
Stefan Metzmacher
627983ced0 r13084: fix 'make test'!
I would sugguest to run 'make test && make valgrind' before each commit
at this stage...

metze
(This used to be commit b7a0a778cc)
2007-10-10 13:51:23 -05:00
Andrew Tridgell
82b6a5c9fc r13076: catch a easy to make error during vampire install
(This used to be commit 1c49ce8df0)
2007-10-10 13:51:22 -05:00
Jelmer Vernooij
a54a66ddf1 r13062: Fix upgrade of WINS entries
(This used to be commit cc4cab341e)
2007-10-10 13:51:20 -05:00
Andrew Bartlett
bade0ad909 r13018: Fix (correct) warning about mixing C/js interface function types. I
don't use the arguments, but you must connect as the right type
anyway.

Andrew Bartlett
(This used to be commit f50186e930)
2007-10-10 13:51:17 -05:00
Andrew Bartlett
ba8406fd3f r12997: Feed the right event context to libnet in ejsnet and the auth code.
This should give better behaviour in SWAT.

Fix authentication as Samba, rather than System, users in SWAT.

Andrew Bartlett
(This used to be commit 498d72c4ad)
2007-10-10 13:51:15 -05:00
Andrew Tridgell
5d91a37002 r12947: added some error checking that I stumbled across while testing domain migration
(This used to be commit c7951d17b1)
2007-10-10 13:51:12 -05:00
Andrew Bartlett
ba07f94438 r12945: Try to move closer to getting Samba3 import working again.
There still a few things to work out

Andrew Bartlett
(This used to be commit 701558b5fe)
2007-10-10 13:51:12 -05:00
Andrew Bartlett
2bb3a50c7e r12931: Remove some prefixes. We have:
Login failed: Login Failed: Logon failure - please try again

In SWAT currently...

Andrew Bartlett
(This used to be commit 51eded8180)
2007-10-10 13:51:08 -05:00
Andrew Bartlett
747b5cce53 r12929: Fix more implict global and shadowing variables.
Andrew Bartlett
(This used to be commit def3195618)
2007-10-10 13:51:07 -05:00
Andrew Bartlett
f3db23ac75 r12928: This patch improves the interaction between the vampire and provsion code.
Previously, we had to know (or guess) the host and domain guid at the
provision stage.  Now we query the database post-provision, to extract
the values and fill in the zone file.

This allows us to generate a correct zone file in the Windows migration case.

In an effort to make SWAT easier to use, I have removed and renamed
some of the provision options.

I have also fixed a nasty issue in my js code.  I had implictly
declared a global variable of the name 'join', with disasterious
results for any subsequent user of the string utility function:

esp exception - ASSERT at lib/appweb/ejs/ejsParser.c:2064, 0

Backtrace:
        [ 0]       substitute_var:20   ->               list[i] = join("", list2)
        [ 1]           setup_file:9    ->       data = substitute_var(data, subobj)

Andrew Bartlett
(This used to be commit a38ceefd11)
2007-10-10 13:51:07 -05:00
Andrew Bartlett
5d9f510644 r12918: Don't tell the user the difference between 'no such user' and 'wrong
password'.

Andrew Bartlett
(This used to be commit e13cb0ab17)
2007-10-10 13:51:02 -05:00
Andrew Bartlett
58f78fa182 r12892: Add a 'Migrate from Windows' page to our installation section in SWAT.
Doing this required reworking ejsnet, particularly so it could take a
set of credentials, not just a username and password argument.

This required fixing the ejsnet.js test script, which now adds and
deletes a user, and is run from 'make test'.  This should prevent it
being broken again.

Deleting a user from ejsnet required that the matching backend be
added to libnet, hooking fortunetly onto already existing code for the
actual deletion.

The js credentials interface now handles the 'set machine account' flag.

New functions have been added to provision.js to wrap the basic
operations (so we can write a command line version, as well as the web
based version).

Andrew Bartlett
(This used to be commit a5e7c17c34)
2007-10-10 13:50:59 -05:00
Andrew Bartlett
792951a365 r12891: We no longer manually set the 'name' attribute.
Andrew Bartlett
(This used to be commit 7b169aad3f)
2007-10-10 13:50:58 -05:00
Andrew Bartlett
75ef0ba513 r12823: Fix up the provison and newuser code in SWAT. This also cleans up the
main provision script a bit, as the argument list was getting out of
control.  (It has been replaced in part with an object).

This also returns the session_info from the auth code into ejs.

We still need access control allowing only root to re-provision.

Andrew Bartlett
(This used to be commit 002cdcf3ca)
2007-10-10 13:50:02 -05:00
Andrew Bartlett
195f5c3635 r12822: Given that talloc gives us this extra level of safety, use it.
Andrew Bartlett
(This used to be commit a6028558dc)
2007-10-10 13:50:02 -05:00
Andrew Bartlett
8f86ddcd93 r12819: Fix swat authentication again. We need to pass the socket_address
structure around, so the auth code knows where the request came from.

Andrew Bartlett
(This used to be commit 7a7b2668c0)
2007-10-10 13:50:01 -05:00
Andrew Bartlett
f55ea8bb3d r12804: This patch reworks the Samba4 sockets layer to use a socket_address
structure that is more generic than just 'IP/port'.

It now passes make test, and has been reviewed and updated by
metze. (Thankyou *very* much).

This passes 'make test' as well as kerberos use (not currently in the
testsuite).

The original purpose of this patch was to have Samba able to pass a
socket address stucture from the BSD layer into the kerberos routines
and back again.   It also removes nbt_peer_addr, which was being used
for a similar purpose.

It is a large change, but worthwhile I feel.

Andrew Bartlett
(This used to be commit 88198c4881)
2007-10-10 13:49:57 -05:00
Andrew Bartlett
27f997e682 r12749: Fix the newuser script.
Andrew Bartlett
(This used to be commit 42cdad5e3f)
2007-10-10 13:49:49 -05:00
Andrew Bartlett
a8eec31354 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
(This used to be commit be9d0cae89)
2007-10-10 13:49:48 -05:00
Andrew Bartlett
a2cad19bbd r12744: For correctly written scripts, we don't need this anymore. Only use
the cmdline credentials if we ask for it.

Andrew Bartlett
(This used to be commit 874dd09759)
2007-10-10 13:49:48 -05:00
Andrew Bartlett
8f4dc51345 r12739: Add support for using credentials in the provision process.
This should allow us to provision to a 'normal' LDAP server.

Also add in 'session info' hooks (unused).  Both of these need to be
hooked in on the webserver.

Andrew Bartlett
(This used to be commit b349d2fbfe)
2007-10-10 13:49:48 -05:00
Andrew Bartlett
8574fe2f8e r12738: Use a talloc_reference to ensure this doesn't get free()'ed too early.
Andrew Bartlett
(This used to be commit 0f8c162211)
2007-10-10 13:49:47 -05:00
Andrew Bartlett
81e05038b6 r12708: This is equivilant, but doesn't cause a warning.
Andrew Bartlett
(This used to be commit 964f7fc6ca)
2007-10-10 13:49:44 -05:00
Jelmer Vernooij
a7d517d6da r12704: role => server role
(This used to be commit 5884a7efff)
2007-10-10 13:49:43 -05:00
Jelmer Vernooij
65bf7621d9 r12703: Fix handling of short passdb backends (also reported by Steinar Gunderson)
(This used to be commit 4c562c42b4)
2007-10-10 13:49:43 -05:00
Jelmer Vernooij
34be0772d2 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
(This used to be commit 10da56fb6c)
2007-10-10 13:49:41 -05:00
Jelmer Vernooij
6c81984ddb r12697: Support empty fullname fields in unix accounts
(This used to be commit 3d70ebca0b)
2007-10-10 13:49:40 -05:00
Jelmer Vernooij
92461359f7 r12695: A dot is allowed in NetBIOS names.
(This used to be commit f4ac7d6359)
2007-10-10 13:49:39 -05:00
Jelmer Vernooij
78c50015bb r12694: Move some headers to the directory of the subsystem they belong to.
(This used to be commit c722f665c9)
2007-10-10 13:49:39 -05:00
Jelmer Vernooij
046a54f963 r12622: Move table.c prototypes to seperate header to prevent circular dependencies
with proto.h
(This used to be commit 9e0ba38037)
2007-10-10 13:49:06 -05:00
Jelmer Vernooij
aa9f67163c r12620: Get rid of automatically generated lists of init functions of subsystems.
This allows Samba libraries to be used by other projects (and parts of
Samba to be built as shared libraries).
(This used to be commit 44f0aba715)
2007-10-10 13:49:06 -05:00
Jelmer Vernooij
d4de4c2d21 r12608: Remove some unused #include lines.
(This used to be commit 70e7449318)
2007-10-10 13:49:03 -05:00
Andrew Bartlett
02c8c376d5 r12596: This variable is unused.
Andrew Bartlett
(This used to be commit 2853ccfc8a)
2007-10-10 13:49:00 -05:00
Jelmer Vernooij
46aa296cc9 r12592: Remove some useless dependencies
(This used to be commit ca8db1a0cd)
2007-10-10 13:49:00 -05:00
Andrew Bartlett
5811b6dac5 r12533: Get the ldb.errstring() out to the user on failure. It helps a lot
with debugging!

Andrew Bartlett
(This used to be commit fe36cb6767)
2007-10-10 13:47:52 -05:00
Andrew Tridgell
e4dbcc0d5d r12531: 'make quicktest' was taking 15 minutes on my system due to failing DNS
lookups in load_interfaces(). The reason was my eth0 interface was
down, and it was being interpreted as a DNS name.

This patch changes load_interfaces() to happening automatically when
interfaces are first needed instead of on the startup of every samba
binary. This means that (for example) ldbadd doesn't call
load_interfaces(), which means no slow DNS lookups.

I also reduced the number of static globals in interface.c to 1, and
changed from malloc to talloc

When you want to force a reload of the interfaces list, you now call
unload_interfaces(), which means the next call that needs the
interfaces list will reload it
(This used to be commit f79d90bd13)
2007-10-10 13:47:52 -05:00
Jelmer Vernooij
d49f11df21 r12517: Don't generate empty init functions
(This used to be commit 832a1092c9)
2007-10-10 13:47:51 -05:00
Jelmer Vernooij
00ace36e07 r12516: Fix drsuapi and netlogon javascript bindings
(This used to be commit b46eeba9fc)
2007-10-10 13:47:51 -05:00
Jelmer Vernooij
0ad7b308a1 r12514: Move DCE/RPC interface table to a seperate file
Be a bit more strict when checking for duplicate interfaces
(This used to be commit b1286a6d27)
2007-10-10 13:47:49 -05:00
Jelmer Vernooij
acd6a086b3 r12510: Change the DCE/RPC interfaces to take a pointer to a
dcerpc_interface_table struct rather then a tuple of interface
name, UUID and version.

This removes the requirement for having a global list of DCE/RPC interfaces,
except for these parts of the code that use that list explicitly
(ndrdump and the scanner torture test).

This should also allow us to remove the hack that put the authservice parameter
in the dcerpc_binding struct as it can now be read directly from
dcerpc_interface_table.

I will now modify some of these functions to take a dcerpc_syntax_id
structure rather then a full dcerpc_interface_table.
(This used to be commit 8aae0f168e)
2007-10-10 13:47:48 -05:00
Jelmer Vernooij
c1c01df22f r12501: Merge EJSHeader.pm into EJS.pm and simplify smbcalls_rpc.c a bit,
now that it is guaranteed that the smbcalls modules are always initialized
after the EJS subsystem itself.
(This used to be commit 1e8670874b)
2007-10-10 13:47:46 -05:00
Jelmer Vernooij
09c44f6cae r12500: Use init functions explicitly in a few more places. 'gensec' and 'librpc'
are the only two subsystems left to convert.
(This used to be commit f6bbc72996)
2007-10-10 13:47:46 -05:00
Jelmer Vernooij
6aafed9600 r12499: Move smb_build.h out of includes.h
(This used to be commit c92ace494f)
2007-10-10 13:47:45 -05:00
Jelmer Vernooij
4bbb73894c r12445: Fix header in manpage, make script executable
(This used to be commit 7ca00cd918)
2007-10-10 13:47:40 -05:00
Andrew Tridgell
4ee24ce2ba r12323: fixeed the use of options.get_credentials() for ldb
(This used to be commit b27d81dca9)
2007-10-10 13:47:29 -05:00
Andrew Tridgell
ac3f676f62 r12322: automatically use cmdline_credentials if the ldb object doesn't have
its own credentials element
(This used to be commit de8975bdd3)
2007-10-10 13:47:29 -05:00
Andrew Bartlett
6589e93b1b r12252: With this change (hack) we can now do an provision onto Samba4's LDAP
server.  Now to try another one...

Andrew Bartlett
(This used to be commit 175f616d74)
2007-10-10 13:47:24 -05:00
Andrew Bartlett
a1827a1deb 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
(This used to be commit ae2f3a64ee)
2007-10-10 13:47:22 -05:00
Jelmer Vernooij
085aac2e01 r12218: Use common functions for generating lists
(This used to be commit ba913b86e8)
2007-10-10 13:47:21 -05:00
Rafal Szczesniak
17280956c3 r12104: Move to (sync) smb_composite_connect from smbcli_tree_full_connection()
This is one of the last places using the latter function.

rafal
(This used to be commit c95d30d38c)
2007-10-10 13:47:09 -05:00
Stefan Metzmacher
150848248a r12014: free the irpc_request structure with the irpc_call_recv functions,
to match all other _recv functions we have

metze
(This used to be commit bd4f85ab5f)
2007-10-10 13:46:59 -05:00
Stefan Metzmacher
e4ed5dd5bc r12013: fix compiler warnings
metze
(This used to be commit 4d35c2b8e6)
2007-10-10 13:46:59 -05:00
Stefan Metzmacher
d72e8aacaf r12012: fix renaming smbsrv_trees -> smbsrv_tcons
metze
(This used to be commit e5654f9791)
2007-10-10 13:46:59 -05:00
Andrew Bartlett
9c6b7f2d62 r11995: A big kerberos-related update.
This merges Samba4 up to current lorikeet-heimdal, which includes a
replacement for some Samba-specific hacks.

In particular, the credentials system now supplies GSS client and
server credentials.  These are imported into GSS with
gss_krb5_import_creds().  Unfortunetly this can't take an MEMORY
keytab, so we now create a FILE based keytab as provision and join
time.

Because the keytab is now created in advance, we don't spend .4s at
negprot doing sha1 s2k calls.  Also, because the keytab is read in
real time, any change in the server key will be correctly picked up by
the the krb5 code.

To mark entries in the secrets which should be exported to a keytab,
there is a new kerberosSecret objectClass.  The new routine
cli_credentials_update_all_keytabs() searches for these, and updates
the keytabs.

This is called in the provision.js via the ejs wrapper
credentials_update_all_keytabs().

We can now (in theory) use a system-provided /etc/krb5.keytab, if

krb5Keytab: FILE:/etc/krb5.keytab

is added to the secrets.ldb record.  By default the attribute

privateKeytab: secrets.keytab

is set, pointing to allow the whole private directory to be moved
without breaking the internal links.
(This used to be commit 6b75573df4)
2007-10-10 13:46:56 -05:00
Andrew Tridgell
09932e0383 r11956: removed the old rootdse.ldif, and the provision.js code that uses it
(This used to be commit 4b56c129c6)
2007-10-10 13:46:50 -05:00
Rafal Szczesniak
9aef045b27 r11814: 1) Set name resolution methods according to smb.conf
2) Set credentials workstation name, otherwise rpc bind function
   segfaults on auth stage

rafal
(This used to be commit 6dc67ba6a3)
2007-10-10 13:46:32 -05:00
Stefan Metzmacher
509be8d902 r11781: rename tree to tcons to match the sessions substructure of smbsrv_connection
metze
(This used to be commit acd3e644e0)
2007-10-10 13:46:26 -05:00
Rafal Szczesniak
5518741f3f r11748: By default, use name resolution method provided by means
of smb.conf.

rafal
(This used to be commit 739169e8ed)
2007-10-10 13:46:21 -05:00
Rafal Szczesniak
8aae0d3d63 r11588: Remove unused (at the moment) variable and quiet compiler warning.
rafal
(This used to be commit 90db7f13bc)
2007-10-10 13:45:55 -05:00
Rafal Szczesniak
2a006a7e6b r11586: Further work on ejs interface for libnet. The idea is to split libnet
functionalities into groups of subcontexts of net subcontext just the
way it's done in net tool. This way we can pass common arguments when
creating subcontext. Also, this may allow easier writing net tool
completely as a script.

At the moment there's a name resolve code segfault to be fixed.

rafal
(This used to be commit 25310d0592)
2007-10-10 13:45:54 -05:00
Simo Sorce
5c95905871 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.
(This used to be commit 22c8c97e6f)
2007-10-10 13:45:53 -05:00
Andrew Tridgell
b00252c5b8 r11501: change provision code to use the new display specifiers
(This used to be commit 696fa87a21)
2007-10-10 13:45:45 -05:00
Andrew Tridgell
318ac84440 r11500: fixed a bug in the variable substition code using the new limit argument to split()
(This used to be commit 25131efea8)
2007-10-10 13:45:45 -05:00
Andrew Tridgell
218d306ece r11498: added an optional extra argument to split to limit the number of
pieces a string is split into. This allows for a fix in the variable
substitution used in provisioning
(This used to be commit be06785d48)
2007-10-10 13:45:45 -05:00
Andrew Tridgell
4764eb7a93 r11496: add a minimal ads-compatible schema into our sam.ldb setup. This is
needed for mmc management of Samba4.
(This used to be commit cbbce4fe40)
2007-10-10 13:45:45 -05:00
Andrew Tridgell
917ca215bb r11475: removed a extraneous ldb_delete() call (i had it there for debugging)
(This used to be commit daa9dcd8f4)
2007-10-10 13:45:42 -05:00
Andrew Tridgell
c845ab1e60 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)
(This used to be commit 91dfe304cf)
2007-10-10 13:45:41 -05:00
Andrew Tridgell
783851099b r11458: fixed our ejs smbscript interfaces to use arrays where appropriate. In
js arrays are a special type of object where the length property is
automatic, and cannot be modified manually. Our code was manually
setting length, which made it abort when someone passed in a real ejs
array. To fix this we need to create real arrays instead of objects,
and remove the code that manually sets the length
(This used to be commit ebdd1393fd)
2007-10-10 13:45:39 -05:00
Andrew Bartlett
4e052d1fe4 r11439: Make presedence on strcmp comparison clear, and fill in
logon_parameters for the auth subsystem.

Andrew Bartlett
(This used to be commit 767c5ca7be)
2007-10-10 13:45:37 -05:00
Andrew Tridgell
ea4ad9152a r11365: fixed a comment typo
(This used to be commit 3333d71ab6)
2007-10-10 13:45:26 -05:00
Andrew Tridgell
c5b99e3c69 r11363: fixed a problem with provisioning when hklm already exists (the
problem is really caused by hklm not having objectclass attributes on
its records, but this is a workaround)
(This used to be commit 62d5253a03)
2007-10-10 13:45:26 -05:00
Andrew Tridgell
e0ab3485ee r11354: - generate a ejs error on bad ldif to add/modify
- fixed a double free error in ldb.close()
(This used to be commit 7f797e7097)
2007-10-10 13:45:23 -05:00
Rafal Szczesniak
b22bda7533 r11308: Correctly return status code in case of js error or libnet
function execution error.

rafal
(This used to be commit a50a5bef6e)
2007-10-10 13:45:17 -05:00
Jelmer Vernooij
8ee1ee66ed r11303: Support defining and installing public headers for libraries.
Support installing libraries.
Get rid of pkg-config file (will be autogenerated later on).
(This used to be commit b4745032a2)
2007-10-10 13:45:16 -05:00
Andrew Tridgell
75d3a8f6dc r11285: fixed winreg.js for the recent change to winreg.idl
(This used to be commit 27f46b4f18)
2007-10-10 13:45:13 -05:00
Rafal Szczesniak
ab6ae6838e r11281: Initial ejs interface for libnet functions.
rafal
(This used to be commit f9c436bbdf)
2007-10-10 13:45:13 -05:00
Jelmer Vernooij
4c5a4a7e02 r11244: Relative path names in .mk files
(This used to be commit 24e1030090)
2007-10-10 13:45:06 -05:00
Andrew Bartlett
17be61b7b9 r11222: Small provision fixes: canonicalName is now generated, and the DC=
list should be from the dnsdomain (ie lowercae).

Andrew Bartlett
(This used to be commit 10d692a1c2)
2007-10-10 13:45:05 -05:00
Andrew Bartlett
8103ef3974 r11217: Ensure the realm is substituted in UPPER case.
Andrew Bartlett
(This used to be commit 0c29f0e30d)
2007-10-10 13:45:04 -05:00
Jelmer Vernooij
f4d590662e r11214: Remove scons files (see http://lists.samba.org/archive/samba-technical/2005-October/043443.html)
(This used to be commit 7fffc5c917)
2007-10-10 13:45:03 -05:00
Andrew Bartlett
642b42424a r11203: Use different variable names to make it easier to tell which assert fired.
Andrew Bartlett
(This used to be commit df6a40c2d2)
2007-10-10 13:45:01 -05:00
Stefan Metzmacher
e627a90362 r11171: fix the build
metze
(This used to be commit 0d948cf430)
2007-10-10 13:44:54 -05:00
Stefan Metzmacher
c3c26c9008 r11087: - add type,name,scope as attributes to winsRecords,
so you can use them in search filters,
  only for administration not used inside the winserver code
- fix the samba3 ugrade scripts to create a correct samba4 wins.ldb

metze
(This used to be commit 9f3b6746d8)
2007-10-10 13:44:46 -05:00
Stefan Metzmacher
dab2b68583 r11086: add sys.unix2nttime() function
metze
(This used to be commit a3abf10d43)
2007-10-10 13:44:46 -05:00
Stefan Metzmacher
a8504e1061 r11085: as ejs doesn't support '&' '|' bitwise AND and OR,
we need some helper functions for this

metze
(This used to be commit e27e36909d)
2007-10-10 13:44:46 -05:00
Stefan Metzmacher
a59cca6f97 r11083: use the addresses from the record
metze
(This used to be commit 5d46cdd1ee)
2007-10-10 13:44:45 -05:00
Andrew Tridgell
33da2fabe6 r10914: moved the ldap time string functions into ldb so they can be used by
the time attribute handling functions
(This used to be commit 93c296d527)
2007-10-10 13:39:42 -05:00
Jelmer Vernooij
5058f4b9e8 r10586: Add MergedObject() builder. Default to Library() rather
then StaticLibrary()
(This used to be commit b53313dc51)
2007-10-10 13:39:08 -05:00
Jelmer Vernooij
42b81d7c3e r10528: Add credentials.h back into includes.h as some compilers don't
seem to be able to handle incomplete enum types.
(This used to be commit 540155fad3)
2007-10-10 13:39:02 -05:00
Jelmer Vernooij
bb9c9ec69c r10515: Handle replacement of "domain logons" and "domain master" by "server role"
(This used to be commit c5e3a1c55d)
2007-10-10 13:38:59 -05:00
Jelmer Vernooij
f801ad3592 r10510: Decrease the amount of data included by includes.h a bit
(This used to be commit 03647e1321)
2007-10-10 13:38:58 -05:00
Andrew Bartlett
51cbc188df r10402: Make the RPC-SAMLOGON test pass against Win2k3 SP0 again.
I still have issues with Win2k3 SP1, and Samba4 doesn't pass it's own
test for the moment, but I'm working on these issues :-)

This required a change to the credentials API, so that the special
case for NTLM logins using a principal was indeed handled as a
special, not general case.

Also don't set the realm from a ccache, as then it overrides --option=realm=.

Andrew Bartlett
(This used to be commit 194e8f07c0)
2007-10-10 13:38:39 -05:00
Jelmer Vernooij
6812c73534 r10348: Add scons scripts for remaining subsystems. Most subsystems build now,
but final linking still fails (as does generating files asn1, et, idl and proto
files)
(This used to be commit 4f0d7f75b9)
2007-10-10 13:38:30 -05:00
Jelmer Vernooij
d2a666acbe r10316: More dynconfig fixes
(This used to be commit 0963ab9c14)
2007-10-10 13:38:17 -05:00
Andrew Tridgell
95040e9341 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.
(This used to be commit dff660c23c)
2007-10-10 13:38:11 -05:00
Andrew Tridgell
bcc3ce695e r10193: r11632@blu: tridge | 2005-08-30 23:08:27 +1000
if we fail to erase a ldb during provision by traversing
 and deleting records (an in-place erase) then just unlink it
 and start it again. This makes provisioning much more robust
 to changes in ldb that make it not backward compatible with
 old DBs.
(This used to be commit 173655aec2)
2007-10-10 13:38:07 -05:00
Andrew Tridgell
68974a1c72 r10192: r11631@blu: tridge | 2005-08-30 23:06:37 +1000
added a ldb.close() method in js. Useful for re-opening the db
(This used to be commit 1f12364a0f)
2007-10-10 13:38:07 -05:00
Jelmer Vernooij
342d229b40 r10190: Do some very basic input checking when provisioning.
(This used to be commit 87f25fe49c)
2007-10-10 13:38:06 -05:00
Tim Potter
ed4913d45d r9990: Fix some 64-bit size_t warnings.
(This used to be commit dd148451d7)
2007-10-10 13:36:26 -05:00
Jelmer Vernooij
aae4b1a951 r9951: Add another value to the default HKLM.
Convert Samba3 policy "refuse machine pw change" to registry value.
(This used to be commit a143234ac7)
2007-10-10 13:36:24 -05:00
Jelmer Vernooij
1170f02e23 r9925: Fix swapped nt/lm password hashes - caught by Andrew Bartlett
(This used to be commit 4f0ee80f6c)
2007-10-10 13:36:22 -05:00
Jelmer Vernooij
08f630be82 r9915: Some more mappings. Fix weird sAMAccountName values.
(This used to be commit 8ff1358f40)
2007-10-10 13:36:21 -05:00
Jelmer Vernooij
e2e2508b58 r9899: Be more conservative about what is sent to the remote server in ldb_map.
(This used to be commit 76e943d441)
2007-10-10 13:36:21 -05:00
Jelmer Vernooij
05db3024ba r9854: Finish ldb_map testsuite
Update PLAN
Some more small other fixes
(This used to be commit de2bde2526)
2007-10-10 13:36:18 -05:00
Jelmer Vernooij
222fdd5237 r9842: More error checks in the ldb_map modules, extend testsuite
(This used to be commit b7992de4b7)
2007-10-10 13:36:17 -05:00
Jelmer Vernooij
0712cbdab4 r9834: More tests for the upgrade from Samba3
(This used to be commit d2db164d6f)
2007-10-10 13:36:17 -05:00
Jelmer Vernooij
2f23a8cec1 r9830: Fix support for importing registry values. Extended the examplre registry tdb.
(This used to be commit 11e2a19389)
2007-10-10 13:36:16 -05:00
Jelmer Vernooij
d991196655 r9827: Convert 'passdb backend' rather then 'passdb backends'
Be a bit more verbose
(This used to be commit fb2fd8da10)
2007-10-10 13:36:16 -05:00
Jelmer Vernooij
adf31c5042 r9826: Add some more OOM checks
(This used to be commit 213bcb7e16)
2007-10-10 13:36:15 -05:00
Jelmer Vernooij
06db539696 r9825: Correctly handle length argument to substr()
(This used to be commit edf380cb5f)
2007-10-10 13:36:15 -05:00
Jelmer Vernooij
f58a74aaba r9816: Work on testsuite for upgrade
Add 'paths' object to provision code.
(This used to be commit 488d737fb0)
2007-10-10 13:35:04 -05:00
Jelmer Vernooij
40f85ace04 r9813: Conver testsuite for samba3sam module to EJS
(This used to be commit 77f24ed131)
2007-10-10 13:35:04 -05:00
Jelmer Vernooij
cf016f972b r9805: Add 'data' property to param EJS object
Write out new smb.conf file. Parameters that have disappeared
between Samba 3 and 4 will optionally be prefixed with 'samba3:'
(This used to be commit 27eefbd905)
2007-10-10 13:35:03 -05:00
Jelmer Vernooij
9f4b32996c r9800: Add EJS interface to param. tridge, sorry this overlaps a bit
with your loadparm interface. :-/
(This used to be commit bb0cef581a)
2007-10-10 13:35:03 -05:00
Jelmer Vernooij
a3a7881d39 r9798: Add generic functions for handling smb.conf files (the parameters don't to be pre-declared). Also doesn't use any globals, so multiple files can be loaded at once.
Currently uses the prefix "param" for all functions and structures; suggestions for better ones are welcome...

Remove old smb.conf-parsing code from libsamba3.
(This used to be commit 414e5f7f6d)
2007-10-10 13:35:02 -05:00
Jelmer Vernooij
6cf1b0c07c r9793: Be more verbose, check for errors in upgrade script.
(This used to be commit b7c09df9e5)
2007-10-10 13:35:02 -05:00
Jelmer Vernooij
7be4cf8c1d r9770: Couple other bugfixes
Update TODO-list
(This used to be commit d9541535e3)
2007-10-10 13:34:58 -05:00
Jelmer Vernooij
ec934124db r9762: Add support for reading good old smbpasswd files
Fix password support
Make base64 decode/encode functions available to EJS
(This used to be commit 1376a1fe44)
2007-10-10 13:34:57 -05:00
Jelmer Vernooij
c9ace93ce2 r9756: One-way upgrade from Samba3->Samba4 basically works now
Still need to polish some rough edges
(This used to be commit a8f309aa81)
2007-10-10 13:34:56 -05:00
Jelmer Vernooij
d4f22109ee r9755: Fix crash bug in SWAT login
(This used to be commit 6e3e964fb4)
2007-10-10 13:34:56 -05:00
Jelmer Vernooij
11f3f0fa6c r9754: Upgrading with the command line utility now works, at least partially (-:
Upgrading using SWAT should work as well now.
(This used to be commit 8baa2ac377)
2007-10-10 13:34:56 -05:00
Jelmer Vernooij
442d147f6d r9746: Add "staff" as possible alternative to wheel
(should fix standard provisioning on AIX)
(This used to be commit b1d9ef8998)
2007-10-10 13:34:56 -05:00
Jelmer Vernooij
0a72d9a5f7 r9744: - [upgrade.js] Start working on smb.conf conversion.
- [ldb_map] Support storing non-mappable data in a fallback LDB
(This used to be commit 435e4c6389)
2007-10-10 13:34:55 -05:00
Jelmer Vernooij
0549763600 r9735: More work on generating a valid Samba4 configuration using the
Samba3 data (both console and SWAT)
(This used to be commit d569465dc4)
2007-10-10 13:34:55 -05:00
Andrew Bartlett
24186a80eb r9728: A *major* update to the credentials system, to incorporate the
Kerberos CCACHE into the system.

This again allows the use of the system ccache when no username is
specified, and brings more code in common between gensec_krb5 and
gensec_gssapi.

It also has a side-effect that may (or may not) be expected: If there
is a ccache, even if it is not used (perhaps the remote server didn't
want kerberos), it will change the default username.

Andrew Bartlett
(This used to be commit 6202267f6e)
2007-10-10 13:34:54 -05:00
Jelmer Vernooij
14ebeffc46 r9725: Fix full output mode of samba3dump as well. Thanks to tridge for
a bit for explanation about js.
(This used to be commit 765a30a049)
2007-10-10 13:34:53 -05:00
Jelmer Vernooij
176da2a281 r9724: Rewrite samba3dump in JS. The summary works now, but the full output
is triggering some obscure EJS assert..
(This used to be commit 42605f4444)
2007-10-10 13:34:53 -05:00
Jelmer Vernooij
d152839e29 r9722: Initial attempt at converting samba3dump to EJS..
(This used to be commit 7e3b94dfb9)
2007-10-10 13:34:53 -05:00
Jelmer Vernooij
d6cd54fb0a r9718: Work a bit on the SWAT interface
(This used to be commit b1844905d2)
2007-10-10 13:34:53 -05:00
Andrew Tridgell
9b0662bb44 r9707: r11080@blu: tridge | 2005-08-28 12:41:12 +1000
make sure we leave the account enabled after creating a new user
(This used to be commit a22d0d02ee)
2007-10-10 13:34:52 -05:00
Andrew Tridgell
8da7ab52eb r9706: r11042@blu: tridge | 2005-08-28 12:40:09 +1000
a NULL expression is valid in a ldb search
(This used to be commit a8748cab86)
2007-10-10 13:34:52 -05:00
Andrew Tridgell
c98c6aa561 r9702: r9680@blu: tridge | 2005-08-27 18:45:08 +1000
- fixed ncacn_ip_tcp to use the generic async name resolution methods,
   so NBT names now work (as requested several times by abartlet!)

 - changed resolve_name() to take an event_context, so it doesn't cause
   the whole process to block

 - cleaned up the talloc_find_parent_bytype() calls to go via a cleaner
   event_context_find() call
(This used to be commit b3d491b210)
2007-10-10 13:34:51 -05:00
Jelmer Vernooij
37059d70d9 r9700: Change DATA_BLOB in ejs back to struct datablob
Support writing idmap mappings to winbind.ldif
(This used to be commit 3709def353)
2007-10-10 13:34:49 -05:00
Jelmer Vernooij
95ed275dbb r9698: Fix a bit of memory management
More minor bugfixes
Support mapping objectclasses and do mapping on 'dn' field as well (not just msg->dn)
(This used to be commit b7b079167d)
2007-10-10 13:34:42 -05:00
Andrew Tridgell
2e35b72086 r9645: fixed the ejs GetOptions() call to look at the first option passed (this is what broke --help)
(This used to be commit 88a7e9e00f)
2007-10-10 13:34:36 -05:00
Andrew Tridgell
10dcfca9f1 r9580: put the libinclude() after the GetOptions so the smb.conf is loaded to
get the libjs path
(This used to be commit ee0b693ffa)
2007-10-10 13:34:31 -05:00
Andrew Tridgell
4a37c7ebbe r9568: updated the winreg js library for CreateKey, and add a --createkey
option to the winreg tool
(This used to be commit 881452c7b7)
2007-10-10 13:34:29 -05:00
Andrew Tridgell
cfa981c656 r9566: fix an uninitialised variable
(This used to be commit 7082440a70)
2007-10-10 13:34:29 -05:00
Andrew Tridgell
8f9478b09d r9504: use some low level ejs hackery to give much better exception error messages in both
the web server and smbscript. We can now give backtraces for all internal asserts, not
just high level errors
(This used to be commit 84c756b25c)
2007-10-10 13:34:23 -05:00
Andrew Tridgell
d857d1a965 r9500: userAuth() takes a creds object, not a general object now ...
(This used to be commit 57e6eb9c66)
2007-10-10 13:34:23 -05:00
Andrew Tridgell
185adae2f9 r9499: added error checking to the userAuth() call. SWAT is still failing, but at least it now
tells us why
(This used to be commit 4afb16d7b2)
2007-10-10 13:34:23 -05:00
Andrew Tridgell
60eb9f87a0 r9497: - converted the winreg library to a more OO style of interface
- added a reg.typestring() method that returns a string representation of a type
(This used to be commit 47cf409cdf)
2007-10-10 13:34:22 -05:00
Andrew Tridgell
2dd966a465 r9496: added a regToVar() function that converts a registry blob variable to a ejs variable.
(This used to be commit 76ffc20079)
2007-10-10 13:34:22 -05:00
Andrew Tridgell
da6dc01ae2 r9492: it is more usual to return 'undefined' instead of 'false' on a call failing (unless the
call is returning a boolean anyway).

Unfortunately the new GetOptions syntax loses the ability for the caller to know why the
command line arguments were bad. Maybe we would be better always returning an object and
having an is_error element?
(This used to be commit 516ba6d20b)
2007-10-10 13:34:21 -05:00
Andrew Tridgell
fef7a81478 r9491: fixed up a few scripts that need to be updated for the new GetOptions syntax. Mimir, its
a good idea to use grep -r to find places that need fixing when you change the syntax of
a call :-)
(This used to be commit 1ead49f8e8)
2007-10-10 13:34:21 -05:00
Rafal Szczesniak
55e746ad56 r9477: Convert popt options to an ejs object. Doesn't seem to break anything
except of popt help (-h) option (unexpected ?).

rafal
(This used to be commit 1990793b23)
2007-10-10 13:34:20 -05:00
Andrew Tridgell
f4aa80d88f r9465: handle encoding and decoding of pointers, representing them as a
string containing "(POINTER)"
(This used to be commit 6f69eeb8f2)
2007-10-10 13:34:18 -05:00
Andrew Tridgell
81556a9078 r9464: fixed a problem with child pointers copied into non-allocated mpr variables. We
now use the same free technique as is used for mpr strings, rather than relying on
being a child of the variable
(This used to be commit 3d6739eaa6)
2007-10-10 13:34:18 -05:00
Simo Sorce
3e4c4cff21 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
(This used to be commit 692e35b779)
2007-10-10 13:33:32 -05:00
Andrew Tridgell
80f75d4138 r9377: made winreg a user tool (I find it quite useful). I expect it to get the ability
to add/remove keys and values in the future.

add it to the standard tests, ensuring that we know if winreg
breaks. This is particularly important as winreg uses such unusual IDL
constructs
(This used to be commit e4ca36bda3)
2007-10-10 13:33:30 -05:00
Andrew Tridgell
4e3cacdaa8 r9355: return the EnumKey and EnumValue list we have so far when we get a rpc fault
(This used to be commit 3a9c63923f)
2007-10-10 13:33:27 -05:00
Andrew Tridgell
29e5e9e1e3 r9344: started adding calls for manipulation of data blobs in ejs
added:

  blobToArray()
  blobFromArray()
  blobCompare()
(This used to be commit cc5a3e9cc3)
2007-10-10 13:33:26 -05:00
Andrew Tridgell
bc6d35135d r9340: print the [in] contents when debugging even if the marshalling
failed. This makes it easier to track down marshalling bugs.
(This used to be commit a7a1752ca4)
2007-10-10 13:33:25 -05:00
Andrew Tridgell
ba6d3075bc r9339: treat arrays of uint8 values as a special DATA_BLOB type in the ejs
interfaces to RPC. This makes large blobs of data much saner. Tim, you
will probably want to do the same for the smb_interfaces.h generated
code.

Next we will need ways of extracting different data types from these
blobs, for example asking for the blob to be interpreted as a utf16
string, or as a little-endian integer. That will allow for registry
scripting to be quite sane.
(This used to be commit a8bca2e8e2)
2007-10-10 13:33:25 -05:00
Andrew Tridgell
9fffd12799 r9338: fixed the winreg IDL to be correct for the EnumKey and EnumValue
calls. The previous IDL was just a workaround for the limitations of
our older rpc infrastructure. Now that Jelmer has added much improved
string support using the charset keyword we can correctly implemenent
the unusual winreg string buffers.

Jelmer, note the little comment I put on winreg_StringBuf() about why
I couldn't use [value()] for the length field.

This also fixes EnumKey() and EnumValue() to use NTTIME fields for the
last_changed_time. I don't know why we were using a pair of uint32's,
as it is just a NTTIME.
(This used to be commit 8354b01612)
2007-10-10 13:33:25 -05:00
Andrew Tridgell
8942ac69f0 r9227: cleanup and simplify the AJAJ code
(This used to be commit ceb7669e59)
2007-10-10 13:31:34 -05:00
Andrew Tridgell
922f28fcbd r9226: make sure we catch rpc faults in the ejs rpc wrappers
(This used to be commit 3ec376141e)
2007-10-10 13:31:34 -05:00
Andrew Tridgell
924b3cc953 r9218: make the winreg library code handle arbitrary paths more efficiently
and more conveniently (caller doesn't need to know the hive names now)
(This used to be commit dadd7e22fb)
2007-10-10 13:31:32 -05:00
Andrew Tridgell
2b31c6d9d0 r9210: fixed support for a credentials element in a rpc object in ejs to not
give lots of warnings of missing properties
(This used to be commit 15737abd74)
2007-10-10 13:31:31 -05:00
Andrew Tridgell
e49aeef232 r9178: remove the old server printf code
(This used to be commit 0b96b3bfe3)
2007-10-10 13:31:29 -05:00
Andrew Tridgell
0c15c02411 r9174: ejs does not include the special variable 'length' in for loops over objects,
so we need to check for it separately in the object lineariser
(This used to be commit ea3c3d0a0f)
2007-10-10 13:31:28 -05:00
Andrew Tridgell
2ed26253c1 r9171: - support putting a credentials object in a rpc pipe object to allow authentication
with other than the command line credentials in a rpc pipe
(This used to be commit aae05ebc9c)
2007-10-10 13:31:27 -05:00
Andrew Tridgell
772d58066d r9159: abstract the winreg js functions into a nice library interface
(This used to be commit 5e39870062)
2007-10-10 13:31:25 -05:00
Andrew Tridgell
31fa87f23b r9146: - enable winreg pipe from ejs
- map the result code from rpc calls into the ejs objects

- treat winreg_String like lsa_String, hiding the length elements
(This used to be commit 2f6311c9a3)
2007-10-10 13:31:23 -05:00
Andrew Tridgell
b99bca5657 r9132: 'pointer' is better for typedef than 'C pointer'
(This used to be commit f91f5eeac9)
2007-10-10 13:31:20 -05:00
Andrew Tridgell
67180c4ccd r9131: started adding the server side code for "AJAJ" (asynchronous javascript and javascript)
This is rather like AJAX, but passes around javascript objects between
the client and server, taking advantage of the fact that we have the
same language on both client and server.
(This used to be commit 5f9e00fb7f)
2007-10-10 13:31:19 -05:00
Tim Potter
b056c7ac34 r9123: Add ejs_pull_DATA_BLOB() and ejs_pull_BOOL() although leave DATA_BLOB
unimplemented for the moment.
(This used to be commit 0e022f8d45)
2007-10-10 13:31:18 -05:00
Andrew Tridgell
beed5b8532 r9119: added a lp.categories() call in the loadparm js object, to allow
retrieval of the smb.conf parameter categories. This will make writing
a smb.conf editor easier.
(This used to be commit 8db549b150)
2007-10-10 13:31:18 -05:00
Tim Potter
1b42035bd9 r9096: Spelling.
(This used to be commit c61b29bdf0)
2007-10-10 13:31:16 -05:00
Andrew Tridgell
84da1a1050 r9082: added the ECMA functions encodeURIComponent() and
decodeURIComponent(), which I am using as part of my object
linearisation code
(This used to be commit f91f705a14)
2007-10-10 13:31:15 -05:00
Rafal Szczesniak
c11e266cba r9071: Set real and workstation fields in ejs credentials object.
rafal
(This used to be commit eb7a5d09c7)
2007-10-10 13:31:14 -05:00
Rafal Szczesniak
1702f5ba11 r9070: More fields in ejs credentials object.
rafal
(This used to be commit e819c035f7)
2007-10-10 13:31:14 -05:00
Andrew Tridgell
2a533ec684 r9059: add a basic credentials object for mimir
(This used to be commit 36a9277e87)
2007-10-10 13:31:13 -05:00
Jelmer Vernooij
7facdcc161 r8985: Automatically generate make dependency rules for
the asn1 and error table files.

This removes the need for HEIMDAL_EXTERNAL
(This used to be commit 2f481ac93c)
2007-10-10 13:31:04 -05:00
Jelmer Vernooij
36f64c0f05 r8979: Bunch of makefile fragment inclusion fixes:
- support whitespace
 - support "include " keyword
 - move swig stuff to .mk file
 - support autogenerated makefile portions (use "include echo foo|")
(This used to be commit 43779c09b6)
2007-10-10 13:31:02 -05:00
Jelmer Vernooij
9f611ffdde r8966: Simplify the makefile generation system a bit.
Autogenerate list of binaries (rather then having them hardcoded in build/smb_build/makefile.pm)
Add INSTALLDIR keyword to .mk files
(This used to be commit ce0935112b)
2007-10-10 13:31:00 -05:00
Andrew Tridgell
fc58570940 r8887: fixed the irpc error that caused ia64 to fail the LOCAL-IRPC test
(This used to be commit ce9a262d37)
2007-10-10 13:30:15 -05:00
Andrew Tridgell
bab1eb1e34 r8822: fixed number of arguments in samr lib
(This used to be commit 8eee26bb85)
2007-10-10 13:30:08 -05:00
Andrew Tridgell
f6d2892faa r8821: continue the trend to move to a more OO style of interface for our js
calls. This changes the generated RPC and IRPC calls to use the 'this'
object pointer instead of requiring the passing of the object on each
call. So typical usage is now:

var echo = echo_init();
var io = irpcObj();

status = echo.connect("ncacn_np:server");
assert(status.is_ok);

io.input.in_data = 7;
status = echo.AddOne(io);
assert(status.is_ok);
(This used to be commit f7b49ecd08)
2007-10-10 13:30:08 -05:00
Andrew Bartlett
66b2a04346 r8790: Finish the migration of aliases and privilages with SamSync, by adding
templating support for foreignSecurityPrincipals to the samdb module.
This is an extension beyond what microsoft does, and has been very
useful :-)

The setup scripts have been modified to use the new template, as has
the SAMR and LSA code.

Other cleanups in LSA remove the assumption that the short domain name
is the first component of the realm.

Also add a lot of useful debug messages, to make it clear how/why the
SamSync may have gone wrong.  Many of these should perhaps be hooked
into an error string.

Andrew Bartlett
(This used to be commit 1f071b0609)
2007-10-10 13:30:05 -05:00
Andrew Tridgell
8fbcde9450 r8742: fixed handling of zero length names in mprObject()
(This used to be commit 8086c37df6)
2007-10-10 13:30:00 -05:00
Andrew Bartlett
b16362fab6 r8700: Propmted by tridge's need to do plaintext auth in ejs, rework the
user_info strcture in auth/

This moves it to a pattern much like that found in ntvfs, with
functions to migrate between PAIN, HASH and RESPONSE passwords.

Instead of make_user_info*() functions, we simply fill in the control
block in the callers, per recent dicussions on the lists.  This
removed a lot of data copies as well as error paths, as we can grab
much of it with talloc.

Andrew Bartlett
(This used to be commit ecbd2235a3)
2007-10-10 13:29:55 -05:00
Andrew Tridgell
a369f0ecaf r8678: setup for gdb backtrace in 'make test'
(This used to be commit acf8c8fd49)
2007-10-10 13:29:53 -05:00
Andrew Bartlett
f8c1258d01 r8677: The first part of the domain name may not be equal to the netbios domain name.
Remove the use of flatname from the main domain object, we no longer
reference it.

Andrew Bartlett
(This used to be commit 2303e24be7)
2007-10-10 13:29:53 -05:00
Andrew Tridgell
4163622a0b r8661: added strstr() ejs function in string lib
(This used to be commit a569fc8924)
2007-10-10 13:29:51 -05:00
Andrew Bartlett
6173fad231 r8660: Use templates for the initial provision of user and computer accounts.
This ensures the templating code is used, and also makes it clearer
what I need to duplicate in the vampire area.

Also fix a silly bug in the template application code (the samdb
module) that caused templates to be compleatly unused (my fault, from
my commit last night).

Andrew Bartlett
(This used to be commit 4a8ef7197f)
2007-10-10 13:29:51 -05:00
Andrew Tridgell
7a8ac75887 r8659: return ldif formatted attributes in the ejs ldb search call, so sids show up as strings
not binary blobs
(This used to be commit d2c29a5a51)
2007-10-10 13:29:50 -05:00
Andrew Bartlett
24d2107324 r8650: Use the timestamps and a new objectguid module rather than placing
boilerplate attributes in every entry in provision.ldif.

The next step will be to use templates.

Andrew Bartlett
(This used to be commit 940ed9827f)
2007-10-10 13:29:50 -05:00
Andrew Tridgell
2fd92cb1b4 r8648: automatically redirect to provisioning if not yet provisioned when the
home page in swat is accessed
(This used to be commit 78fb559c08)
2007-10-10 13:29:49 -05:00
Andrew Tridgell
2f5f01567b r8643: - make lp_configfile() work again
- get rid of redundeny dyn_CONFIGFILE argument to lp_load()

- fixed provisioning to work with completely pristine install,
  creating an initial smb.conf is none is present

- added lp.set() and lp.reload() to loadparm ejs object interface
(This used to be commit c2691ef712)
2007-10-10 13:29:48 -05:00
Andrew Tridgell
d5ac1f9bf4 r8640: continue the trend by moving the ejs random calls into an object
(This used to be commit ed4fb68ef7)
2007-10-10 13:29:48 -05:00
Andrew Tridgell
86d628a292 r8639: moved loadparm calls into an ejs object
(This used to be commit 2dc493eea6)
2007-10-10 13:29:48 -05:00
Andrew Tridgell
620301858a r8638: continue the trend of maknig our C functions true ejs objects by making the string functions
into an object. To keep existing code working I have added:

  string_init(global);

into base.js. That brings the functions into the global scope for our
existing scripts
(This used to be commit a978484738)
2007-10-10 13:29:48 -05:00
Andrew Tridgell
3d59490a40 r8637: added sys.stat() and sys.lstat() calls
(This used to be commit 5dbdf4fb33)
2007-10-10 13:29:48 -05:00
Andrew Tridgell
240ca36cf2 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.
(This used to be commit 6a1ed328e2)
2007-10-10 13:29:47 -05:00
Andrew Tridgell
d6c20a5c8a r8633: check for valid input to ejs_userAuth()
(This used to be commit 8e788ae309)
2007-10-10 13:29:46 -05:00
Andrew Tridgell
e9c925f872 r8629: - moved the getDomainList() call out of smbcalls_auth.c and into libjs/auth.js
- tried to make the ejs_userAuth() call work for the sam, not just for
  unix auth. I didn't get this working. Andrew, when you get a chance
  can you see what I'm doing wrong? I suspect its because we aren't
  supplying a challenge, but a challenge doesn't really make sense in a
  'is this username/password' correct call.
(This used to be commit 9e07c08a71)
2007-10-10 13:29:46 -05:00
Andrew Tridgell
8f16aa6c17 r8603: we have to use the same db name as the rest of smbd uses so the ldb connect
works when already open
(This used to be commit 1183f54c8d)
2007-10-10 13:29:44 -05:00
Andrew Tridgell
da88ef65e0 r8602: allow options in ldb connect calls
(This used to be commit 4c1d6a97c0)
2007-10-10 13:29:44 -05:00
Andrew Tridgell
82f1a9474d r8590: added server status utility functions for checking on the status of a task via irpc
- for stream tasks, returns the number of connections

- for non-stream tasks, returns "RUNNING"

For both, return "DISABLED" or "NOT RESPONDING" appropriately
(This used to be commit 78d6303814)
2007-10-10 13:29:42 -05:00
Andrew Tridgell
0e7b9f84ce r8589: - support --version option to smbstatus
- print samba version at startup
(This used to be commit eb3e4bbe7f)
2007-10-10 13:29:42 -05:00
Andrew Tridgell
cb060f8bac r8584: added --nbt option to smbstatus for nbt server statistics
(This used to be commit 26a676a4e3)
2007-10-10 13:29:41 -05:00
Andrew Tridgell
ef948e53b7 r8583: nicer smbstatus output
(This used to be commit 0578bcdf7f)
2007-10-10 13:29:41 -05:00
Andrew Tridgell
afe0fffc44 r8582: added sys.httptime() call, to display a NTTIME as a http time string
(This used to be commit 632f7bbe3e)
2007-10-10 13:29:41 -05:00
Andrew Tridgell
6615b40601 r8581: fixed handling of 64 bit integers in rpc calls from ejs
(This used to be commit 2ae6a33846)
2007-10-10 13:29:41 -05:00
Andrew Tridgell
a32fe0f293 r8577: added management calls to list current tree connects
(This used to be commit 658befc1e4)
2007-10-10 13:29:40 -05:00
Andrew Tridgell
340b3d7301 r8575: the beginnings of a smbstatus command
(This used to be commit 4ecaf72a31)
2007-10-10 13:29:40 -05:00
Andrew Tridgell
1bc4bd4c14 r8570: delete all records in the old db when provisioning, rather than using
sys.unlink(). This allows smbd to see the new db without restarting.
(This used to be commit 71004aa165)
2007-10-10 13:29:39 -05:00