summaryrefslogtreecommitdiffstats
path: root/source3/lib/util_sid.c
Commit message (Collapse)AuthorAgeFilesLines
* s3-winbind: Fix bug #9052 resolving our own "Domain Local" groups.Andreas Schneider2012-07-231-8/+1
| | | | | | | | | | | | | | | | | We don't resolve our own "Domain Local" groups since bug #7843 has been fixed. So we need to add the add resource groups to the sid list too. Before bug #7843 the "Domain Local" groups were added with a lookupuseraliases call, but this isn't done anymore for our domain so we need to resolve resource groups here. When to use Resource Groups: http://technet.microsoft.com/en-us/library/cc753670%28v=WS.10%29.aspx Signed-off-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon Jul 23 22:12:30 CEST 2012 on sn-devel-104
* More const compiler warning fixes.Jeremy Allison2011-05-051-1/+1
|
* s3: "hex_encode" does the same as "binary_string"Volker Lendecke2011-03-151-1/+1
|
* Quite some callers of sid_split_rid do not care about the ridVolker Lendecke2011-03-101-2/+1
|
* s3: Use dom_sid_string_buf in sid_to_fstringVolker Lendecke2011-03-031-3/+1
| | | | | Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Thu Mar 3 22:56:57 CET 2011 on sn-devel-104
* libcli/auth Merge source4/libcli/security and util_sid.c into the common codeAndrew Bartlett2010-10-141-313/+1
| | | | | | | | | This should ensure we only have one copy of these core functions in the tree. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s3 Replace is_sid_in_token() with security_token_has_sid() from common codeAndrew Bartlett2010-10-141-11/+0
| | | | | | | | The two routines are identical, so there is no need to keep both. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s3: Replace sid_binstring and sid_guidstring with PIDL-based alternativesAndrew Bartlett2010-09-201-20/+0
| | | | | | | | | This reduces the manual marshalling of these structures by removing the duplication here. Andrew Bartlett Signed-off-by: Günther Deschner <gd@samba.org>
* s3-util: use shared dom_sid_dup.Günther Deschner2010-09-201-19/+0
| | | | Guenther
* s3-util_sid: use shared dom_sid_compare_auth and dom_sid_equal_X functions.Günther Deschner2010-09-201-85/+7
| | | | Guenther
* s3-util_sid Use the NDR parser to parse struct dom_sidAndrew Bartlett2010-09-141-14/+8
| | | | | | | The manual parser failed to constrain the maximum number of sub-authorities to 15, allowing an overflow of the array. Andrew Bartlett
* libcli/security Merge source3/ string_to_sid() to common codeAndrew Bartlett2010-09-141-106/+0
| | | | | | | | The source3 code repsects the limit of a maximum of 15 subauths, while the source4 code does not, creating a security issue as we parse string-form SIDs from clients. Andrew Bartlett
* s3-util_sid use ARRAY_SIZE() to ensure we never overflow the dom_sidAndrew Bartlett2010-09-141-1/+1
| | | | | | | This ensures that this, unlike the MAXSUBAUTHS macro, can't get out of sync with the structure. Andrew Bartlett
* s3-util_sid Accept S-1-5 as a SIDAndrew Bartlett2010-09-141-2/+10
|
* s3-dom_sid Use C99 types in dom_sid handlingAndrew Bartlett2010-09-141-7/+7
| | | | Andrew Bartlett
* s3-util_sid Tidy up global struct security_tokenAndrew Bartlett2010-09-111-12/+6
| | | | | | | | | This no longer needs to be global, and should be const. We now also init it with the C99 style initialisers. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s3:auth Remove NT_USER_TOKENAndrew Bartlett2010-09-111-4/+4
| | | | | | | | | The all UPPER case typedef is no longer the preferred Samba style and this makes it easier to see that this is the IDL-derivied structure Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s3-auth Change type of num_sids to uint32_tAndrew Bartlett2010-09-111-4/+4
| | | | | | | | | | | | | | size_t is overkill here, and in struct security_token in the num_sids is uint32_t. This includes a change to the prototype of add_sid_to_array() and add_sid_to_array_unique(), which has had a number of consequnetial changes as I try to sort out all the callers using a pointer to the number of sids. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s3-auth Rename NT_USER_TOKEN user_sids -> sidsAndrew Bartlett2010-08-311-1/+1
| | | | This is closer to the struct security_token from security.idl
* s3-netlogon: remove global include of netlogon.h.Günther Deschner2010-08-061-0/+1
| | | | | | | This reduces precompiled headers by another 4 MB and also slightly speeds up the build. Guenther
* s3:fix an outdated comment.Michael Adam2010-06-211-5/+2
|
* s3: remove unused librpc/ndr/sid.c.Günther Deschner2010-06-031-0/+1
| | | | Guenther
* s3-build: only use ndr_security.h where needed.Günther Deschner2010-05-311-0/+1
| | | | Guenther
* s3:lib s3:lib move get_global_sam_name to util_names.cAndrew Bartlett2010-05-281-13/+0
| | | | | | | | | This doesn't really belong in util_sid.c, and has much more in common with the other functions in util_names.c Andrew Bartlett Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:dom_sid Global replace of DOM_SID with struct dom_sidAndrew Bartlett2010-05-211-64/+64
| | | | | | | | | | 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>
* s3: Remove use of iconv_convenience.Jelmer Vernooij2010-05-181-3/+3
|
* s3: Use IS_DC macro in get_global_sam_name()Volker Lendecke2010-04-101-1/+1
| | | | Much as I dislike macros, this one is there. So why not use it...
* s3: Make string_to_sid survive the LOCAL-string_to_sid testVolker Lendecke2010-02-201-13/+40
|
* Revert "s3: Make string_to_sid a wrapper around dom_sid_parse"Volker Lendecke2010-01-251-7/+50
| | | | This reverts commit dff03b61fd5d923562711b38cc7dbe996dc07283.
* s3: Make string_to_sid a wrapper around dom_sid_parseVolker Lendecke2010-01-231-50/+7
|
* s3: Remove string_sid_tallocVolker Lendecke2010-01-231-13/+0
| | | | All but one call were pointless, so I think this API should go
* s3: Fix some nonempty blank linesVolker Lendecke2010-01-231-11/+11
|
* s3: Adapt sid_dup_talloc to README.CodingVolker Lendecke2010-01-021-8/+9
|
* s3: Remove debug_ctx()Volker Lendecke2009-11-031-1/+1
| | | | | | | | smbd just crashed on me: In a debug message I called a routine preparing a string that itself used debug_ctx. The outer routine also used it after the inner routine had returned. It was still referencing the talloc context that the outer debug_ctx() had given us, which the inner DEBUG had already freed.
* Make sid_binstring & friends take a talloc contextVolker Lendecke2009-05-281-7/+9
|
* Add iconv_convenience argument to size functions.Jelmer Vernooij2009-01-011-3/+3
|
* Cope with MAXIMUM_ALLOWED_ACCESS requests when opening handles.Jeremy Allison2008-10-211-0/+11
| | | | Jeremy.
* I think the problem with these functions is that lookup_usergroupsHerb Lewis2008-08-151-17/+17
| | | | | | | | | | should never include the user SID. The comment for the function in winbindd/winbindd_ads.c says /* Lookup groups a user is a member of. */ The following patch makes the wbinfo calls return the correct data before and after a login. wbinfo --user-domgroups and --user-sids (This used to be commit 7849938906a9c859805cbaeca66fae9d3c515aad)
* Use sid_array_from_info3 in lookup_usergroups_cached().Günther Deschner2008-04-041-1/+8
| | | | | Guenther (This used to be commit 65b4cb20ea3fb806cfd50281e08f32bea70fafce)
* Use netr_SamInfo3 in sid_array_from_info3.Günther Deschner2008-02-171-15/+15
| | | | | Guenther (This used to be commit 06095e8c705fc292323fa8d0110ae3aaeccab949)
* Convert add_sid_to_array() add_sid_to_array_unique() to return NTSTATUS.Michael Adam2008-01-091-28/+42
| | | | | Michael (This used to be commit 6b2b9a60ef857ec31da5fea631535205fbdede4a)
* Remove tiny code duplicationVolker Lendecke2007-12-291-15/+3
| | | | | sid_size did the same as ndr_size_dom_sid (This used to be commit 8aec5d09ba023413bd8ecbdfbc7d23904df94389)
* s/sid_to_string/sid_to_fstring/Volker Lendecke2007-12-151-1/+1
| | | | | least surprise for callers (This used to be commit eb523ba77697346a365589101aac379febecd546)
* Use dom_sid_string for sid_string_tallocVolker Lendecke2007-12-151-29/+12
| | | | | | Remove some code duplication, but introduce one more dependency on librpc/ndr. Easily turned around so that librpc/ndr depends on lib/util_sid if necessary (This used to be commit 3a0b1b2060facd5f1ac1461b23dd86c75cdd9458)
* sid_string_static is no more :-)Volker Lendecke2007-12-151-11/+8
| | | | | | | | | | | | | We now have four ways to do sid_to_string: sid_to_string: Convert it into an existing fstring, when you have one sid_string_talloc: The obvious thing sid_string_tos: For the lazy, use only with care sid_string_dbg: The one to use in DEBUG statements (This used to be commit 7b8276aaa48852270c6b70b081c3f28e316a7a2c)
* Replace sid_string_static by sid_string_dbg in DEBUGsVolker Lendecke2007-12-151-1/+1
| | | | (This used to be commit bb35e794ec129805e874ceba882bcc1e84791a09)
* Add sid_string_dbgVolker Lendecke2007-12-151-0/+5
| | | | | | This makes use of the just added debug_ctx and will kill many sid_string_static() calls (This used to be commit 3e4148c280efe154c3f8d552731c8b29d6977507)
* add sid_string_tallocVolker Lendecke2007-12-151-2/+10
| | | | (This used to be commit 9e3ef0923d71cc06b8445be2625ebd8dfed1b42d)
* RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison2007-10-181-15/+15
| | | | | | | | bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy. (This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
* r25575: Document S-1-5-12 (restriced code sid).Günther Deschner2007-10-101-1/+7
| | | | | Guenther (This used to be commit 109b09edef4bcad06c3b850edf7db74419c3ad78)