diff options
author | Simo Sorce <simo@redhat.com> | 2014-04-19 16:11:47 -0400 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-04-28 21:57:01 +0200 |
commit | 9a592ee3fc195f20732c6b1f90894a0be25ccc19 (patch) | |
tree | 320d37f03789f3d938a51dae0aaec82c9ad5f9a4 /src/util/sss_ini.c | |
parent | 8e09148b68a3fd8b06fcb746054f3cfa250b40f8 (diff) | |
download | sssd-9a592ee3fc195f20732c6b1f90894a0be25ccc19.tar.gz sssd-9a592ee3fc195f20732c6b1f90894a0be25ccc19.tar.xz sssd-9a592ee3fc195f20732c6b1f90894a0be25ccc19.zip |
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>
Diffstat (limited to 'src/util/sss_ini.c')
-rw-r--r-- | src/util/sss_ini.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/sss_ini.c b/src/util/sss_ini.c index 5293ae93b..89b133da0 100644 --- a/src/util/sss_ini.c +++ b/src/util/sss_ini.c @@ -120,7 +120,7 @@ int sss_ini_config_file_open(struct sss_ini_initdata *init_data, &init_data->file); #elif defined(HAVE_LIBINI_CONFIG_V0) return check_and_open_readonly(config_file, &init_data->file, 0, 0, - (S_IRUSR|S_IWUSR), CHECK_REG); + S_IFREG|S_IRUSR|S_IWUSR, 0); #endif } |