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

545 Commits

Author SHA1 Message Date
Andrew Bartlett
7b169aad3f r12891: We no longer manually set the 'name' attribute.
Andrew Bartlett
2007-10-10 13:50:58 -05:00
Andrew Bartlett
002cdcf3ca 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
2007-10-10 13:50:02 -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
7a7b2668c0 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
2007-10-10 13:50:01 -05:00
Andrew Bartlett
88198c4881 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
2007-10-10 13:49:57 -05:00
Andrew Bartlett
42cdad5e3f r12749: Fix the newuser script.
Andrew Bartlett
2007-10-10 13:49:49 -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
b349d2fbfe 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
2007-10-10 13:49:48 -05:00
Andrew Bartlett
0f8c162211 r12738: Use a talloc_reference to ensure this doesn't get free()'ed too early.
Andrew Bartlett
2007-10-10 13:49:47 -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
5884a7efff r12704: role => server role 2007-10-10 13:49:43 -05:00
Jelmer Vernooij
4c562c42b4 r12703: Fix handling of short passdb backends (also reported by Steinar Gunderson) 2007-10-10 13:49:43 -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
Jelmer Vernooij
3d70ebca0b r12697: Support empty fullname fields in unix accounts 2007-10-10 13:49:40 -05:00
Jelmer Vernooij
f4ac7d6359 r12695: A dot is allowed in NetBIOS names. 2007-10-10 13:49:39 -05:00
Jelmer Vernooij
c722f665c9 r12694: Move some headers to the directory of the subsystem they belong to. 2007-10-10 13:49:39 -05:00
Jelmer Vernooij
9e0ba38037 r12622: Move table.c prototypes to seperate header to prevent circular dependencies
with proto.h
2007-10-10 13:49:06 -05:00
Jelmer Vernooij
44f0aba715 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).
2007-10-10 13:49:06 -05:00
Jelmer Vernooij
70e7449318 r12608: Remove some unused #include lines. 2007-10-10 13:49:03 -05:00
Andrew Bartlett
2853ccfc8a r12596: This variable is unused.
Andrew Bartlett
2007-10-10 13:49:00 -05:00
Jelmer Vernooij
ca8db1a0cd r12592: Remove some useless dependencies 2007-10-10 13:49:00 -05:00
Andrew Bartlett
fe36cb6767 r12533: Get the ldb.errstring() out to the user on failure. It helps a lot
with debugging!

Andrew Bartlett
2007-10-10 13:47:52 -05:00
Andrew Tridgell
f79d90bd13 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
2007-10-10 13:47:52 -05:00
Jelmer Vernooij
832a1092c9 r12517: Don't generate empty init functions 2007-10-10 13:47:51 -05:00
Jelmer Vernooij
b46eeba9fc r12516: Fix drsuapi and netlogon javascript bindings 2007-10-10 13:47:51 -05:00
Jelmer Vernooij
b1286a6d27 r12514: Move DCE/RPC interface table to a seperate file
Be a bit more strict when checking for duplicate interfaces
2007-10-10 13:47:49 -05:00
Jelmer Vernooij
8aae0f168e 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.
2007-10-10 13:47:48 -05:00
Jelmer Vernooij
1e8670874b 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.
2007-10-10 13:47:46 -05:00
Jelmer Vernooij
f6bbc72996 r12500: Use init functions explicitly in a few more places. 'gensec' and 'librpc'
are the only two subsystems left to convert.
2007-10-10 13:47:46 -05:00
Jelmer Vernooij
c92ace494f r12499: Move smb_build.h out of includes.h 2007-10-10 13:47:45 -05:00
Jelmer Vernooij
7ca00cd918 r12445: Fix header in manpage, make script executable 2007-10-10 13:47:40 -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
175f616d74 r12252: With this change (hack) we can now do an provision onto Samba4's LDAP
server.  Now to try another one...

Andrew Bartlett
2007-10-10 13:47:24 -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
Jelmer Vernooij
ba913b86e8 r12218: Use common functions for generating lists 2007-10-10 13:47:21 -05:00
Rafal Szczesniak
c95d30d38c r12104: Move to (sync) smb_composite_connect from smbcli_tree_full_connection()
This is one of the last places using the latter function.

rafal
2007-10-10 13:47:09 -05:00
Stefan Metzmacher
bd4f85ab5f r12014: free the irpc_request structure with the irpc_call_recv functions,
to match all other _recv functions we have

metze
2007-10-10 13:46:59 -05:00
Stefan Metzmacher
4d35c2b8e6 r12013: fix compiler warnings
metze
2007-10-10 13:46:59 -05:00
Stefan Metzmacher
e5654f9791 r12012: fix renaming smbsrv_trees -> smbsrv_tcons
metze
2007-10-10 13:46:59 -05:00
Andrew Bartlett
6b75573df4 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.
2007-10-10 13:46:56 -05:00
Andrew Tridgell
4b56c129c6 r11956: removed the old rootdse.ldif, and the provision.js code that uses it 2007-10-10 13:46:50 -05:00
Rafal Szczesniak
6dc67ba6a3 r11814: 1) Set name resolution methods according to smb.conf
2) Set credentials workstation name, otherwise rpc bind function
   segfaults on auth stage

rafal
2007-10-10 13:46:32 -05:00
Stefan Metzmacher
acd3e644e0 r11781: rename tree to tcons to match the sessions substructure of smbsrv_connection
metze
2007-10-10 13:46:26 -05:00
Rafal Szczesniak
739169e8ed r11748: By default, use name resolution method provided by means
of smb.conf.

rafal
2007-10-10 13:46:21 -05:00
Rafal Szczesniak
90db7f13bc r11588: Remove unused (at the moment) variable and quiet compiler warning.
rafal
2007-10-10 13:45:55 -05:00
Rafal Szczesniak
25310d0592 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
2007-10-10 13:45:54 -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
696fa87a21 r11501: change provision code to use the new display specifiers 2007-10-10 13:45:45 -05:00