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

130 Commits

Author SHA1 Message Date
Andrew Bartlett
9c6b637ce8 s4:auth Change auth_generate_session_info to take flags
This allows us to control what groups should be added in what use
cases, and in particular to more carefully control the introduction of
the 'authenticated' group.

In particular, in the 'service_named_pipe' protocol, we do not have
control over the addition of the authenticated users group, so we key
of 'is this user the anonymous SID'.

This also takes more care to allocate the right length ptoken->sids

Andrew Bartlett
2010-05-20 17:39:10 +10:00
Andrew Bartlett
5f9024c8a4 s4:auth Move BUILTIN group addition into session.c
The group list in the PAC does not include 'enterprise DCs' and
BUILTIN groups, so we should generate it on each server, not in the
list we pass around in the PAC or SamLogon reply.

Andrew Bartlett
2010-05-20 17:39:09 +10:00
Matthias Dieter Wallnöfer
fd00867e85 s4:samdb.c - Make it signed-safe
Use an unsigned argument for the numbers of groups and the counter "i" since
the function is called only by "auth_generate_session_info" with an unsigned
number of groups argument.
2010-03-03 20:15:25 +01:00
Andrew Bartlett
a9d9447d5a s4:credentials Add hooks to extract a named Kerberos credentials cache
This allows the integration of external tools that can't be linked
into C or python, but need to authenticate as the local machine
account.

The machineaccountccache script demonstrates this, and debugging has
been improved in cli_credentials_set_secrets() by passing back and
error string.

Andrew Bartlett
2010-02-20 17:58:07 +11:00
Andrew Bartlett
7d38bb4e93 Remove special case logic in 'samdb_relative_path'.
While this logic (avoiding to prefix a non-filename with a path) is
important in the code this was copied from (private_dir()), none of
the callers of this function need it.

Andrew Bartlett
2009-11-02 16:36:53 +11:00
Andrew Tridgell
798b05a974 s4-dsdb: call dsdb_make_schema_global() from ldb_wrap
Calling it from samdb_connect() can cause a stale schema to be put
into the global schema.

Thanks to Andrew Bartlett for spotting this.
2009-10-27 20:30:53 +11:00
Andrew Tridgell
0b624d9eff s4-samdb: make sure the static credentials are never freed 2009-10-23 14:54:07 +11:00
Andrew Tridgell
05f93c3e8f s4-dsdb: add a static samdb_credentials
Similarly to system_session(), this creates a static
samdb_credentials()
2009-10-23 14:52:17 +11:00
Andrew Bartlett
4209cf9860 s4:dsdb Make the 'relative path' code in partitions handle tdb://
The previous code would fail if the caller used tdb:// in the URL for the
top-level database.

Andrew Bartlett
2009-10-21 22:43:57 +11:00
Matthias Dieter Wallnöfer
076ca26cfe s4:templates - Remove the latest relics (in "dcesrv_lsa_CreateSecret") 2009-09-07 14:36:39 +02:00
Günther Deschner
8db45607f8 libds: share UF_ flags between samba3 and 4.
Guenther
2009-07-13 15:36:06 +02:00
Matthias Dieter Wallnöfer
4aa335be11 SAMDB: Don't check for "sAMAccountName" twice 2009-06-29 13:40:45 +10:00
Stefan Metzmacher
183c379fe5 s4:lib/tevent: rename structs
list=""
list="$list event_context:tevent_context"
list="$list fd_event:tevent_fd"
list="$list timed_event:tevent_timer"

for s in $list; do
	o=`echo $s | cut -d ':' -f1`
	n=`echo $s | cut -d ':' -f2`
	r=`git grep "struct $o" |cut -d ':' -f1 |sort -u`
	files=`echo "$r" | grep -v source3 | grep -v nsswitch | grep -v packaging4`
	for f in $files; do
		cat $f | sed -e "s/struct $o/struct $n/g" > $f.tmp
		mv $f.tmp $f
	done
done

metze
2008-12-29 20:46:40 +01:00
Jelmer Vernooij
9565999755 Fix include paths to new location of libutil. 2008-10-11 21:31:42 +02:00
Simo Sorce
508527890a Merge ldb_search() and ldb_search_exp_fmt() into a simgle function.
The previous ldb_search() interface made it way too easy to leak results,
and being able to use a printf-like expression turns to be really useful.
2008-09-23 18:17:46 -04:00
Andrew Bartlett
532899386b Use secrets.ldb to store credentials to contact LDAP backend.
This makes Samba4 behave much like Samba3 did, and use a single set of
administrative credentials for it's connection to LDAP.

