1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00
Commit Graph

130 Commits

Author SHA1 Message Date
Gerald Carter
eafd53a7e7 added idmap_ldap to wrong branch. 0001-01-01 00:00:00 +00:00
cvs2svn Import User
7a85a96325 This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'. 0001-01-01 00:00:00 +00:00
Gerald Carter
69c84ad06b initial version of idmap_ldap.c; lots of updates to come 0001-01-01 00:00:00 +00:00
Jeremy Allison
b6b844a1a2 function() is *NOT* a valid C proto, but C++ only.
The correct prototype in C is function(void).
Please remember this !
Jeremy.
0001-01-01 00:00:00 +00:00
Jelmer Vernooij
7e352f5c62 Add smb_register_idmap(). Based on a patch from metze 0001-01-01 00:00:00 +00:00
Simo Sorce
b24c0efc4b add idmap_winbind unless I made a better way to solve SID type for domain
SIDs
0001-01-01 00:00:00 +00:00
Gerald Carter
a1326ea348 syncing LDAP schema changes with Samba_3_0 0001-01-01 00:00:00 +00:00
Gerald Carter
998586e652 *****LDAP schema changes*****
New objectclass named sambaSamAccount which uses attribute
prefaced with the phrase 'samba' to prevent future name clashes.

Change in functionality of the 'ldap filter' parameter.  This always
defaults to "(uid=%u)" now and is and'd with the approriate objectclass
depending on whether you are using ldapsam_compat or ldapsam

conversion script for migrating from sambaAccount to
sambaSamAccount will come next.
0001-01-01 00:00:00 +00:00
Jeremy Allison
e12934c67b Fix compiler warnings.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
2a6d0c2481 Fix obvious compiler warnings.
Jeremy.
0001-01-01 00:00:00 +00:00
cvs2svn Import User
f1e5990657 This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'. 0001-01-01 00:00:00 +00:00
Simo Sorce
921215cf4b fixes to *_util.c files
add winbindd_passdb backend
this makes it possible to have nua accounts on security = user servers to
show up in unic through nss_winbind.so

the problem is that we do not have group support, so nss group support is
not very good at this time (read: totally absent)

we NEED group support in passdb
0001-01-01 00:00:00 +00:00
Simo Sorce
21701876dc shouldn't wellknown group be well.. ..WKN_GRP ?
make a new sam_Account contain our domain by default, windows will complain
on logon otherwise.
fix stupid typo in idmap_util.c
0001-01-01 00:00:00 +00:00
Simo Sorce
7ae6162e1d fix wrong debug messages in idmap_util.c
correctly handle allocated rids in tdbsam
0001-01-01 00:00:00 +00:00
Simo Sorce
62365023db init wellknown in pdbedit too
add group mapping mappings to idmap at startup
0001-01-01 00:00:00 +00:00
Simo Sorce
568feee897 proper wellknown sids initialization at startup 0001-01-01 00:00:00 +00:00
cvs2svn Import User
a1ffe2a29c This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'. 0001-01-01 00:00:00 +00:00
Simo Sorce
6d036761e5 *id_to_*id call reshape to return NTSTATUS errors
plus internal fixes
1st stage
0001-01-01 00:00:00 +00:00
Simo Sorce
6a7689cf74 correctly initiazlize idmap tdb when creationg new
few fixes to *id_to_*id functions, we don't set the mapping for algoritmic
RIDs, they are resolved in the classic way
eliminate getpw* calls from tdbsam
0001-01-01 00:00:00 +00:00
Simo Sorce
db571a9fd7 auto-init for utility functions 0001-01-01 00:00:00 +00:00
Simo Sorce
6a6f603246 This is a nice rewrite:
SAM_ACCOUNT does not have anymore uid and gid fields
all the code that used them has been fixed to use the proper idmap calls

fix to idmap_tdb for first time idmap.tdb initialization.

auth_serversupplied_info structure has now an uid and gid field

few other fixes to make the system behave correctly with idmap

tested only with tdbsam, but smbpasswd and nisplus should be ok

have not tested ldap !
0001-01-01 00:00:00 +00:00
Simo Sorce
3c2963f8e3 forgot to add the file where things moved 0001-01-01 00:00:00 +00:00
Simo Sorce
f7041ec5d7 consolidate idmap code in one place 0001-01-01 00:00:00 +00:00
Simo Sorce
9d7d007443 make winbind use idmap as well.
change idmap_init call

