History log of /sssd-io/src/util/inotify.c
Revision Date Author Comments Expand
c53997720b231ad61af435a3124c7ecd731fc99b 13-Feb-2018 Lukas Slebodnik <lslebodn@redhat.com>

INOTIFY: Fix warning Wstringop-truncation It could not cause any security bug because it is used only with short names /etc/passwd, /etc/group, /etc/resolv.conf. And only root could set long names via env variables SSS_FILES_PASSWD, SSS_FILES_GROUP CC src/util/libsss_files_la-inotify.lo src/util/inotify.c: In function ‘copy_filenames’: src/util/inotify.c:390:5: warning: ‘strncpy’ specified bound 4096 equals destination size [-Wstringop-truncation] strncpy(fcopy, filename, sizeof(fcopy)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../sssd/src/util/inotify.c:403:5: warning: ‘strncpy’ specified bound 4096 equals destination size [-Wstringop-truncation] strncpy(fcopy, filename, sizeof(fcopy)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ man gcc says: In the following example, the call to "strncpy" specifies the size of the destination buffer as the bound. If the length of the source string is equal to or greater than this size the result of the copy will not be NUL-terminated. Therefore, the call is also diagnosed. To avoid the warning, specify "sizeof buf - 1" as the bound and set the last element of the buffer to "NUL". void copy (const char *s) { char buf[80]; strncpy (buf, s, sizeof buf); ... } Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>

346d6d8bf5fdb446921d754c07c8a7d913a048d5 29-Jan-2018 René Genz <liebundartig@freenet.de>

Fix minor spelling mistakes Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>

/sssd-io/contrib/gdbinit /sssd-io/contrib/sssd.spec.in /sssd-io/src/conf_macros.m4 /sssd-io/src/confdb/confdb.c /sssd-io/src/confdb/confdb.h /sssd-io/src/confdb/confdb_setup.c /sssd-io/src/config/SSSDConfig/__init__.py.in /sssd-io/src/config/SSSDConfig/ipachangeconf.py /sssd-io/src/db/sysdb_ops.c /sssd-io/src/db/sysdb_search.c /sssd-io/src/external/ldap.m4 /sssd-io/src/ldb_modules/memberof.c /sssd-io/src/lib/certmap/sss_cert_content_nss.c /sssd-io/src/man/sss-certmap.5.xml /sssd-io/src/man/sssd-ad.5.xml /sssd-io/src/monitor/monitor.c /sssd-io/src/monitor/monitor_netlink.c /sssd-io/src/monitor/monitor_sbus.c /sssd-io/src/p11_child/p11_child_nss.c /sssd-io/src/resolv/async_resolv.c /sssd-io/src/sbus/sssd_dbus.h /sssd-io/src/sbus/sssd_dbus_common.c /sssd-io/src/sbus/sssd_dbus_connection.c /sssd-io/src/tools/tools_mc_util.c authtok.h become_user.c cert/libcrypto/cert.c cert/nss/cert.c inotify.c safe-format-string.h server.c sss_krb5.c util_errors.h
0f058b3156f584b21cffb0c9725e8082fbee47d0 08-Jun-2017 Lukas Slebodnik <lslebodn@redhat.com>

UTIL: Remove limits.h from util/util.h limits.h is not used directly by util/util.h. The header file limits.h must be included in 17 files and after removing it from util.h it had to be added only to 4 missing files Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>

8cfb42e1985550e99585d311f68087d414932806 15-Feb-2017 Jakub Hrozek <jhrozek@redhat.com>

UTIL: Add a generic inotify module Adds a reusable module for watching files using the Linux-specific inotify(7) interface. Adds the possibility to watch the file's parent directory as well to make it possible to watch moves into the directory and allow watching file that doesn't exist at the time the watch is created. This interface is needed to implement the files provider, so this commit is related to: https://fedorahosted.org/sssd/ticket/2228 Reviewed-by: Pavel Březina <pbrezina@redhat.com>