[SSSD] [PATCH] 1371-Missing resolv.conf should be non-fatal
Jakub Hrozek
jhrozek at redhat.com
Wed Sep 12 12:02:20 UTC 2012
On Mon, Sep 10, 2012 at 09:21:05PM -0500, Ariel Barria wrote:
>
> thanks to both for comments.
>
Hi Ariel,
actually I reread the patch and I think there is a simpler way to fix
the ticket..directly in the monitor_config_file() function, there is
already a stat() call:
1823 ret = stat(file, &file_stat);
1824 if (ret < 0) {
1825 err = errno;
1826 DEBUG(0, ("Could not stat file [%s]. Error [%d:%s]\n",
1827 file, err, strerror(err)));
1828 return err;
1829 }
So I think that simply extending the error handler with special-casing
ENOENT as you had in your patch would work fine:
+ if (ret == ENOENT) {
+ DEBUG(SSSDBG_MINOR_FAILURE,
+ ("file [%s] is missing, but will skip this check.\n",
+ RESOLV_CONF_PATH));
+ } else {
+ DEBUG(SSSDBG_MINOR_FAILURE,("Could not stat file [%s]. Error [%d:%s]\n",
+ RESOLV_CONF_PATH, ret, strerror(ret)));
+ }
More information about the sssd-devel
mailing list