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

143 Commits

Author SHA1 Message Date
Michael Adam
93c0c0749a s3:passdb: don't look into group mappings in legacy_sid_to_unixid()
The backends (tdbsam and ldapsam) do this.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2012-12-03 08:48:31 +01:00
Volker Lendecke
1c9b1e0766 s3: Fix some nonempty blank lines
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-09-04 15:15:00 -07:00
Volker Lendecke
2ffe69082e s3: Remove a shadowing variable declaration 2012-09-01 03:33:21 +02:00
Björn Jacke
cbecd1595c s3: fix compile warning on openindiana
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Thu Aug 23 18:22:13 CEST 2012 on sn-devel-104
2012-08-23 18:22:13 +02:00
Andrew Bartlett
02e25b2a43 s3-passdb: Allow pdb_sid_to_id to work on any SID
This is needed so that pdb_samba4 can map any SID during a provision.

At runtime, winbindd will be asked first, but this shortcut direct to the
ldb file makes it possible to set the permissions on the sysvol share at
provision time.

Andrew Bartlett
2012-08-21 15:25:49 +10:00
Jeremy Allison
526e875cec Check error returns from strupper_m() (in all reasonable places). 2012-08-09 12:06:54 -07:00
Michael Adam
1ee95e4cb1 s3: rename sid_check_is_in_our_domain() to sid_check_is_in_our_sam()
This does not check whether the given sid is in our domain, but
but whether it belongs to the local sam, which is a different
thing on a domain member server.

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Jul 12 18:36:02 CEST 2012 on sn-devel-104
2012-07-12 18:36:02 +02:00
Michael Adam
c43505b621 s3: rename sid_check_is_domain() to sid_check_is_our_sam()
This does not check whether the given sid is the domain sid,
but whether it is the sid of the local sam, which is different
for a domain member server.
2012-07-12 16:43:51 +02:00
Ira Cooper
074991cefe s3-passdb: Fix negative SID->uid/gid/both cache handling
-1 uid/gid/both signals a non existent uid/gid/both.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-24 22:30:23 +02:00
Andrew Bartlett
c844f65779 s3-idmap: convert most idmap_cache callers to unixid API
This will eventually allow the struct unixid to be passed all the way up
and down the stack.

Andrew Bartlett

Signed-off-by: Michael Adam <obnox@samba.org>
2012-05-02 13:18:03 +02:00
Michael Adam
f9c9c49c51 s3:passdb: rename sids_to_unix_ids() --> sids_to_unixids() for consistency 2012-05-02 12:45:30 +02:00
Andrew Bartlett
ac97f151ed s3-passdb: Use struct unixid in sids_to_unix_ids
This avoids the union in the struct wbcUnixId and moves us to using only struct unixid
internally.

Andrew Bartlett

Signed-off-by: Michael Adam <obnox@samba.org>
2012-05-02 12:45:30 +02:00
Andrew Bartlett
2d5df933f4 s3-passdb: Rename legacy_sid_to_id -> legacy_sid_to_unixid for clarity
Signed-off-by: Michael Adam <obnox@samba.org>
2012-05-02 12:45:29 +02:00
Andrew Bartlett
a6e29f23f0 s3-passdb: Change pdb_sid_to_id() to return struct unixid
This will make it easier to consistantly pass a struct unixid all the way up and
down the idmap stack, and allow ID_TYPE_BOTH to be handled correctly.

Andrew Bartlett

Signed-off-by: Michael Adam <obnox@samba.org>
2012-05-02 12:45:29 +02:00
Volker Lendecke
13774a5f9f s3: Remove two unused variables 2012-04-21 12:10:37 +02:00
Michael Adam
c89affbd8d s3:passdb: do not use the in-memory idmap cache (it will be removed) 2012-04-20 23:17:36 +02:00
Simo Sorce
605d7d965a pdb-interface: Do not use unid_t here
This interface needs to be publicly available, unid_t here is not really useful
and makes it harder to use it as unid_t is not a public union.

Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Tue Oct 18 20:57:16 CEST 2011 on sn-devel-104
2011-10-18 20:57:16 +02:00
Simo Sorce
995d156726 s3-group-mapping: Remove fstrings from GROUP_MAP.
Signed-off-by: Andreas Schneider <asn@samba.org>

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Oct 12 19:28:12 CEST 2011 on sn-devel-104
2011-10-12 19:28:12 +02:00
Andreas Schneider
177db0a880 s3-id_cache: Move id caches mgmt out of smbd
We must leave the MSG_IDMAP_KILL operation in SMBD as it uses smbd
specific internal globals and makes sense only in the context of a smbd
daemon.
The rest is moved under lib/ as we need to deal with id cache cleanups
in other daemons too (like lsasd).

Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:08:25 -04:00
Andrew Bartlett
5e26e94092 s3-talloc Change TALLOC_ZERO_ARRAY() to talloc_zero_array()
Using the standard macro makes it easier to move code into common, as
TALLOC_ZERO_ARRAY isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
3d15137653 s3-talloc Change TALLOC_ARRAY() to talloc_array()
Using the standard macro makes it easier to move code into common, as
TALLOC_ARRAY isn't standard talloc.
2011-06-09 12:40:08 +02:00
Volker Lendecke
ddfeccc6e4 s3: Use wbcSidsToUnixIds in create_local_token
Signed-off-by: Jeremy Allison <jra@samba.org>
2011-04-13 14:13:25 -07:00
Günther Deschner
2f36ef7225 s3-passdb: add passdb.h where needed.
Guenther
2011-03-30 01:13:07 +02:00
Günther Deschner
d85f140826 s3-winbind: remove global inclusion of libwbclient.
Guenther
2011-03-30 01:13:06 +02:00
Volker Lendecke
16b007c223 Quite some callers of sid_split_rid do not care about the rid 2011-03-10 18:48:34 +01:00
Volker Lendecke
ae28029f67 s3: Remove an obsolete comment 2011-03-03 22:08:49 +01:00
Gregor Beck
6710561c27 s3: add functions to remove entries from idmap memcache 2011-02-28 12:58:43 +01:00
Gregor Beck
01e7611050 s3: add functions to flush the idmap memcache 2011-02-28 12:58:37 +01:00
Volker Lendecke
ecb65332ea s3: Fix some nonempty blank lines 2011-02-22 19:18:57 +01:00
Andrew Bartlett
f768b32e37 libcli/security Provide a common, top level libcli/security/security.h
This will reduce the noise from merges of the rest of the
libcli/security code, without this commit changing what code
is actually used.

