https://fedorahosted.org/sssd/ticket/1625
Additional info:
....the class of configuration error messages could be changed to match the default debug level.Apparently this was covered with #1345 and in server.c
if (debug_level == SSSDBG_UNRESOLVED) { /* set debug level if any in conf_entry */ ret = confdb_get_int(ctx->confdb_ctx, conf_entry, CONFDB_SERVICE_DEBUG_LEVEL, SSSDBG_DEFAULT, &debug_level);
On 28/11/12 01:31, Ariel Barria wrote:
https://fedorahosted.org/sssd/ticket/1625
/ // Additional info:/
..../the class of configuration error messages could be changed to match the default debug level./
Apparently this was covered with #1345 and in server.c
/ if (debug_level == SSSDBG_UNRESOLVED) { /* set debug level if any in conf_entry */ ret = confdb_get_int(ctx->confdb_ctx, conf_entry, CONFDB_SERVICE_DEBUG_LEVEL, SSSDBG_DEFAULT, &debug_level);/
Hi Ariel,
Could you add the path of database to the
- DEBUG(SSSDBG_CRIT_FAILURE, ("Error loading configuration file: " "[%d]: %s\n", ret, strerror(ret)));
part as well? And error messages from strerror are not much help in this case [22]: Invalid argument // for empty file [2]: No such file or directory // for invalid syntax in config file so could you change this accordingly to ticket proposal ?
Thanks
Ondra
sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/sssd-devel
Thanks for your comments.
Date: Wed, 28 Nov 2012 14:38:29 +0100 From: okos@redhat.com To: sssd-devel@lists.fedorahosted.org Subject: Re: [SSSD] [PATHC] 1625-Confusing error messages for invalid sssd.conf
On 28/11/12 01:31, Ariel Barria wrote:
https://fedorahosted.org/sssd/ticket/1625
/ // Additional info:/
..../the class of configuration error messages could be changed to match the default debug level./
Apparently this was covered with #1345 and in server.c
/ if (debug_level == SSSDBG_UNRESOLVED) { /* set debug level if any in conf_entry */ ret = confdb_get_int(ctx->confdb_ctx, conf_entry, CONFDB_SERVICE_DEBUG_LEVEL, SSSDBG_DEFAULT, &debug_level);/
Hi Ariel,
Could you add the path of database to the
- DEBUG(SSSDBG_CRIT_FAILURE, ("Error loading configuration file: " "[%d]: %s\n", ret, strerror(ret)));
part as well? And error messages from strerror are not much help in this case [22]: Invalid argument // for empty file [2]: No such file or directory // for invalid syntax in config file so could you change this accordingly to ticket proposal ?
Thanks
Ondra
sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/sssd-devel
-- Ondrej Kos Associate Software Engineer Identity Management Red Hat Czech
phone: +420-532-294-558 cell: +420-736-417-909 ext: 82-62558 loc: 1013 Brno 1 office irc: okos @ #brno _______________________________________________ sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/sssd-devel
On 28/11/12 17:12, Ariel Barria wrote:
Thanks for your comments.
Date: Wed, 28 Nov 2012 14:38:29 +0100 From: okos@redhat.com To: sssd-devel@lists.fedorahosted.org Subject: Re: [SSSD] [PATHC] 1625-Confusing error messages for invalid
sssd.conf
On 28/11/12 01:31, Ariel Barria wrote:
https://fedorahosted.org/sssd/ticket/1625
/ // Additional info:/
..../the class of configuration error messages could be changed to match the default debug level./
Apparently this was covered with #1345 and in server.c
/ if (debug_level == SSSDBG_UNRESOLVED) { /* set debug level if any in conf_entry */ ret = confdb_get_int(ctx->confdb_ctx, conf_entry, CONFDB_SERVICE_DEBUG_LEVEL, SSSDBG_DEFAULT, &debug_level);/
Hi Ariel,
Could you add the path of database to the
- DEBUG(SSSDBG_CRIT_FAILURE, ("Error loading configuration file: "
"[%d]: %s\n", ret, strerror(ret)));
part as well? And error messages from strerror are not much help in this case [22]: Invalid argument // for empty file [2]: No such file or directory // for invalid syntax in config file so could you change this accordingly to ticket proposal ?
Thanks
Ondra
Thanks for the patch, but now, there's a bit wide if-else statement, could you please rewrite it into swich? And append a commit message (what's been done and why)
Ondra
Date: Wed, 28 Nov 2012 17:50:09 +0100 From: okos@redhat.com To: sssd-devel@lists.fedorahosted.org Subject: Re: [SSSD] [PATHC] 1625-Confusing error messages for invalid sssd.conf
On 28/11/12 17:12, Ariel Barria wrote:
Thanks for your comments.
Date: Wed, 28 Nov 2012 14:38:29 +0100 From: okos@redhat.com To: sssd-devel@lists.fedorahosted.org Subject: Re: [SSSD] [PATHC] 1625-Confusing error messages for invalid
sssd.conf
On 28/11/12 01:31, Ariel Barria wrote:
https://fedorahosted.org/sssd/ticket/1625
/ // Additional info:/
..../the class of configuration error messages could be changed to match the default debug level./
Apparently this was covered with #1345 and in server.c
/ if (debug_level == SSSDBG_UNRESOLVED) { /* set debug level if any in conf_entry */ ret = confdb_get_int(ctx->confdb_ctx, conf_entry, CONFDB_SERVICE_DEBUG_LEVEL, SSSDBG_DEFAULT, &debug_level);/
Hi Ariel,
Could you add the path of database to the
- DEBUG(SSSDBG_CRIT_FAILURE, ("Error loading configuration file: "
"[%d]: %s\n", ret, strerror(ret)));
part as well? And error messages from strerror are not much help in this case [22]: Invalid argument // for empty file [2]: No such file or directory // for invalid syntax in config file so could you change this accordingly to ticket proposal ?
Thanks
Ondra
Thanks for the patch, but now, there's a bit wide if-else statement, could you please rewrite it into swich? And append a commit message (what's been done and why)
sure, new patch.
On 28/11/12 19:31, Ariel Barria wrote:
Date: Wed, 28 Nov 2012 17:50:09 +0100 From: okos@redhat.com To: sssd-devel@lists.fedorahosted.org Subject: Re: [SSSD] [PATHC] 1625-Confusing error messages for invalid
sssd.conf
On 28/11/12 17:12, Ariel Barria wrote:
Thanks for your comments.
Date: Wed, 28 Nov 2012 14:38:29 +0100 From: okos@redhat.com To: sssd-devel@lists.fedorahosted.org Subject: Re: [SSSD] [PATHC] 1625-Confusing error messages for invalid
sssd.conf
On 28/11/12 01:31, Ariel Barria wrote:
https://fedorahosted.org/sssd/ticket/1625
/ // Additional info:/
..../the class of configuration error messages could be changed to match the default debug level./
Apparently this was covered with #1345 and in server.c
/ if (debug_level == SSSDBG_UNRESOLVED) { /* set debug level if any in conf_entry */ ret = confdb_get_int(ctx->confdb_ctx, conf_entry, CONFDB_SERVICE_DEBUG_LEVEL, SSSDBG_DEFAULT, &debug_level);/
Hi Ariel,
Could you add the path of database to the
- DEBUG(SSSDBG_CRIT_FAILURE, ("Error loading configuration file: "
"[%d]: %s\n", ret, strerror(ret)));
part as well? And error messages from strerror are not much help
in this
case [22]: Invalid argument // for empty file [2]: No such file or directory // for invalid syntax in config file so could you change this accordingly to ticket proposal ?
Thanks
Ondra
Thanks for the patch, but now, there's a bit wide if-else statement, could you please rewrite it into swich? And append a commit message (what's been done and why)
sure, new patch.
Hi Ariel,
Just remove multiple whitespaces:
DEBUG(SSSDBG_CRIT_FAILURE, ("Error loading configuration file %s: " " invalid configuration.\n", config_file));
--------^
DEBUG(SSSDBG_CRIT_FAILURE, ("Error loading configuration file %s: " " empty file.\n", config_file));
--------^
and add the link to the trac to commit message and its an Ack
Thanks
Ondra
Date: Thu, 29 Nov 2012 12:08:57 +0100 From: okos@redhat.com To: sssd-devel@lists.fedorahosted.org Subject: Re: [SSSD] [PATHC] 1625-Confusing error messages for invalid sssd.conf
On 28/11/12 19:31, Ariel Barria wrote:
Date: Wed, 28 Nov 2012 17:50:09 +0100 From: okos@redhat.com To: sssd-devel@lists.fedorahosted.org Subject: Re: [SSSD] [PATHC] 1625-Confusing error messages for invalid
sssd.conf
On 28/11/12 17:12, Ariel Barria wrote:
Thanks for your comments.
Date: Wed, 28 Nov 2012 14:38:29 +0100 From: okos@redhat.com To: sssd-devel@lists.fedorahosted.org Subject: Re: [SSSD] [PATHC] 1625-Confusing error messages for invalid
sssd.conf
On 28/11/12 01:31, Ariel Barria wrote:
https://fedorahosted.org/sssd/ticket/1625
/ // Additional info:/
..../the class of configuration error messages could be changed to match the default debug level./
Apparently this was covered with #1345 and in server.c
/ if (debug_level == SSSDBG_UNRESOLVED) { /* set debug level if any in conf_entry */ ret = confdb_get_int(ctx->confdb_ctx, conf_entry, CONFDB_SERVICE_DEBUG_LEVEL, SSSDBG_DEFAULT, &debug_level);/
Hi Ariel,
Could you add the path of database to the
- DEBUG(SSSDBG_CRIT_FAILURE, ("Error loading configuration file: "
"[%d]: %s\n", ret, strerror(ret)));
part as well? And error messages from strerror are not much help
in this
case [22]: Invalid argument // for empty file [2]: No such file or directory // for invalid syntax in config file so could you change this accordingly to ticket proposal ?
Thanks
Ondra
Thanks for the patch, but now, there's a bit wide if-else statement, could you please rewrite it into swich? And append a commit message (what's been done and why)
sure, new patch.
Hi. true, I had not seen.
Hi Ariel,
Just remove multiple whitespaces:
DEBUG(SSSDBG_CRIT_FAILURE, ("Error loading configuration file %s: " " invalid configuration.\n", config_file));
--------^
DEBUG(SSSDBG_CRIT_FAILURE, ("Error loading configuration file %s: " " empty file.\n", config_file));
--------^
and add the link to the trac to commit message and its an Ack
Thanks
Ondra
-- Ondrej Kos Associate Software Engineer Identity Management Red Hat Czech
phone: +420-532-294-558 cell: +420-736-417-909 ext: 82-62558 loc: 1013 Brno 1 office irc: okos @ #brno _______________________________________________ sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/sssd-devel
On 29/11/12 15:33, Ariel Barria wrote:
Date: Thu, 29 Nov 2012 12:08:57 +0100 From: okos@redhat.com To: sssd-devel@lists.fedorahosted.org Subject: Re: [SSSD] [PATHC] 1625-Confusing error messages for invalid
sssd.conf
On 28/11/12 19:31, Ariel Barria wrote:
Date: Wed, 28 Nov 2012 17:50:09 +0100 From: okos@redhat.com To: sssd-devel@lists.fedorahosted.org Subject: Re: [SSSD] [PATHC] 1625-Confusing error messages for invalid
sssd.conf
On 28/11/12 17:12, Ariel Barria wrote:
Thanks for your comments.
Date: Wed, 28 Nov 2012 14:38:29 +0100 From: okos@redhat.com To: sssd-devel@lists.fedorahosted.org Subject: Re: [SSSD] [PATHC] 1625-Confusing error messages for
invalid
sssd.conf
On 28/11/12 01:31, Ariel Barria wrote: > https://fedorahosted.org/sssd/ticket/1625 > > / > // Additional info:/ > > ..../the class of configuration error messages could be > changed to match the default debug level./ > > Apparently this was covered with #1345 and in server.c > > / if (debug_level == SSSDBG_UNRESOLVED) { > /* set debug level if any in conf_entry */ > ret = confdb_get_int(ctx->confdb_ctx, conf_entry, > CONFDB_SERVICE_DEBUG_LEVEL, > SSSDBG_DEFAULT, > &debug_level);/ >
Hi Ariel,
Could you add the path of database to the > + DEBUG(SSSDBG_CRIT_FAILURE, ("Error loading configuration
file: "
> "[%d]: %s\n", ret, strerror(ret))); part as well? And error messages from strerror are not much help
in this
case [22]: Invalid argument // for empty file [2]: No such file or directory // for invalid syntax in
config file
so could you change this accordingly to ticket proposal ?
Thanks
Ondra >
Thanks for the patch, but now, there's a bit wide if-else statement, could you please rewrite it into swich? And append a commit message (what's been done and why)
sure, new patch.
Hi. true, I had not seen.
Hi Ariel,
Just remove multiple whitespaces:
DEBUG(SSSDBG_CRIT_FAILURE, ("Error loading configuration file %s: " " invalid configuration.\n", config_file));
--------^
DEBUG(SSSDBG_CRIT_FAILURE, ("Error loading configuration file %s: " " empty file.\n", config_file));
--------^
and add the link to the trac to commit message and its an Ack
Thanks
Ondra
-- Ondrej Kos Associate Software Engineer Identity Management Red Hat Czech
phone: +420-532-294-558 cell: +420-736-417-909 ext: 82-62558 loc: 1013 Brno 1 office irc: okos @ #brno _______________________________________________ sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/sssd-devel
sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/sssd-devel
Thanks for the patch
ACK
Ondra
On Thu, Nov 29, 2012 at 09:33:08AM -0500, Ariel Barria wrote:
Hi Ariel, this is a good start!
From 182c5c70d52734caba59d97ca318b036412a6705 Mon Sep 17 00:00:00 2001 From: "Ariel O. Barria" arielb@fedoraproject.org Date: Tue, 27 Nov 2012 19:21:05 -0500 Subject: [PATCH] Confusing error messages for invalid sssd.conf
https://fedorahosted.org/sssd/ticket/1625 Amending errors messages and add other error codes to be more specific and avoid confusion.
src/monitor/monitor.c | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-)
diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c index 71f915723426e97aaf98c2bccee81a41e7595da8..d9bee5b3b13854841dbaabea19c3db2257df9a48 100644 --- a/src/monitor/monitor.c +++ b/src/monitor/monitor.c @@ -2752,15 +2752,31 @@ int main(int argc, const char *argv[]) /* Parse config file, fail if cannot be done */ ret = load_configuration(tmp_ctx, config_file, &monitor); if (ret != EOK) {
if (ret == EPERM) {
DEBUG(1, ("Cannot read configuration file %s\n", config_file));
switch (ret) {
case EPERM:
DEBUG(SSSDBG_CRIT_FAILURE,
("Configuration file %s mode bits too permissive.\n",
config_file));
I think we should rather say "Not enough permission to read configuration file" because maybe EPERM could be returned in case SELinux denied access as well.
sss_log(SSS_LOG_ALERT,
"Cannot read config file %s, please check if permissions "
"are 0600 and the file is owned by root.root", config_file);
} else {
DEBUG(SSSDBG_CRIT_FAILURE, ("Error loading configuration database: "
"[%d]: %s\n", ret, strerror(ret)));
sss_log(SSS_LOG_ALERT, "Cannot load configuration database");
"Cannot read config file %s, please check if permissions "
"are 0600 and the file is owned by root.root", config_file);
break;
I think we should only special-case EPERM and not the other error codes because they are quite generic. I think that for anything else other than EPERM we should simply say that SSSD couldn't load the configuration database.
Longer-term, this might be a perfect place to introduce new error codes.
case ENOENT:
DEBUG(SSSDBG_CRIT_FAILURE, ("Error loading configuration file %s: "
"invalid configuration.\n", config_file));
sss_log(SSS_LOG_ALERT, "Cannot load configuration file.");
break;
case EINVAL:
DEBUG(SSSDBG_CRIT_FAILURE, ("Error loading configuration file %s: "
"empty file.\n", config_file));
sss_log(SSS_LOG_ALERT, "Cannot load configuration file.");
break;
default:
DEBUG(SSSDBG_CRIT_FAILURE, ("Error loading configuration file %s.",
config_file));
sss_log(SSS_LOG_ALERT, "Cannot load configuration file.[%d]: %s\n",
ret, strerror(ret));
}break; } return 4;
-- 1.7.11.7
On 03/20/2013 09:16 AM, Jakub Hrozek wrote:
On Thu, Nov 29, 2012 at 09:33:08AM -0500, Ariel Barria wrote:
Hi Ariel, this is a good start!
From 182c5c70d52734caba59d97ca318b036412a6705 Mon Sep 17 00:00:00 2001 From: "Ariel O. Barria" arielb@fedoraproject.org Date: Tue, 27 Nov 2012 19:21:05 -0500 Subject: [PATCH] Confusing error messages for invalid sssd.conf
https://fedorahosted.org/sssd/ticket/1625 Amending errors messages and add other error codes to be more specific and avoid confusion.
src/monitor/monitor.c | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-)
diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c index 71f915723426e97aaf98c2bccee81a41e7595da8..d9bee5b3b13854841dbaabea19c3db2257df9a48 100644 --- a/src/monitor/monitor.c +++ b/src/monitor/monitor.c @@ -2752,15 +2752,31 @@ int main(int argc, const char *argv[]) /* Parse config file, fail if cannot be done */ ret = load_configuration(tmp_ctx, config_file, &monitor); if (ret != EOK) {
if (ret == EPERM) {
DEBUG(1, ("Cannot read configuration file %s\n", config_file));
switch (ret) {
case EPERM:
DEBUG(SSSDBG_CRIT_FAILURE,
("Configuration file %s mode bits too permissive.\n",
config_file));
I think we should rather say "Not enough permission to read configuration file" because maybe EPERM could be returned in case SELinux denied access as well.
sss_log(SSS_LOG_ALERT,
"Cannot read config file %s, please check if permissions "
"are 0600 and the file is owned by root.root", config_file);
} else {
DEBUG(SSSDBG_CRIT_FAILURE, ("Error loading configuration database: "
"[%d]: %s\n", ret, strerror(ret)));
sss_log(SSS_LOG_ALERT, "Cannot load configuration database");
"Cannot read config file %s, please check if permissions "
"are 0600 and the file is owned by root.root", config_file);
break;
I think we should only special-case EPERM and not the other error codes because they are quite generic. I think that for anything else other than EPERM we should simply say that SSSD couldn't load the configuration database.
Longer-term, this might be a perfect place to introduce new error codes.
case ENOENT:
DEBUG(SSSDBG_CRIT_FAILURE, ("Error loading configuration file %s: "
"invalid configuration.\n", config_file));
sss_log(SSS_LOG_ALERT, "Cannot load configuration file.");
break;
case EINVAL:
DEBUG(SSSDBG_CRIT_FAILURE, ("Error loading configuration file %s: "
"empty file.\n", config_file));
sss_log(SSS_LOG_ALERT, "Cannot load configuration file.");
break;
default:
DEBUG(SSSDBG_CRIT_FAILURE, ("Error loading configuration file %s.",
config_file));
sss_log(SSS_LOG_ALERT, "Cannot load configuration file.[%d]: %s\n",
ret, strerror(ret));
}break; } return 4;
-- 1.7.11.7
sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/sssd-devel
Wouldn't this area be affected by the work needed for using newer version of the libini?
On 03/20/2013 12:28 PM, Jakub Hrozek wrote:
On Wed, Mar 20, 2013 at 12:06:56PM -0400, Dmitri Pal wrote:
Wouldn't this area be affected by the work needed for using newer version of the libini?
That's a good point, thanks, I haven't relized that. But I still suspect we would get EPERM on wrong sssd.conf permissions. _______________________________________________ sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/sssd-devel
It returns what fopen() & open() does. And according to man page it is EACCESS rather than EPERM.
EACCES The requested access to the file is not allowed, or search per- mission is denied for one of the directories in the path prefix of pathname, or the file did not exist yet and write access to the parent directory is not allowed. (See also path_resolu- tion(7).)
EPERM The O_NOATIME flag was specified, but the effective user ID of the caller did not match the owner of the file and the caller was not privileged (CAP_FOWNER).
IMO you should check for both.
Also if the code is using the access check call (will be used with the new interface and proposed refactoring of the code) the access check will return EACCESS if the permissions on the file are wrong. See the header ini_configobj.h in ini folder.
thanks for your comments. done.
Date: Wed, 20 Mar 2013 13:26:53 -0400 From: dpal@redhat.com To: sssd-devel@lists.fedorahosted.org Subject: Re: [SSSD] [PATHC] 1625-Confusing error messages for invalid sssd.conf
On 03/20/2013 12:28 PM, Jakub Hrozek wrote:
On Wed, Mar 20, 2013 at 12:06:56PM -0400, Dmitri Pal wrote:
Wouldn't this area be affected by the work needed for using newer version of the libini?
That's a good point, thanks, I haven't relized that. But I still suspect we would get EPERM on wrong sssd.conf permissions. _______________________________________________ sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/sssd-devel
It returns what fopen() & open() does. And according to man page it is EACCESS rather than EPERM.
EACCES The requested access to the file is not allowed, or search per- mission is denied for one of the directories in the path prefix of pathname, or the file did not exist yet and write access to the parent directory is not allowed. (See also path_resolu- tion(7).)
EPERM The O_NOATIME flag was specified, but the effective user ID of the caller did not match the owner of the file and the caller was not privileged (CAP_FOWNER).
IMO you should check for both.
Also if the code is using the access check call (will be used with the new interface and proposed refactoring of the code) the access check will return EACCESS if the permissions on the file are wrong. See the header ini_configobj.h in ini folder.
-- Thank you, Dmitri Pal
Sr. Engineering Manager for IdM portfolio Red Hat Inc.
Looking to carve out IT costs? www.redhat.com/carveoutcosts/
sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/sssd-devel
On Wed, Apr 03, 2013 at 03:27:29PM -0500, Ariel Barria wrote:
thanks for your comments. done.
Hi Ariel,
you don't have to duplicate the case statements in a switch statement if both should yield the same result. Instead of:
+ case EPERM: + DEBUG(SSSDBG_CRIT_FAILURE, + ("Not enough permission to read configuration file.\n")); + break; + case EACCES: + DEBUG(SSSDBG_CRIT_FAILURE, + ("Not enough permission to read configuration file.\n")); + break;
You can use: + case EPERM: + case EACCES: + DEBUG(SSSDBG_CRIT_FAILURE, + ("Not enough permission to read configuration file.\n")); + break;
Also instead of "Not enough permission" I would rather say "Insufficient permissions".
Almost there :)
Hi Ariel,
you don't have to duplicate the case statements in a switch statement if both should yield the same result. Instead of:
case EPERM:
DEBUG(SSSDBG_CRIT_FAILURE,
("Not enough permission to read configuration file.\n"));
break;
case EACCES:
DEBUG(SSSDBG_CRIT_FAILURE,
("Not enough permission to read configuration file.\n"));
break;
You can use:
case EPERM:
case EACCES:
DEBUG(SSSDBG_CRIT_FAILURE,
("Not enough permission to read configuration file.\n"));
break;
Ok, thank you
Also instead of "Not enough permission" I would rather say "Insufficient permissions".
I am hopeful ^_^
Almost there :)
new patch
On Tue, Apr 09, 2013 at 11:50:35AM -0500, Ariel Barria wrote:
Hi Ariel,
you don't have to duplicate the case statements in a switch statement if both should yield the same result. Instead of:
case EPERM:
DEBUG(SSSDBG_CRIT_FAILURE,
("Not enough permission to read configuration file.\n"));
break;
case EACCES:
DEBUG(SSSDBG_CRIT_FAILURE,
("Not enough permission to read configuration file.\n"));
break;
You can use:
case EPERM:
case EACCES:
DEBUG(SSSDBG_CRIT_FAILURE,
("Not enough permission to read configuration file.\n"));
break;
Ok, thank you
Also instead of "Not enough permission" I would rather say "Insufficient permissions".
I am hopeful ^_^
Almost there :)
new patch
Ack!
On Fri, Apr 12, 2013 at 04:59:28PM +0200, Jakub Hrozek wrote:
On Tue, Apr 09, 2013 at 11:50:35AM -0500, Ariel Barria wrote:
Hi Ariel,
you don't have to duplicate the case statements in a switch statement if both should yield the same result. Instead of:
case EPERM:
DEBUG(SSSDBG_CRIT_FAILURE,
("Not enough permission to read configuration file.\n"));
break;
case EACCES:
DEBUG(SSSDBG_CRIT_FAILURE,
("Not enough permission to read configuration file.\n"));
break;
You can use:
case EPERM:
case EACCES:
DEBUG(SSSDBG_CRIT_FAILURE,
("Not enough permission to read configuration file.\n"));
break;
Ok, thank you
Also instead of "Not enough permission" I would rather say "Insufficient permissions".
I am hopeful ^_^
Almost there :)
new patch
Ack!
Pushed to master.
sssd-devel@lists.fedorahosted.org