summaryrefslogtreecommitdiffstats
path: root/libcli/security/privileges.c
Commit message (Collapse)AuthorAgeFilesLines
* libcli/security/privileges.c - fix wrong counter typeMatthias Dieter Wallnöfer2011-02-211-1/+1
| | | | | This strictly needs to be from type "uint32_t" since "privset->count" is defined with this type.
* libcli/security/privileges.c - fix the counting of privilegesMatthias Dieter Wallnöfer2011-02-211-9/+4
| | | | | Since the privileges are always counted with a signed integer, there is no reason to specify the upper limit with a "uint32_t".
* Turns out there are lots of places in S3 where token passed inJeremy Allison2010-12-021-0/+4
| | | | | | | | | | here can be NULL (become_root() sets the current security token to NULL for example). Ensure we don't crash. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Thu Dec 2 03:26:03 CET 2010 on sn-devel-104
* Add code to implement SeSecurityPrivilege in net rpc rights, and in theJeremy Allison2010-10-211-6/+3
| | | | | | | | | open and get/set NT security descriptor code. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Thu Oct 21 00:15:57 UTC 2010 on sn-devel-104
* libcli/security Add debug class to security_token_debug() et alAndrew Bartlett2010-10-121-9/+11
| | | | | | This will allow it to replace functions in source3 that use debug classes. Andrew Bartlett
* libcli/privileges Fix commentAndrew Bartlett2010-09-111-1/+1
|
* s4-privs Seperate rights and privilegesAndrew Bartlett2010-09-111-14/+51
| | | | | | | | | These are related, but slightly different concepts. The biggest difference is that rights are not enumerated as a system-wide list. This moves the rights to security.idl due to dependencies. Andrew Bartlett
* libcli/security Move 'private' privileges functions to another headerAndrew Bartlett2010-09-111-0/+1
| | | | | | | | | These functions work on the bitmap, and are only exposed because the source3/ privileges storage uses the bitmap in account_policy.tdb Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* libcli/security Remove 'always true' return from se_priv_put_all_privilegesAndrew Bartlett2010-09-111-2/+1
| | | | | | Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* privileges: privilege luids are not all below 64Andrew Tridgell2010-09-111-3/+0
| | | | | | the ones brought across from s3 have higher values Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* libcli/security Make sec_privilege_from_index() return SEC_PRIV_INVALID on ↵Andrew Bartlett2010-09-111-1/+1
| | | | | | | | | | failure This is clearer and more consistent than using a magic -1 return Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* libcli/security Expose sec_privilege_mask()Andrew Bartlett2010-09-111-1/+1
| | | | Signed-off-by: Andrew Tridgell <tridge@samba.org>
* libcli/security make sec_privilege_id() return SEC_PRIV_INVALID on failure.Andrew Bartlett2010-09-111-1/+1
| | | | | | Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* libcli/security Remove unused functions and constants.Andrew Bartlett2010-09-111-215/+14
| | | | | | | | All the callers to these functions have been removed or reworked. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* libcli/security Rename all privilege bitmaps constantsAndrew Bartlett2010-09-111-28/+28
| | | | | | | | | The idea here to to make it very clear how they differ from the enumerated LUID values. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* libcli/security Remove luid_to_se_priv() and luid_to_privilege_name()Andrew Bartlett2010-09-111-43/+4
| | | | | | | | These functions duplicate other functions in the merged code. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* libcli/security Improve dump of privileges: Just walk the tableAndrew Bartlett2010-09-111-5/+4
| | | | | | | | | This removes some logic recently added that was just too smart - it is easier to just walk the table and do a bit match here. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s3-privs Remove pointer indirection from se_priv_to_privilege_set()Andrew Bartlett2010-09-111-2/+2
| | | | | | Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* libcli/security Don't export privs[] as a global variableAndrew Bartlett2010-09-111-24/+19
| | | | | | | | | | | | Instead, provide access functions for the LSA and net sam callers for the information they need. They still only enumerate the first 8 privileges that have traditionally been exposed. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* libcli/security Merge privilege lists from source3 and source4Andrew Bartlett2010-09-111-169/+126
| | | | | | | | | The LSA enumeration in source3 will not show the new privileges, but otherwise, they are now in common, and can be set by name. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* libcli/security Return number of entries in the old source3 listAndrew Bartlett2010-09-111-3/+4
| | | | | | | | | This ensures there isn't a behaviour change when the source3 list is combined with the longer source4 list. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* libcli/privileges Simplify get_privilege_luid() to return just the enumAndrew Bartlett2010-09-111-8/+3
| | | | | | | | | As Samba only deals with the lower 32 bits of the LUID, just return those and let the LSA layer deal with the upper 0 bits. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* libcli/security Don't memcpy a uint64_t value, just assign it.Andrew Bartlett2010-09-111-1/+1
| | | | Signed-off-by: Andrew Tridgell <tridge@samba.org>
* libcli/security Use ARRAY_SIZE() consistantly.Andrew Bartlett2010-09-111-15/+16
| | | | | | | | | This avoids the use of SE_END, and has all callers walking the array using the same termination condition. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* libcli/security Fix and clarify privilege manipulation function commentsAndrew Bartlett2010-09-111-9/+9
| | | | Signed-off-by: Andrew Tridgell <tridge@samba.org>
* libcli/security Make the two privileges tables share a common struct definitionAndrew Bartlett2010-09-111-26/+21
| | | | Signed-off-by: Andrew Tridgell <tridge@samba.org>
* libcli/security Move source4/ privileges code into the common libcli/securityAndrew Bartlett2010-09-111-0/+289
| | | | Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s3-privs Inline dump_se_priv into callers now that it's just a uint64_tAndrew Bartlett2010-09-111-9/+0
| | | | | | | | The previous 128 bit structure needed this helper function. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* libcli/security Use talloc_realloc() not TALLOC_REALLOC_ARRAY()Andrew Bartlett2010-09-111-1/+1
| | | | Signed-off-by: Andrew Tridgell <tridge@samba.org>
* libcli/security Use C99 typesAndrew Bartlett2010-09-111-3/+3
| | | | Signed-off-by: Andrew Tridgell <tridge@samba.org>
* libcli/security Use true and false, not True and FalseAndrew Bartlett2010-09-111-22/+22
| | | | Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s3-privs Move source3/ privileges implmentation into commonAndrew Bartlett2010-09-111-0/+457
Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>