I found this while testing the sssctl config-check command.
Michal
On (01/07/16 10:18), Michal Židek wrote:
I found this while testing the sssctl config-check command.
Michal
From 0df000749a3b9423b72f5338630c3092e2cf74be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C5=BDidek?= mzidek@redhat.com Date: Fri, 1 Jul 2016 09:58:41 +0200 Subject: [PATCH] config: Fix filename matching regex
Configuration file snippets must end with suffix .conf. We wrongly allowed any suffixes that begin with .conf (for example .conf.back).
src/util/sss_ini.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/sss_ini.c b/src/util/sss_ini.c index b4dbb07..4438f8c 100644 --- a/src/util/sss_ini.c +++ b/src/util/sss_ini.c @@ -211,7 +211,7 @@ int sss_ini_get_config(struct sss_ini_initdata *init_data, int ret; #ifdef HAVE_LIBINI_CONFIG_V1 #ifdef HAVE_LIBINI_CONFIG_V1_3
- const char *patterns[] = { "^[^\.].*\.conf", NULL };
- const char *patterns[] = { "^[^\.].*\.conf$", NULL }; const char *sections[] = { ".*", NULL }; uint32_t i = 0; char *msg = NULL;
It would be good to document it as well. Maybe in sssd.conf
LS
On 07/01/2016 10:21 AM, Lukas Slebodnik wrote:
On (01/07/16 10:18), Michal Židek wrote:
I found this while testing the sssctl config-check command.
Michal
From 0df000749a3b9423b72f5338630c3092e2cf74be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C5=BDidek?= mzidek@redhat.com Date: Fri, 1 Jul 2016 09:58:41 +0200 Subject: [PATCH] config: Fix filename matching regex
Configuration file snippets must end with suffix .conf. We wrongly allowed any suffixes that begin with .conf (for example .conf.back).
src/util/sss_ini.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/sss_ini.c b/src/util/sss_ini.c index b4dbb07..4438f8c 100644 --- a/src/util/sss_ini.c +++ b/src/util/sss_ini.c @@ -211,7 +211,7 @@ int sss_ini_get_config(struct sss_ini_initdata *init_data, int ret; #ifdef HAVE_LIBINI_CONFIG_V1 #ifdef HAVE_LIBINI_CONFIG_V1_3
- const char *patterns[] = { "^[^\.].*\.conf", NULL };
- const char *patterns[] = { "^[^\.].*\.conf$", NULL }; const char *sections[] = { ".*", NULL }; uint32_t i = 0; char *msg = NULL;
It would be good to document it as well. Maybe in sssd.conf
LS
Yes, but I will send the man page patch separately and ping some native speaker to take a look at it.
Michal
On (01/07/16 10:26), Michal Židek wrote:
On 07/01/2016 10:21 AM, Lukas Slebodnik wrote:
On (01/07/16 10:18), Michal Židek wrote:
I found this while testing the sssctl config-check command.
Michal
From 0df000749a3b9423b72f5338630c3092e2cf74be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C5=BDidek?= mzidek@redhat.com Date: Fri, 1 Jul 2016 09:58:41 +0200 Subject: [PATCH] config: Fix filename matching regex
Configuration file snippets must end with suffix .conf. We wrongly allowed any suffixes that begin with .conf (for example .conf.back).
src/util/sss_ini.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/sss_ini.c b/src/util/sss_ini.c index b4dbb07..4438f8c 100644 --- a/src/util/sss_ini.c +++ b/src/util/sss_ini.c @@ -211,7 +211,7 @@ int sss_ini_get_config(struct sss_ini_initdata *init_data, int ret; #ifdef HAVE_LIBINI_CONFIG_V1 #ifdef HAVE_LIBINI_CONFIG_V1_3
- const char *patterns[] = { "^[^\.].*\.conf", NULL };
- const char *patterns[] = { "^[^\.].*\.conf$", NULL }; const char *sections[] = { ".*", NULL }; uint32_t i = 0; char *msg = NULL;
It would be good to document it as well. Maybe in sssd.conf
LS
Yes, but I will send the man page patch separately and ping some native speaker to take a look at it.
fair enough and it would be good to add doc comments also to python-sssdconfig that it touches only main conf.
BTW. Do we want to enforce numbers at the beggininng of snippet files? or just recommend in man page?
eg: "^[0-9][0-9].*\.conf"
LS
On 07/01/2016 10:49 AM, Lukas Slebodnik wrote:
On (01/07/16 10:26), Michal Židek wrote:
On 07/01/2016 10:21 AM, Lukas Slebodnik wrote:
On (01/07/16 10:18), Michal Židek wrote:
I found this while testing the sssctl config-check command.
Michal
From 0df000749a3b9423b72f5338630c3092e2cf74be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C5=BDidek?= mzidek@redhat.com Date: Fri, 1 Jul 2016 09:58:41 +0200 Subject: [PATCH] config: Fix filename matching regex
Configuration file snippets must end with suffix .conf. We wrongly allowed any suffixes that begin with .conf (for example .conf.back).
src/util/sss_ini.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/sss_ini.c b/src/util/sss_ini.c index b4dbb07..4438f8c 100644 --- a/src/util/sss_ini.c +++ b/src/util/sss_ini.c @@ -211,7 +211,7 @@ int sss_ini_get_config(struct sss_ini_initdata *init_data, int ret; #ifdef HAVE_LIBINI_CONFIG_V1 #ifdef HAVE_LIBINI_CONFIG_V1_3
- const char *patterns[] = { "^[^\.].*\.conf", NULL };
- const char *patterns[] = { "^[^\.].*\.conf$", NULL }; const char *sections[] = { ".*", NULL }; uint32_t i = 0; char *msg = NULL;
It would be good to document it as well. Maybe in sssd.conf
LS
Yes, but I will send the man page patch separately and ping some native speaker to take a look at it.
fair enough and it would be good to add doc comments also to python-sssdconfig that it touches only main conf.
BTW. Do we want to enforce numbers at the beggininng of snippet files? or just recommend in man page?
eg: "^[0-9][0-9].*\.conf"
LS
I think we should not enforce it.
Michal
On (01/07/16 11:07), Michal Židek wrote:
On 07/01/2016 10:49 AM, Lukas Slebodnik wrote:
On (01/07/16 10:26), Michal Židek wrote:
On 07/01/2016 10:21 AM, Lukas Slebodnik wrote:
On (01/07/16 10:18), Michal Židek wrote:
I found this while testing the sssctl config-check command.
Michal
From 0df000749a3b9423b72f5338630c3092e2cf74be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C5=BDidek?= mzidek@redhat.com Date: Fri, 1 Jul 2016 09:58:41 +0200 Subject: [PATCH] config: Fix filename matching regex
Configuration file snippets must end with suffix .conf. We wrongly allowed any suffixes that begin with .conf (for example .conf.back).
src/util/sss_ini.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/sss_ini.c b/src/util/sss_ini.c index b4dbb07..4438f8c 100644 --- a/src/util/sss_ini.c +++ b/src/util/sss_ini.c @@ -211,7 +211,7 @@ int sss_ini_get_config(struct sss_ini_initdata *init_data, int ret; #ifdef HAVE_LIBINI_CONFIG_V1 #ifdef HAVE_LIBINI_CONFIG_V1_3
- const char *patterns[] = { "^[^\.].*\.conf", NULL };
- const char *patterns[] = { "^[^\.].*\.conf$", NULL }; const char *sections[] = { ".*", NULL }; uint32_t i = 0; char *msg = NULL;
It would be good to document it as well. Maybe in sssd.conf
LS
Yes, but I will send the man page patch separately and ping some native speaker to take a look at it.
fair enough and it would be good to add doc comments also to python-sssdconfig that it touches only main conf.
BTW. Do we want to enforce numbers at the beggininng of snippet files? or just recommend in man page?
eg: "^[0-9][0-9].*\.conf"
LS
I think we should not enforce it.
OK, ACK to the patch
LS
On (01/07/16 11:18), Lukas Slebodnik wrote:
On (01/07/16 11:07), Michal Židek wrote:
On 07/01/2016 10:49 AM, Lukas Slebodnik wrote:
On (01/07/16 10:26), Michal Židek wrote:
On 07/01/2016 10:21 AM, Lukas Slebodnik wrote:
On (01/07/16 10:18), Michal Židek wrote:
I found this while testing the sssctl config-check command.
Michal
From 0df000749a3b9423b72f5338630c3092e2cf74be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C5=BDidek?= mzidek@redhat.com Date: Fri, 1 Jul 2016 09:58:41 +0200 Subject: [PATCH] config: Fix filename matching regex
Configuration file snippets must end with suffix .conf. We wrongly allowed any suffixes that begin with .conf (for example .conf.back).
src/util/sss_ini.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/sss_ini.c b/src/util/sss_ini.c index b4dbb07..4438f8c 100644 --- a/src/util/sss_ini.c +++ b/src/util/sss_ini.c @@ -211,7 +211,7 @@ int sss_ini_get_config(struct sss_ini_initdata *init_data, int ret; #ifdef HAVE_LIBINI_CONFIG_V1 #ifdef HAVE_LIBINI_CONFIG_V1_3
- const char *patterns[] = { "^[^\.].*\.conf", NULL };
- const char *patterns[] = { "^[^\.].*\.conf$", NULL }; const char *sections[] = { ".*", NULL }; uint32_t i = 0; char *msg = NULL;
It would be good to document it as well. Maybe in sssd.conf
LS
Yes, but I will send the man page patch separately and ping some native speaker to take a look at it.
fair enough and it would be good to add doc comments also to python-sssdconfig that it touches only main conf.
BTW. Do we want to enforce numbers at the beggininng of snippet files? or just recommend in man page?
eg: "^[0-9][0-9].*\.conf"
LS
I think we should not enforce it.
OK, ACK to the patch
I do not expect any CI failures from this one-liner string change.
master: * e27c0ecef59272d4723f904a17061b4e59f0a6db
LS
On (01/07/16 11:07), Michal Židek wrote:
On 07/01/2016 10:49 AM, Lukas Slebodnik wrote:
On (01/07/16 10:26), Michal Židek wrote:
On 07/01/2016 10:21 AM, Lukas Slebodnik wrote:
On (01/07/16 10:18), Michal Židek wrote:
I found this while testing the sssctl config-check command.
Michal
From 0df000749a3b9423b72f5338630c3092e2cf74be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C5=BDidek?= mzidek@redhat.com Date: Fri, 1 Jul 2016 09:58:41 +0200 Subject: [PATCH] config: Fix filename matching regex
Configuration file snippets must end with suffix .conf. We wrongly allowed any suffixes that begin with .conf (for example .conf.back).
src/util/sss_ini.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/sss_ini.c b/src/util/sss_ini.c index b4dbb07..4438f8c 100644 --- a/src/util/sss_ini.c +++ b/src/util/sss_ini.c @@ -211,7 +211,7 @@ int sss_ini_get_config(struct sss_ini_initdata *init_data, int ret; #ifdef HAVE_LIBINI_CONFIG_V1 #ifdef HAVE_LIBINI_CONFIG_V1_3
- const char *patterns[] = { "^[^\.].*\.conf", NULL };
- const char *patterns[] = { "^[^\.].*\.conf$", NULL }; const char *sections[] = { ".*", NULL }; uint32_t i = 0; char *msg = NULL;
It would be good to document it as well. Maybe in sssd.conf
LS
Yes, but I will send the man page patch separately and ping some native speaker to take a look at it.
fair enough and it would be good to add doc comments also to python-sssdconfig that it touches only main conf.
BTW. Do we want to enforce numbers at the beggininng of snippet files? or just recommend in man page?
eg: "^[0-9][0-9].*\.conf"
LS
I think we should not enforce it.
BTW here is a pattern from gssproxy const char *patterns[] = { /* match only files starting with "##-" and ending in ".conf" */ "^[0-9]\{2\}-.\{1,\}\.conf$", NULL, };
I know you didn't want to enforce it. But at least, it would be good to have a simillar recomendation.
LS
On 07/01/2016 11:41 AM, Lukas Slebodnik wrote:
On (01/07/16 11:07), Michal Židek wrote:
On 07/01/2016 10:49 AM, Lukas Slebodnik wrote:
On (01/07/16 10:26), Michal Židek wrote:
On 07/01/2016 10:21 AM, Lukas Slebodnik wrote:
On (01/07/16 10:18), Michal Židek wrote:
I found this while testing the sssctl config-check command.
Michal
From 0df000749a3b9423b72f5338630c3092e2cf74be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C5=BDidek?= mzidek@redhat.com Date: Fri, 1 Jul 2016 09:58:41 +0200 Subject: [PATCH] config: Fix filename matching regex
Configuration file snippets must end with suffix .conf. We wrongly allowed any suffixes that begin with .conf (for example .conf.back).
src/util/sss_ini.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/sss_ini.c b/src/util/sss_ini.c index b4dbb07..4438f8c 100644 --- a/src/util/sss_ini.c +++ b/src/util/sss_ini.c @@ -211,7 +211,7 @@ int sss_ini_get_config(struct sss_ini_initdata *init_data, int ret; #ifdef HAVE_LIBINI_CONFIG_V1 #ifdef HAVE_LIBINI_CONFIG_V1_3
- const char *patterns[] = { "^[^\.].*\.conf", NULL };
- const char *patterns[] = { "^[^\.].*\.conf$", NULL }; const char *sections[] = { ".*", NULL }; uint32_t i = 0; char *msg = NULL;
It would be good to document it as well. Maybe in sssd.conf
LS
Yes, but I will send the man page patch separately and ping some native speaker to take a look at it.
fair enough and it would be good to add doc comments also to python-sssdconfig that it touches only main conf.
BTW. Do we want to enforce numbers at the beggininng of snippet files? or just recommend in man page?
eg: "^[0-9][0-9].*\.conf"
LS
I think we should not enforce it.
BTW here is a pattern from gssproxy const char *patterns[] = { /* match only files starting with "##-" and ending in ".conf" */ "^[0-9]\{2\}-.\{1,\}\.conf$", NULL, };
I know you didn't want to enforce it. But at least, it would be good to have a simillar recomendation.
LS
I do not expect someone to have more than 99 snippet files, but I also do not like the limitation. But I do not insist.
I added the recommendation to the man page. (patch in another thread)
Michal
sssd-devel@lists.fedorahosted.org