removed ldap backend for winbind idmap, seem it had problems anyway and it
have to be reworked to work with idmap without calling winbind code.

simo
0001-01-01 00:00:00 +00:00
Simo Sorce
ff051e9cf4 enhancements 0001-01-01 00:00:00 +00:00
Simo Sorce
bec45093c3 add idmap only parameter
make idmap not map SIDs outside the uid/gid range defined by default
this is to keep backward compatibility
0001-01-01 00:00:00 +00:00
Jelmer Vernooij
aa07b12fda Patch from Stefan Metzmacher to add default parameters to the lp_parm()
smb.conf parameters along with some other small fixes. Binary
compatible with older modules.
0001-01-01 00:00:00 +00:00
Simo Sorce
bc95de4ebb fixes
fix debug, add "idmap" string to the list of classes
fix idmap, check init failures, and enhance debugging
fix idmap_tdb, _do_ init uid and gid low,high states (too bad I missed that
before)
fix smbd/uid.c, use gid_t for gids and uid_t for uids
0001-01-01 00:00:00 +00:00
Simo Sorce
6393105bda seem that someone changed the semanthic of unix_strlower without fixing all
places where it was used, this caused me segfaults in the last week :(

add more debugging in idmap to chase down a problem
0001-01-01 00:00:00 +00:00
Andrew Bartlett
aeaa60c843 NTSTATUS strings are much more use than raw numbers... 0001-01-01 00:00:00 +00:00
Simo Sorce
9374f8692f some more debugging in case of failure 0001-01-01 00:00:00 +00:00
Simo Sorce
ad1a2ab0d6 fix commit 0001-01-01 00:00:00 +00:00
Simo Sorce
cf17261519 This commit make winbindd copy winbindd_idmap.tdb into idmap.tdb on the
first run if idmap.tdb is not found, and then eventually convert it to the
new format.
This is done to unify winbind and idmap databases and to make a backup of
winbindd_idmap.tdb in case you want to downgrade (of course it will not be
updated).
This is needed because idmap.tdb contains also local mappings, not only
foreign domains mappings.

Added some other fixes/improvements

Simo.
0001-01-01 00:00:00 +00:00
Simo Sorce
5ac94535d7 some more idmapping :) 0001-01-01 00:00:00 +00:00
Tim Potter
9c706be7b4 Fixed compiler warning. 0001-01-01 00:00:00 +00:00
Simo Sorce
0278132047 THE Idmap patch :-)
includes a --with-idmap=no switch to disable idmap usage if you find
problems.

cosmetic fixes and param aliases to separate winbind from idamp roles.

A temporarily remote idmap winbind compatibility backend.
As I have time I will further change code to not call directly winbind
(partly done but not tested) and a specilized module will be built in place
for the current glue hack.

The patch has been tested locally in my limited time, the patch is simple and
clear and should not reserve problems, if any just disable it.

As usual, comments and fisex are welcome :-)

Simo.
0001-01-01 00:00:00 +00:00
Jelmer Vernooij
e149e70717 - Use FUNCTION_MACRO, not __FUNCTION__.
- Add some const
0001-01-01 00:00:00 +00:00
Simo Sorce
8fb4e210bc more on idmap
two layers structure with
- local tdb cache
- remote idmap repository

compiles
0001-01-01 00:00:00 +00:00
Simo Sorce
0d6cec90c1 some more code
(not tested yet)
0001-01-01 00:00:00 +00:00
Simo Sorce
8338e74ac4 initial work for the new idmpa interface 0001-01-01 00:00:00 +00:00
Simo Sorce
4c6d461a85 Some progress towards gums and tdbsam2
genparser works fine, and it is a marvelous tool to store objects in tdb :)
0001-01-01 00:00:00 +00:00
Simo Sorce
54f11b7de8 some more work on gums.
- Building a tdbsam2 backend to see what I got right and what not about the proposed API
- Corrections to API based on tdbsam2 work
0001-01-01 00:00:00 +00:00
Jeremy Allison
784d15761c Finish adding strings to all talloc_init() calls.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
20a44d4cf1 talloc_init_named -> talloc_init.
Jeremy.
0001-01-01 00:00:00 +00:00
Simo Sorce
831d3d1ec7 updates to the gums
introduce genparser will be used by tdbsam2
0001-01-01 00:00:00 +00:00
Tim Potter
2a9d183cf6 Remove FILE_MACRO as __FILE__ is ANSI C. 0001-01-01 00:00:00 +00:00
Herb Lewis
243763d6eb use FILE_MACRO instead of __FILE__
use FUNCTION_MACRO instead of __FUNCTION_
0001-01-01 00:00:00 +00:00
Jelmer Vernooij
cda79af76a Remove SAM from 3.0 - it belongs in HEAD 0001-01-01 00:00:00 +00:00
Simo Sorce
cae9074405 Some was asking to look at this code, so better it stay there until we decide what to do with it.
Last updates are support for the right way to support privileges.

