5b93634c7f0e34f69b4cf8fb9b2e77b9179024a7 |
|
28-Aug-2017 |
Fabiano Fidêncio <fidencio@redhat.com> |
UTIL: move {files,selinux}.c under util directory
files.c has at least one function that will be re-used for the new
session provider that's about to be added. Also, a few other functions
may be added and files.c seems the right place for those.
selinux.c has been moved together with files.c as the latter takes
advantage of some functions from the former and we do not want to always
link agains the tools code.
The public functions from files.c got a "sss_" prefix and it has been
changed whenever they're used.
Last but not least, all the places that included "tools/tools_util.h"
due to the functions on files.c had this include removed (as they were
already including "util/util.h".
Related:
https://pagure.io/SSSD/sssd/issue/2995
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
9c7e046cc10a834b86457844df3ba810866cad45 |
|
09-Aug-2016 |
Pavel Březina <pbrezina@redhat.com> |
utils: add remove_subtree
Remove all entries in a directory but will
not remove the directory itself.
Reviewed-by: Petr Cech <pcech@redhat.com> |
08cd034c8584b6f058cf565ce66f7f9f7120622f |
|
09-Aug-2016 |
Petr Cech <pcech@redhat.com> |
UTILS: Fixing duplication of pid file declaration
Resolves:
https://fedorahosted.org/sssd/ticket/2978
Reviewed-by: Fabiano Fidêncio <fabiano@fidencio.org>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
aea1d5c0ca9bb1470759b024c8b97b6c1f577193 |
|
27-Jun-2016 |
Pavel Březina <pbrezina@redhat.com> |
sss_tools: add test if sssd is running
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
760a62e4aea13e3d1a428be35c4ae1547ae63afc |
|
11-May-2016 |
Stephen Gallagher <sgallagh@redhat.com> |
UTIL: Add secure copy function
This is a precursor to supporting a static default configuration file.
We need to be able to copy the default into the mutable location if the
infopipe is asked to modify it.
This patch opens both the source and destination files together in order
to avoid time-of-check/time-of-use bugs.
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
42ec8af02ecf1937e4db9b1ecc6216022634f0f9 |
|
20-Oct-2014 |
Michal Zidek <mzidek@redhat.com> |
util: Move semanage related functions to src/util
These functions will be reused by IPA provider.
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
83bf46f4066e3d5e838a32357c201de9bd6ecdfd |
|
12-Feb-2014 |
Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com> |
Update DEBUG* invocations to use new levels
Use a script to update DEBUG* macro invocations, which use literal
numbers for levels, to use bitmask macros instead:
grep -rl --include '*.[hc]' DEBUG . |
while read f; do
mv "$f"{,.orig}
perl -e 'use strict;
use File::Slurp;
my @map=qw"
SSSDBG_FATAL_FAILURE
SSSDBG_CRIT_FAILURE
SSSDBG_OP_FAILURE
SSSDBG_MINOR_FAILURE
SSSDBG_CONF_SETTINGS
SSSDBG_FUNC_DATA
SSSDBG_TRACE_FUNC
SSSDBG_TRACE_LIBS
SSSDBG_TRACE_INTERNAL
SSSDBG_TRACE_ALL
";
my $text=read_file(\*STDIN);
my $repl;
$text=~s/
^
(
.*
\b
(DEBUG|DEBUG_PAM_DATA|DEBUG_GR_MEM)
\s*
\(\s*
)(
[0-9]
)(
\s*,
)
(
\s*
)
(
.*
)
$
/
$repl = $1.$map[$3].$4.$5.$6,
length($repl) <= 80
? $repl
: $1.$map[$3].$4."\n".(" " x length($1)).$6
/xmge;
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> |
a3c8390d19593b1e5277d95bfb4ab206d4785150 |
|
12-Feb-2014 |
Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com> |
Make DEBUG macro invocations variadic
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:
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> |
db78f4c750943fcd4b60bca5f3fdfd6cc5d3d4f8 |
|
21-May-2013 |
Ondrej Kos <okos@redhat.com> |
Move nscd.c from tools to util
Preparation for the following patch which will include the nscd.c in the
monitor code due to newly introduced function for checking the nscd
configuration file. |
94cbf1cfb0f88c967f1fb0a4cf23723148868e4a |
|
23-Jan-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
TOOLS: Use file descriptor to avoid races when creating a home directory
When creating a home directory, the destination tree can be modified in
various ways while it is being constructed because directory permissions
are set before populating the directory. This can lead to file creation
and permission changes outside the target directory tree, using hard links.
This security problem was assigned CVE-2013-0219
https://fedorahosted.org/sssd/ticket/1782 |
7a92ae1598735ff69e36c72a7be60292ccad41d3 |
|
21-Jan-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
TOOLS: invalidate parent groups in memory cache, too
https://fedorahosted.org/sssd/ticket/1775
In addition to invalidating the group being added to when adding a
member group/user, we also need to invalidate all its parent groups,
otherwise this getgrnam("parent") wouldn't report the members newly
added to its child groups. |
2bb2eadf2b1b7854f430e37689b3e7a25bedfebd |
|
15-Jan-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
TOOLS: Provide a convenience function to refresh a list of groups |
543676afec3c08fdc0a5a794976adc8dfdca974b |
|
15-Jan-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
TOOLS: Split querying nss responder into a separate function
The tools query the responder in order to sync the memcache after
performing changes to the local database. The functions will be reused
by other tools so I split them into a separate functions. |
82dc11348718bf8e2ff07da696f91f6703293c24 |
|
15-Jan-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
TOOLS: move memcache related functions to tools_mc_utils.c
The upcoming patches will link only users of this file with client libs,
so it's better to have it separate.
There is no functional change in this patch |
a290ace39af184d878568e17588b6b2210aea63f |
|
28-Nov-2012 |
Michal Zidek <mzidek@redhat.com> |
sss_cache: Small refactor.
The logic that checks if sssd_nss is running and then
sends SIGHUP to monitor or removes the caches was moved
to a function sss_memcache_clear_all() and made public in
tools_util.h. |
33cbb789ff71be5dccbb4a0acd68814b0d53da34 |
|
06-Nov-2012 |
Michal Zidek <mzidek@redhat.com> |
sss_cache: Remove fastcache even if sssd is not running.
https://fedorahosted.org/sssd/ticket/1584 |
7c2e91ac48b20e6699d5c98c9912ea6427453c95 |
|
24-Sep-2012 |
Michal Zidek <mzidek@redhat.com> |
tools_util.h provides signal_sssd function. |
95cc95749a5e783f2b5d2124d783f85820baf937 |
|
22-May-2012 |
Stephen Gallagher <sgallagh@redhat.com> |
Always use positional arguments in translatable strings
https://fedorahosted.org/sssd/ticket/1336 |
ac3a1f3da772cf101101c31675c63dc3549b21b5 |
|
22-Nov-2011 |
Jakub Hrozek <jhrozek@redhat.com> |
Cleanup: Remove unused parameters |
8443d24c0584f45151e0c80506d7a572b8a38ed7 |
|
08-Sep-2010 |
Jakub Hrozek <jhrozek@redhat.com> |
Fix assorted minor bugs in sss_ tools
Fixes: #585 |
d86fc9163127f7c5bd0c3af950fcddff7911867f |
|
12-Apr-2010 |
Simo Sorce <ssorce@redhat.com> |
tools: remove creation of event_context
Since the sysdb is now synchronous and creates its own event context we
don't need an explicit event context anymore in the tools. |
e5e32021c23f3726d68ee756e8e3de48b3214063 |
|
12-Apr-2010 |
Simo Sorce <ssorce@redhat.com> |
sysdb: remove remaining traces of sysdb_handle |
9c124af8868a7d3908c03ec369e28daef17d5f12 |
|
08-Apr-2010 |
Jakub Hrozek <jhrozek@redhat.com> |
SELinux login management
Adds a new option -Z to sss_useradd and sss_usermod. This option allows
user to specify the SELinux login context for the user. On deleting the
user with sss_userdel, the login mapping is deleted, so subsequent
adding of the same user would result in the default login context unless
-Z is specified again.
MLS security is not supported as of this patch. |
81020661d35772b5499525b76a19c9a3794c953e |
|
08-Apr-2010 |
Jakub Hrozek <jhrozek@redhat.com> |
Move SELinux related functions into its own module
Fix whitespace errors |
4aa841c5724f313435aeea1c0319e81bb0d14321 |
|
06-Apr-2010 |
Jakub Hrozek <jhrozek@redhat.com> |
Add userdel_cmd param
Fixes: #231 |
e45fcd9e478300e6be8a49402fcea81fce623804 |
|
15-Mar-2010 |
Jakub Hrozek <jhrozek@redhat.com> |
Flush NSCD cache after modifying local database
Fixes: #221 |
1c48b5a62f73234ed26bb20f0ab345ab61cda0ab |
|
18-Feb-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Rename server/ directory to src/
Also update BUILD.txt |