519354d079731e673244a8e3851e5c5522d1b45e |
|
04-Apr-2018 |
Fabiano Fidêncio <fidencio@redhat.com> |
SERVER: Tone down shutdown messages for socket-activated responders
When dealing with socket-activated responders, those may be shut
themselves down after some inactivy period. And that's completely normal
and expected, thus should not be logged as an fatal error.
For the case when the responder is started by the monitor, however, it
still makes sense to keep the code as it is as the responders won't shut
themselves down in any normal scenario.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
346d6d8bf5fdb446921d754c07c8a7d913a048d5 |
|
29-Jan-2018 |
René Genz <liebundartig@freenet.de> |
Fix minor spelling mistakes
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
cb75b275d15beedd1fdecc1f8ced657fba282218 |
|
03-Nov-2017 |
Lukas Slebodnik <lslebodn@redhat.com> |
Add parameter --logger to daemons
Different binary handled information about logging differently
e,g, --debug-to-files --debug-to-stderr
And logging to journald was a special case of previous options
(!debug_file && !debug_to_stderr). It was also tied to the monitor option
"--daemon" and therefore loggind to stderr was used in interactive mode
+ systemd Type=notify.
Resolves:
https://pagure.io/SSSD/sssd/issue/3433
Reviewed-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com> |
a02a5ed51178b2cbede0396d66aed716b8898096 |
|
25-Oct-2017 |
René Genz <liebundartig@freenet.de> |
Fix minor spelling mistakes
Merges: https://pagure.io/SSSD/sssd/pull-request/3556
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
91141c6ae6e6a255cfd66266581671ddd16086b3 |
|
08-Jun-2017 |
Lukas Slebodnik <lslebodn@redhat.com> |
UTIL: Remove signal.h from util/util.h
signal.h is not used directly by util/util.h. The header file signal.h
must be included in 19 files and after removing it from util.h it had to be
added only to 12 missing files. And util.util.h is included in 381 files
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com> |
087162b85e191af51637904702813969b35eaadc |
|
25-Jan-2017 |
Fabiano Fidêncio <fidencio@redhat.com> |
SERVER: Set the process group during server_setup()
By calling setpgid() in server_setup() we are able to kill the process
in the watchdog by simply doing kill(-getpid(), SIGTERM).
However, in order to have it working properly the SELinux policy for
SSSD has to be updated and unless SSSD is ran with SELinux on permissive
mode, each of the responders and the monitor will trigger a similar
message:
Jan 09 14:31:50 client1.ipa.example audit[11630]: AVC avc: denied
{ setpgid } for pid=11630 comm="sssd_pac"
scontext=system_u:system_r:sssd_t:s0
tcontext=system_u:system_r:sssd_t:s0 tclass=process permissive=0
It's important to say that till SELinux policy is fixed, we might end up
leaking some processes.
Related:
https://fedorahosted.org/sssd/ticket/3266
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
41e9e8b60e3bed0159914e755aa05df9a2448470 |
|
23-Jan-2017 |
Fabiano Fidêncio <fidencio@redhat.com> |
UTIL: Introduce --socket-activated cmdline option for responders
This option is going to be used for socket-activated responders as they
are special in some ways. So, by knowing this option we can:
- skip owning the debug files as it will be done by the responders' unit
files;
- skip "become_user()", as the process will already be started by the
proper user bu the responders' unit files;
- setup a timeout to shutdown the responder in case it has been
socket-activated and is idle.
This option has been encapsulated on is_socket_activated() function,
which will always return "false" when called on platforms where systemd
is not supported.
For any of the services are taking advantage of this newly introduced
option/function, but later on in this series it's going to be used.
In order to use it, just add SSSD_RESPONDER_OPTS to the poptOption
structure.
Related:
https://fedorahosted.org/sssd/ticket/2243
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
fbe6644aa28d93f492434950680c5618eb567712 |
|
08-Nov-2016 |
Jakub Hrozek <jhrozek@redhat.com> |
MONITOR: Do not set up watchdog for monitor
It makes little sense to set up watchdog for monitor because there is no
entity that would restart the monitor. Therefore we should disable the
watchdog for monitor process.
Resolves:
https://fedorahosted.org/sssd/ticket/3232
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
f9f3dbc87d49bea05a54c2bcd9f7e40e4e8ab85a |
|
29-Jun-2016 |
Simo Sorce <simo@redhat.com> |
Server: Enable Watchdog in all daemons
This allows the services to self monitor.
Related:
https://fedorahosted.org/sssd/ticket/2921
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
131684b9107a3fc07906013d16b35975531f2864 |
|
16-Jun-2016 |
Stephen Gallagher <sgallagh@redhat.com> |
DEBUG: Add `debug` alias for debug_level
Our users constantly make the mistake of typing `debug = 9` in the
sssd.conf instead of `debug_level = 9` as would be correct. This
happens frequently-enough that we should just alias it rather than
continue to have people make mistakes.
Resolves:
https://fedorahosted.org/sssd/ticket/2999
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Petr Cech <pcech@redhat.com> |
a0c8aae6b31867f29e83e4f8a2a7ef037a82569e |
|
04-Nov-2015 |
Michal Židek <mzidek@redhat.com> |
server_setup: Log failed attempt to set locale
Failed setlocale call could cause unexpected
behaviour. It is better to generate DEBUG
message if this happens.
Reviewed-by: Michal Židek <mzidek@redhat.com> |
c299f997e20011536e365bc18e59e73f68629d2c |
|
14-Oct-2015 |
Petr Cech <pcech@redhat.com> |
REFACTOR: umask(0177) --> umask(SSS_DFL_UMASK)
There are many calls of umask function with 0177 argument. This patch
add new constant SSS_DFL_UMASK which stands for 0177. So all occurences
of umask(0177) (except responder code) are replaced by constant
SSS_DFL_UMASK.
Resolves:
https://fedorahosted.org/sssd/ticket/2424
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
87f8bee53ee1b4ca87b602ff8536bc5fd5b5b595 |
|
17-Mar-2015 |
Lukas Slebodnik <lslebodn@redhat.com> |
Add missing new lines to debug messages
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
aff8b0e3b41644c70704b78e15501779d52b6ff4 |
|
28-Nov-2014 |
Pavel Reichl <preichl@redhat.com> |
Fix: always check return value of unlink()
Resolves:
https://fedorahosted.org/sssd/ticket/2506
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
3fd66df4813d1410c1a6187c80e3a23395b14aed |
|
20-Oct-2014 |
Jakub Hrozek <jhrozek@redhat.com> |
UTIL: Use a custom PID_PATH and DB_PATH when unit testing server.c
server.c used hardcoded PID_PATH and DB_PATH from config.h. Normally,
this path resides in a system directory (like /var/) and should not be
written to by tests. In order to specify a different one for tests, we
need to conditionalize normal builds and unit test builds.
Reviewed-by: Pavel Reichl <preichl@redhat.com> |
4546e283498ffe2511cb566b9159714c671e326b |
|
20-Oct-2014 |
Jakub Hrozek <jhrozek@redhat.com> |
SSSD: Chown the log files
We need to chown the log files before dropping root to make sure they
are usable by the SSSD user. Unfortunately, we can't just rely on
passing the fd opened by root, because we need to be also able to rotate
the log files.
Reviewed-by: Pavel Reichl <preichl@redhat.com> |
ac40d2f2b2b2fc35c95389f5e28febd580bd2b7a |
|
20-Oct-2014 |
Jakub Hrozek <jhrozek@redhat.com> |
SSSD: Add the options to specify a UID and GID to run as
Adds new command line options --uid and --gid to all SSSD servers,
making it possible to switch to another user ID if needed.
So far all code still runs as root.
Reviewed-by: Pavel Reichl <preichl@redhat.com> |
1925ce32f7c1dc226be31d4301a0a1dbb2448baa |
|
09-Oct-2014 |
Jakub Hrozek <jhrozek@redhat.com> |
UTIL: Do not depend on monitor code
Just moves code around. There should be a way to use the server.c module
without linking the monitor code.
Reviewed-by: Pavel Reichl <preichl@redhat.com> |
7f4ff1b4c829af421a64aa11c992780eac4a9fde |
|
12-May-2014 |
Lukas Slebodnik <lslebodn@redhat.com> |
UTIL: Use constant instead of value for stdin.
Reviewed-by: Jakub Hrozek <jhrozek@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> |
3242dd4a49c3869c9b066a63afb81cebf1a35b7d |
|
12-Nov-2013 |
Simo Sorce <simo@redhat.com> |
Signals: Refactor termination of processes
sig_term() was never used as a real signal handler, but only called by tevent
signal handlers in the kerberos and ldap children.
Also the same code was duplicated with separate local guard variables in other
functions.
Unify orderly termination handling, between all these functions. |
27712b5a46e3b579b9d03e363a7d0769e8c307fc |
|
12-Nov-2013 |
Simo Sorce <simo@redhat.com> |
Signals: Remove empty sig_hup
SIGHUP handling is implemented later using a tevent handler so sig_hup() is
useless. |
f7257ab0bcea6c41fab5a4677787f3075ecdcb64 |
|
04-Nov-2013 |
Pavel Reichl <pavel.reichl@redhat.com> |
Include ext headers with #include <foo.h> - cont
Changing style of including header files from outside of sssd tree - from "header.h" to <header.h> |
d2f4746587809673122d348a8f806f1c14d3d60a |
|
22-Sep-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
Check return values of setenv and unsetenv |
d6837823b0a002c9c8afb48caf3eeda5cb73f173 |
|
18-Sep-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
BE: Log domain name to journald if available
If the SSSD is compiled with journald support, then all sss_log()
statements will include a new field called "SSSD_DOMAIN" that includes
the domain name. Filtering only messages from the single domain is then
as easy as:
# journalctl SSSD_DOMAIN=foo.example.com |
71e234151ddc6b50576364c30bda2b72264b1083 |
|
11-Sep-2013 |
Lukas Slebodnik <lslebodn@redhat.com> |
Fix formating of variables with type: ssize_t |
41bfa213a0994cebcef5f69fd2c353136c803ae4 |
|
06-May-2013 |
Yuri Chornoivan <yurchor@ukr.net> |
Fix minor typos |
141255402340299c4ae544f546a979f2872a091a |
|
03-Apr-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
pidfile(): Do not leak fd on error
https://fedorahosted.org/sssd/ticket/1860 |
dae0a9fa4a2c76c964c06b6607d78498cdb8d799 |
|
19-Nov-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
SERVER: Check the return value of waitpid
We should at least print an error message and error out if waitpid()
fails.
https://fedorahosted.org/sssd/ticket/1651 |
715e09ece039af851b96bcf1861c4fff6169d499 |
|
06-Nov-2012 |
Pavel Březina <pbrezina@redhat.com> |
exit original process after sssd is initialized
https://fedorahosted.org/sssd/ticket/1357
Neither systemd or our init script use pid file as a notification
that sssd is finished initializing. They will continue starting up
next service right after the original (not daemonized) sssd process
is terminated.
If any of the responders fail to start, we will never terminate
the original process via signal and "service sssd start" will hang.
Thus we take this as an error and terminate the daemon with
a non-zero value. This will also terminate the original process
and init script or systemd will print failure. |
53b475b0195d04f8cb9f8dc6a33953f03fcc1dd5 |
|
06-Nov-2012 |
Pavel Březina <pbrezina@redhat.com> |
fix indendation, coding style and debug levels in server.c |
387349ae092f6dbeb8e4bca291a772695836629c |
|
20-Jun-2012 |
Stef Walter <stefw@gnome.org> |
Move some debug lines to new debug log levels
* These are common lines of debug output when starting
up sssd
https://bugzilla.redhat.com/show_bug.cgi?id=811113 |
33aa72ea4d6b04549be0b47e8ec6ff9375621de8 |
|
02-May-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
SERVER: use the correct return code of sss_atomic_write_s |
9d7d4458d94d0aac0a7edf999368eb18f89cb76a |
|
20-Apr-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
Convert read and write operations to sss_atomic_read
https://fedorahosted.org/sssd/ticket/1209 |
3bea01f01d76e1e95a8239c0d3f67073992136a1 |
|
22-Feb-2012 |
Jan Zeleny <jzeleny@redhat.com> |
Don't give memory context in confdb where not needed |
91d521779424409646649a84a99a20f8e8e159df |
|
21-Jan-2012 |
Stephen Gallagher <sgallagh@redhat.com> |
Fix invalid index in pidfile()
If we hit the "read too much, this should never happen" line, we
would write a NULL-terminator past the end of the static buffer.
Coverity 12472 |
05113318e280904f2a1ce3721b8d6504afd7e7df |
|
19-Dec-2011 |
Stephen Gallagher <sgallagh@redhat.com> |
Reorder pidfile() function to guarantee NULL-termination
Coverity 12400 |
1a7529bf5f867b43e0475f7f9ac0cd8671fb16f1 |
|
08-Sep-2011 |
Pavel Březina <pbrezina@redhat.com> |
DEBUG timestamps offer higher precision
https://fedorahosted.org/sssd/ticket/956
Added: --debug-microseconds=0/1
Added: debug_microseconds to sssd.conf |
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) |
96ea25cbd9b94d48c57b6173eeda2b3fbe670a70 |
|
08-Aug-2011 |
Pavel Březina <pbrezina@redhat.com> |
debug_timestamps fixes
Fixed: could not overwrite debug_timestamps when set in sssd.conf
Fixed: invalid description of debug_timestamps in sssd man page |
324fb26ba803a999bedc29e93c46c84f27abf5b7 |
|
23-May-2011 |
Sumit Bose <sbose@redhat.com> |
Set _GNU_SOURCE globally |
d818283d39d56204ffe710b6c9b83a2cf497f946 |
|
06-May-2011 |
Stephen Gallagher <sgallagh@redhat.com> |
Allow changing the log level without restart
We will now re-read the confdb debug_level value when processing
the monitor_common_logrotate() function, which occurs when the
monitor receives a SIGHUP. |
d3750f3c3a9e232629c8b634b7b5407114667700 |
|
04-May-2011 |
Stephen Gallagher <sgallagh@redhat.com> |
Override config file debug_level with command-line
This patch also makes the following changes:
1) The [sssd] debug_level setting no longer acts as a default for
all other sections.
2) We will now skip passing the debug argument to the child
processes from the master unless the SSSD was run with a
command-line argument for the debug level.
https://fedorahosted.org/sssd/ticket/764 |
d8ac1e7ac9d659717db884ba02c3aa1caeffb60c |
|
16-Dec-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Fix invalid sizeof in pidfile
https://fedorahosted.org/sssd/ticket/730 |
b892b95f0ba494a3e149164695ef58d79dd9fb0c |
|
02-Dec-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Make default SIGTERM and SIGINT handlers use tevent |
5ee74e2b7c0cfc30f7209b2b81a34f4f4e15bad7 |
|
09-Jul-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Add log notifications for startup and shutdown. |
02a5cdc06cd78e9798b71a5d9ebb6d8bcc43d127 |
|
28-Jun-2010 |
Jakub Hrozek <jhrozek@redhat.com> |
Resend SIGINT as SIGTERM in services
Fixes: #462 |
c892981d8272a02c44900d4c7b081da0bff6e4b3 |
|
17-Jun-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Initialize len before looping to read the pidfile
https://fedorahosted.org/sssd/ticket/544 |
06247775aa9c49ffce72827921eb45e2d04c6aa1 |
|
10-Jun-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Properly handle read() and write() throughout the SSSD
We need to guarantee at all times that reads and writes complete
successfully. This means that they must be checked for returning
EINTR and EAGAIN, and all writes must be wrapped in a loop to
ensure that they do not truncate their output. |
67607dda05e36c4d0be4647160ad376b89d89c51 |
|
07-May-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Clean up kdcinfo and kpasswdinfo files when exiting |
71cd2f7ce705561d8d8f3cb7f385a57bedad1ef1 |
|
08-Mar-2010 |
Jakub Hrozek <jhrozek@redhat.com> |
Reopen logs when SIGHUP is caught
Upon receiving SIGHUP, the monitor signals all services to reopen their
debug logs. It is also possible to signal individual services to reopen
their particular files.
Fixes: #332 |
ac318e41098b306a626fa686904bbd626794e812 |
|
04-Mar-2010 |
Simo Sorce <ssorce@redhat.com> |
Fix debug_timestamps
It was broken when the default was changed, making it impossible to silence
from the config file. |
1c48b5a62f73234ed26bb20f0ab345ab61cda0ab |
|
18-Feb-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Rename server/ directory to src/
Also update BUILD.txt |