diff --git a/globus-gridftp-server-config.patch b/globus-gridftp-server-config.patch new file mode 100644 index 0000000..078cc2e --- /dev/null +++ b/globus-gridftp-server-config.patch @@ -0,0 +1,137 @@ +From 19be7214e0da708ce3491a039a23b4d2c5ba1b92 Mon Sep 17 00:00:00 2001 +From: Matyas Selmeci +Date: Thu, 2 Nov 2017 15:58:16 -0500 +Subject: [PATCH 1/3] Do not ignore config.d files with a . in the name + +This fixes a regression where files like +`/etc/gridftp.d/gridftp-hdfs.conf` were getting ignored. Since the +intent of the original change was to keep .rpmnew and .rpmsave files +from being read, search specifically for `.rpm` instead. +--- + globus_i_gfs_config.c | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) + +diff --git a/globus_i_gfs_config.c b/globus_i_gfs_config.c +index eace237b42..faed95b583 100644 +--- a/globus_i_gfs_config.c ++++ b/globus_i_gfs_config.c +@@ -493,8 +493,8 @@ static const globus_l_gfs_config_option_t option_list[] = + {"config_dir", "config_dir", NULL, "C", NULL, GLOBUS_L_GFS_CONFIG_STRING, 0, NULL, + "Path to directory holding configuration files that should be loaded. Files " + "will be loaded in alphabetical order, and in the event of duplicate parameters " +- "the last loaded file will take precedence. Files with a '.' in the name " +- "(file.bak, file.rpmsave, etc.) will be ignored. Note that the main " ++ "the last loaded file will take precedence. Backup files and files created by " ++ "package updates (e.g. file.rpmsave) will be ignored. Note that the main " + "configuration file, if one exists, will always be loaded last.", NULL, NULL,GLOBUS_FALSE, NULL}, + {"config_base_path", "config_base_path", NULL, "config-base-path", NULL, GLOBUS_L_GFS_CONFIG_STRING, 0, NULL, + "Base path to use when config and log path options are not full paths. " +@@ -1160,9 +1160,10 @@ globus_l_gfs_config_load_config_dir( + { + char * full_path; + +- /* skip any file with a '.': hidden, . or .. +- and files like .rpm*, .deb*, .bak*, etc */ +- if(strchr(entries[i]->d_name, '.') != NULL) ++ /* skip hidden and . or .. ++ and files possibly created by updates .rpmsave or .rpmnew */ ++ if(*entries[i]->d_name == '.' || ++ strstr(entries[i]->d_name, '.rpm') != NULL) + { + free(entries[i]); + continue; + +From 7ef0c5cf702cffcc2003fc5d122cf9687fab1b4b Mon Sep 17 00:00:00 2001 +From: Matyas Selmeci +Date: Fri, 3 Nov 2017 10:44:38 -0500 +Subject: [PATCH 2/3] Be more selective in what config files we skip + +--- + globus_i_gfs_config.c | 42 ++++++++++++++++++++++++++------ + 1 file changed, 35 insertions(+), 7 deletions(-) + +diff --git a/globus_i_gfs_config.c b/globus_i_gfs_config.c +index faed95b583..57255f3291 100644 +--- a/globus_i_gfs_config.c ++++ b/globus_i_gfs_config.c +@@ -1159,19 +1159,47 @@ globus_l_gfs_config_load_config_dir( + for(i = 0; i < count && result == GLOBUS_SUCCESS; i++) + { + char * full_path; +- +- /* skip hidden and . or .. +- and files possibly created by updates .rpmsave or .rpmnew */ +- if(*entries[i]->d_name == '.' || +- strstr(entries[i]->d_name, '.rpm') != NULL) ++ char * filename; ++ char * fileext; ++ char * backupsuffix; ++ ++ filename = entries[i]->d_name; ++ ++ ++ /* skip windows backup files (.bak) and backups created ++ by package managers (.rpmsave, .rpmnew, etc.) */ ++ fileext = strrchr(filename, '.'); ++ if(fileext && ++ (! strcmp(fileext, ".bak") || ++ ! strcmp(fileext, ".dpkg-dist") || ++ ! strcmp(fileext, ".dpkg-new") || ++ ! strcmp(fileext, ".dpkg-old") || ++ ! strcmp(fileext, ".rpmnew") || ++ ! strcmp(fileext, ".rpmsave"))) + { + free(entries[i]); + continue; + } +- ++ ++ /* skip unix backup files */ ++ backupsuffix = strrchr(filename, '~'); ++ if(backupsuffix && ! strcmp(backupsuffix, "~")) ++ { ++ free(entries[i]); ++ continue; ++ } ++ ++ /* skip unix hidden files */ ++ if(*filename == '.') ++ { ++ free(entries[i]); ++ continue; ++ } ++ ++ + full_path = malloc(PATH_MAX); + rc = snprintf( +- full_path, PATH_MAX, "%s/%s", conf_dir, entries[i]->d_name); ++ full_path, PATH_MAX, "%s/%s", conf_dir, filename); + + if(!envs_only) + { + +From ba117479a0facf4a485d6953a8d73680c679fd08 Mon Sep 17 00:00:00 2001 +From: Matyas Selmeci +Date: Fri, 3 Nov 2017 11:56:52 -0500 +Subject: [PATCH 3/3] Update manual with new config.d ignore rules + +--- + globus-gridftp-server.8 | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/globus-gridftp-server.8 b/globus-gridftp-server.8 +index 848ae8b300..6e6c29c00d 100644 +--- a/globus-gridftp-server.8 ++++ b/globus-gridftp-server.8 +@@ -961,9 +961,8 @@ Path to main configuration file that should be loaded\&. Otherwise will attempt + .PP + \fB\-C string\fR + .RS 4 +-Path to directory holding configuration files that should be loaded\&. Files will be loaded in alphabetical order, and in the event of duplicate parameters the last loaded file will take precedence\&. Files with a +-\fI\&.\fR +-in the name (file\&.bak, file\&.rpmsave, etc\&.) will be ignored\&. Note that the main configuration file, if one exists, will always be loaded last\&. ++Path to directory holding configuration files that should be loaded\&. Files will be loaded in alphabetical order, and in the event of duplicate parameters the last loaded file will take precedence\&. Backup files and files created by package updates (e.g. file\&.rpmsave) will be ignored\&. ++Note that the main configuration file, if one exists, will always be loaded last\&. + .sp + This option can also be set in the configuration file as + config_dir\&. diff --git a/globus-gridftp-server.spec b/globus-gridftp-server.spec index 5492138..77c659f 100644 --- a/globus-gridftp-server.spec +++ b/globus-gridftp-server.spec @@ -8,7 +8,7 @@ Name: globus-gridftp-server %global _name %(tr - _ <<< %{name}) -Version: 12.3 +Version: 12.4 Release: 1%{?dist} Summary: Globus Toolkit - Globus GridFTP Server @@ -30,6 +30,9 @@ Patch1: %{name}-epsv-ip.patch # Get command string # https://github.com/globus/globus-toolkit/pull/98 Patch2: %{name}-cmd-string.patch +# Ignore backup & packaging files in config.d +# https://github.com/globus/globus-toolkit/pull/118 +Patch3: %{name}-config.patch Requires: globus-xio-gsi-driver%{?_isa} >= 2 Requires: globus-xio-udt-driver%{?_isa} >= 1 @@ -110,6 +113,7 @@ Globus GridFTP Server Development Files %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build # Reduce overlinking @@ -245,6 +249,10 @@ fi %{_libdir}/pkgconfig/%{name}.pc %changelog +* Wed Nov 08 2017 Mattias Ellert - 12.4-1 +- GT6 update +- Ignore backup & packaging files in config.d + * Tue Sep 26 2017 Mattias Ellert - 12.3-1 - GT6 update diff --git a/sources b/sources index dc6f989..95103f6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (globus_gridftp_server-12.3.tar.gz) = a097663bf48888b30ef07f47e6416d72cde4e51a5648c07014c754736996aa74dd80a60f13405722fc39d737cb8b628e8acf30482badf0a5e475b908bfb28c5b +SHA512 (globus_gridftp_server-12.4.tar.gz) = a77f9e976b8f06ceaa4e4215b8a8dc76b43206df9ef5eb6310c8ec89f8757ed6c5ee7294aeaa3d1a8f52147e19b3a96344d4d2ad240d901b422298bd61d6e66f