summaryrefslogtreecommitdiffstats
path: root/src/db/sysdb_selinux.c
Commit message (Collapse)AuthorAgeFilesLines
* Make DEBUG macro invocations variadicNikolai Kondrashov2014-05-021-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | Use a script to update DEBUG macro invocations to use it as a variadic macro, supplying format string and its arguments directly, instead of wrapping them in parens. This script was used to update the code (identical to commit a3c8390d19593b1e5277d95bfb4ab206d4785150): grep -rwl --include '*.[hc]' DEBUG . | while read f; do mv "$f"{,.orig} perl -e \ 'use strict; use File::Slurp; my $text=read_file(\*STDIN); $text=~s#(\bDEBUG\s*\([^(]+)\((.*?)\)\s*\)\s*;#$1$2);#gs; print $text;' < "$f.orig" > "$f" rm "$f.orig" done Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Stephen Gallagher <sgallagh@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* Move SELinux processing to provider.Michal Zidek2013-03-191-107/+0
| | | | | | | | | | | | The SELinux processing was distributed between provider and pam responder which resulted in hard to maintain code. This patch moves the logic to provider. IT ALSO REQUIRES CHANGE IN THE SELINUX POLICY, because the provider also writes the content of selinux login file to disk (which was done by responder before). https://fedorahosted.org/sssd/ticket/1743
* Add domain argument to sysdb selinux functionsSimo Sorce2013-01-151-14/+19
|
* Add domain to sysdb_search_user_by_name()Simo Sorce2013-01-151-1/+3
| | | | Also remove unused sysdb_search_domuser_by_name()
* Remove the sysdb_ctx_get_domain() function.Simo Sorce2013-01-151-1/+1
| | | | | We are deprecating sysdb->domain so kill the function that gives access to this member as we should stop relying on it being available (or correct).
* SYSDB: Split a function to read all SELinux mapsJakub Hrozek2013-01-081-23/+43
|
* SELinux: Always use the default if it exists on the serverJakub Hrozek2012-09-131-2/+9
| | | | | | | | | | | | | | https://fedorahosted.org/sssd/ticket/1513 This is a counterpart of the FreeIPA ticket https://fedorahosted.org/freeipa/ticket/3045 During an e-mail discussion, it was decided that * if the default is set in the IPA config object, the SSSD would use that default no matter what * if the default is not set (aka empty or missing), the SSSD would just use the system default and skip creating the login file altogether
* DB: Always write the SELinux object to sysdbJakub Hrozek2012-09-131-70/+8
| | | | | | There's no point in checking if the object already exists because we always wipe the whole sysdb subtree. We were also immediatelly cancelling the transaction because we'd jump to goto, even though it was with EOK.
* Unify usage of sysdb transactions (part 2).Michal Zidek2012-09-041-13/+15
|
* Only create the SELinux login file if there are mappings on the serverJakub Hrozek2012-08-161-6/+1
| | | | | | | | | | | https://fedorahosted.org/sssd/ticket/1455 In case there are no rules on the IPA server, we must simply avoid generating the login file. That would make us fall back to the system-wide default defined in /etc/selinux/targeted/seusers. The IPA default must be only used if there *are* rules on the server, but none matches.
* Fix sysdb_search_selinux_usermap_by_username return valueJakub Hrozek2012-07-201-0/+1
| | | | | | | | There was a logic bug in sysdb_search_selinux_usermap_by_username that resulted in returning the value the variable "ret" had after the last call to sysdb_attrs_get_uint32_t, which in cases the last rule processed did not have the requested attributes led to using the default user context.
* Fix uninitialized valuesNick Guay2012-07-181-2/+2
| | | | https://fedorahosted.org/sssd/ticket/1379
* SYSDB: Delete SELinux mappingsJakub Hrozek2012-07-181-0/+17
|
* Modify priority evaluation in SELinux user mapsJan Zeleny2012-07-181-1/+33
| | | | | | | | | | | | | | | | | | | The functionality now is following: When rule is being matched, its priority is determined as a combination of user and host specificity (host taking preference). After the rule is matched in provider, only its host priority is stored in sysdb for later usage. When rules are matched in the responder, their user priority is determined. After that their host priority is retrieved directly from sysdb and sum of both priorities is user to determine whether to use that rule or not. If more rules have the same priority, the order given in IPA config is used. https://fedorahosted.org/sssd/ticket/1360 https://fedorahosted.org/sssd/ticket/1395
* SYSDB: return EOK if empty message is passed into get_rm_msgJakub Hrozek2012-05-021-0/+1
| | | | | If the code never entered the loop in get_rm_message, we would return arbitrary return value.
* Added some SELinux-related sysdb routinesJan Zeleny2012-02-061-0/+471