Andrew Bartlett
(This used to be commit e396a59788)
2008-07-15 15:07:13 +10:00
Simo Sorce
2daf2897d5 Use a custom init function for samba4 that sets a samba4
specific debug function.
By default do not debug, this is the most appropriate action for a library
as we cannot assume what stderr is use for in the main app.
The main app is responsible to set ev_debug_stderr if they so desire.
(This used to be commit e566a2f308)
2008-06-14 13:00:53 -04:00
Simo Sorce
929adc9efa Make up the right dependencies now that ldb depends on libevents
(This used to be commit 3b8eec7ca3)
2008-06-14 11:59:19 -04:00
Simo Sorce
7dddab3f6c Make sure we have an event context available
(This used to be commit b7c96e0cc2)
2008-04-21 19:53:29 -04:00
Jelmer Vernooij
21fc767378 Specify event_context to ldb_wrap_connect explicitly.
(This used to be commit b4e1ae07a2)
2008-04-17 12:23:44 +02:00
Andrew Bartlett
19fcdb2e8a Give a more useful error when the templates.ldb can't be found.
Andrew Bartlett
(This used to be commit 26108eb66b)
2008-02-09 14:02:14 +11:00
Andrew Bartlett
ac4810f1bb Remove 'dn' from mapping, it isn't a valid attribute in AD, and causes
problems with ldap.js test with OpenLDAP as the backend.

Likewise, remove it from the template lookup (for consistancy).

TODO:  see if it can be removed from ldb

Andrew Bartlett
(This used to be commit 47a1b76f7f)
2008-01-11 15:19:27 +11:00
Jelmer Vernooij
71e2cafe96 r26483: Merge ldb module dependency fixes, fix auth python module.
(This used to be commit 85eeecf997)
2007-12-21 05:50:41 +01:00
Jelmer Vernooij
41db2ab12c r26319: Split encoding functions out of libcli_ldap.
(This used to be commit 95a6ef7fc8)
2007-12-21 05:48:33 +01:00
Andrew Bartlett
f5860b5a85 r26298: Use metze's schema loading code to pre-initialise the schema into the
samdb before we start writing entries into it.

In doing so, I realised we still used 'dnsDomain', which is not part
of the standard schema (now removed).

We also set the 'wrong' side of the linked attributes for the
masteredBy on each partition - this is now set in provision_self_join
and backlinks via the linked attributes code.

When we have the schema loaded, we must also have a valid domain SID
loaded, so that the objectclass module works.  This required some ejs
glue.

Andrew Bartlett
(This used to be commit b0de08916e)
2007-12-21 05:48:15 +01:00
Jelmer Vernooij
934e932387 r26235: Avoid global_loadparm.
(This used to be commit e903978220)
2007-12-21 05:47:13 +01:00
Jelmer Vernooij
cc04f143dc r26229: Set loadparm context as opaque pointer in ldb, remove more uses of global_loadparm.
(This used to be commit 37d05fdc7b)
2007-12-21 05:47:06 +01:00
Jelmer Vernooij
f4a1083cf9 r26227: Make loadparm_context part of a server task, move loadparm_contexts further up the call stack.
(This used to be commit 0721a07aad)
2007-12-21 05:47:04 +01:00
Andrew Bartlett
25143a2648 r26135: Remove samdb_add(), samdb_delete() and samdb_modify(), which were just
wrappers to ldb_add() etc.  samdb_replace() remains, as it sets flags on
all entries as 'replace'.

Andrew Bartlett
(This used to be commit 09c0faa5b7)
2007-12-21 05:46:17 +01:00
Jelmer Vernooij
ca0b72a1fd r26003: Split up DB_WRAP, as first step in an attempt to sanitize dependencies.
(This used to be commit 56dfcb4f2f)
2007-12-21 05:45:40 +01:00
Andrew Bartlett
b34f286d3a r25949: Make error messages clearer and more correct.
Andrew Bartlett
(This used to be commit f0a0d73f76)
2007-12-21 05:45:13 +01:00
Andrew Bartlett
3f2ca10d2d r25940: Rework the samldb and templates handling.
Templates just don't belong in the sam.ldb, as they don't obey any of
the other rules.  This moves them to a seperate templates.ldb.

In samldb, this patch reworks the duplicate SID and Name detection
code, to use ldb_search_exp_fmt() rather than gendb_search.  This
returns far more useful errors, which we now handle and report better.

The call to samdb_search_for_parent_domain() has been moved in samldb,
to allow both the account and SID uniqueness checks to be in the same
domain.  This function also returns better errors.

dcesrv_drsuapi.c is updated for the new prototype of
samdb_search_for_parent_domain()

Andrew Bartlett
(This used to be commit f1ab90c88c)
2007-12-21 05:45:10 +01:00
Stefan Metzmacher
529763a9aa r25920: ndr: change NTSTAUS into enum ndr_err_code (samba4 callers)
lib/messaging/
lib/registry/
lib/ldb-samba/
librpc/rpc/
auth/auth_winbind.c
auth/gensec/
auth/kerberos/
dsdb/repl/
dsdb/samdb/
dsdb/schema/
torture/
cluster/ctdb/
kdc/
ntvfs/ipc/
torture/rap/
ntvfs/
utils/getntacl.c
ntptr/
smb_server/
libcli/wrepl/
wrepl_server/
libcli/cldap/
libcli/dgram/
libcli/ldap/
libcli/raw/
libcli/nbt/
libnet/
winbind/
rpc_server/