Simo.
0001-01-01 00:00:00 +00:00
Jelmer Vernooij
2a598d435d Sync with metze's CVS tree 0001-01-01 00:00:00 +00:00
Jelmer Vernooij
82a0abf4c8 Don't use SAM FLAGS from smb.h since they're gone - patch from metze 0001-01-01 00:00:00 +00:00
Simo Sorce
a123e05877 try to put every security descriptors related definitions in the same file.
also try to uniform names to a clean scheme.

first part.
0001-01-01 00:00:00 +00:00
Jelmer Vernooij
598039599c strchr -> strrchr 0001-01-01 00:00:00 +00:00
Andrew Bartlett
b9036900d0 Remove sam/api.c.
In order to reduce complexity, this patch removes the upper layer of the SAM
API.  Also, we remove the function pointers on the sam context - there really
is no point making these replaceable - that's for the modules.

Move a number of functions in include/interface.c around to allow for use of
'static' and to keep the external API in one chunk, at the bottem.  All these
functions were renamed to remove the context_sam -> sam

Consequential changes in the samtest module, and back out metze's change for
ACB filtering, becouse I think it belongs in the SAM backeds.  (But I will take
debate on this one).

Changes to the lib/util_sid.c code to create a 'system' token, and make it a
SAM_ASSERT() enforced requirement to have a token on those calls that specify
it.  samtest now uses this.

We should have a samtest call to set your own token.

We also need to extend our se_access code to cover the things that Win2k is
returning in it's access tokens.  Currently our system token doesn't pass, due
to unexpected flags.  (When running sam_ads against Win2k)

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
85122800fc Updates for sam_ads by metze - add the start of domain policy searching, and a
small fix for the previous merge.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Jelmer Vernooij
470a131632 Fix typos + report FIXME 0001-01-01 00:00:00 +00:00
Andrew Bartlett
dc8b0d23e0 Back out one of the API changes, now I recall how it was meant to work.
(New accounts are created on thier internal talloc context, not a supplied one
and not the one beloning to the SAM)

Also actaully add the sam_skel to the tree.

I need to work out with Jelmer an appropriate way to ensure we still have an
example external build, and if this should move back out again.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
24fb0cde2f Add the beginings of sam_ads to the tree.
This module, primarilly the work of "Stefan (metze) Metzmacher"
<metze@metzemix.de>, uses the Active Directory schema to store the
user/group/other information.  I've been testing it against a real AD server,
and it is intended to work with OpenLDAP as well.

I've moved a few functions around in our other libads code, which has made it
easier to tap into that existing code.

Also, I've made some changes to the SAM interface, I hope there are not too
many objections...   To ensure we don't get silly bugs in the skel module, it
is now in the default compile.  This way you should not forget to update it :-)

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Gerald Carter
e026b84815 syncing up with HEAD again.... 0001-01-01 00:00:00 +00:00
Jelmer Vernooij
1430473d3f Fix segfault in sam_context_enum_domains - reported by Kai 0001-01-01 00:00:00 +00:00
Jelmer Vernooij
81156d6556 Add samtest command 'enum_accounts' + few typo fixes in sam/interface.c 0001-01-01 00:00:00 +00:00
Jelmer Vernooij
d312e1c2b4 enum_domains shouldn't crash when there are no domains available 0001-01-01 00:00:00 +00:00
Jelmer Vernooij
0c01219850 Fix bug in get_methods_by_name
Fix bug in enum_domains
Add samtest commands:
 - lookup_sid
 - lookup_name
 - enum_domains
 - lookup_domain