This includes (along with other security headers) dom_sid.h and
security_token.h

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Oct 12 05:54:10 UTC 2010 on sn-devel-104
2010-10-12 05:54:10 +00:00
Günther Deschner
4dbd743e46 s3-util_sid: use shared dom_sid_compare_auth and dom_sid_equal_X functions.
Guenther
2010-09-20 14:04:37 -07:00
Günther Deschner
2b41f421fd s3-idmap: only include idmap headers where needed.
Guenther
2010-08-26 00:20:29 +02:00
Günther Deschner
aba1bf4b5e s3-build: only include memcache.h where needed.
Guenther
2010-08-26 00:20:28 +02:00
Günther Deschner
c136b84f0d s3-secrets: only include secrets.h when needed.
Guenther
2010-08-05 10:12:25 +02:00
Andreas Schneider
a81b97ff34 s3-passdb: Make sure that we don't assign garbage. 2010-06-28 10:18:12 +02:00
Simo Sorce
0a7ff14617 s3:passdb Export function to calculate the proper primary group sid
Don't keep it buried in passdb, this function need to be available
for use in places where we do not want to construct an artificial
samu struct just to play tricks.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-06-07 22:53:08 +10:00
Günther Deschner
f9f8007361 s3-build: only use ndr_security.h where needed.
Guenther
2010-05-31 11:32:37 +02:00
Andrew Bartlett
cba7f8b827 s3:dom_sid Global replace of DOM_SID with struct dom_sid
This matches the structure that new code is being written to,
and removes one more of the old-style named structures, and
the need to know that is is just an alias for struct dom_sid.

Andrew Bartlett

Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-21 10:39:59 +02:00
Jelmer Vernooij
b8268cf7b0 s3: Remove use of iconv_convenience. 2010-05-18 11:45:31 +02:00
Volker Lendecke
5197d76faa s3: Make a debug msg more readable 2010-04-28 10:55:50 +02:00
Volker Lendecke
48251c3370 s3: Use sid_check_is_in_our_domain instead of a direct sid_peek_check_rid 2010-01-10 20:56:16 +01:00
Volker Lendecke
3ea64e0ad8 s3: Replace most calls to sid_append_rid() by sid_compose() 2010-01-10 20:56:16 +01:00
Michael Adam
30ab3a762e s3:passdb: remove the uid_to_rid method - we only need uid_to_sid
Michael
2009-11-14 01:28:50 +01:00
Günther Deschner
1f4d26c487 s3-lsa: allow to lookup BUILTIN\ in lsa_LookupNames.
Found by RPC-LSA-LOOKUPNAMES torture test.

Guenther
2009-10-20 15:28:31 +02:00
Volker Lendecke
a488334bf1 Rename LOOKUP_NAME_EXPLICIT to LOOKUP_NAME_NO_NSS
It took me a bit to understand what this flag does. I hope this is
a bit clearer, at least it is to me.
2009-07-31 23:19:05 +02:00
Michael Adam
a4bc5bfa95 s3:passdb: fix bug #6509: use gid (not uid) cache in fetch_gid_from_cache().
With the previous code, the cache can never have been hit at all.

Michael
2009-06-26 14:15:44 +02:00
Marc VanHeyningen
75de7c0e87 s3: zero an uninitialized array
Invalid pointers were being dereferenced in lookup_sids causing
occasional seg faults.

Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-05-27 12:37:35 -07:00
Aravind Srinivasan
5aefb44bf0 s3: Fallback to the legacy sid_to_(uid|gid) instead of returning NULL.
This is very similar to be1dfff02d
2009-05-12 17:13:40 -07:00
Jeremy Allison
b4c9cfb2af Fix a bunch of compiler warnings about wrong format types.
Should make Solaris 10 builds look cleaner.
Jeremy.
2009-05-11 21:56:57 -07:00
Volker Lendecke
f91565544f Fix bug 6097
A client sent a SID with authority 0 and 0 sub-authorities. W2k3 replies with
NT_STATUS_INVALID_SID, even if other SIDs in the list are valid.

Thanks to Pavel <wylda@volny.cz> for the bug report!
2009-03-24 11:59:42 +01:00