metze
(This used to be commit 6223c7fddc)
2007-12-21 05:45:02 +01:00
Jelmer Vernooij
05e7c48146 r25553: Convert to standard bool type.
(This used to be commit b7371f1a19)
2007-10-10 15:07:54 -05:00
Jelmer Vernooij
2f3551ca7c 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.
(This used to be commit 3468952e77)
2007-10-10 15:07:34 -05:00
Jelmer Vernooij
37d53832a4 r25398: Parse loadparm context to all lp_*() functions.
(This used to be commit 3fcc960839)
2007-10-10 15:07:25 -05:00
Andrew Bartlett
4870c0dd00 r25268: Thanks to Andrew Kroeger for pointing out on IRC that this is
compleatly dead code.

Andrew Bartlett
(This used to be commit 5838aca79b)
2007-10-10 15:07:03 -05:00
Jelmer Vernooij
ffeee68e4b r25026: Move param/param.h out of includes.h
(This used to be commit abe8349f9b)
2007-10-10 15:05:38 -05:00
Jelmer Vernooij
cd962355ab r25000: Fix some more C++ compatibility warnings.
(This used to be commit 08bb1ef643)
2007-10-10 15:05:27 -05:00
Andrew Bartlett
1d95a18a9b r24986: LDB has a function for comparing things that must meet the rules of
attribute names.

Andrew Bartlett
(This used to be commit 46e3875806)
2007-10-10 15:05:23 -05:00
Andrew Bartlett
bb84655d65 r24941: Simplify samdb_result_nttime(), and remove nttime_from_string()
Andrew Bartlett
(This used to be commit bcd994a139)
2007-10-10 15:03:40 -05:00
Andrew Bartlett
6a92d816a7 r24918: Fix the build (forgot to include dcesrv_lsa.c in the previous commit)
and improve error strings returned from samdb.c

Andrew Bartlett
(This used to be commit a42d0eb531)
2007-10-10 15:03:38 -05:00
Andrew Bartlett
8294016a1b r24914: In response to bug #4892 by Matthias Wallnöfer <mwallnoefer@yahoo.de>,
allow the objectclass module to reconstruct the objectclass hierarchy,
rather than using templates.

The issue being fixed in particular is that 'top' was not being set on
containers.

This should ensure we do this right for all objects.

Andrew Bartlett
(This used to be commit d17a0058ba)
2007-10-10 15:03:37 -05:00
Andrew Bartlett
d7f84b51f9 r24611: Following up on the re-opening of bug 4817 is it pretty clear that
machine accounts are not subject to password policy in Win2k3 R2 (at
least in terms of password quality).

In testing this, I found that Win2k3 R2 has changed the way the old
ChangePassword RPC call is handled - the 'cross-checks' between new LM
and NT passwords are not required.

Andrew Bartlett
(This used to be commit 417ea885b4)
2007-10-10 15:02:23 -05:00
Andrew Tridgell
0479a2f1cb 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.
(This used to be commit fcf38a38ac)
2007-10-10 14:59:12 -05:00
Andrew Bartlett
e9d19477e4 r23560: - Activate metze's schema modules (from metze's schema-loading-13 patch).
- samba3sam.js: rework the samba3sam test to not use objectCategory,
  as it's has special rules (dnsName a simple match)
- ldap.js: Test the ordering of the objectClass attributes for the baseDN
- schema_init.c: Load the mayContain and mustContain (and system...) attributes when
  reading the schema from ldb
- To make the schema load not suck in terms of performance, write the
  schema into a static global variable
- ldif_handlers.c: Match objectCategory for equality and canonicolisation
  based on the loaded schema, not simple tring manipuation
- ldb_msg.c: don't duplicate attributes when adding attributes to a list
- kludge_acl.c: return allowedAttributesEffective based on schema results
  and privilages

Andrew Bartlett
(This used to be commit dcff83ebe4)
2007-10-10 14:53:27 -05:00
Andrew Bartlett
ba6f0b0c48 r22522: Print why we can't find these entries.
Andrew Bartlett
(This used to be commit 465f181168)
2007-10-10 14:51:37 -05:00
Stefan Metzmacher
6cb8ac851c r21503: add usefull function to get the site dn for the local server
metze
(This used to be commit 08b8e9acff)
2007-10-10 14:48:46 -05:00
Stefan Metzmacher
3b14713f6d r21362: rename:
"ntPwdHash" => "unicodePwd"
"lmPwdHash" => "dBCSPwd"
"sambaLMPwdHistory" => "lmPwdHistory"
"sambaNTPwdHistory" => "ntPwdHistory"

Note: you need to reprovision after this change!

metze
(This used to be commit dc4242c09c)
2007-10-10 14:48:20 -05:00
Stefan Metzmacher
3b956f0779 r20779: fix compiler warnings
metze
(This used to be commit 0b98f11d3e)
2007-10-10 14:40:53 -05:00