0001-01-01 00:00:00 +00:00
Jelmer Vernooij
50d2527eed - Don't put pointer to sam_domain_handle in sam_methods but single domainsid and domainname
- Allocate sam_methods, set domain_sid, domain_name and backend_name in make_sam_methods_backend_entry instead of in the backend
- Remove sam_context and domain_sid pointers from the sam_init_function - we don't need those arguments anymore since they're
  available in sam_methods as well
0001-01-01 00:00:00 +00:00
Jelmer Vernooij
2fe72652ee Move functionality to check whether entries for lp_workgroup() and "BUILTIN"
exist and add them if necessary from check_correct_backend_entries into
sam_context_check_default_backends. The reason for this is that we don't
always want to have BUILTIN and lp_workgroup() in a sam_context, for example
when doing sam2sam. check_correct_backend_entries has been renamed to
'check_duplicate_backend_entries' since that's what it currently does.

The sam_context_check_default_backends() function is only called
by sam_get_static_context(BOOL reload) currently currently.
0001-01-01 00:00:00 +00:00
Jelmer Vernooij
60ab55fedf Merge in first command for 'samtest'
Fix small bug in sam/interface.c
Make sam backend to default to a define
0001-01-01 00:00:00 +00:00
Jelmer Vernooij
56cb03bfc6 Patch from Stefan (metze) Metzmacher with more updates for the SAM subsystem 0001-01-01 00:00:00 +00:00
Andrew Bartlett
4d642e1fa4 Fix some missing ; on the end of our SAM_ASSERT()... 0001-01-01 00:00:00 +00:00
Andrew Bartlett
5f59abb410 Get our consts back in line with current norms - only for pointer protection.
Debate about extending this policy welcomed on samba-technical.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
f91fcb1661 Updates to sam_skel from metze, add sam/group.c and add a DEBUG() to the
SAM_ASSERT if we are not going to crash.
0001-01-01 00:00:00 +00:00
Andrew Bartlett
e13bc43262 This commit includes part of the patch from metze posted to the list, and a few
of my own changes.

In particular:  I've added a SAM_ASSERT macro.  This expands to either
SMB_ASSERT() (which should help us track down bugs) or a return of
NT_STATUS_CHECK_FAIL.

Metze's changes are mostly to bring the code into line with current discussions
on things like adding users/groups, flags etc.

I've adjusted a fair bit of the 'const' in the SAM stuff.  Const is currently
used only for pointers, not for local variables or non-pointer paramters.  The
benifits and reasons for extending this further need discussion on
samba-technical.

Also, some of the 'context' paramters should not be const, to allow backend
modules to do fancy caching etc in them.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Jelmer Vernooij
b813761126 Several compiler warning fixes + fix dependencies samtest 0001-01-01 00:00:00 +00:00
Jelmer Vernooij
06eb3138ab small fixes
make lp_sam_backend() a list
0001-01-01 00:00:00 +00:00
Jelmer Vernooij
61626340e5 Add plugin support for the sam system from metze (based on passdb code) 0001-01-01 00:00:00 +00:00
Jelmer Vernooij
b742d068b8 Add new files to Makefile + typo fix 0001-01-01 00:00:00 +00:00
Jelmer Vernooij
eafcc38704 Put in patch from metze (Stefan Metzmacher) to:
- Rename user -> account
- Add sam_* functions (api.c)
- Several small fixes
0001-01-01 00:00:00 +00:00
Jelmer Vernooij
6395c34f2f Silly of me to only test this with --with-sam and not without. Doh! 0001-01-01 00:00:00 +00:00
Jelmer Vernooij
067ae5f810 Code style + typo fixes
Added Kai Krger to copyrightholders of interface.c
0001-01-01 00:00:00 +00:00
Jelmer Vernooij
4b7de5ee23 Put in intermediate version of new SAM system. It's not stable yet, code
might be ugly, etc - please don't blame me for anything but instead try to fix
the code :-). Compiling of the new sam system can be enabled with the
configure option --with-sam

Removing passdb/passgrp.c as it's unused
fix typo in utils/testparm.c
0001-01-01 00:00:00 +00:00
Andrew Bartlett
40fc43296d Add the current working document on the interface to the tree that we have
*somthing* in the directory.  (Stops cvs update -P eating it).

This is the combined effort of many from #samba-technical, kai, metze,
ctrlsoft, idra and abartlet in particular.  It will no doubt change :-)

Andrew Bartlett
0001-01-01 00:00:00 +00:00