49dd8ee2834d9477418961dbaffa4a03cfa9fd1e |
|
29-Jan-2018 |
René Genz <liebundartig@freenet.de> |
Fix minor spelling mistakes in tests/*
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
6f466e0a3d950d21bd750ef53cb93b75dc023f9e |
|
28-Aug-2017 |
Fabiano Fidêncio <fidencio@redhat.com> |
UTIL: Add sss_create_dir()
The newly added function helps us to create a new dir avoiding a
possible TUCTOU issue.
It's going to be used by the new session provider code.
A simple test for this new function has also been provided.
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> |
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> |
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> |
6b57784f0f175275fd900eca21c77415e3a5ea52 |
|
09-Jul-2014 |
Jakub Hrozek <jhrozek@redhat.com> |
TOOLS: Always debug to stderr
https://fedorahosted.org/sssd/ticket/2348
Programs that are supposed to only be executed on the foreground should
log to stderr automatically.
Reviewed-by: Michal Židek <mzidek@redhat.com> |
e504025b074f3e13bbb888272ea1fe11d2bbb8bc |
|
23-Jun-2014 |
Lukas Slebodnik <lslebodn@redhat.com> |
TESTS: Fix format string in check macros
Reviewed-by: Pavel Reichl <preichl@redhat.com> |
9a592ee3fc195f20732c6b1f90894a0be25ccc19 |
|
28-Apr-2014 |
Simo Sorce <simo@redhat.com> |
util: Change file check fns to use a mode mask
Instead of using a custom way to chck file type, use the system
provided macros and a mode mask to decide when we want to check.
Additionally a mask also allows us to selectively check permissions.
Related:
https://bugzilla.redhat.com/1089098
Resolves:
https://fedorahosted.org/sssd/ticket/2321
Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Pavel Reichl <preichl@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> |
eca766c0801ed859a8b50e23cb94fa79acd866f4 |
|
09-Jul-2013 |
Ondrej Kos <okos@redhat.com> |
Do not copy special files when creating homedir
https://fedorahosted.org/sssd/ticket/1778
When trying to copy special file, only message is logged now. |
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 |
7eabf0b9d835bfb724d1c348fd0acd4975652a1b |
|
13-Nov-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
TESTS: Fix a couple of debug-level setters |
9e2c64c6d4f5560e27207193efea6536a566865e |
|
29-Oct-2012 |
Michal Zidek <mzidek@redhat.com> |
Include talloc log in our debug facility
https://fedorahosted.org/sssd/ticket/1495 |
89caf5edcc99f5731e89bd51e6ffaad3ec11c304 |
|
25-Aug-2011 |
Pavel Březina <pbrezina@redhat.com> |
New DEBUG facility - SSSDBG_UNRESOLVED changed from -1 to 0
Removed:
SSS_UNRESOLVED_DEBUG_LEVEL (completely replaced with SSSDBG_UNRESOLVED)
Added new macro:
CONVERT_AND_SET_DEBUG_LEVEL(new_value)
Changes unresolved debug level value (SSSDBG_UNRESOLVED) from -1 to 0
so DEBUG macro could be reduced by one condition. Anyway, it has a minor
effect, every time you want to load debug_level from command line parameters,
you have to use following pattern:
/* Set debug level to invalid value so we can deside if -d 0 was used. */
debug_level = SSSDBG_INVALID;
pc = poptGetContext(argv[0], argc, argv, long_options, 0);
while((opt = poptGetNextOpt(pc)) != -1) { ... }
CONVERT_AND_SET_DEBUG_LEVEL(debug_level); |
99dd40a885ed3d42af4bbbde7ee2fc98830544d0 |
|
25-Aug-2011 |
Pavel Březina <pbrezina@redhat.com> |
New DEBUG facility - conversion
https://fedorahosted.org/sssd/ticket/925
Conversion of the old debug_level format to the new one.
(only where it was necessary)
Removed:
SSS_DEFAULT_DEBUG_LEVEL (completely replaced with SSSDBG_DEFAULT) |
e194940b169691939c5c8f2a29754df1c7678a42 |
|
15-Nov-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Fix const cast warnings in tests |
5d395f5cecf4be9d9ebebb51515ad4e590dcc630 |
|
28-Sep-2010 |
Sumit Bose <sbose@redhat.com> |
Suppress some 'unchecked return value' warnings |
9fb59763bce293c2490e0b9f8e97bb1f74ba0910 |
|
04-Mar-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Add --with-test-dir option to configure
All 'make check' tests will chdir() into this directory before
running the suite. This provides the option of having temporary
files generated in a tmpfs or ramdisk |
978bea5902ece9b9f01d1d6525dbe0889a410ffc |
|
23-Feb-2010 |
Sumit Bose <sbose@redhat.com> |
Check and set permissions on SBUS sockets |
1c48b5a62f73234ed26bb20f0ab345ab61cda0ab |
|
18-Feb-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Rename server/ directory to src/
Also update BUILD.txt |