diff options
Diffstat (limited to 'external/meta-openembedded/meta-networking/recipes-daemons')
61 files changed, 699 insertions, 1845 deletions
diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp_git.bb b/external/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp_0.7.2.bb index a9949d59..ff9084db 100644 --- a/external/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp_git.bb +++ b/external/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp_0.7.2.bb @@ -3,17 +3,12 @@ SECTION = "net" HOMEPAGE = "http://packages.debian.org/atftp" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://LICENSE;md5=94d55d512a9ba36caa9b7df079bae19f" -PV = "0.7.1+git${SRCPV}" -PR = "r3" -SRCREV = "be3291a18c069ae23a124ffdc56d64a5ff0bbec7" +SRCREV = "52b71f0831dcbde508bd3a961d84abb80a62480f" SRC_URI = "git://git.code.sf.net/p/atftp/code \ - file://atftpd-0.7_circumvent_tftp_size_restrictions.patch \ - file://atftpd-0.7_unprotected_assignments_crash.patch \ file://atftpd.init \ file://atftpd.service \ - file://atftp-0.7-sorcerers_apprentice.patch \ " SRC_URI_append_libc-musl = " file://0001-argz.h-fix-musl-compile-add-missing-defines.patch \ file://0002-tftp.h-tftpd.h-fix-musl-compile-missing-include.patch \ diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/atftp/files/atftp-0.7-sorcerers_apprentice.patch b/external/meta-openembedded/meta-networking/recipes-daemons/atftp/files/atftp-0.7-sorcerers_apprentice.patch deleted file mode 100644 index fc64291c..00000000 --- a/external/meta-openembedded/meta-networking/recipes-daemons/atftp/files/atftp-0.7-sorcerers_apprentice.patch +++ /dev/null @@ -1,94 +0,0 @@ -atftp exhibits the well known "Sorcerer's Apprentice Syndrome"(SAS) problem. -According to RFC 1350, the fix to SAS is quite simple: further copies of the -acknowledgment for a particular data block would be ignored. - -Patch originally from OpenSUSE: -https://build.opensuse.org/package/view_file?file=atftp-0.7-sorcerers_apprentice.patch&package=atftp.539&project=openSUSE%3A12.1%3AUpdate&rev=84569792975e00573d7df597d2a6e895 - -Upstream-Status: Pending - -Signed-off-by: Roy.Li <rongqing.li@windriver.com> -Index: atftp-0.7/tftp_file.c -=================================================================== ---- atftp-0.7.orig/tftp_file.c 2011-11-22 15:12:53.792744083 +0100 -+++ atftp-0.7/tftp_file.c 2011-11-22 15:13:51.706421893 +0100 -@@ -605,6 +605,7 @@ - int timeout_state = state; /* what state should we go on when timeout */ - int result; - long block_number = 0; -+ long last_requested_block = -1; - long last_block = -1; - int data_size; /* size of data received */ - int sockfd = data->sockfd; /* just to simplify calls */ -@@ -765,6 +766,17 @@ - connected = 1; - } - block_number = ntohs(tftphdr->th_block); -+ -+ if (last_requested_block >= block_number) -+ { -+ if (data->trace) -+ fprintf(stderr, "received duplicated ACK <block: %ld >= %ld>\n", -+ last_requested_block, block_number); -+ break; -+ } -+ else -+ last_requested_block = block_number; -+ - if (data->trace) - fprintf(stderr, "received ACK <block: %ld>\n", - block_number); -Index: atftp-0.7/tftpd_file.c -=================================================================== ---- atftp-0.7.orig/tftpd_file.c 2011-11-22 15:12:53.793744112 +0100 -+++ atftp-0.7/tftpd_file.c 2011-11-22 15:15:04.617534260 +0100 -@@ -403,6 +403,7 @@ - int timeout_state = state; - int result; - long block_number = 0; -+ long last_requested_block = -1; - long last_block = -1; - int block_loops = 0; - int data_size; -@@ -859,6 +860,32 @@ - { - logger(LOG_DEBUG, "received ACK <block: %d>", block_number); - } -+ -+ /* check whether the block request isn't already fulfilled */ -+ -+ /* multicast, block numbers could contain gaps */ -+ if (multicast) { -+ if (last_requested_block >= block_number) -+ { -+ if (data->trace) -+ logger(LOG_DEBUG, "received duplicated ACK <block: %d >= %d>", last_requested_block, block_number); -+ break; -+ } -+ else -+ last_requested_block = block_number; -+ /* unicast, blocks should be requested one after another */ -+ } else { -+ if (last_requested_block + 1 != block_number && last_requested_block != -1) -+ { -+ if (data->trace) -+ logger(LOG_DEBUG, "received out of order ACK <block: %d != %d>", last_requested_block + 1, block_number); -+ break; -+ } -+ else -+ last_requested_block = block_number; -+ } -+ -+ - if (ntohs(tftphdr->th_block) == 65535) - { - block_loops++; -@@ -958,6 +985,8 @@ - /* nedd to send an oack to that client */ - state = S_SEND_OACK; - fseek(fp, 0, SEEK_SET); -+ /* reset the last block received counter */ -+ last_requested_block = -1; - } - else - { diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/atftp/files/atftpd-0.7_circumvent_tftp_size_restrictions.patch b/external/meta-openembedded/meta-networking/recipes-daemons/atftp/files/atftpd-0.7_circumvent_tftp_size_restrictions.patch deleted file mode 100644 index 280b570b..00000000 --- a/external/meta-openembedded/meta-networking/recipes-daemons/atftp/files/atftpd-0.7_circumvent_tftp_size_restrictions.patch +++ /dev/null @@ -1,163 +0,0 @@ -Fate #303031: Circumvent TFTP size restrictions in atftpd -The size of a single image file that can be transferred with TFTP is limited to -2^(2*8) *BLOCKSIZE (as per RFC 1350 there are only two bytes for the block -counter). This is problematic for one of our customers who needs to transfer -100+ MB Windows images using a TFTP client (NT bootloader) which has a -hardwared BLOCKSIZE setting of 1432). - -block rollover -http://www.compuphase.com/tftp.htm - -Patch originally from OpenSUSE: -https://build.opensuse.org/package/show?package=atftp&project=openSUSE%3A12.2 - -Upstream-Status: Pending - -Index: git/tftp_def.h -=================================================================== ---- git.orig/tftp_def.h 2012-11-19 16:28:50.221027144 -0800 -+++ git/tftp_def.h 2012-11-20 17:40:54.391206979 -0800 -@@ -32,6 +32,7 @@ - #define TIMEOUT 5 /* Client timeout */ - #define S_TIMEOUT 5 /* Server timout. */ - #define NB_OF_RETRY 5 -+#define MAXBLOCKS 1000000 /* maximum number of blocks in a download */ - - /* definition to use tftp_options structure */ - #define OPT_FILENAME 0 -Index: git/tftp_file.c -=================================================================== ---- git.orig/tftp_file.c 2012-11-19 16:28:50.221027144 -0800 -+++ git/tftp_file.c 2012-11-19 16:28:51.201027167 -0800 -@@ -622,8 +622,8 @@ - int state = S_SEND_REQ; /* current state in the state machine */ - int timeout_state = state; /* what state should we go on when timeout */ - int result; -- int block_number = 0; -- int last_block = -1; -+ long block_number = 0; -+ long last_block = -1; - int data_size; /* size of data received */ - int sockfd = data->sockfd; /* just to simplify calls */ - struct sockaddr_storage sa; /* a copy of data.sa_peer */ -@@ -637,8 +637,8 @@ - int convert = 0; /* if true, do netascii convertion */ - char string[MAXLEN]; - -- int prev_block_number = 0; /* needed to support netascii convertion */ -- int prev_file_pos = 0; -+ long prev_block_number = 0; /* needed to support netascii convertion */ -+ long prev_file_pos = 0; - int temp = 0; - - data->file_size = 0; -@@ -745,7 +745,7 @@ - data_size, data->data_buffer); - data->file_size += data_size; - if (data->trace) -- fprintf(stderr, "sent DATA <block: %d, size: %d>\n", -+ fprintf(stderr, "sent DATA <block: %ld, size: %d>\n", - block_number + 1, data_size - 4); - state = S_WAIT_PACKET; - break; -@@ -785,7 +785,7 @@ - } - block_number = ntohs(tftphdr->th_block); - if (data->trace) -- fprintf(stderr, "received ACK <block: %d>\n", -+ fprintf(stderr, "received ACK <block: %ld>\n", - block_number); - if ((last_block != -1) && (block_number > last_block)) - { -Index: git/tftp_io.c -=================================================================== ---- git.orig/tftp_io.c 2012-11-19 16:28:50.221027144 -0800 -+++ git/tftp_io.c 2012-11-19 16:28:51.201027167 -0800 -@@ -350,8 +350,8 @@ - /* - * Read from file and do netascii conversion if needed - */ --int tftp_file_read(FILE *fp, char *data_buffer, int data_buffer_size, int block_number, -- int convert, int *prev_block_number, int *prev_file_pos, int *temp) -+int tftp_file_read(FILE *fp, char *data_buffer, int data_buffer_size, long block_number, -+ int convert, long *prev_block_number, long *prev_file_pos, int *temp) - { - int i; - int c; -Index: git/tftp_io.h -=================================================================== ---- git.orig/tftp_io.h 2012-11-19 16:28:50.221027144 -0800 -+++ git/tftp_io.h 2012-11-19 16:28:51.201027167 -0800 -@@ -52,8 +52,8 @@ - int tftp_get_packet(int sock1, int sock2, int *sock, struct sockaddr_storage *sa, - struct sockaddr_storage *from, struct sockaddr_storage *to, - int timeout, int *size, char *data); --int tftp_file_read(FILE *fp, char *buffer, int buffer_size, int block_number, int convert, -- int *prev_block_number, int *prev_file_pos, int *temp); -+int tftp_file_read(FILE *fp, char *buffer, int buffer_size, long block_number, int convert, -+ long *prev_block_number, long *prev_file_pos, int *temp); - int tftp_file_write(FILE *fp, char *data_buffer, int data_buffer_size, int block_number, - int data_size, int convert, int *prev_block_number, int *temp); - #endif -Index: git/tftpd_file.c -=================================================================== ---- git.orig/tftpd_file.c 2012-11-19 16:28:50.225027144 -0800 -+++ git/tftpd_file.c 2012-11-19 16:28:51.201027167 -0800 -@@ -407,8 +407,9 @@ - int state = S_BEGIN; - int timeout_state = state; - int result; -- int block_number = 0; -- int last_block = -1; -+ long block_number = 0; -+ long last_block = -1; -+ int block_loops = 0; - int data_size; - struct sockaddr_storage *sa = &data->client_info->client; - struct sockaddr_storage from; -@@ -431,8 +432,8 @@ - struct client_info *client_old = NULL; - struct tftp_opt options[OPT_NUMBER]; - -- int prev_block_number = 0; /* needed to support netascii convertion */ -- int prev_file_pos = 0; -+ long prev_block_number = 0; /* needed to support netascii convertion */ -+ long prev_file_pos = 0; - int temp = 0; - - /* look for mode option */ -@@ -565,11 +566,12 @@ - logger(LOG_INFO, "blksize option -> %d", result); - } - -- /* Verify that the file can be sent in 2^16 block of BLKSIZE octets */ -- if ((file_stat.st_size / (data->data_buffer_size - 4)) > 65535) -+ /* Verify that the file can be sent in MAXBLOCKS blocks of BLKSIZE octets */ -+ if ((file_stat.st_size / (data->data_buffer_size - 4)) > MAXBLOCKS) - { - tftp_send_error(sockfd, sa, EUNDEF, data->data_buffer, data->data_buffer_size); -- logger(LOG_NOTICE, "Requested file to big, increase BLKSIZE"); -+ logger(LOG_NOTICE, "Requested file too big, increase BLKSIZE"); -+ logger(LOG_NOTICE, "Only %d blocks of %d bytes can be served.", MAXBLOCKS, data->data_buffer_size); - if (data->trace) - logger(LOG_DEBUG, "sent ERROR <code: %d, msg: %s>", EUNDEF, - tftp_errmsg[EUNDEF]); -@@ -880,10 +882,15 @@ - } - /* The ACK is from the current client */ - number_of_timeout = 0; -- block_number = ntohs(tftphdr->th_block); -+ block_number = (block_loops * 65536) + ntohs(tftphdr->th_block); - if (data->trace) -- logger(LOG_DEBUG, "received ACK <block: %d>", -- block_number); -+ { -+ logger(LOG_DEBUG, "received ACK <block: %d>", block_number); -+ } -+ if (ntohs(tftphdr->th_block) == 65535) -+ { -+ block_loops++; -+ }; - if ((last_block != -1) && (block_number > last_block)) - { - state = S_END; diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/atftp/files/atftpd-0.7_unprotected_assignments_crash.patch b/external/meta-openembedded/meta-networking/recipes-daemons/atftp/files/atftpd-0.7_unprotected_assignments_crash.patch deleted file mode 100644 index 28fba6cf..00000000 --- a/external/meta-openembedded/meta-networking/recipes-daemons/atftp/files/atftpd-0.7_unprotected_assignments_crash.patch +++ /dev/null @@ -1,152 +0,0 @@ -Avoid assigning thread data outside of mutex lock - -Patch originally from OpenSUSE: -https://build.opensuse.org/package/show?package=atftp&project=openSUSE%3A12.2 - -Upstream-Status: Pending - -Index: git/tftpd_list.c -=================================================================== ---- git.orig/tftpd_list.c 2012-10-24 21:48:47.000000000 -0700 -+++ git/tftpd_list.c 2012-10-24 21:52:04.266205076 -0700 -@@ -49,11 +49,11 @@ - */ - int tftpd_list_add(struct thread_data *new) - { -- struct thread_data *current = thread_data; -+ struct thread_data *current; - int ret; - - pthread_mutex_lock(&thread_list_mutex); -- -+ current = thread_data; - number_of_thread++; - - ret = number_of_thread; -@@ -81,11 +81,13 @@ - */ - int tftpd_list_remove(struct thread_data *old) - { -- struct thread_data *current = thread_data; -+ struct thread_data *current; - int ret; - - pthread_mutex_lock(&thread_list_mutex); - -+ current = thread_data; -+ - number_of_thread--; - ret = number_of_thread; - -@@ -137,23 +139,26 @@ - struct thread_data *data, - struct client_info *client) - { -- struct thread_data *current = thread_data; /* head of the list */ -- struct tftp_opt *tftp_options = data->tftp_options; -+ struct thread_data *current; /* head of the list */ -+ struct tftp_opt *tftp_options; - struct client_info *tmp; - char options[MAXLEN]; - char string[MAXLEN]; - char *index; - int len; - -+ /* lock the whole list before walking it */ -+ pthread_mutex_lock(&thread_list_mutex); -+ - *thread = NULL; - -+ current = thread_data; -+ tftp_options = data->tftp_options; -+ - opt_request_to_string(tftp_options, options, MAXLEN); - index = strstr(options, "multicast"); - len = (int)index - (int)options; - -- /* lock the whole list before walking it */ -- pthread_mutex_lock(&thread_list_mutex); -- - while (current) - { - if (current != data) -@@ -214,9 +219,10 @@ - void tftpd_clientlist_remove(struct thread_data *thread, - struct client_info *client) - { -- struct client_info *tmp = thread->client_info; -+ struct client_info *tmp; - - pthread_mutex_lock(&thread->client_mutex); -+ tmp = thread->client_info; - while ((tmp->next != client) && (tmp->next != NULL)) - tmp = tmp->next; - if (tmp->next == NULL) -@@ -231,9 +237,11 @@ - void tftpd_clientlist_free(struct thread_data *thread) - { - struct client_info *tmp; -- struct client_info *head = thread->client_info; -+ struct client_info *head; - - pthread_mutex_lock(&thread->client_mutex); -+ head = thread->client_info; -+ - while (head) - { - tmp = head; -@@ -250,9 +258,10 @@ - struct client_info *client, - struct sockaddr_storage *sock) - { -- struct client_info *head = thread->client_info; -+ struct client_info *head; - - pthread_mutex_lock(&thread->client_mutex); -+ head = thread->client_info; - - if (client) - { -@@ -334,10 +343,10 @@ - - void tftpd_list_kill_threads(void) - { -- struct thread_data *current = thread_data; /* head of list */ -+ struct thread_data *current; /* head of list */ - - pthread_mutex_lock(&thread_list_mutex); -- -+ current = thread_data; - - while (current != NULL) - { -Index: git/tftpd_mcast.c -=================================================================== ---- git.orig/tftpd_mcast.c 2012-10-24 21:48:47.000000000 -0700 -+++ git/tftpd_mcast.c 2012-10-24 21:49:11.570201582 -0700 -@@ -51,9 +51,11 @@ - */ - int tftpd_mcast_get_tid(char **addr, short *port) - { -- struct tid *current = tid_list; -+ struct tid *current; - - pthread_mutex_lock(&mcast_tid_list); -+ current = tid_list; -+ - /* walk the list for a free tid */ - while (current != NULL) - { -@@ -74,9 +76,11 @@ - - int tftpd_mcast_free_tid(char *addr, short port) - { -- struct tid *current = tid_list; -+ struct tid *current; - - pthread_mutex_lock(&mcast_tid_list); -+ current = tid_list; -+ - while (current != NULL) - { - if ((current->used == 1) && (current->port == port) && diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Bug-fix-for-pid_t-not-found-on-musl.patch b/external/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Bug-fix-for-pid_t-not-found-on-musl.patch new file mode 100644 index 00000000..2a583466 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Bug-fix-for-pid_t-not-found-on-musl.patch @@ -0,0 +1,30 @@ +From d0d5ac317dab11610a5fc91ca3e7f5ad72ce2236 Mon Sep 17 00:00:00 2001 +From: Zang Ruochen <zangrc.fnst@cn.fujitsu.com> +Date: Tue, 29 Oct 2019 13:19:37 +0800 +Subject: [PATCH] Bug fix for pid_t not found on musl. + +When compiling version 5.1.6 on musl, the following error occurs: +log.h:49:8: error: unknown type name 'pid_t' + +Upstream-Status: Pending + +Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com> +--- + lib/defaults.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lib/defaults.c b/lib/defaults.c +index a6ea116..b3ecfa5 100644 +--- a/lib/defaults.c ++++ b/lib/defaults.c +@@ -21,6 +21,7 @@ + #include <string.h> + #include <sys/utsname.h> + #include <sys/stat.h> ++#include <sys/types.h> + #include <stdarg.h> + + #include "config.h" +-- +2.20.1 + diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Do-not-hardcode-path-for-pkg.m4.patch b/external/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Do-not-hardcode-path-for-pkg.m4.patch index f3f25f46..b991acad 100644 --- a/external/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Do-not-hardcode-path-for-pkg.m4.patch +++ b/external/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Do-not-hardcode-path-for-pkg.m4.patch @@ -1,21 +1,26 @@ -From 6d24365f0828185fd1bb4d199209ca07eb95c41d Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 24 Aug 2018 06:24:36 +0000 -Subject: [PATCH] Do not hardcode path for pkg.m4 +From a27217a5437da313d251b4a765bf7cb60ffaa62d Mon Sep 17 00:00:00 2001 +From: Changqing Li <changqing.li@windriver.com> +Date: Tue, 27 Nov 2018 15:27:47 +0800 +Subject: [PATCH] From 6d24365f0828185fd1bb4d199209ca07eb95c41d Mon Sep 17 + 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Fri, 24 Aug 2018 + 06:24:36 +0000 Subject: [PATCH] Do not hardcode path for pkg.m4 Upstream-Status: Pending Signed-off-by: Khem Raj <raj.khem@gmail.com> + +update patch to version 5.1.6 +Signed-off-by: Changqing Li <changqing.li@windriver.com> --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in -index 50aed15..f81767c 100644 +index 493b9f1..268d06b 100644 --- a/configure.in +++ b/configure.in @@ -12,7 +12,7 @@ define([AC_CACHE_SAVE], )dnl - AC_INIT(.autofs-5.1.4) + AC_INIT(.autofs-5.1.6) # for pkg-config macros -m4_include([/usr/share/aclocal/pkg.m4]) @@ -24,5 +29,5 @@ index 50aed15..f81767c 100644 # # autofs installs by default in /usr -- -1.9.1 +2.7.4 diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0002-Replace-__S_IEXEC-with-S_IEXEC.patch b/external/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0002-Replace-__S_IEXEC-with-S_IEXEC.patch index 469027aa..e7fdd10a 100644 --- a/external/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0002-Replace-__S_IEXEC-with-S_IEXEC.patch +++ b/external/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0002-Replace-__S_IEXEC-with-S_IEXEC.patch @@ -1,22 +1,26 @@ -From 557ca399f4b3a397f20bb147ec6dc4ab9732dd1e Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 31 Mar 2017 19:12:10 -0700 -Subject: [PATCH] Replace __S_IEXEC with S_IEXEC +From 096e33743158e0e8c04d60d01cc66e2945d79777 Mon Sep 17 00:00:00 2001 +From: Changqing Li <changqing.li@windriver.com> +Date: Tue, 27 Nov 2018 16:52:35 +0800 +Subject: [PATCH] From 557ca399f4b3a397f20bb147ec6dc4ab9732dd1e Mon Sep 17 + 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Fri, 31 Mar 2017 + 19:12:10 -0700 Subject: [PATCH] Replace __S_IEXEC with S_IEXEC S_IEXEC is portable Signed-off-by: Khem Raj <raj.khem@gmail.com> +update patch to version 5.1.5 +Signed-off-by: Changqing Li <changqing.li@windriver.com> --- - daemon/lookup.c | 4 ++-- + daemon/lookup.c | 6 +++--- modules/lookup_multi.c | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/daemon/lookup.c b/daemon/lookup.c -index 201ccbb..d821db8 100644 +index 18df935..d35d484 100644 --- a/daemon/lookup.c +++ b/daemon/lookup.c -@@ -366,7 +366,7 @@ static int read_file_source_instance(struct autofs_point *ap, struct map_source +@@ -382,7 +382,7 @@ static int read_file_source_instance(struct autofs_point *ap, struct map_source if (!S_ISREG(st.st_mode)) return NSS_STATUS_NOTFOUND; @@ -25,7 +29,7 @@ index 201ccbb..d821db8 100644 type = src_prog; else type = src_file; -@@ -856,7 +856,7 @@ static int lookup_name_file_source_instance(struct autofs_point *ap, struct map_ +@@ -942,7 +942,7 @@ static int lookup_name_file_source_instance(struct autofs_point *ap, struct map_ if (!S_ISREG(st.st_mode)) return NSS_STATUS_NOTFOUND; @@ -34,8 +38,17 @@ index 201ccbb..d821db8 100644 type = src_prog; else type = src_file; +@@ -1118,7 +1118,7 @@ static struct map_source *lookup_get_map_source(struct master_mapent *entry) + if (!S_ISREG(st.st_mode)) + return NULL; + +- if (st.st_mode & __S_IEXEC) ++ if (st.st_mode & S_IEXEC) + type = "program"; + else + type = "file"; diff --git a/modules/lookup_multi.c b/modules/lookup_multi.c -index fadd2ea..3ecda6d 100644 +index bb9f88c..cf109de 100644 --- a/modules/lookup_multi.c +++ b/modules/lookup_multi.c @@ -247,7 +247,7 @@ static struct lookup_mod *nss_open_lookup(const char *format, int argc, const ch @@ -47,3 +60,6 @@ index fadd2ea..3ecda6d 100644 type = src_prog; else type = src_file; +-- +2.7.4 + diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-do-not-check-for-modprobe.patch b/external/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-do-not-check-for-modprobe.patch deleted file mode 100644 index 1d5c3e1e..00000000 --- a/external/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-do-not-check-for-modprobe.patch +++ /dev/null @@ -1,89 +0,0 @@ -From 2cbc576ea1fbd1cbf4579d64b30e41d762084e7f Mon Sep 17 00:00:00 2001 -From: "yanjun.zhu" <yanjun.zhu@windriver.com> -Date: Tue, 15 Jan 2013 12:45:44 +0800 -Subject: [PATCH] autofs: do not check for modprobe - -Description: Loading autofs module is #ifdef'ed in the source, so - there is no need to check for /proc (which is only used - to load module) or modprobe. Both modprobe and /proc - are always in the fixed location so there's no need to - check for these to start with. - -Upstream-Status: Backport [1] -[1] http://www.spinics.net/lists/autofs/msg00139.html - ---- - configure.in | 6 ------ - daemon/module.c | 3 +++ - include/automount.h | 11 +++-------- - 3 files changed, 6 insertions(+), 14 deletions(-) - -diff --git a/configure.in b/configure.in -index 44a1c8b..b226236 100644 ---- a/configure.in -+++ b/configure.in -@@ -34,11 +34,6 @@ AC_MSG_CHECKING([for binaries in]) - AC_MSG_RESULT([$searchpath]) - - # --# Make sure we have "/proc" --# --AF_LINUX_PROCFS() -- --# - # Location of init.d directory? - # - AF_INIT_D() -@@ -142,7 +137,6 @@ AF_PATH_INCLUDE(UMOUNT, umount, /bin/umount, $searchpath) - AF_PATH_INCLUDE(E2FSCK, fsck.ext2 e2fsck, , $searchpath) - AF_PATH_INCLUDE(E3FSCK, fsck.ext3 e3fsck, , $searchpath) - AF_PATH_INCLUDE(E4FSCK, fsck.ext4 e4fsck, , $searchpath) --AF_PATH_INCLUDE(MODPROBE, modprobe, , $searchpath) - - AF_CHECK_PROG(LEX, flex lex, , $searchpath) - AF_CHECK_PROG(YACC, bison, , $searchpath) -diff --git a/daemon/module.c b/daemon/module.c -index bed8f7a..e41a98e 100644 ---- a/daemon/module.c -+++ b/daemon/module.c -@@ -19,6 +19,8 @@ - #include "automount.h" - #include "nsswitch.h" - -+#if 0 -+/* see comment in daemon/automount.c around load_autofs4_module() call */ - int load_autofs4_module(void) - { - FILE *fp; -@@ -53,6 +55,7 @@ int load_autofs4_module(void) - - return 1; - } -+#endif - - int open_lookup(const char *name, const char *err_prefix, const char *mapfmt, - int argc, const char *const *argv, struct lookup_mod **lookup) -diff --git a/include/automount.h b/include/automount.h -index c0f5fbf..cc336ad 100644 ---- a/include/automount.h -+++ b/include/automount.h -@@ -51,16 +51,11 @@ - #error Failed to locate umount(8)! - #endif - --#ifndef HAVE_MODPROBE --#error Failed to locate modprobe(8)! --#endif -- --#ifndef HAVE_LINUX_PROCFS --#error Failed to verify existence of procfs filesystem! --#endif -- -+#if 0 -+/* see comment in daemon/automount.c around load_autofs4_module() call */ - #define FS_MODULE_NAME "autofs4" - int load_autofs4_module(void); -+#endif - - /* The -s (sloppy) option to mount is good, if we have it... */ - diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/pkgconfig-libnsl.patch b/external/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/pkgconfig-libnsl.patch index 1c7b1199..be750ab8 100644 --- a/external/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/pkgconfig-libnsl.patch +++ b/external/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/pkgconfig-libnsl.patch @@ -1,7 +1,9 @@ -From e3ae56cf0bb4063c31295f45d04e3c504f4b6cc7 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 24 Apr 2017 20:41:25 -0700 -Subject: [PATCH] autofs: Upgrade to 5.1.2 release +From 602f9ca83c2bdbf511bcb178fcb4b9fc54da955f Mon Sep 17 00:00:00 2001 +From: Changqing Li <changqing.li@windriver.com> +Date: Tue, 27 Nov 2018 15:20:46 +0800 +Subject: [PATCH] From e3ae56cf0bb4063c31295f45d04e3c504f4b6cc7 Mon Sep 17 + 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Mon, 24 Apr 2017 + 20:41:25 -0700 Subject: [PATCH] autofs: Upgrade to 5.1.2 release Use pkg-config first to look for external libnsl which is now split out from glibc, if it does not exist then see if its provided @@ -9,20 +11,27 @@ by glibc itself. -Khem +Upstream-Status: Pending + +update patch to version 5.1.5 +Signed-off-by: Changqing Li <changqing.li@windriver.com> --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in -index 9cf73b8..1016c71 100644 +index 76ecb40..493b9f1 100644 --- a/configure.in +++ b/configure.in -@@ -186,7 +186,7 @@ fi - # - # glibc/libc 6 new libraries - # --AC_CHECK_LIB(nsl, yp_match, LIBNSL="-lnsl") -+PKG_CHECK_MODULES([NSL], [libnsl], [], [AC_CHECK_LIB([nsl],[yp_match],[LIBNSL="-lnsl"],[LIBNSL=""])]) - AC_SUBST(LIBNSL) +@@ -238,7 +238,7 @@ AC_SUBST(LIBCLOCK_GETTIME) - AC_CHECK_LIB(resolv, res_query, LIBRESOLV="-lresolv") + PKG_CHECK_MODULES([NSL],[libnsl],, + [ +-AC_CHECK_LIB(nsl, yp_match, NSL_LIBS="-lnsl") ++PKG_CHECK_MODULES([NSL], [libnsl], [], [AC_CHECK_LIB([nsl],[yp_match],[LIBNSL="-lnsl"],[LIBNSL=""])]) + AC_SUBST(NSL_LIBS) + NSL_CFLAGS="" + ]) +-- +2.7.4 + diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/using-pkg-config-to-detect-libxml-2.0-and-krb5.patch b/external/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/using-pkg-config-to-detect-libxml-2.0-and-krb5.patch index 3d0c6bd7..d1f9f349 100644 --- a/external/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/using-pkg-config-to-detect-libxml-2.0-and-krb5.patch +++ b/external/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/using-pkg-config-to-detect-libxml-2.0-and-krb5.patch @@ -1,22 +1,27 @@ -From dabcbdae38038a8e4ad2c4286112381c407c5ce7 Mon Sep 17 00:00:00 2001 -From: Roy Li <rongqing.li@windriver.com> -Date: Tue, 19 Aug 2014 11:31:35 +0800 -Subject: [PATCH] using pkg-config to detect libxml-2.0 and krb5 +From dd90a690f95569b999b8ac9ab57e834b3421dcbb Mon Sep 17 00:00:00 2001 +From: Changqing Li <changqing.li@windriver.com> +Date: Tue, 27 Nov 2018 15:19:07 +0800 +Subject: [PATCH] From dabcbdae38038a8e4ad2c4286112381c407c5ce7 Mon Sep 17 + 00:00:00 2001 From: Roy Li <rongqing.li@windriver.com> Date: Tue, 19 Aug 2014 + 11:31:35 +0800 Subject: [PATCH] using pkg-config to detect libxml-2.0 and + krb5 -Upstream-status: Pending +Upstream-Status: Pending Signed-off-by: Roy Li <rongqing.li@windriver.com> +update patch to 5.1.5 +Signed-off-by: Changqing Li <changqing.li@windriver.com> --- configure.in | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in -index b226236..9cf73b8 100644 +index f5fbb35..76ecb40 100644 --- a/configure.in +++ b/configure.in -@@ -162,8 +162,20 @@ if test x$enable_sloppy_mount = xyes; then - fi +@@ -211,8 +211,20 @@ fi + AC_SUBST(ENABLE_FEDFS) # LDAP SASL auth needs libxml and Kerberos -AF_CHECK_LIBXML() @@ -38,3 +43,6 @@ index b226236..9cf73b8 100644 AC_SEARCH_LIBS([versionsort],[]) if test "$ac_cv_search_versionsort" = "no"; then +-- +2.7.4 + diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.4.bb b/external/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.6.bb index 8a1bcad2..54f0b999 100644 --- a/external/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.4.bb +++ b/external/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.6.bb @@ -13,7 +13,6 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/autofs-${PV}.tar.gz \ file://autofs-5.0.7-include-linux-nfs.h-directly-in-rpc_sub.patch \ file://no-bash.patch \ file://cross.patch \ - file://autofs-5.0.7-do-not-check-for-modprobe.patch \ file://fix_disable_ldap.patch \ file://autofs-5.0.7-fix-lib-deps.patch \ file://add-the-needed-stdarg.h.patch \ @@ -26,9 +25,12 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/autofs-${PV}.tar.gz \ file://pkgconfig-libnsl.patch \ file://0001-modules-lookup_multi.c-Replace-__S_IEXEC-with-S_IEXE.patch \ file://0001-Do-not-hardcode-path-for-pkg.m4.patch \ + file://0001-Bug-fix-for-pid_t-not-found-on-musl.patch \ " -SRC_URI[md5sum] = "17bc9d371cf39d99f400ebadfc2289bb" -SRC_URI[sha256sum] = "8d1c9964c8286ccb08262ad47c60bb6343492902def5399fd36d79a0ccb0e718" + + +SRC_URI[md5sum] = "e6800e0afd6009ecdff148088c564050" +SRC_URI[sha256sum] = "82094cad44f4e5c4f93eff2789cd66b57d7ab3fa646b7722d97608571001e694" UPSTREAM_CHECK_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/" @@ -45,13 +47,19 @@ PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" EXTRA_OEMAKE = "DONTSTRIP=1" EXTRA_OECONF += "--disable-mount-locking \ --enable-ignore-busy --with-openldap=no \ + --with-confdir=${sysconfdir}/default \ + --with-fifodir=/run \ + --with-flagdir=/run \ --with-sasl=no --with-libtirpc \ + --with-mapdir=${sysconfdir} \ --with-path=${STAGING_BINDIR_NATIVE} \ --with-fifodir=${localstatedir}/run \ --with-flagdir=${localstatedir}/run \ " CACHED_CONFIGUREVARS = "ac_cv_path_RANLIB=${RANLIB} \ ac_cv_path_RPCGEN=rpcgen \ + initdir=${INIT_D_DIR} \ + piddir=/run \ " do_configure_prepend () { @@ -62,12 +70,20 @@ do_configure_prepend () { } do_install_append () { + # samples have been removed from SUBDIRS from 5.1.5, need to install separately + oe_runmake 'DESTDIR=${D}' install_samples + if [ -d ${D}/run ]; then rmdir ${D}/run fi if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run fi + # On hybrid systemd/sysvinit builds, we need to install the sysvinit script by hand. + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -d -m 755 ${D}${INIT_D_DIR} + install -m 755 ${S}/samples/rc.autofs ${D}${INIT_D_DIR}/autofs + fi } SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}" diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/CVE-2019-19906.patch b/external/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/CVE-2019-19906.patch new file mode 100644 index 00000000..b94780f3 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/CVE-2019-19906.patch @@ -0,0 +1,35 @@ +From 94fe6eb9ea2691f4a7c32fbf2d0c7c454995b666 Mon Sep 17 00:00:00 2001 +From: Changqing Li <changqing.li@windriver.com> +Date: Thu, 27 Feb 2020 11:08:57 +0800 +Subject: [PATCH] Fix #587 + +Off by one error in common.c, CVE-2019-19906. + +Thanks to Stephan Zeisberg for reporting + +CVE: CVE-2019-19906 + +Upstream-Stauts: Backport [https://github.com/cyrusimap/cyrus-sasl +/commit/dcc9f51cbd4ed622cfb0f9b1c141eb2ffe3b12f1] + +Signed-off-by: Changqing Li <changqing.li@windriver.com> +--- + lib/common.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/common.c b/lib/common.c +index 305311d..445c5d5 100644 +--- a/lib/common.c ++++ b/lib/common.c +@@ -190,7 +190,7 @@ int _sasl_add_string(char **out, size_t *alloclen, + + if (add==NULL) add = "(null)"; + +- addlen=strlen(add); /* only compute once */ ++ addlen=strlen(add)+1; /* only compute once */ + if (_buf_alloc(out, alloclen, (*outlen)+addlen)!=SASL_OK) + return SASL_NOMEM; + +-- +2.7.4 + diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.27.bb b/external/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.27.bb index 594e55da..d55dc4ab 100644 --- a/external/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.27.bb +++ b/external/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.27.bb @@ -2,7 +2,7 @@ SUMMARY = "Generic client/server library for SASL authentication" SECTION = "libs" HOMEPAGE = "http://asg.web.cmu.edu/sasl/" DEPENDS = "openssl db groff-native" -LICENSE = "BSD" +LICENSE = "BSD-4-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=3f55e0974e3d6db00ca6f57f2d206396" SRCREV = "e41cfb986c1b1935770de554872247453fdbb079" @@ -16,6 +16,7 @@ SRC_URI = "git://github.com/cyrusimap/cyrus-sasl;protocol=https \ file://0004-configure.ac-fix-condition-for-suppliment-snprintf-i.patch \ file://0001-Allow-saslauthd-to-be-built-outside-of-source-tree-w.patch \ file://0001-makeinit.sh-fix-parallel-build-issue.patch \ + file://CVE-2019-19906.patch \ " UPSTREAM_CHECK_URI = "https://github.com/cyrusimap/cyrus-sasl/archives" diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.conf.sample b/external/meta-openembedded/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.conf.sample deleted file mode 100644 index ec058419..00000000 --- a/external/meta-openembedded/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.conf.sample +++ /dev/null @@ -1,21 +0,0 @@ -# options to dnrd - -# example: two default dns servers and dns servers for exampledomain.com. The -# latter are load balanced (-b) -# -# - -# DNRD_OPTS=" -# -s XXX.XXX.XX.XXX -# -s XXX.XXX.XX.XXX -# -b -# -s XXX.XXX.XX.XXX:exampledomain.com -# -s XXX.XXX.XX.XXX:exampledomain.com" - -# example: dnrd user -# - -# DNRD_USER="user" -# - - diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.init b/external/meta-openembedded/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.init deleted file mode 100644 index 2fe583fc..00000000 --- a/external/meta-openembedded/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.init +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/sh -# -# Startup script for dnrd -# -# Copyright 2008, Rakesh Pandit <rakesh.pandit@gmail.com> -# -# This source is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This source is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# -# chkconfig: - 85 15 -# description: dnrd is a proxying nameserver. It forwards DNS queries to the -# appropriate nameserver, but can also act as the primary nameserver for -# a subnet behind a firewall. It also has features such as caching DNS -# requests, support for DNS servers, cache poisoning prevention, TCP -# support, etc.. - -# processname: dnrd -# pidfile: /var/run/dnrd.pid -# config: /etc/dnrd/dnrd.conf - -# Provides: dnrd -# Required-Start: -# Should-Start: -# Required-Stop: -# Default-Stop: 0 1 2 6 -# Short-Description: Start dnrd daemon -# Description: Domain Name Relay Daemon -# END INIT INFO - -exe=/usr/sbin/dnrd -pfile=/etc/passwd - -# Source function library. -. /etc/init.d/functions - -# Source conf file -. /etc/dnrd/dnrd.conf - -[ -x $exe ] || exit 1 -[ -r "/etc/dnrd/dnrd.conf" ] || exit 1 -if [ $DNRD_USER ] -then - grep "^${LOGIN}:" $pfile >/dev/null 2>&1 - if [ $? -eq 0 ];then - echo "$DNRD_USER specified in /etc/dnrd/dnrd.conf does not exist!" - fi -else - echo "DNRD_USER not set at /etc/dnrd/dnrd.conf!" - exit 1 -fi - -case "$1" in - start) - echo -n "Starting dnrd: " - daemon dnrd $DNRD_OPTS -u $DNRD_USER - echo - touch /var/lock/subsys/dnrd - ;; - stop) - echo -n "Shutting down dnrd: " - killproc dnrd - echo - rm -f /var/lock/subsys/dnrd - rm -f /var/run/dnrd.pid - ;; - status) - status dnrd - ;; - restart) - $0 stop - $0 start - ;; - reload) - echo -n "Reloading dnrd: " - killproc dnrd -HUP - echo - ;; - *) - echo "Usage: $0 {start|stop|restart|reload|status}" - exit 1 -esac - -exit 0 diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.service b/external/meta-openembedded/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.service deleted file mode 100644 index 9c9fa663..00000000 --- a/external/meta-openembedded/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=Domain Name Relay Daemon -After=network.target - -[Service] -Type=forking -PIDFile=/var/run/dnrd.pid -EnvironmentFile=/etc/dnrd/dnrd.conf -ExecStart=/usr/sbin/dnrd $DNRD_OPTS -u $DNRD_USER - -[Install] -WantedBy=multi-user.target diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/igmpproxy/igmpproxy/0001-src-igmpproxy.h-Include-sys-types.h-for-u_short-u_in.patch b/external/meta-openembedded/meta-networking/recipes-daemons/igmpproxy/igmpproxy/0001-src-igmpproxy.h-Include-sys-types.h-for-u_short-u_in.patch deleted file mode 100644 index 82cdc36a..00000000 --- a/external/meta-openembedded/meta-networking/recipes-daemons/igmpproxy/igmpproxy/0001-src-igmpproxy.h-Include-sys-types.h-for-u_short-u_in.patch +++ /dev/null @@ -1,25 +0,0 @@ -From a557651a08e21e3c7c7f5eca9f5405f86624903f Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 14 Jul 2017 22:42:51 -0700 -Subject: [PATCH] src/igmpproxy.h: Include sys/types.h for u_short/u_init - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/igmpproxy.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/igmpproxy.h b/src/igmpproxy.h -index 4dabd1c..4454729 100644 ---- a/src/igmpproxy.h -+++ b/src/igmpproxy.h -@@ -46,6 +46,7 @@ - #include <stdbool.h> - - #include <sys/socket.h> -+#include <sys/types.h> - #include <sys/un.h> - #include <sys/time.h> - #include <sys/ioctl.h> --- -2.13.3 - diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/igmpproxy/igmpproxy_0.1.bb b/external/meta-openembedded/meta-networking/recipes-daemons/igmpproxy/igmpproxy_0.1.bb deleted file mode 100644 index 5424dc45..00000000 --- a/external/meta-openembedded/meta-networking/recipes-daemons/igmpproxy/igmpproxy_0.1.bb +++ /dev/null @@ -1,16 +0,0 @@ -SUMMARY = "simple dynamic multicast routing daemon that only uses IGMP signalling" -HOMEPAGE = "http://sourceforge.net/projects/igmpproxy/" - -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=1e995e2799bb0d27d63069b97f805420" - -SRC_URI = "http://sourceforge.net/projects/igmpproxy/files/${BPN}/${PV}/${BPN}-${PV}.tar.gz \ - file://0001-src-igmpproxy.h-Include-sys-types.h-for-u_short-u_in.patch \ - " - -SRC_URI[md5sum] = "c56f41ec195bc1fe016369bf74efc5a1" -SRC_URI[sha256sum] = "ee18ff3d8c3ae3a29dccb7e5eedf332337330020168bd95a11cece8d7d7ee6ae" - -inherit autotools pkgconfig - -CFLAGS += "-D_GNU_SOURCE" diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/igmpproxy/igmpproxy_0.2.1.bb b/external/meta-openembedded/meta-networking/recipes-daemons/igmpproxy/igmpproxy_0.2.1.bb new file mode 100644 index 00000000..004433b6 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-daemons/igmpproxy/igmpproxy_0.2.1.bb @@ -0,0 +1,13 @@ +SUMMARY = "simple dynamic multicast routing daemon that only uses IGMP signalling" +HOMEPAGE = "http://sourceforge.net/projects/igmpproxy/" + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=432040ff3a55670c1dec0c32b209ad69" + +SRC_URI = "https://github.com/pali/igmpproxy/releases/download/${PV}/${BP}.tar.gz" +SRC_URI[md5sum] = "3a9c2cb42c1f5ee0cb769a4884545641" +SRC_URI[sha256sum] = "d351e623037390f575c1203d9cbb7ba33a8bdef85a3c5e1d2901c5a2a38449a1" + +UPSTREAM_CHECK_URI = "https://github.com/pali/${BPN}/releases" + +inherit autotools pkgconfig diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/strncpy-truncation.patch b/external/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/strncpy-truncation.patch new file mode 100644 index 00000000..01e1da87 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/strncpy-truncation.patch @@ -0,0 +1,39 @@ +Replace strncpy with memcpy + +since the length of data to +be copied has already been determined with strlen(). Replace strncpy() +with memcpy() to address the warning and optimize the code a little. + +| ippool_config.c:112:2: note: 'snprintf' output between 8 and 55 bytes into a destination of size 48 +| 112 | snprintf(prompt, sizeof(prompt), "ippool-%s", server_name); +| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- a/cli/cli_readline.c ++++ b/cli/cli_readline.c +@@ -257,10 +257,15 @@ static void cli_rl_display_wrapped_text( + int pos; + int in_ws; + int i; ++ int bufsize = sizeof(text_buf)/sizeof(text_buf[0]); + + if (left_margin == 0) { + left_margin = 3; + } ++ if (left_margin > bufsize) { ++ left_margin = bufsize; ++ } ++ + if (right_margin == 0) { + right_margin = 78;; + } +@@ -271,7 +276,7 @@ static void cli_rl_display_wrapped_text( + /* First copy the text heading to the buffer and add a "-", accounting for + * the specified left margin. + */ +- strncpy(&text_buf[0], text1, left_margin - 3); ++ memcpy(&text_buf[0], text1, left_margin - 3); + for (pos = strlen(text1); pos < left_margin - 3; pos++) { + text_buf[pos] = ' '; + } diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool_1.3.bb b/external/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool_1.3.bb index 6fa46904..3554e688 100644 --- a/external/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool_1.3.bb +++ b/external/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool_1.3.bb @@ -26,6 +26,7 @@ SRC_URI = "https://sourceforge.net/projects/openl2tp/files/${BPN}/${PV}/${BPN}-$ file://0003-cli-Mark-return-of-strtol-as-long-int.patch \ file://0002-link-with-libtirpc.patch \ file://0003-musl-fixes.patch \ + file://strncpy-truncation.patch \ " LIC_FILES_CHKSUM = "file://LICENSE;md5=4c59283b82fc2b166455e0fc23c71c6f" diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0.876.bb b/external/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.1.0.bb index e6a87a38..97b55635 100644 --- a/external/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0.876.bb +++ b/external/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.1.0.bb @@ -7,11 +7,12 @@ disk access using SCSI commands sent over Internet Protocol networks." HOMEPAGE = "http://www.open-iscsi.com/" LICENSE = "GPLv2 & LGPLv2.1" SECTION = "net" -DEPENDS = "openssl flex-native bison-native open-isns util-linux" +DEPENDS = "openssl flex-native bison-native open-isns util-linux kmod" +DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}" -LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" -SRCREV ?= "bd79e4ed1004a6035d2538a308c5930890421a22" +SRCREV ?= "549f8987be49583bb06b117a364bea3a8fc5250c" SRC_URI = "git://github.com/open-iscsi/open-iscsi \ file://initd.debian \ @@ -26,20 +27,26 @@ B = "${WORKDIR}/build" PV .= "+git${SRCPV}" -inherit update-rc.d systemd autotools +inherit update-rc.d systemd autotools pkgconfig EXTRA_OECONF = " \ --target=${TARGET_SYS} \ --host=${BUILD_SYS} \ " +EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', '--without-systemd', d)}" + EXTRA_OEMAKE = ' \ OS="${TARGET_SYS}" \ TARGET="${TARGET_OS}" \ BASE="${prefix}" \ MANDIR="${mandir}" \ + OPTFLAGS="-DNO_SYSTEMD ${CFLAGS}" \ + PKG_CONFIG="${STAGING_BINDIR_NATIVE}/pkg-config" \ + NO_SYSTEMD=1 \ ' + do_configure () { cd ${S}/iscsiuio ; autoreconf --install; ./configure ${EXTRA_OECONF} } diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/keepalived/keepalived_1.4.2.bb b/external/meta-openembedded/meta-networking/recipes-daemons/keepalived/keepalived_2.0.20.bb index 31c50ff6..f3c33dcb 100644 --- a/external/meta-openembedded/meta-networking/recipes-daemons/keepalived/keepalived_1.4.2.bb +++ b/external/meta-openembedded/meta-networking/recipes-daemons/keepalived/keepalived_2.0.20.bb @@ -11,8 +11,8 @@ LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" SRC_URI = "http://www.keepalived.org/software/${BP}.tar.gz" -SRC_URI[md5sum] = "610af6e04071f02d3469191de7499f4e" -SRC_URI[sha256sum] = "4e2d7cc01a6ee29a3955f5c622d47704ba7d9dd758189f15e9def016a2d1faa3" +SRC_URI[md5sum] = "a5966e8433b60998709c4a922a407bac" +SRC_URI[sha256sum] = "9670fbc5eb3dc113828be8b702549dc68ec9578cf83287520d935be76fc8f193" DEPENDS = "libnfnetlink openssl" diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/lldpd/files/src-daemon-lldpd.service.in-Use-fixed-path-for-mkdir.patch b/external/meta-openembedded/meta-networking/recipes-daemons/lldpd/files/src-daemon-lldpd.service.in-Use-fixed-path-for-mkdir.patch deleted file mode 100644 index 4876e179..00000000 --- a/external/meta-openembedded/meta-networking/recipes-daemons/lldpd/files/src-daemon-lldpd.service.in-Use-fixed-path-for-mkdir.patch +++ /dev/null @@ -1,32 +0,0 @@ -From f9f3e4dd31588cce5f655730da7b5c3f56a9bdc1 Mon Sep 17 00:00:00 2001 -From: Fabio Berton <fabio.berton@ossystems.com.br> -Date: Tue, 26 Sep 2017 09:19:51 -0300 -Subject: [PATCH] src/daemon/lldpd.service.in: Use fixed path for mkdir command -Organization: O.S. Systems Software LTDA. - -@mkdir_p@ is expanded to host tools path ../build/tmp/hosttools/mkdir that -doesn't exist on target. Remove @mkdir_p@ and use /bin/mkdir -p to -create /var/run/lldpd directory. - -Upstream-Status: Inappropriate [configuration] - -Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> ---- - src/daemon/lldpd.service.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/daemon/lldpd.service.in b/src/daemon/lldpd.service.in -index fdb7338..4291830 100644 ---- a/src/daemon/lldpd.service.in -+++ b/src/daemon/lldpd.service.in -@@ -9,7 +9,7 @@ Type=notify - NotifyAccess=main - EnvironmentFile=-/etc/default/lldpd - EnvironmentFile=-/etc/sysconfig/lldpd --ExecStartPre=@mkdir_p@ @PRIVSEP_CHROOT@ -+ExecStartPre=/bin/mkdir -p @PRIVSEP_CHROOT@ - ExecStart=@sbindir@/lldpd $DAEMON_ARGS $LLDPD_OPTIONS - Restart=on-failure - PrivateTmp=yes --- -2.14.2 diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/lldpd/lldpd_0.9.8.bb b/external/meta-openembedded/meta-networking/recipes-daemons/lldpd/lldpd_1.0.4.bb index dbd84cf6..8fdaf848 100644 --- a/external/meta-openembedded/meta-networking/recipes-daemons/lldpd/lldpd_0.9.8.bb +++ b/external/meta-openembedded/meta-networking/recipes-daemons/lldpd/lldpd_1.0.4.bb @@ -9,11 +9,10 @@ SRC_URI = "\ http://media.luffy.cx/files/${BPN}/${BPN}-${PV}.tar.gz \ file://lldpd.init.d \ file://lldpd.default \ - file://src-daemon-lldpd.service.in-Use-fixed-path-for-mkdir.patch \ " -SRC_URI[md5sum] = "8809600492f6b73149eb19158e819c1f" -SRC_URI[sha256sum] = "9ee494e91bc33938575b2c09b26188c486ef8eac6e2155d250c189cc4e988c4f" +SRC_URI[md5sum] = "33e8d58623f99184e4e709cbbfe45db3" +SRC_URI[sha256sum] = "5319bc032fabf1008d5d91e280276aa7f1bbfbb70129d8526cd4526d7c22724f" inherit autotools update-rc.d useradd systemd pkgconfig bash-completion diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/networkd-dispatcher/networkd-dispatcher.bb b/external/meta-openembedded/meta-networking/recipes-daemons/networkd-dispatcher/networkd-dispatcher_2.0.1.bb index 050a9382..6b73506c 100644 --- a/external/meta-openembedded/meta-networking/recipes-daemons/networkd-dispatcher/networkd-dispatcher.bb +++ b/external/meta-openembedded/meta-networking/recipes-daemons/networkd-dispatcher/networkd-dispatcher_2.0.1.bb @@ -1,9 +1,3 @@ -python __anonymous() { - features = d.getVar('DISTRO_FEATURES') - if not features or 'systemd' not in features: - raise bb.parse.SkipPackage('networkd-dispatcher needs systemd in DISTRO_FEATURES') -} - SUMMARY = "Dispatcher service for systemd-networkd connection status changes" DESCRIPTION = "This daemon is similar to NetworkManager-dispatcher, but is much \ more limited in the types of events it supports due to the limited nature of \ @@ -13,22 +7,25 @@ AUTHOR = "Clayton Craft and others" LICENSE = "GPLv3" LIC_FILES_CHKSUM = "file://LICENSE;md5=84dcc94da3adb52b53ae4fa38fe49e5d" -RDEPENDS_${PN} = "systemd python3 python3-pygobject python3-dbus" +inherit features_check systemd -SRC_URI = "git://gitlab.com/craftyguy/networkd-dispatcher.git;protocol=https" -SRCREV = "c7e25623a161b64618ea778541c064d2a1df086b" -PV = "1.7+git${SRCPV}" +RDEPENDS_${PN} = "python3-pygobject python3-dbus" +REQUIRED_DISTRO_FEATURES = "systemd" -S = "${WORKDIR}/git" +SRC_URI = "https://gitlab.com/craftyguy/networkd-dispatcher/-/archive/${PV}/networkd-dispatcher-${PV}.tar.bz2" +SRC_URI[md5sum] = "304d7dcc21331ea295e207f8493cb8d8" +SRC_URI[sha256sum] = "21f84c3646a043329dc64787e4e58dfce592b2559b0e3069af82c469805660c2" + +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE_${PN} = "networkd-dispatcher.service" +SYSTEMD_AUTO_ENABLE = "disable" # Nothing to build, just a python script to install do_configure[noexec] = "1" do_compile[noexec] = "1" do_install() { - install -D -m 0755 ${S}/networkd-dispatcher ${D}${sbindir}/networkd-dispatcher + install -D -m 0755 ${S}/networkd-dispatcher ${D}${bindir}/networkd-dispatcher install -D -m 0644 ${S}/networkd-dispatcher.service ${D}/${systemd_system_unitdir}/networkd-dispatcher.service install -D -m 0644 ${S}/networkd-dispatcher.conf ${D}/${sysconfdir}/conf.d/networkd-dispatcher.conf } - -FILES_${PN} += "${systemd_system_unitdir}/networkd-dispatcher.service" diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-function-saHpiSensorThresholds.patch b/external/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-function-saHpiSensorThresholds.patch new file mode 100644 index 00000000..b2771c0c --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-function-saHpiSensorThresholds.patch @@ -0,0 +1,35 @@ +From e0b2be7a1fce0fed63bac8c350b711b69edfe30e Mon Sep 17 00:00:00 2001 +From: "yanjun.zhu" <yanjun.zhu@windriver.com> +Date: Tue, 30 Apr 2019 10:04:58 +0800 +Subject: [PATCH] openhpid/safhpi.c: fix function saHpiSensorThresholdsSet + +In COPY_TH the SensorThresholds->TH will be copied to tmp.TH only if +TH.IsSupported == SAHPI_TRUE. So we should pass &tmp but not +SensorThresholds as the argument to OH_CALL_ABI. Otherwise the TH will +be set even if TH.IsSupported == SAHPI_FALSE. + +Upstream-Status: Submitted +[https://github.com/open-hpi/openhpi/pull/2744/commits/77a78bb1ada56e55c5ba6d7a5987c214705bf035] + +Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com> +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + openhpid/safhpi.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/openhpid/safhpi.c b/openhpid/safhpi.c +index 28a2632..61b7f03 100644 +--- a/openhpid/safhpi.c ++++ b/openhpid/safhpi.c +@@ -1933,7 +1933,7 @@ SaErrorT SAHPI_API saHpiSensorThresholdsSet ( + oh_release_domain(d); /* Unlock domain */ + + OH_CALL_ABI(h, set_sensor_thresholds, SA_ERR_HPI_INVALID_CMD, rv, +- ResourceId, SensorNum, SensorThresholds); ++ ResourceId, SensorNum, &tmp); + oh_release_handler(h); + + return rv; +-- +2.7.4 + diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-testfail-errors.patch b/external/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-testfail-errors.patch deleted file mode 100644 index 60e2e791..00000000 --- a/external/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-testfail-errors.patch +++ /dev/null @@ -1,33 +0,0 @@ -Fix for saftest failures. - -Upstream-Status: Pending - -Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com> - -Index: openhpi-3.6.1/openhpid/safhpi.c -=================================================================== ---- openhpi-3.6.1.orig/openhpid/safhpi.c -+++ openhpi-3.6.1/openhpid/safhpi.c -@@ -1933,7 +1933,7 @@ SaErrorT SAHPI_API saHpiSensorThresholds - oh_release_domain(d); /* Unlock domain */ - - OH_CALL_ABI(h, set_sensor_thresholds, SA_ERR_HPI_INVALID_CMD, rv, -- ResourceId, SensorNum, SensorThresholds); -+ ResourceId, SensorNum, &tmp); - oh_release_handler(h); - - return rv; -Index: openhpi-3.6.1/utils/sahpi_struct_utils.c -=================================================================== ---- openhpi-3.6.1.orig/utils/sahpi_struct_utils.c -+++ openhpi-3.6.1/utils/sahpi_struct_utils.c -@@ -3861,6 +3861,9 @@ SaHpiBoolT oh_valid_textbuffer(SaHpiText - /* found a unpaired surrogate */ - return SAHPI_FALSE; - } -+ } else { -+ /*the first 2 bytes wrong*/ -+ return SAHPI_FALSE; - } - } - break; diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/openhpi/openhpi_3.8.0.bb b/external/meta-openembedded/meta-networking/recipes-daemons/openhpi/openhpi_3.8.0.bb index c4b3309f..e8d19a2c 100644 --- a/external/meta-openembedded/meta-networking/recipes-daemons/openhpi/openhpi_3.8.0.bb +++ b/external/meta-openembedded/meta-networking/recipes-daemons/openhpi/openhpi_3.8.0.bb @@ -17,7 +17,7 @@ servers, Blade Center, and machines which export data via sysfs. \ HOMEPAGE = "http://openhpi.sourceforge.net/Home" SECTION = "net" -LICENSE = "BSD" +LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=e3c772a32386888ccb5ae1c0ba95f1a4" DEPENDS = "net-snmp libxml2 ncurses openssl glib-2.0 popt e2fsprogs \ @@ -33,7 +33,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \ file://openhpi-glib-cross-compile.patch \ file://openhpi-linkfix.patch \ file://openhpi-fix-host-gcc.patch \ - file://openhpi-fix-testfail-errors.patch \ + file://openhpi-fix-function-saHpiSensorThresholds.patch \ file://openhpi-add-libnetsnmp-when-link.patch \ file://openhpi-invalide-session.patch \ file://openhpi-use-serial-tests-config-needed-by-ptest.patch \ @@ -60,19 +60,20 @@ FILES_${PN}-libs = "${libdir}/${BPN}/*.so /usr/lib/${BPN}/*.so" INSANE_SKIP_${PN}-libs = "dev-so" RDEPENDS_${PN} += "${PN}-libs" -PACKAGECONFIG ??= "libgcrypt non32bit" +PACKAGECONFIG ??= "libgcrypt non32bit snmp-bc" PACKAGECONFIG[sysfs] = "--enable-sysfs,--disable-sysfs,sysfsutils," PACKAGECONFIG[libgcrypt] = "--enable-encryption,--disable-encryption,libgcrypt," PACKAGECONFIG[non32bit] = "--enable-non32bit-int,--disable-non32bit-int,," +PACKAGECONFIG[snmp-bc] = "--enable-snmp_bc,--disable-snmp_bc" export DISTRO do_install_append () { install -m 0755 -d ${D}${sysconfdir}/${BPN} - install -m 0755 ${S}/openhpiclient.conf.example ${D}${sysconfdir}/${BPN}/openhpiclient.conf - install -m 0700 ${S}/openhpi.conf.example ${D}${sysconfdir}/${BPN}/openhpi.conf - install -m 0755 ${S}/simulation.data.example ${D}${sysconfdir}/${BPN}/simulation.data - install -m 0755 ${S}/test_agent.data.example ${D}${sysconfdir}/${BPN}/test_agent.data + install -m 0644 ${S}/openhpiclient.conf.example ${D}${sysconfdir}/${BPN}/openhpiclient.conf + install -m 0600 ${S}/openhpi.conf.example ${D}${sysconfdir}/${BPN}/openhpi.conf + install -m 0644 ${S}/simulation.data.example ${D}${sysconfdir}/${BPN}/simulation.data + install -m 0644 ${S}/test_agent.data.example ${D}${sysconfdir}/${BPN}/test_agent.data install -m 0755 ${WORKDIR}/openhpi.init ${D}${sysconfdir}/init.d/openhpid install -d ${D}${systemd_unitdir}/system @@ -84,6 +85,21 @@ do_install_append () { do_compile_ptest () { for x in `find ${B} -name Makefile -exec grep -l buildtest-TESTS {} \;`; do dir=`dirname ${x}` + case $dir in + *cpp/t) ;; + *snmp_bc/t) if ${@bb.utils.contains('PACKAGECONFIG','snmp-bc','true','false',d)} + then + oe_runmake -C ${dir} buildtest-TESTS + fi + ;; + *) oe_runmake -C ${dir} buildtest-TESTS ;; + esac + done +} + +ack_do_compile_ptest () { + for x in `find ${B} -name Makefile -exec grep -l buildtest-TESTS {} \;`; do + dir=`dirname ${x}` upper=`dirname ${dir}` if [ `basename ${upper}` != "cpp" ]; then oe_runmake -C ${dir} buildtest-TESTS @@ -104,6 +120,9 @@ do_install_ptest () { sed -i "s/^Makefile:/MM:/g" ${x}; done; + install -m 644 ${S}/openhpid/t/ohpi/openhpi.conf ${D}${PTEST_PATH}/openhpid/t/ohpi/ + sed -i "s:OPENHPI_CONF=[^ ]*:OPENHPI_CONF=./openhpi.conf:g" ${D}${PTEST_PATH}/openhpid/t/ohpi/Makefile + mkdir -p ${D}${PTEST_PATH}/plugins/watchdog/ cp -L ${D}/${libdir}/${BPN}/libwatchdog.so ${D}${PTEST_PATH}/plugins/watchdog/ cp -L ${D}/${libdir}/${BPN}/libsimulator.so ${D}${PTEST_PATH}/plugins/watchdog/ diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-Add-configure-time-check-for-gettid-API.patch b/external/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-Add-configure-time-check-for-gettid-API.patch new file mode 100644 index 00000000..2b03b180 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-Add-configure-time-check-for-gettid-API.patch @@ -0,0 +1,67 @@ +From 91c7362834ccd88d1432b3e6c5c51748b72b10ad Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 27 Jul 2019 07:21:16 -0700 +Subject: [PATCH] Add configure time check for gettid API + +glibc 2.30 has added syscalls wrapper for gettid +it should now be checked during configure if C library provides +this API then do not define local function + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + configure.ac | 4 ++++ + src/base/logtrace.cc | 3 +++ + src/osaf/config.h.in | 3 +++ + 3 files changed, 10 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 22ab936..90f3da4 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -480,6 +480,10 @@ fi + + AC_SUBST([localstatedir]) + ++############################################# ++# Checks for functions. ++############################################# ++AC_CHECK_FUNCS([ gettid ]) + + ############################################# + # Checks for programs. +diff --git a/src/base/logtrace.cc b/src/base/logtrace.cc +index 8908c1f..fe87e8d 100644 +--- a/src/base/logtrace.cc ++++ b/src/base/logtrace.cc +@@ -31,6 +31,7 @@ + #include "base/logtrace_client.h" + #include "base/logtrace_buffer.h" + #include "base/ncsgl_defs.h" ++#include "osaf/config.h" + + namespace global { + +@@ -58,7 +59,9 @@ std::once_flag init_flag; + thread_local LogTraceBuffer gl_thread_buffer{gl_local_thread_trace, + global::thread_trace_buffer_size}; + ++#ifndef HAVE_GETTID + static pid_t gettid() { return syscall(SYS_gettid); } ++#endif + + /** + * USR2 signal handler to enable/disable trace (toggle) +diff --git a/src/osaf/config.h.in b/src/osaf/config.h.in +index d1f6d1a..0a3f27d 100644 +--- a/src/osaf/config.h.in ++++ b/src/osaf/config.h.in +@@ -18,6 +18,9 @@ + /* Define if experimental code is enabled */ + #undef HAVE_EXPERIMENTAL + ++/* Define to 1 if you have the `gettid' function. */ ++#undef HAVE_GETTID ++ + /* SAHPI_INTERFACE_VERSION == A01 */ + #undef HAVE_HPI_A01 + diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-Catch-std-ifstream-failure-by-reference.patch b/external/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-Catch-std-ifstream-failure-by-reference.patch deleted file mode 100644 index 30fdb8bf..00000000 --- a/external/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-Catch-std-ifstream-failure-by-reference.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 38c5343f84799fc5041575f3ec808f7476b6eea3 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 16 Apr 2018 14:33:35 -0700 -Subject: [PATCH] Catch std::ifstream::failure by reference - -Fixes -error: catching polymorphic type 'class std::ios_base::failure' by value -[-Werror=catch-value=] - } catch (std::ofstream::failure) { - ^~~~~~~ - -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- - src/base/conf.cc | 4 ++-- - src/dtm/dtmnd/dtm_main.cc | 2 +- - src/dtm/dtmnd/multicast.cc | 2 +- - 3 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/src/base/conf.cc b/src/base/conf.cc -index d5755a1..4820357 100644 ---- a/src/base/conf.cc -+++ b/src/base/conf.cc -@@ -189,7 +189,7 @@ std::string Conf::ReadFile(const std::string& path_name, - try { - str.open(path_name); - str >> contents; -- } catch (std::ifstream::failure) { -+ } catch (std::ifstream::failure& e) { - contents.clear(); - } - return (str.fail() || contents.empty()) ? default_contents : contents; -@@ -203,7 +203,7 @@ void Conf::WriteFileAtomically(const std::string& path_name, - try { - str.open(tmp_file, std::ofstream::out | std::ofstream::trunc); - str << contents << std::endl; -- } catch (std::ofstream::failure) { -+ } catch (std::ofstream::failure& e) { - success = false; - } - str.close(); -diff --git a/src/dtm/dtmnd/dtm_main.cc b/src/dtm/dtmnd/dtm_main.cc -index 585e11e..5cf6ad7 100644 ---- a/src/dtm/dtmnd/dtm_main.cc -+++ b/src/dtm/dtmnd/dtm_main.cc -@@ -367,7 +367,7 @@ void UpdateNodeIdFile(DTM_INTERNODE_CB *cb) { - try { - str.open(PKGLOCALSTATEDIR "/node_id", std::ofstream::out); - str << std::hex << node_id << std::endl; -- } catch (std::ofstream::failure) { -+ } catch (std::ofstream::failure& e) { - } - str.close(); - } -diff --git a/src/dtm/dtmnd/multicast.cc b/src/dtm/dtmnd/multicast.cc -index cadc002..7c25fea 100644 ---- a/src/dtm/dtmnd/multicast.cc -+++ b/src/dtm/dtmnd/multicast.cc -@@ -199,7 +199,7 @@ bool Multicast::GetPeersFromFile(const std::string &path_name) { - } - } - } -- } catch (std::ifstream::failure) { -+ } catch (std::ifstream::failure& e) { - LOG_ER("Caught std::ifstream::failure when reading file '%s', peers=%zu", - path_name.c_str(), static_cast<size_t>(peers_.size())); - peers_.clear(); diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-Fix-string-overflow-in-snprintf.patch b/external/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-Fix-string-overflow-in-snprintf.patch deleted file mode 100644 index db6796d0..00000000 --- a/external/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-Fix-string-overflow-in-snprintf.patch +++ /dev/null @@ -1,76 +0,0 @@ -From ae7178a78aba2e5766b70191617113487fd7ad0b Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 16 Apr 2018 18:29:17 -0700 -Subject: [PATCH] Fix string overflow in snprintf - -Fixes errors like -error: '%s' dir -ective output may be truncated writing up to 255 bytes into a region of size 32 [-Werror=forma -t-truncation=] - snprintf(reinterpret_cast<char *>(Healthy.key), sizeof(Healthy.key), "%s", - ^~~~ - hlth_str); - ~~~~~~~~ - -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- - src/log/logd/lgs_util.cc | 4 ++-- - src/rde/rded/rde_amf.cc | 2 +- - src/smf/smfd/SmfUpgradeCampaign.cc | 4 ++-- - 3 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/src/log/logd/lgs_util.cc b/src/log/logd/lgs_util.cc -index ac93d5a..cce80f3 100644 ---- a/src/log/logd/lgs_util.cc -+++ b/src/log/logd/lgs_util.cc -@@ -200,12 +200,12 @@ char *lgs_get_time(time_t *time_in) { - - stringSize = 5 * sizeof(char); - snprintf(srcString, (size_t)stringSize, "%d", -- (timeStampData->tm_year + START_YEAR)); -+ (timeStampData->tm_year + START_YEAR) & 0x4dU); - - strncpy(timeStampString, srcString, stringSize); - - stringSize = 3 * sizeof(char); -- snprintf(srcString, (size_t)stringSize, "%02d", (timeStampData->tm_mon + 1)); -+ snprintf(srcString, (size_t)stringSize, "%02d", (timeStampData->tm_mon + 1) & 0x2dU); - - strncat(timeStampString, srcString, stringSize); - -diff --git a/src/rde/rded/rde_amf.cc b/src/rde/rded/rde_amf.cc -index 81e521e..d53cc48 100644 ---- a/src/rde/rded/rde_amf.cc -+++ b/src/rde/rded/rde_amf.cc -@@ -102,7 +102,7 @@ static uint32_t rde_amf_healthcheck_start(RDE_AMF_CB *rde_amf_cb) { - SaAmfHealthcheckKeyT Healthy; - SaNameT SaCompName; - char *phlth_ptr; -- char hlth_str[256]; -+ char hlth_str[32]; - - TRACE_ENTER(); - -diff --git a/src/smf/smfd/SmfUpgradeCampaign.cc b/src/smf/smfd/SmfUpgradeCampaign.cc -index 45cdce8..6761bcf 100644 ---- a/src/smf/smfd/SmfUpgradeCampaign.cc -+++ b/src/smf/smfd/SmfUpgradeCampaign.cc -@@ -447,7 +447,7 @@ SaAisErrorT SmfUpgradeCampaign::tooManyRestarts(bool *o_result) { - TRACE_ENTER(); - SaAisErrorT rc = SA_AIS_OK; - SaImmAttrValuesT_2 **attributes; -- int curCnt = 0; -+ short int curCnt = 0; - - /* Read the SmfCampRestartInfo object smfCampRestartCnt attr */ - std::string obj = "smfRestartInfo=info," + -@@ -473,7 +473,7 @@ SaAisErrorT SmfUpgradeCampaign::tooManyRestarts(bool *o_result) { - attrsmfCampRestartCnt.setName("smfCampRestartCnt"); - attrsmfCampRestartCnt.setType("SA_IMM_ATTR_SAUINT32T"); - char buf[5]; -- snprintf(buf, 4, "%d", curCnt); -+ snprintf(buf, 4, "%hd", curCnt); - attrsmfCampRestartCnt.addValue(buf); - imoCampRestartInfo.addValue(attrsmfCampRestartCnt); - diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-create_empty_library-Use-CC-variable-intead-of-hardc.patch b/external/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-create_empty_library-Use-CC-variable-intead-of-hardc.patch new file mode 100644 index 00000000..21abcf75 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-create_empty_library-Use-CC-variable-intead-of-hardc.patch @@ -0,0 +1,23 @@ +From 300fd3e27e71a91fc52d3f985ed4fde548852853 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 27 Sep 2019 12:50:11 -0700 +Subject: [PATCH] create_empty_library: Use CC variable intead of hardcoding + gcc + +This ensures that cross-compiles can succeed, otherwise we get wrong +architecture on these stub libraries + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + scripts/create_empty_library | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/scripts/create_empty_library ++++ b/scripts/create_empty_library +@@ -66,4 +66,4 @@ for s in $symbols; do + echo "SaAisErrorT $s() { return SA_AIS_ERR_UNAVAILABLE; }" >> "$tmpdir/lib.c" + done + rm -f "$1" +-gcc -O2 -shared -fPIC "$tmpdir/lib.c" -Wl,-version-script="$2" -Wl,-soname="$libbase.so.$version1" -o "$1" ++$CC -O2 -shared -fPIC "$tmpdir/lib.c" -Wl,-version-script="$2" -Wl,-soname="$libbase.so.$version1" -o "$1" $LDFLAGS diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-immom_python-convert-to-python3.patch b/external/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-immom_python-convert-to-python3.patch new file mode 100644 index 00000000..f4587468 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-immom_python-convert-to-python3.patch @@ -0,0 +1,50 @@ +From ffc829603a2c50674c8e04de5221e43f80bfc1b2 Mon Sep 17 00:00:00 2001 +From: Andrey Zhizhikin <andrey.z@gmail.com> +Date: Mon, 27 Jan 2020 13:00:53 +0000 +Subject: [PATCH] immom_python: convert to python3 + +Convert immom_python to use python3, python2 is EOL and is not supported +by all distributions anymore. + +Upstream-Status: Pending + +Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com> +--- + samples/immsv/immom_python/immom.py | 2 +- + samples/immsv/immom_python/immomexamples.py | 2 +- + samples/immsv/immom_python/immomtest.py | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/samples/immsv/immom_python/immom.py b/samples/immsv/immom_python/immom.py +index 4f68625ed..f88197000 100755 +--- a/samples/immsv/immom_python/immom.py ++++ b/samples/immsv/immom_python/immom.py +@@ -1,4 +1,4 @@ +-#! /usr/bin/python ++#!/usr/bin/env python3 + """ + immom -- An IMM Object Manager in Python + +diff --git a/samples/immsv/immom_python/immomexamples.py b/samples/immsv/immom_python/immomexamples.py +index 70c579265..bd693c25f 100755 +--- a/samples/immsv/immom_python/immomexamples.py ++++ b/samples/immsv/immom_python/immomexamples.py +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#!/usr/bin/env python3 + + import immom + +diff --git a/samples/immsv/immom_python/immomtest.py b/samples/immsv/immom_python/immomtest.py +index 4b98bea8c..ed2463ba9 100755 +--- a/samples/immsv/immom_python/immomtest.py ++++ b/samples/immsv/immom_python/immomtest.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # -*- coding: utf-8 -*- + + import immom +-- +2.17.1 + diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0002-Fix-format-truncation-errors.patch b/external/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0002-Fix-format-truncation-errors.patch deleted file mode 100644 index f98e28da..00000000 --- a/external/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0002-Fix-format-truncation-errors.patch +++ /dev/null @@ -1,100 +0,0 @@ -From c5034fe42df8923bcefc10e163151997d70b6241 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 16 Apr 2018 14:56:47 -0700 -Subject: [PATCH] Fix format-truncation errors - -Fixes errors with gcc8 eg. -error: '%u' directive output may be truncated writing between 1 and 10 bytes into a region of size between 0 and 254 [-Werror=format-truncation=] - -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- - src/base/daemon.c | 4 ++-- - src/mds/mds_c_db.c | 8 ++++---- - src/mds/mds_core.h | 4 ++-- - src/mds/mds_dt2c.h | 2 +- - 4 files changed, 9 insertions(+), 9 deletions(-) - -diff --git a/src/base/daemon.c b/src/base/daemon.c -index 361dd8d..4001b73 100644 ---- a/src/base/daemon.c -+++ b/src/base/daemon.c -@@ -95,11 +95,11 @@ static int __create_pidfile(const char *pidfile) - { - FILE *file = NULL; - int fd, rc = 0; -- char pidfiletmp[NAME_MAX] = {0}; -+ char pidfiletmp[NAME_MAX+12] = {0}; - pid_t pid; - - pid = getpid(); -- snprintf(pidfiletmp, NAME_MAX, "%s.%u.tmp", pidfile, pid); -+ snprintf(pidfiletmp, NAME_MAX+12, "%s.%u.tmp", pidfile, pid); - - /* open the file and associate a stream with it */ - if (((fd = open(pidfiletmp, O_RDWR | O_CREAT, 0644)) == -1) || -diff --git a/src/mds/mds_c_db.c b/src/mds/mds_c_db.c -index e6b95cd..3d4a222 100644 ---- a/src/mds/mds_c_db.c -+++ b/src/mds/mds_c_db.c -@@ -124,10 +124,10 @@ void get_adest_details(MDS_DEST adest, char *adest_details) - } - - if (remote == true) -- snprintf(adest_details, MDS_MAX_PROCESS_NAME_LEN, -+ snprintf(adest_details, MDS_MAX_PROCESS_NAME_LEN+24, - "<rem_nodeid[0x%" PRIx32 "]:%s>", ncs_node_id, process_name); - else -- snprintf(adest_details, MDS_MAX_PROCESS_NAME_LEN, -+ snprintf(adest_details, MDS_MAX_PROCESS_NAME_LEN+24, - "<nodeid[0x%" PRIx32 "]:%s>", ncs_node_id, process_name); - - m_MDS_LOG_DBG("MDS:DB: adest_details: %s ", adest_details); -@@ -207,10 +207,10 @@ void get_subtn_adest_details(MDS_PWE_HDL pwe_hdl, MDS_SVC_ID svc_id, - } - - if (remote == true) -- snprintf(adest_details, MDS_MAX_PROCESS_NAME_LEN, -+ snprintf(adest_details, MDS_MAX_PROCESS_NAME_LEN+24, - "<rem_node[0x%" PRIx32 "]:%s>", ncs_node_id, process_name); - else -- snprintf(adest_details, MDS_MAX_PROCESS_NAME_LEN, -+ snprintf(adest_details, MDS_MAX_PROCESS_NAME_LEN+24, - "<node[0x%" PRIx32 "]:%s>", ncs_node_id, process_name); - done: - m_MDS_LOG_DBG("MDS:DB: adest_details: %s ", adest_details); -diff --git a/src/mds/mds_core.h b/src/mds/mds_core.h -index 37696d4..7f5225d 100644 ---- a/src/mds/mds_core.h -+++ b/src/mds/mds_core.h -@@ -163,7 +163,7 @@ typedef struct mds_subscription_results_info { - uint32_t msg_snd_cnt; /* Message send count to this destination */ - uint32_t msg_rcv_cnt; /* Message rcv count from this destination */ - char sub_adest_details -- [MDS_MAX_PROCESS_NAME_LEN]; /* <node[slotno]:processname[pid]> */ -+ [MDS_MAX_PROCESS_NAME_LEN+24]; /* <node[slotno]:processname[pid]> */ - - } MDS_SUBSCRIPTION_RESULTS_INFO; - -@@ -194,7 +194,7 @@ typedef struct mds_subscription_info { - count is grater than ZERO bcast (multi-unicast) */ - uint32_t prev_ver_sub_count; - char sub_adest_details -- [MDS_MAX_PROCESS_NAME_LEN]; /* <node[slotno]:processname[pid]> */ -+ [MDS_MAX_PROCESS_NAME_LEN+24]; /* <node[slotno]:processname[pid]> */ - - } MDS_SUBSCRIPTION_INFO; - -diff --git a/src/mds/mds_dt2c.h b/src/mds/mds_dt2c.h -index 012999c..006b722 100644 ---- a/src/mds/mds_dt2c.h -+++ b/src/mds/mds_dt2c.h -@@ -143,7 +143,7 @@ typedef struct mdtm_send_req { - */ - MDS_DEST adest; /* MDTM to do local/remote routing, destination adest */ - char sub_adest_details -- [MDS_MAX_PROCESS_NAME_LEN]; /* <node[nodeid]:processname[pid]> */ -+ [MDS_MAX_PROCESS_NAME_LEN+24]; /* <node[nodeid]:processname[pid]> */ - MDS_SEND_PRIORITY_TYPE pri; - MDS_CLIENT_MSG_FORMAT_VER - msg_fmt_ver; /* message format version specification */ diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0008-check-for-size-before-using-strncpy.patch b/external/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0008-check-for-size-before-using-strncpy.patch deleted file mode 100644 index 497bb07d..00000000 --- a/external/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0008-check-for-size-before-using-strncpy.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 29510dd81e3a5e96151afdb0702863cbfd640766 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 22 Jun 2018 18:58:59 -0700 -Subject: [PATCH] check for size before using strncpy - -ensures that size is never execeding the string length -that execPath can hold - -Fixes -error: '__builtin___strncpy_chk' specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=] - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/imm/immnd/immnd_proc.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/imm/immnd/immnd_proc.c b/src/imm/immnd/immnd_proc.c -index 015932a..c8f115e 100644 ---- a/src/imm/immnd/immnd_proc.c -+++ b/src/imm/immnd/immnd_proc.c -@@ -1902,6 +1902,10 @@ static int immnd_forkPbe(IMMND_CB *cb) - LOG_ER("Pathname too long: %u max is 1023", newLen); - return -1; - } -+ if (execDirLen > 1023 || execDirLen < 0) { -+ LOG_ER("Execdir name too long: %u max is 1023", execDirLen); -+ return -1; -+ } - - strncpy(execPath, cb->mProgName, execDirLen); - execPath[execDirLen] = 0; diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.18.04.bb b/external/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.19.10.bb index c534c620..3ab4757c 100644 --- a/external/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.18.04.bb +++ b/external/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.19.10.bb @@ -14,7 +14,7 @@ SECTION = "admin" LICENSE = "LGPLv2.1" LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7" -DEPENDS = "libxml2 python" +DEPENDS = "libxml2 python3" TOOLCHAIN = "gcc" SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}" @@ -24,13 +24,14 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/releases/${BPN}-${PV}.tar.gz \ file://0001-configure-Disable-format-overflow-if-supported-by-gc.patch \ file://0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch \ file://0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch \ - file://0001-Catch-std-ifstream-failure-by-reference.patch \ - file://0002-Fix-format-truncation-errors.patch \ - file://0001-Fix-string-overflow-in-snprintf.patch \ - file://0008-check-for-size-before-using-strncpy.patch \ + file://0001-Add-configure-time-check-for-gettid-API.patch \ + file://0001-create_empty_library-Use-CC-variable-intead-of-hardc.patch \ + file://0001-immom_python-convert-to-python3.patch \ " -SRC_URI[md5sum] = "21836e43b13ad33bed9bd0ed391e5a6e" -SRC_URI[sha256sum] = "e55dc2645487fb22938e8386b99eef6eb7aff43a246ce3e92488daf6ee46247a" +SRC_URI[md5sum] = "9b61df01d1a092101c4a626692edae19" +SRC_URI[sha256sum] = "6da9af96e8ee58d11031d305bf4804a00deb6108e12e422722882a2091bd34bd" + +UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/opensaf/files/releases" inherit autotools useradd systemd pkgconfig @@ -47,12 +48,11 @@ PACKAGECONFIG[plm] = "--enable-ais-plm,--disable-ais-plm,libvirt openhpi" PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}" -PKGLIBDIR="${libdir}" - +CPPFLAGS += "-Wno-error=stringop-overflow= -Wno-error=stringop-truncation" +CXXFLAGS += "-Wno-error=stringop-overflow= -Wno-error=stringop-truncation -Wno-error=format-truncation=" LDFLAGS += "-Wl,--as-needed -latomic -Wl,--no-as-needed" do_install_append() { - cp -av --no-preserve=ownership ${B}/lib/.libs/*.so* ${D}${libdir} rm -fr "${D}${localstatedir}/lock" rm -fr "${D}${localstatedir}/run" rmdir --ignore-fail-on-non-empty "${D}${localstatedir}" @@ -63,12 +63,15 @@ do_install_append() { fi } -FILES_${PN} += "${systemd_unitdir}/system/*.service" +FILES_${PN} += "${libdir}/libSa*.so ${systemd_unitdir}/system/*.service" +FILES_${PN}-dev += "${libdir}/libopensaf_core.so" FILES_${PN}-staticdev += "${PKGLIBDIR}/*.a" INSANE_SKIP_${PN} = "dev-so" -RDEPENDS_${PN} += "bash python" +RDEPENDS_${PN} += "bash python3-core" # http://errors.yoctoproject.org/Errors/Details/186970/ -EXCLUDE_FROM_WORLD_libc-musl = "1" +COMPATIBLE_HOST_libc-musl = 'null' + +FILES_SOLIBSDEV = "" diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix.inc b/external/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix.inc index 3d4f1df4..4b9940cc 100644 --- a/external/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix.inc +++ b/external/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix.inc @@ -14,33 +14,22 @@ DEPENDS = "db icu libpcre libnsl2 openssl postfix-native \ LICENSE = "IPL-1.0 | EPL-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=b181651ad99a7dc4cc8c4ce2f491ed1a" -SRC_URI = "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${PV}.tar.gz \ - file://makedefs.patch \ - file://install.patch \ - file://main.cf \ - file://postfix \ - file://internal_recipient \ - file://postfix.service \ - file://aliasesdb \ - file://check_hostname.sh \ -" - S = "${WORKDIR}/postfix-${PV}" CLEANBROKEN = "1" BBCLASSEXTEND = "native" -inherit update-rc.d useradd update-alternatives systemd +inherit update-rc.d useradd update-alternatives systemd lib_package INITSCRIPT_NAME = "postfix" INITSCRIPT_PARAMS = "start 58 3 4 5 . stop 13 0 1 6 ." -USERADD_PACKAGES = "${PN}" -USERADD_PARAM_${PN} = \ +USERADD_PACKAGES = "${PN}-bin" +USERADD_PARAM_${PN}-bin = \ "-d /var/spool/postfix -r -g postfix --shell /bin/false postfix; \ -d /var/spool/vmail -r -g vmail --shell /bin/false vmail \ " -GROUPADD_PARAM_${PN} = "--system postfix;--system postdrop;--system vmail" +GROUPADD_PARAM_${PN}-bin = "--system postfix;--system postdrop;--system vmail" export SYSLIBS = "${LDFLAGS}" @@ -196,11 +185,15 @@ do_install_append_class-native() { ln -sf ../sbin/sendmail.postfix ${D}${bindir}/mailq } -ALTERNATIVE_${PN} += "sendmail mailq newaliases" +ALTERNATIVE_${PN}-bin = "sendmail mailq newaliases" +# /usr/lib/sendmial is required by LSB core test +ALTERNATIVE_${PN}-bin_linuxstdbase = "sendmail mailq newaliases usr-lib-sendmail" ALTERNATIVE_TARGET[mailq] = "${bindir}/mailq" ALTERNATIVE_TARGET[newaliases] = "${bindir}/newaliases" ALTERNATIVE_TARGET[sendmail] = "${sbindir}/sendmail.postfix" ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/sendmail" +ALTERNATIVE_TARGET[usr-lib-sendmail] = "${sbindir}/sendmail.postfix" +ALTERNATIVE_LINK_NAME[usr-lib-sendmail] = "/usr/lib/sendmail" ALTERNATIVE_PRIORITY = "120" @@ -209,34 +202,21 @@ ALTERNATIVE_LINK_NAME[mailq.1] = "${mandir}/man1/mailq.1" ALTERNATIVE_LINK_NAME[newaliases.1] = "${mandir}/man1/newaliases.1" ALTERNATIVE_LINK_NAME[sendmail.1] = "${mandir}/man1/sendmail.1" -PACKAGE_WRITE_DEPS += "postfix-native" -pkg_postinst_${PN} () { - if [ "x$D" = "x" ]; then - touch /etc/aliases - newaliases +pkg_postinst_ontarget_${PN}-cfg () { + touch /etc/aliases + newaliases - # generate virtual_alias, default is hash - touch /etc/postfix/virtual_alias - postmap /etc/postfix/virtual_alias - else - if ${@'true' if 'linuxstdbase' in d.getVar('DISTROOVERRIDES', False) else 'false'}; then - # /usr/lib/sendmail is required by LSB core test - [ ! -L $D/usr/lib/sendmail ] && ln -sf ${sbindir}/sendmail $D/usr/lib/ - fi - - touch $D/etc/aliases - # This can fail depending on host setup - if ! newaliases -C $D/etc/postfix/main.cf -oA$D/etc/aliases; then - $INTERCEPT_DIR/postinst_intercept delay_to_first_boot ${PKG} mlprefix=${MLPREFIX} - else - touch $D/etc/postfix/virtual_alias - postmap -c $D/etc/postfix $D/etc/postfix/virtual_alias - fi - - fi + # generate virtual_alias, default is hash + touch /etc/postfix/virtual_alias + postmap /etc/postfix/virtual_alias } +PACKAGES =+ "${PN}-cfg" +RDEPENDS_${PN}-cfg_class-target += "${PN}-bin" +RDEPENDS_${PN}_class-target += "${PN}-cfg" # Exclude .debug directories from the main package -FILES_${PN} = "${sysconfdir} ${localstatedir} ${bindir}/* ${sbindir}/* \ +FILES_${PN}-bin += "${localstatedir} ${bindir}/* ${sbindir}/* \ ${libexecdir}/* ${systemd_unitdir}/*" +FILES_${PN}-cfg = "${sysconfdir}" FILES_${PN}-dbg += "${libexecdir}/postfix/.debug" +ALLOW_EMPTY_${PN} = "1" diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.3.1.bb b/external/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.3.1.bb deleted file mode 100644 index 6718b7ef..00000000 --- a/external/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.3.1.bb +++ /dev/null @@ -1,12 +0,0 @@ -require postfix.inc - -SRC_URI += "file://0001-makedefs-Use-native-compiler-to-build-makedefs.test.patch \ - file://postfix-install.patch \ - file://icu-config.patch \ - file://0001-makedefs-add-lnsl-and-lresolv-to-SYSLIBS-by-default.patch \ - " - -SRC_URI[md5sum] = "4381c6492f415e4a69cf5099d4acea76" -SRC_URI[sha256sum] = "54f514dae42b5275cb4bc9c69283f16c06200b71813d0bb696568c4ba7ae7e3b" - -UPSTREAM_CHECK_REGEX = "postfix\-(?P<pver>3\.3(\.\d+)+).tar.gz" diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.4.12.bb b/external/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.4.12.bb new file mode 100644 index 00000000..db5b41bf --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.4.12.bb @@ -0,0 +1,18 @@ +require postfix.inc + +SRC_URI += "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${PV}.tar.gz \ + file://makedefs.patch \ + file://install.patch \ + file://main.cf \ + file://postfix \ + file://internal_recipient \ + file://postfix.service \ + file://aliasesdb \ + file://check_hostname.sh \ + file://0001-makedefs-Use-native-compiler-to-build-makedefs.test.patch \ + file://postfix-install.patch \ + file://icu-config.patch \ + file://0001-makedefs-add-lnsl-and-lresolv-to-SYSLIBS-by-default.patch \ + " +SRC_URI[sha256sum] = "18555183ae8b52a9e76067799279c86f9f2770cdef3836deb8462ee0a0855dec" +UPSTREAM_CHECK_REGEX = "postfix\-(?P<pver>3\.3(\.\d+)+).tar.gz" diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/proftpd/proftpd_1.3.6.bb b/external/meta-openembedded/meta-networking/recipes-daemons/proftpd/proftpd_1.3.6.bb index 40994726..1e4697a6 100644 --- a/external/meta-openembedded/meta-networking/recipes-daemons/proftpd/proftpd_1.3.6.bb +++ b/external/meta-openembedded/meta-networking/recipes-daemons/proftpd/proftpd_1.3.6.bb @@ -13,10 +13,10 @@ SRC_URI = "ftp://ftp.proftpd.org/distrib/source/${BPN}-${PV}.tar.gz \ file://build_fixup.patch \ file://proftpd.service \ " -iSRC_URI[md5sum] = "13270911c42aac842435f18205546a1b" +SRC_URI[md5sum] = "13270911c42aac842435f18205546a1b" SRC_URI[sha256sum] = "91ef74b143495d5ff97c4d4770c6804072a8c8eb1ad1ecc8cc541b40e152ecaf" -inherit autotools-brokensep useradd update-rc.d systemd +inherit autotools-brokensep useradd update-rc.d systemd multilib_script PACKAGECONFIG ??= "shadow \ ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 pam', d)} \ @@ -110,6 +110,7 @@ do_install () { sed -e 's|--sysroot=${STAGING_DIR_HOST}||g' \ -e 's|${STAGING_DIR_NATIVE}||g' \ -e 's|-fdebug-prefix-map=[^ ]*||g' \ + -e 's|-fmacro-prefix-map=[^ ]*||g' \ -i ${D}/${bindir}/prxs # ftpmail perl script, which reads the proftpd log file and sends @@ -133,6 +134,8 @@ GROUPADD_PARAM_${PN} = "--system ${FTPGROUP}" USERADD_PARAM_${PN} = "--system -g ${FTPGROUP} --home-dir /var/lib/${FTPUSER} --no-create-home \ --shell /bin/false ${FTPUSER}" +MULTILIB_SCRIPTS = "${PN}:${bindir}/prxs" + FILES_${PN} += "/home/${FTPUSER}" RDEPENDS_${PN} += "perl" diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd_2.3.1.bb b/external/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd_2.3.1.bb index 58625c80..cab0d943 100644 --- a/external/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd_2.3.1.bb +++ b/external/meta-openembedded/meta-networking/recipes-daemons/ptpd/ptpd_2.3.1.bb @@ -5,7 +5,7 @@ and PTP Version 2 implements IEEE-1588-2008. PTP was developed to provide very p time coordination of LAN connected computers." HOMEPAGE = "http://sourceforge.net/projects/ptpd" SECTION = "net" -LICENSE = "BSD" +LICENSE = "BSD-2-Clause" LIC_FILES_CHKSUM = "file://README;md5=0733e1b3788ab2ebbc63bf33a020da1d" DEPENDS = "libpcap" @@ -31,6 +31,8 @@ SRC_URI = "http://downloads.sourceforge.net/project/ptpd/ptpd/${@get_sub(d)}/ptp SRC_URI[md5sum] = "253bab7ab51d969616ea811be1f132f3" SRC_URI[sha256sum] = "0dbf54dd2c178bd9fe62481d2c37513ee36636d8bf137cfdad96891490cdbf93" +UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/ptpd/files/releases" + S = "${WORKDIR}/ptpd-${PV}" EXTRA_OEMAKE = "" diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd/0001-Remove-hardcoded-usr-local-includes-from-configure.a.patch b/external/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd/0001-Remove-hardcoded-usr-local-includes-from-configure.a.patch index 76523fb9..2606a366 100644 --- a/external/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd/0001-Remove-hardcoded-usr-local-includes-from-configure.a.patch +++ b/external/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd/0001-Remove-hardcoded-usr-local-includes-from-configure.a.patch @@ -1,4 +1,4 @@ -From 1bafadf2502334a3e972ff667061469316d0d2ca Mon Sep 17 00:00:00 2001 +From a45e086661a3eed29193546c525998d7525ef6d9 Mon Sep 17 00:00:00 2001 From: Tudor Florea <tudor.florea@enea.com> Date: Tue, 4 Aug 2015 02:46:39 +0200 Subject: [PATCH] Remove hardcoded /usr/local includes from configure.ac @@ -7,33 +7,40 @@ Upstream-Status: Inappropriate [config] Signed-off-by: Yauhen Kharuzhy <yauhen.kharuzhy@promwad.com> Signed-off-by: Tudor Florea <tudor.florea@enea.com> + +Update for 1.0.49. +Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com> + --- - configure.ac | 12 ------------ - 1 file changed, 12 deletions(-) + configure.ac | 15 --------------- + 1 file changed, 15 deletions(-) diff --git a/configure.ac b/configure.ac -index 6c78e8c..851d45d 100644 +index 079e6f0..9a1ec06 100644 --- a/configure.ac +++ b/configure.ac -@@ -100,18 +100,6 @@ AC_ARG_VAR(PYTHON,local path to the python interpreter) - python_possible_path="/usr/bin:/usr/local/bin:/bin:/opt/python/bin:/opt/python/usr/bin:/opt/python/usr/local/bin" - AC_PATH_PROG(PYTHON,python,/usr/bin/env python,$python_possible_path) +@@ -96,21 +96,6 @@ AX_CHECK_LINK_FLAG([-Wl,-z,relro], [LDFLAGS="$LDFLAGS -Wl,-z,relro"]) + AX_CHECK_LINK_FLAG([-Wl,-z,now], [LDFLAGS="$LDFLAGS -Wl,-z,now"]) + AX_CHECK_LINK_FLAG([-Wl,-z,noexecstack], [LDFLAGS="$LDFLAGS -Wl,-z,noexecstack"]) --if test -d /usr/local/include; then -- CPPFLAGS="$CPPFLAGS -I/usr/local/include" --fi -- --if test -d /usr/kerberos/include; then -- CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include" --fi -- --if test -d /usr/local/lib; then -- LDFLAGS="$LDFLAGS -L/usr/local/lib" +-if test "x$cross_compiling" != "xyes"; then +- for path in \ +- /usr/kerberos \ +- /usr/local /opt /usr/local/opt \ +- /usr/openssl@1.1 /opt/openssl@1.1 /usr/local/opt/openssl@1.1 \ +- /usr/openssl /opt/openssl /usr/local/opt/openssl; do +- if test -d $path/include; then +- CPPFLAGS="$CPPFLAGS -I${path}/include" +- fi +- if test -d $path/lib; then +- LDFLAGS="$LDFLAGS -L${path}/lib" +- fi +- done -fi - CPPFLAGS="$CPPFLAGS -D_FORTIFY_SOURCE=2" dnl Checks for header files -- -1.9.1 +2.7.4 diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd/nostrip.patch b/external/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd/nostrip.patch index 4cb33bc5..32d714f6 100644 --- a/external/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd/nostrip.patch +++ b/external/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd/nostrip.patch @@ -1,7 +1,8 @@ -From 0290bd6f4ceddff2c52dff833c9d31d24de7d0e1 Mon Sep 17 00:00:00 2001 +From 79fd22c0def26eba130db98e312bb00fec32ac0a Mon Sep 17 00:00:00 2001 From: Tudor Florea <tudor.florea@enea.com> Date: Tue, 4 Aug 2015 03:07:01 +0200 -Subject: [PATCH] Don't mess with CFLAGS and LDFLAGS when --with-minimal is specified +Subject: [PATCH] Don't mess with CFLAGS and LDFLAGS when --with-minimal is + specified We especially don't want stripping enabled. @@ -9,15 +10,16 @@ Upstream-Status: Inappropriate [config] Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Tudor Florea <tudor.florea@enea.com> + --- configure.ac | 2 -- 1 file changed, 2 deletions(-) diff --git a/configure.ac b/configure.ac -index 851d45d..dc410a1 100644 +index 695ce68..0f28b55 100644 --- a/configure.ac +++ b/configure.ac -@@ -423,8 +423,6 @@ AC_ARG_WITH(minimal, +@@ -414,8 +414,6 @@ AC_ARG_WITH(minimal, AC_DEFINE(NO_FTP_USERS) AC_DEFINE(WITHOUT_ASCII) AC_DEFINE(BORING_MODE) @@ -26,6 +28,3 @@ index 851d45d..dc410a1 100644 fi ]) AC_ARG_WITH(paranoidmsg, --- -1.9.1 - diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd_1.0.42.bb b/external/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd_1.0.49.bb index e5c56164..5a8e9c13 100644 --- a/external/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd_1.0.42.bb +++ b/external/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd_1.0.49.bb @@ -2,21 +2,19 @@ SUMMARY = "FTP Server with a strong focus on software security" DESCRIPTION = "Pure-FTPd is a free (BSD license), secure, production-quality and standard-conformant FTP server." HOMEPAGE = "http://www.pureftpd.org/project/pure-ftpd" SECTION = "net" -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://COPYING;md5=90352fb2bfe17f4261687a0d6e09f489" +LICENSE = "BSD-0-Clause" +LIC_FILES_CHKSUM = "file://COPYING;md5=e25e28bc568d70eb26c3a91387c86ccb" DEPENDS = "libcap virtual/crypt" - SRC_URI = "http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-${PV}.tar.gz \ file://0001-Remove-hardcoded-usr-local-includes-from-configure.a.patch \ file://nostrip.patch \ " -SRC_URI[md5sum] = "4195af8f0e5ee2a798b1014071dae3a3" -SRC_URI[sha256sum] = "7be73a8e58b190a7054d2ae00c5e650cb9e091980420082d02ec3c3b68d8e7f9" +SRC_URI[md5sum] = "451879495ba61c1d7dcfca8dd231119f" +SRC_URI[sha256sum] = "767bf458c70b24f80c0bb7a1bbc89823399e75a0a7da141d30051a2b8cc892a5" inherit autotools -EXTRA_OECONF = "--with-minimal" PACKAGECONFIG[libsodium] ="ac_cv_lib_sodium_crypto_pwhash_scryptsalsa208sha256_str=yes, \ - ac_cv_lib_sodium_crypto_pwhash_scryptsalsa208sha256_str=no, libsodium" + ac_cv_lib_sodium_crypto_pwhash_scryptsalsa208sha256_str=no, libsodium" diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd_2.17.bb b/external/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd_2.17.bb deleted file mode 100644 index 4baea01d..00000000 --- a/external/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd_2.17.bb +++ /dev/null @@ -1,5 +0,0 @@ - -require radvd.inc - -SRC_URI[md5sum] = "64ee3fdb5544bcddef1c6cd80d77fa0a" -SRC_URI[sha256sum] = "53757e7f2164899e1145482f1ae91829600a6e2f6fec29cfb3b350a3bb45bd5d" diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd_2.18.bb b/external/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd_2.18.bb new file mode 100644 index 00000000..6097b209 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd_2.18.bb @@ -0,0 +1,5 @@ + +require radvd.inc + +SRC_URI[md5sum] = "26ead3a0d5cfbe4c81c3089eaf7b3250" +SRC_URI[sha256sum] = "4f573e36b96ba92d03b5abbbd5f059b9c8994967812c77852f44049ac5a448fd" diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-Bug-4843-pt1-ext_edirectory_userip_acl-refactoring-f.patch b/external/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-Bug-4843-pt1-ext_edirectory_userip_acl-refactoring-f.patch deleted file mode 100644 index 001d9e90..00000000 --- a/external/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-Bug-4843-pt1-ext_edirectory_userip_acl-refactoring-f.patch +++ /dev/null @@ -1,506 +0,0 @@ -From 01a44c96dbd04936e9cb2501745a834a0b09d504 Mon Sep 17 00:00:00 2001 -From: Amos Jeffries <yadij@users.noreply.github.com> -Date: Sun, 13 May 2018 06:57:41 +0000 -Subject: [PATCH] Bug 4843 pt1: ext_edirectory_userip_acl refactoring for GCC-8 - (#204) - -Proposed changes to this helper to fix strcat / strncat buffer -overread / overflow issues. - -The approach takes three parts: - -* adds a makeHexString function to replace many for-loops - catenating bits of strings together with hex conversion into a - second buffer. Replacing with a snprintf() and buffer overflow - handling. - -* a copy of Ip::Address::lookupHostIp to convert the input - string into IP address binary format, then generate the hex - string using the above new hex function instead of looped - sub-string concatenations across several buffers. - This removes all the "00" and "0000" strncat() calls and - allows far simpler code even with added buffer overflow - handling. - -* replace multiple string part concatenations with a few simpler - calls to snprintf() for all the search_ip buffer constructions. - Adding buffer overflow handling as needed for the new calls. ---- -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Upstream-Status: Backport - - .../ext_edirectory_userip_acl.cc | 376 ++++++------------ - 1 file changed, 120 insertions(+), 256 deletions(-) - -diff --git a/helpers/external_acl/eDirectory_userip/ext_edirectory_userip_acl.cc b/helpers/external_acl/eDirectory_userip/ext_edirectory_userip_acl.cc -index 63609e4..ad16bfd 100644 ---- a/helpers/external_acl/eDirectory_userip/ext_edirectory_userip_acl.cc -+++ b/helpers/external_acl/eDirectory_userip/ext_edirectory_userip_acl.cc -@@ -67,6 +67,9 @@ - #ifdef HAVE_LDAP_H - #include <ldap.h> - #endif -+#ifdef HAVE_NETDB_H -+#include <netdb.h> -+#endif - - #ifdef HELPER_INPUT_BUFFER - #define EDUI_MAXLEN HELPER_INPUT_BUFFER -@@ -714,11 +717,14 @@ BindLDAP(edui_ldap_t *l, char *dn, char *pw, unsigned int t) - - /* Copy details - dn and pw CAN be NULL for anonymous and/or TLS */ - if (dn != NULL) { -+ if (strlen(dn) >= sizeof(l->dn)) -+ return LDAP_ERR_OOB; /* DN too large */ -+ - if ((l->basedn[0] != '\0') && (strstr(dn, l->basedn) == NULL)) { - /* We got a basedn, but it's not part of dn */ -- xstrncpy(l->dn, dn, sizeof(l->dn)); -- strncat(l->dn, ",", 1); -- strncat(l->dn, l->basedn, strlen(l->basedn)); -+ const int x = snprintf(l->dn, sizeof(l->dn)-1, "%s,%s", dn, l->basedn); -+ if (x < 0 || static_cast<size_t>(x) >= sizeof(l->dn)) -+ return LDAP_ERR_OOB; /* DN too large */ - } else - xstrncpy(l->dn, dn, sizeof(l->dn)); - } -@@ -778,24 +784,73 @@ BindLDAP(edui_ldap_t *l, char *dn, char *pw, unsigned int t) - } - } - -+// XXX: duplicate (partial) of Ip::Address::lookupHostIp -+/** -+ * Convert the IP address string representation in src to -+ * its binary representation. -+ * -+ * \return binary representation of the src IP address. -+ * Must be free'd using freeaddrinfo(). -+ */ -+static struct addrinfo * -+makeIpBinary(const char *src) -+{ -+ struct addrinfo want; -+ memset(&want, 0, sizeof(want)); -+ want.ai_flags = AI_NUMERICHOST; // prevent actual DNS lookups! -+ -+ struct addrinfo *dst = nullptr; -+ if (getaddrinfo(src, nullptr, &want, &dst) != 0) { -+ // not an IP address -+ /* free any memory getaddrinfo() dynamically allocated. */ -+ if (dst) -+ freeaddrinfo(dst); -+ return nullptr; -+ } -+ -+ return dst; -+} -+ -+/** -+ * Convert srcLen bytes from src into HEX and store into dst, which -+ * has a maximum content size of dstSize including c-string terminator. -+ * The dst value produced will be a 0-terminated c-string. -+ * -+ * \retval N length of dst written (excluding c-string terminator) -+ * \retval -11 (LDAP_ERR_OOB) buffer overflow detected -+ */ -+static int -+makeHexString(char *dst, const int dstSize, const char *src, const int srcLen) -+{ -+ // HEX encoding doubles the amount of bytes/octets copied -+ if ((srcLen*2) >= dstSize) -+ return LDAP_ERR_OOB; // cannot copy that many -+ -+ *dst = 0; -+ -+ for (int k = 0; k < srcLen; ++k) { -+ int c = static_cast<int>(src[k]); -+ if (c < 0) -+ c = c + 256; -+ char hexc[4]; -+ const int hlen = snprintf(hexc, sizeof(hexc), "%02X", c); -+ if (hlen < 0 || static_cast<size_t>(hlen) > sizeof(hexc)) // should be impossible -+ return LDAP_ERR_OOB; -+ strcat(dst, hexc); -+ } -+ return strlen(dst); -+} -+ - /* - * ConvertIP() - <edui_ldap_t> <ip> - * - * Take an IPv4 address in dot-decimal or IPv6 notation, and convert to 2-digit HEX stored in l->search_ip - * This is the networkAddress that we search LDAP for. -- * -- * PENDING -- CHANGE OVER TO inet*_pton, but inet6_pton does not provide the correct syntax -- * - */ - static int - ConvertIP(edui_ldap_t *l, char *ip) - { -- char bufa[EDUI_MAXLEN], bufb[EDUI_MAXLEN], obj[EDUI_MAXLEN]; -- char hexc[4], *p; - void *y, *z; -- size_t s; -- long x; -- int i, j, t, swi; /* IPv6 "::" cut over toggle */ - if (l == NULL) return LDAP_ERR_NULL; - if (ip == NULL) return LDAP_ERR_PARAM; - if (!(l->status & LDAP_INIT_S)) return LDAP_ERR_INIT; /* Not initalized */ -@@ -831,183 +886,22 @@ ConvertIP(edui_ldap_t *l, char *ip) - l->status |= (LDAP_IPV4_S); - z = NULL; - } -- s = strlen(ip); -- *(bufa) = '\0'; -- *(bufb) = '\0'; -- *(obj) = '\0'; -- /* StringSplit() will zero out bufa & obj at each call */ -- memset(l->search_ip, '\0', sizeof(l->search_ip)); -- xstrncpy(bufa, ip, sizeof(bufa)); /* To avoid segfaults, use bufa instead of ip */ -- swi = 0; -- if (l->status & LDAP_IPV6_S) { -- /* Search for :: in string */ -- if ((bufa[0] == ':') && (bufa[1] == ':')) { -- /* bufa starts with a ::, so just copy and clear */ -- xstrncpy(bufb, bufa, sizeof(bufb)); -- *(bufa) = '\0'; -- ++swi; /* Indicates that there is a bufb */ -- } else if ((bufa[0] == ':') && (bufa[1] != ':')) { -- /* bufa starts with a :, a typo so just fill in a ':', cat and clear */ -- bufb[0] = ':'; -- strncat(bufb, bufa, strlen(bufa)); -- *(bufa) = '\0'; -- ++swi; /* Indicates that there is a bufb */ -- } else { -- p = strstr(bufa, "::"); -- if (p != NULL) { -- /* Found it, break bufa down and split into bufb here */ -- *(bufb) = '\0'; -- i = strlen(p); -- memcpy(bufb, p, i); -- *p = '\0'; -- bufb[i] = '\0'; -- ++swi; /* Indicates that there is a bufb */ -- } -- } -- } -- s = strlen(bufa); -- if (s < 1) -- s = strlen(bufb); -- while (s > 0) { -- if ((l->status & LDAP_IPV4_S) && (swi == 0)) { -- /* Break down IPv4 address */ -- t = StringSplit(bufa, '.', obj, sizeof(obj)); -- if (t > 0) { -- errno = 0; -- x = strtol(obj, (char **)NULL, 10); -- if (((x < 0) || (x > 255)) || ((errno != 0) && (x == 0)) || ((obj[0] != '0') && (x == 0))) -- return LDAP_ERR_OOB; /* Out of bounds -- Invalid address */ -- memset(hexc, '\0', sizeof(hexc)); -- int hlen = snprintf(hexc, sizeof(hexc), "%02X", (int)x); -- strncat(l->search_ip, hexc, hlen); -- } else -- break; /* reached end of octet */ -- } else if (l->status & LDAP_IPV6_S) { -- /* Break down IPv6 address */ -- if (swi > 1) -- t = StringSplit(bufb, ':', obj, sizeof(obj)); /* After "::" */ -- else -- t = StringSplit(bufa, ':', obj, sizeof(obj)); /* Before "::" */ -- /* Convert octet by size (t) - and fill 0's */ -- switch (t) { /* IPv6 is already in HEX, copy contents */ -- case 4: -- hexc[0] = (char) toupper((int)obj[0]); -- i = (int)hexc[0]; -- if (!isxdigit(i)) -- return LDAP_ERR_OOB; /* Out of bounds */ -- hexc[1] = (char) toupper((int)obj[1]); -- i = (int)hexc[1]; -- if (!isxdigit(i)) -- return LDAP_ERR_OOB; /* Out of bounds */ -- hexc[2] = '\0'; -- strncat(l->search_ip, hexc, 2); -- hexc[0] = (char) toupper((int)obj[2]); -- i = (int)hexc[0]; -- if (!isxdigit(i)) -- return LDAP_ERR_OOB; /* Out of bounds */ -- hexc[1] = (char) toupper((int)obj[3]); -- i = (int)hexc[1]; -- if (!isxdigit(i)) -- return LDAP_ERR_OOB; /* Out of bounds */ -- hexc[2] = '\0'; -- strncat(l->search_ip, hexc, 2); -- break; -- case 3: -- hexc[0] = '0'; -- hexc[1] = (char) toupper((int)obj[0]); -- i = (int)hexc[1]; -- if (!isxdigit(i)) -- return LDAP_ERR_OOB; /* Out of bounds */ -- hexc[2] = '\0'; -- strncat(l->search_ip, hexc, 2); -- hexc[0] = (char) toupper((int)obj[1]); -- i = (int)hexc[0]; -- if (!isxdigit(i)) -- return LDAP_ERR_OOB; /* Out of bounds */ -- hexc[1] = (char) toupper((int)obj[2]); -- i = (int)hexc[1]; -- if (!isxdigit(i)) -- return LDAP_ERR_OOB; /* Out of bounds */ -- hexc[2] = '\0'; -- strncat(l->search_ip, hexc, 2); -- break; -- case 2: -- strncat(l->search_ip, "00", 2); -- hexc[0] = (char) toupper((int)obj[0]); -- i = (int)hexc[0]; -- if (!isxdigit(i)) -- return LDAP_ERR_OOB; /* Out of bounds */ -- hexc[1] = (char) toupper((int)obj[1]); -- i = (int)hexc[1]; -- if (!isxdigit(i)) -- return LDAP_ERR_OOB; /* Out of bounds */ -- hexc[2] = '\0'; -- strncat(l->search_ip, hexc, 2); -- break; -- case 1: -- strncat(l->search_ip, "00", 2); -- hexc[0] = '0'; -- hexc[1] = (char) toupper((int)obj[0]); -- i = (int)hexc[1]; -- if (!isxdigit(i)) -- return LDAP_ERR_OOB; /* Out of bounds */ -- hexc[2] = '\0'; -- strncat(l->search_ip, hexc, 2); -- break; -- default: -- if (t > 4) -- return LDAP_ERR_OOB; -- break; -- } -- /* Code to pad the address with 0's between a '::' */ -- if ((strlen(bufa) == 0) && (swi == 1)) { -- /* We are *AT* the split, pad in some 0000 */ -- t = strlen(bufb); -- /* How many ':' exist in bufb ? */ -- j = 0; -- for (i = 0; i < t; ++i) { -- if (bufb[i] == ':') -- ++j; -- } -- --j; /* Preceding "::" doesn't count */ -- t = 8 - (strlen(l->search_ip) / 4) - j; /* Remainder */ -- if (t > 0) { -- for (i = 0; i < t; ++i) -- strncat(l->search_ip, "0000", 4); -- } -- } -- } -- if ((bufa[0] == '\0') && (swi > 0)) { -- s = strlen(bufb); -- ++swi; -- } else -- s = strlen(bufa); -- } -- s = strlen(l->search_ip); - -- /* CHECK sizes of address, truncate or pad */ -- /* if "::" is at end of ip, then pad another block or two */ -- while ((l->status & LDAP_IPV6_S) && (s < 32)) { -- strncat(l->search_ip, "0000", 4); -- s = strlen(l->search_ip); -- } -- if ((l->status & LDAP_IPV6_S) && (s > 32)) { -- /* Too long, truncate */ -- l->search_ip[32] = '\0'; -- s = strlen(l->search_ip); -- } -- /* If at end of ip, and its not long enough, then pad another block or two */ -- while ((l->status & LDAP_IPV4_S) && (s < 8)) { -- strncat(l->search_ip, "00", 2); -- s = strlen(l->search_ip); -- } -- if ((l->status & LDAP_IPV4_S) && (s > 8)) { -- /* Too long, truncate */ -- l->search_ip[8] = '\0'; -- s = strlen(l->search_ip); -+ size_t s = LDAP_ERR_INVALID; -+ if (struct addrinfo *dst = makeIpBinary(ip)) { -+ if (dst->ai_family == AF_INET6) { -+ struct sockaddr_in6 *sia = reinterpret_cast<struct sockaddr_in6 *>(dst->ai_addr); -+ const char *ia = reinterpret_cast<const char *>(sia->sin6_addr.s6_addr); -+ s = makeHexString(l->search_ip, sizeof(l->search_ip), ia, 16); // IPv6 = 16-byte address -+ -+ } else if (dst->ai_family == AF_INET) { -+ struct sockaddr_in *sia = reinterpret_cast<struct sockaddr_in *>(dst->ai_addr); -+ const char *ia = reinterpret_cast<const char *>(&(sia->sin_addr)); -+ s = makeHexString(l->search_ip, sizeof(l->search_ip), ia, 4); // IPv4 = 4-byte address -+ } // else leave s with LDAP_ERR_INVALID value -+ freeaddrinfo(dst); - } - -- /* Completed, s is length of address in HEX */ - return s; - } - -@@ -1099,48 +993,42 @@ SearchFilterLDAP(edui_ldap_t *l, char *group) - } - if (group == NULL) { - /* No groupMembership= to add, yay! */ -- xstrncpy(bufa, "(&", sizeof(bufa)); -- strncat(bufa, edui_conf.search_filter, strlen(edui_conf.search_filter)); - /* networkAddress */ -- snprintf(bufb, sizeof(bufb), "(|(networkAddress=1\\23%s)", bufc); - if (l->status & LDAP_IPV4_S) { -- int ln = snprintf(bufd, sizeof(bufd), "(networkAddress=8\\23\\00\\00%s)(networkAddress=9\\23\\00\\00%s))", \ -- bufc, bufc); -- strncat(bufb, bufd, ln); -+ const int ln = snprintf(bufd, sizeof(bufd), "(networkAddress=8\\23\\00\\00%s)(networkAddress=9\\23\\00\\00%s)", bufc, bufc); -+ if (ln < 0 || static_cast<size_t>(ln) >= sizeof(bufd)) -+ return LDAP_ERR_OOB; -+ - } else if (l->status & LDAP_IPV6_S) { -- int ln = snprintf(bufd, sizeof(bufd), "(networkAddress=10\\23\\00\\00%s)(networkAddress=11\\23\\00\\00%s))", \ -- bufc, bufc); -- strncat(bufb, bufd, ln); -- } else -- strncat(bufb, ")", 1); -- strncat(bufa, bufb, strlen(bufb)); -- strncat(bufa, ")", 1); -+ const int ln = snprintf(bufd, sizeof(bufd), "(networkAddress=10\\23\\00\\00%s)(networkAddress=11\\23\\00\\00%s)", bufc, bufc); -+ if (ln < 0 || static_cast<size_t>(ln) >= sizeof(bufd)) -+ return LDAP_ERR_OOB; -+ } -+ const int x = snprintf(bufa, sizeof(bufa), "(&%s(|(networkAddress=1\\23%s)%s))", edui_conf.search_filter, bufc, bufd); -+ if (x < 0 || static_cast<size_t>(x) >= sizeof(bufa)) -+ return LDAP_ERR_OOB; -+ - } else { - /* Needs groupMembership= to add... */ -- xstrncpy(bufa, "(&(&", sizeof(bufa)); -- strncat(bufa, edui_conf.search_filter, strlen(edui_conf.search_filter)); - /* groupMembership -- NOTE: Squid *MUST* provide "cn=" from squid.conf */ -- snprintf(bufg, sizeof(bufg), "(groupMembership=%s", group); - if ((l->basedn[0] != '\0') && (strstr(group, l->basedn) == NULL)) { -- strncat(bufg, ",", 1); -- strncat(bufg, l->basedn, strlen(l->basedn)); -+ const int ln = snprintf(bufg, sizeof(bufg), ",%s", l->basedn); -+ if (ln < 0 || static_cast<size_t>(ln) >= sizeof(bufd)) -+ return LDAP_ERR_OOB; - } -- strncat(bufg, ")", 1); -- strncat(bufa, bufg, strlen(bufg)); - /* networkAddress */ -- snprintf(bufb, sizeof(bufb), "(|(networkAddress=1\\23%s)", bufc); - if (l->status & LDAP_IPV4_S) { -- int ln = snprintf(bufd, sizeof(bufd), "(networkAddress=8\\23\\00\\00%s)(networkAddress=9\\23\\00\\00%s))", \ -- bufc, bufc); -- strncat(bufb, bufd, ln); -+ const int ln = snprintf(bufd, sizeof(bufd), "(networkAddress=8\\23\\00\\00%s)(networkAddress=9\\23\\00\\00%s)", bufc, bufc); -+ if (ln < 0 || static_cast<size_t>(ln) >= sizeof(bufd)) -+ return LDAP_ERR_OOB; - } else if (l->status & LDAP_IPV6_S) { -- int ln = snprintf(bufd, sizeof(bufd), "(networkAddress=10\\23\\00\\00%s)(networkAddress=11\\23\\00\\00%s))", \ -- bufc, bufc); -- strncat(bufb, bufd, ln); -- } else -- strncat(bufb, ")", 1); -- strncat(bufa, bufb, strlen(bufb)); -- strncat(bufa, "))", 2); -+ const int ln = snprintf(bufd, sizeof(bufd), "(networkAddress=10\\23\\00\\00%s)(networkAddress=11\\23\\00\\00%s)", bufc, bufc); -+ if (ln < 0 || static_cast<size_t>(ln) >= sizeof(bufd)) -+ return LDAP_ERR_OOB; -+ } -+ const int x = snprintf(bufa, sizeof(bufa), "(&(&%s(groupMembership=%s%s)(|(networkAddress=1\\23%s)%s)))", edui_conf.search_filter, group, bufg, bufc, bufd); -+ if (x < 0 || static_cast<size_t>(x) >= sizeof(bufa)) -+ return LDAP_ERR_OOB; - } - s = strlen(bufa); - xstrncpy(l->search_filter, bufa, sizeof(l->search_filter)); -@@ -1212,10 +1100,10 @@ static int - SearchIPLDAP(edui_ldap_t *l) - { - ber_len_t i, x; -- ber_len_t j, k; -- ber_len_t y, z; -- int c; -- char bufa[EDUI_MAXLEN], bufb[EDUI_MAXLEN], hexc[4]; -+ ber_len_t j; -+ ber_len_t z; -+ char bufa[EDUI_MAXLEN]; -+ char bufb[EDUI_MAXLEN]; - LDAPMessage *ent; - if (l == NULL) return LDAP_ERR_NULL; - if (l->lp == NULL) return LDAP_ERR_POINTER; -@@ -1273,19 +1161,11 @@ SearchIPLDAP(edui_ldap_t *l) - /* bufa is the address, just compare it */ - if (!(l->status & LDAP_IPV4_S) || (l->status & LDAP_IPV6_S)) - break; /* Not looking for IPv4 */ -- for (k = 0; k < z; ++k) { -- c = (int) bufa[k]; -- if (c < 0) -- c = c + 256; -- int hlen = snprintf(hexc, sizeof(hexc), "%02X", c); -- if (k == 0) -- xstrncpy(bufb, hexc, sizeof(bufb)); -- else -- strncat(bufb, hexc, hlen); -- } -- y = strlen(bufb); -+ const int blen = makeHexString(bufb, sizeof(bufb), bufa, z); -+ if (blen < 0) -+ return blen; - /* Compare value with IP */ -- if (memcmp(l->search_ip, bufb, y) == 0) { -+ if (memcmp(l->search_ip, bufb, blen) == 0) { - /* We got a match! - Scan 'ber' for 'cn' values */ - z = ldap_count_values_len(ber); - for (j = 0; j < z; ++j) { -@@ -1308,19 +1188,11 @@ SearchIPLDAP(edui_ldap_t *l) - /* bufa + 2 is the address (skip 2 digit port) */ - if (!(l->status & LDAP_IPV4_S) || (l->status & LDAP_IPV6_S)) - break; /* Not looking for IPv4 */ -- for (k = 2; k < z; ++k) { -- c = (int) bufa[k]; -- if (c < 0) -- c = c + 256; -- int hlen = snprintf(hexc, sizeof(hexc), "%02X", c); -- if (k == 2) -- xstrncpy(bufb, hexc, sizeof(bufb)); -- else -- strncat(bufb, hexc, hlen); -- } -- y = strlen(bufb); -+ const int blen = makeHexString(bufb, sizeof(bufb), &bufa[2], z); -+ if (blen < 0) -+ return blen; - /* Compare value with IP */ -- if (memcmp(l->search_ip, bufb, y) == 0) { -+ if (memcmp(l->search_ip, bufb, blen) == 0) { - /* We got a match! - Scan 'ber' for 'cn' values */ - z = ldap_count_values_len(ber); - for (j = 0; j < z; ++j) { -@@ -1343,19 +1215,11 @@ SearchIPLDAP(edui_ldap_t *l) - /* bufa + 2 is the address (skip 2 digit port) */ - if (!(l->status & LDAP_IPV6_S)) - break; /* Not looking for IPv6 */ -- for (k = 2; k < z; ++k) { -- c = (int) bufa[k]; -- if (c < 0) -- c = c + 256; -- int hlen = snprintf(hexc, sizeof(hexc), "%02X", c); -- if (k == 2) -- xstrncpy(bufb, hexc, sizeof(bufb)); -- else -- strncat(bufb, hexc, hlen); -- } -- y = strlen(bufb); -+ const int blen = makeHexString(bufb, sizeof(bufb), &bufa[2], z); -+ if (blen < 0) -+ return blen; - /* Compare value with IP */ -- if (memcmp(l->search_ip, bufb, y) == 0) { -+ if (memcmp(l->search_ip, bufb, blen) == 0) { - /* We got a match! - Scan 'ber' for 'cn' values */ - z = ldap_count_values_len(ber); - for (j = 0; j < z; ++j) { diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-splay.cc-fix-bind-is-not-a-member-of-std.patch b/external/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-splay.cc-fix-bind-is-not-a-member-of-std.patch new file mode 100644 index 00000000..fbbad159 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-splay.cc-fix-bind-is-not-a-member-of-std.patch @@ -0,0 +1,31 @@ +From 1def5b4278d97f197520d23c1dce52f93a1b2f46 Mon Sep 17 00:00:00 2001 +From: Andrej Valek <andrej.valek@siemens.com> +Date: Tue, 9 Apr 2019 09:40:30 +0200 +Subject: [PATCH] splay.cc: fix bind is not a member of std + +fix +| ../../squid-4.6/test-suite/splay.cc:134:28: error: 'bind' is not a member of 'std' +| auto nextRandom = std::bind (distribution, generator); +| ^~~~ +| ../../squid-4.6/test-suite/splay.cc:134:28: note: 'std::bind' is defined in header '<functional>'; did you forget to '#include <functional>'? + +Signed-off-by: Andrej Valek <andrej.valek@siemens.com> +--- + test-suite/splay.cc | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/test-suite/splay.cc b/test-suite/splay.cc +index f71b337..4e21adc 100644 +--- a/test-suite/splay.cc ++++ b/test-suite/splay.cc +@@ -20,6 +20,7 @@ + #include <unistd.h> + #endif + #include <random> ++#include <functional> + + class intnode + { +-- +2.11.0 + diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-tools.cc-fixed-unused-result-warning.patch b/external/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-tools.cc-fixed-unused-result-warning.patch index 8ea55d0e..f267875e 100644 --- a/external/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-tools.cc-fixed-unused-result-warning.patch +++ b/external/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-tools.cc-fixed-unused-result-warning.patch @@ -1,4 +1,4 @@ -From faaa796a138cbd5033b1e53f33faac0cf4162bf5 Mon Sep 17 00:00:00 2001 +From 86dae8010310d13bd2a2beb006b4085d06ae1556 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Sun, 25 Jun 2017 00:59:24 -0700 Subject: [PATCH] tools.cc: fixed unused-result warning @@ -12,21 +12,23 @@ fix Signed-off-by: Khem Raj <raj.khem@gmail.com> --- - src/tools.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + src/tools.cc | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tools.cc b/src/tools.cc -index 8137a03..843e266 100644 +index 5829574..19f0836 100644 --- a/src/tools.cc +++ b/src/tools.cc -@@ -612,8 +612,8 @@ enter_suid(void) - if (setresuid((uid_t)-1, 0, (uid_t)-1) < 0) - debugs (21, 3, "enter_suid: setresuid failed: " << xstrerror ()); +@@ -581,8 +581,10 @@ enter_suid(void) + debugs (21, 3, "enter_suid: setresuid failed: " << xstrerr(xerrno)); + } #else - - setuid(0); -+ if (setuid(0) < 0) -+ debugs(50, DBG_IMPORTANT, "WARNING: no_suid: setuid(0): " << xstrerror()); ++ if (setuid(0) < 0) { ++ const auto xerrno = errno; ++ debugs(50, DBG_IMPORTANT, "WARNING: no_suid: setuid(0): " << xstrerr(xerrno)); ++ } #endif #if HAVE_PRCTL && defined(PR_SET_DUMPABLE) /* Set Linux DUMPABLE flag */ diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/squid/files/0002-smblib-fix-buffer-over-read.patch b/external/meta-openembedded/meta-networking/recipes-daemons/squid/files/0002-smblib-fix-buffer-over-read.patch deleted file mode 100644 index c8f0c47b..00000000 --- a/external/meta-openembedded/meta-networking/recipes-daemons/squid/files/0002-smblib-fix-buffer-over-read.patch +++ /dev/null @@ -1,39 +0,0 @@ -From a6b1e0fd14311587186e40d09bff5c8c3aada2e4 Mon Sep 17 00:00:00 2001 -From: Amos Jeffries <squid3@treenet.co.nz> -Date: Sat, 25 Jul 2015 05:53:16 -0700 -Subject: [PATCH] smblib: fix buffer over-read - -When parsing SMB LanManager packets with invalid protocol ID and the -default set of Squid supported protocols. It may access memory outside -the buffer storing protocol names. - -smblib is only used by already deprecated helpers which are deprecated -due to far more significant NTLM protocol issues. It will also only -result in packets being rejected later with invalid protocol names. So -this is a minor bug rather than a vulnerability. - - Detected by Coverity Scan. Issue 1256165 ---- -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Upstream-Status: Backport - - lib/smblib/smblib-util.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/lib/smblib/smblib-util.c b/lib/smblib/smblib-util.c -index 6139ae2..e722cbb 100644 ---- a/lib/smblib/smblib-util.c -+++ b/lib/smblib/smblib-util.c -@@ -204,7 +204,11 @@ int SMB_Figure_Protocol(const char *dialects[], int prot_index) - { - int i; - -- if (dialects == SMB_Prots) { /* The jobs is easy, just index into table */ -+ // prot_index may be a value outside the table SMB_Types[] -+ // which holds data at offsets 0 to 11 -+ int ourType = (prot_index < 0 || prot_index > 11); -+ -+ if (ourType && dialects == SMB_Prots) { /* The jobs is easy, just index into table */ - - return(SMB_Types[prot_index]); - } else { /* Search through SMB_Prots looking for a match */ diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/squid/files/Fix-flawed-dynamic-ldb-link-test-in-configure.patch b/external/meta-openembedded/meta-networking/recipes-daemons/squid/files/Fix-flawed-dynamic-ldb-link-test-in-configure.patch index 25f68aff..1516bb01 100644 --- a/external/meta-openembedded/meta-networking/recipes-daemons/squid/files/Fix-flawed-dynamic-ldb-link-test-in-configure.patch +++ b/external/meta-openembedded/meta-networking/recipes-daemons/squid/files/Fix-flawed-dynamic-ldb-link-test-in-configure.patch @@ -1,4 +1,4 @@ -From b4943594654cd340b95aabdc2f3750a4705cc0de Mon Sep 17 00:00:00 2001 +From b73b802282bf95d214c86ba943c5765ba6930bc1 Mon Sep 17 00:00:00 2001 From: Jim Somerville <Jim.Somerville@windriver.com> Date: Mon, 21 Oct 2013 12:50:44 -0400 Subject: [PATCH] Fix flawed dynamic -ldb link test in configure @@ -12,19 +12,17 @@ about why and setting the need for -ldb incorrectly. Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com> --- - configure.ac | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) + configure.ac | 10 ++++++++++ + 1 file changed, 10 insertions(+) diff --git a/configure.ac b/configure.ac -index 57cd1ac..3827222 100644 +index d2f7feb..c7ae568 100644 --- a/configure.ac +++ b/configure.ac -@@ -3229,8 +3229,16 @@ AC_CHECK_DECL(dbopen,,,[ - #include <db.h> - #endif]) +@@ -3235,6 +3235,16 @@ case "$host" in + ;; + esac --dnl 1.85 --SQUID_CHECK_DBOPEN_NEEDS_LIBDB +if test "x$ac_cv_have_decl_dbopen" = "xyes"; then + dnl 1.85 + SQUID_CHECK_DBOPEN_NEEDS_LIBDB @@ -35,6 +33,6 @@ index 57cd1ac..3827222 100644 + # dynamic compile/link test. + ac_cv_dbopen_libdb="yes" +fi - if test "x$ac_cv_dbopen_libdb" = "xyes"; then - LIB_DB="-ldb" - fi + dnl System-specific library modifications + dnl + case "$host" in diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/squid/files/Skip-AC_RUN_IFELSE-tests.patch b/external/meta-openembedded/meta-networking/recipes-daemons/squid/files/Skip-AC_RUN_IFELSE-tests.patch index 6a335254..dd83b62e 100644 --- a/external/meta-openembedded/meta-networking/recipes-daemons/squid/files/Skip-AC_RUN_IFELSE-tests.patch +++ b/external/meta-openembedded/meta-networking/recipes-daemons/squid/files/Skip-AC_RUN_IFELSE-tests.patch @@ -1,4 +1,4 @@ -From a85311965707ba2fa78f7ce044e6f61e65e66fd0 Mon Sep 17 00:00:00 2001 +From e4778299a3e49a634d2c7fe4fd9ac77777e829e3 Mon Sep 17 00:00:00 2001 From: Jim Somerville <Jim.Somerville@windriver.com> Date: Tue, 14 Oct 2014 02:56:08 -0400 Subject: [PATCH] Skip AC_RUN_IFELSE tests @@ -17,7 +17,7 @@ Signed-off-by: Jackie Huang <jackie.huang@windriver.com> 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/acinclude/krb5.m4 b/acinclude/krb5.m4 -index 5c83d88..c264118 100644 +index ad0ba60..4477446 100644 --- a/acinclude/krb5.m4 +++ b/acinclude/krb5.m4 @@ -61,7 +61,15 @@ main(void) @@ -38,10 +38,10 @@ index 5c83d88..c264118 100644 ]) ]) dnl SQUID_CHECK_KRB5_HEIMDAL_BROKEN_KRB5_H diff --git a/acinclude/lib-checks.m4 b/acinclude/lib-checks.m4 -index c4874da..ba72982 100644 +index 7624b56..b449c5a 100644 --- a/acinclude/lib-checks.m4 +++ b/acinclude/lib-checks.m4 -@@ -177,7 +177,9 @@ AC_DEFUN([SQUID_CHECK_OPENSSL_CONST_SSL_METHOD],[ +@@ -217,7 +217,9 @@ AC_DEFUN([SQUID_CHECK_OPENSSL_CONST_SSL_METHOD],[ [ AC_MSG_RESULT([no]) ], @@ -51,8 +51,8 @@ index c4874da..ba72982 100644 + ]) SQUID_STATE_ROLLBACK(check_const_SSL_METHOD) - ] -@@ -265,7 +267,9 @@ AC_DEFUN([SQUID_CHECK_OPENSSL_TXTDB],[ + ]) +@@ -377,7 +379,9 @@ AC_DEFUN([SQUID_CHECK_OPENSSL_TXTDB],[ AC_MSG_RESULT([yes]) AC_DEFINE(SQUID_USE_SSLLHASH_HACK, 1) ], diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/squid/files/set_sysroot_patch.patch b/external/meta-openembedded/meta-networking/recipes-daemons/squid/files/set_sysroot_patch.patch index e990480a..124e0449 100644 --- a/external/meta-openembedded/meta-networking/recipes-daemons/squid/files/set_sysroot_patch.patch +++ b/external/meta-openembedded/meta-networking/recipes-daemons/squid/files/set_sysroot_patch.patch @@ -17,25 +17,25 @@ diff --git a/configure.ac b/configure.ac index 504a844..ff4688c 100644 --- a/configure.ac +++ b/configure.ac -@@ -974,15 +974,15 @@ if test "x$squid_opt_use_esi" = "xyes" -a "x$with_libxml2" != "xno" ; then - dnl Find the main header and include path... - AC_CACHE_CHECK([location of libxml2 include files], [ac_cv_libxml2_include], [ - AC_CHECK_HEADERS([libxml/parser.h], [], [ -- AC_MSG_NOTICE([Testing in /usr/include/libxml2]) -+ AC_MSG_NOTICE([Testing in $SYSROOT/usr/include/libxml2]) - SAVED_CPPFLAGS="$CPPFLAGS" -- CPPFLAGS="-I/usr/include/libxml2 $CPPFLAGS" -+ CPPFLAGS="-I$SYSROOT/usr/include/libxml2 $CPPFLAGS" - unset ac_cv_header_libxml_parser_h -- AC_CHECK_HEADERS([libxml/parser.h], [ac_cv_libxml2_include="-I/usr/include/libxml2"], [ -- AC_MSG_NOTICE([Testing in /usr/local/include/libxml2]) -- CPPFLAGS="-I/usr/local/include/libxml2 $SAVED_CPPFLAGS" -+ AC_CHECK_HEADERS([libxml/parser.h], [ac_cv_libxml2_include="-I$SYSROOT/usr/include/libxml2"], [ -+ AC_MSG_NOTICE([Testing in $SYSROOT/usr/local/include/libxml2]) -+ CPPFLAGS="-I$SYSROOT/usr/local/include/libxml2 $SAVED_CPPFLAGS" +@@ -931,15 +931,15 @@ if test "x$squid_opt_use_esi" = "xyes" -a "x$with_libxml2" != "xno" ; then + dnl Find the main header and include path... + AC_CACHE_CHECK([location of libxml2 include files], [ac_cv_libxml2_include], [ + AC_CHECK_HEADERS([libxml/parser.h], [], [ +- AC_MSG_NOTICE([Testing in /usr/include/libxml2]) ++ AC_MSG_NOTICE([Testing in $SYSROOT/usr/include/libxml2]) + SAVED_CPPFLAGS="$CPPFLAGS" +- CPPFLAGS="-I/usr/include/libxml2 $CPPFLAGS" ++ CPPFLAGS="-I$SYSROOT/usr/include/libxml2 $CPPFLAGS" unset ac_cv_header_libxml_parser_h -- AC_CHECK_HEADERS([libxml/parser.h], [ac_cv_libxml2_include="-I/usr/local/include/libxml2"], [ -+ AC_CHECK_HEADERS([libxml/parser.h], [ac_cv_libxml2_include="-I$SYSROOT/usr/local/include/libxml2"], [ - AC_MSG_NOTICE([Failed to find libxml2 header file libxml/parser.h]) +- AC_CHECK_HEADERS([libxml/parser.h], [LIBXML2_CFLAGS="$LIBXML2_CFLAGS -I/usr/include/libxml2"], [ +- AC_MSG_NOTICE([Testing in /usr/local/include/libxml2]) +- CPPFLAGS="-I/usr/local/include/libxml2 $SAVED_CPPFLAGS" ++ AC_CHECK_HEADERS([libxml/parser.h], [LIBXML2_CFLAGS="$LIBXML2_CFLAGS -I$SYSROOT/usr/include/libxml2"], [ ++ AC_MSG_NOTICE([Testing in $SYSROOT/usr/local/include/libxml2]) ++ CPPFLAGS="-I$SYSROOT/usr/local/include/libxml2 $SAVED_CPPFLAGS" + unset ac_cv_header_libxml_parser_h +- AC_CHECK_HEADERS([libxml/parser.h], [LIBXML2_CFLAGS="$LIBXML2_CFLAGS -I/usr/local/include/libxml2"], [ ++ AC_CHECK_HEADERS([libxml/parser.h], [LIBXML2_CFLAGS="$LIBXML2_CFLAGS -I$SYSROOT/usr/local/include/libxml2"], [ + AC_MSG_NOTICE([Failed to find libxml2 header file libxml/parser.h]) + ]) ]) - ]) diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/squid/files/squid-use-serial-tests-config-needed-by-ptest.patch b/external/meta-openembedded/meta-networking/recipes-daemons/squid/files/squid-use-serial-tests-config-needed-by-ptest.patch index 9c75f17e..732cf17f 100644 --- a/external/meta-openembedded/meta-networking/recipes-daemons/squid/files/squid-use-serial-tests-config-needed-by-ptest.patch +++ b/external/meta-openembedded/meta-networking/recipes-daemons/squid/files/squid-use-serial-tests-config-needed-by-ptest.patch @@ -1,4 +1,4 @@ -From 9bcec221a2bb438d8a9ed59aed846ffe3be9cffa Mon Sep 17 00:00:00 2001 +From 3d881c112bba765731d581194aae95651819b715 Mon Sep 17 00:00:00 2001 From: Jackie Huang <jackie.huang@windriver.com> Date: Tue, 19 Jul 2016 01:56:23 -0400 Subject: [PATCH] squid: use serial-tests config needed by ptest @@ -15,15 +15,15 @@ Signed-off-by: Jackie Huang <jackie.huang@windriver.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac -index 3827222..504a844 100644 +index c7ae568..5e1454e 100644 --- a/configure.ac +++ b/configure.ac @@ -10,7 +10,7 @@ AC_PREREQ(2.61) AC_CONFIG_HEADERS([include/autoconf.h]) AC_CONFIG_AUX_DIR(cfgaux) AC_CONFIG_SRCDIR([src/main.cc]) --AM_INIT_AUTOMAKE([tar-ustar nostdinc subdir-objects]) -+AM_INIT_AUTOMAKE([tar-ustar nostdinc subdir-objects serial-tests]) +-AM_INIT_AUTOMAKE([tar-ustar nostdinc subdir-objects dist-xz]) ++AM_INIT_AUTOMAKE([tar-ustar nostdinc subdir-objects dist-xz serial-tests]) AC_REVISION($Revision$)dnl AC_PREFIX_DEFAULT(/usr/local/squid) AM_MAINTAINER_MODE diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/squid/squid_3.5.27.bb b/external/meta-openembedded/meta-networking/recipes-daemons/squid/squid_4.9.bb index 1557c4b2..19949acd 100644 --- a/external/meta-openembedded/meta-networking/recipes-daemons/squid/squid_3.5.27.bb +++ b/external/meta-openembedded/meta-networking/recipes-daemons/squid/squid_4.9.bb @@ -12,7 +12,7 @@ LICENSE = "GPLv2+" MAJ_VER = "${@oe.utils.trim_version("${PV}", 1)}" MIN_VER = "${@oe.utils.trim_version("${PV}", 2)}" -SRC_URI = "http://www.squid-cache.org/Versions/v${MAJ_VER}/${MIN_VER}/${BPN}-${PV}.tar.bz2 \ +SRC_URI = "http://www.squid-cache.org/Versions/v${MAJ_VER}/${BPN}-${PV}.tar.bz2 \ file://Set-up-for-cross-compilation.patch \ file://Skip-AC_RUN_IFELSE-tests.patch \ file://Fix-flawed-dynamic-ldb-link-test-in-configure.patch \ @@ -23,34 +23,36 @@ SRC_URI = "http://www.squid-cache.org/Versions/v${MAJ_VER}/${MIN_VER}/${BPN}-${P file://squid-don-t-do-squid-conf-tests-at-build-time.patch \ file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch \ file://0001-tools.cc-fixed-unused-result-warning.patch \ - file://0001-Bug-4843-pt1-ext_edirectory_userip_acl-refactoring-f.patch \ - file://0002-smblib-fix-buffer-over-read.patch \ + file://0001-splay.cc-fix-bind-is-not-a-member-of-std.patch \ " SRC_URI_remove_toolchain-clang = "file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch" -SRC_URI[md5sum] = "c17a3ed3a40cd59c23f48b8539dafcd8" -SRC_URI[sha256sum] = "467da134eaf0f7962ba5881793d106772fb05fefa4aea7d9569eec0412c52433" +SRC_URI[md5sum] = "b315d0dce37627dfe61eec7f5304baaf" +SRC_URI[sha256sum] = "0f5829d878002147e7c4d9b8901c2c3c051693465e82e45cef9ab0e226e3e729" -LIC_FILES_CHKSUM = "file://COPYING;md5=c492e2d6d32ec5c1aad0e0609a141ce9 \ - file://errors/COPYRIGHT;md5=8861130fae91400bcf99b66f133172b3 \ - " -DEPENDS = "libtool krb5 openldap db cyrus-sasl openssl expat libxml2" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://errors/COPYRIGHT;md5=19cc4dd146f397e72f3ff6f9f58fbfbe \ + " +DEPENDS = "libtool krb5 openldap db cyrus-sasl" inherit autotools pkgconfig useradd ptest perlnative +LDFLAGS_append_mipsarch = " -latomic" +LDFLAGS_append_powerpc = " -latomic" +LDFLAGS_append_riscv64 = " -latomic" +LDFLAGS_append_riscv32 = " -latomic" + USERADD_PACKAGES = "${PN}" USERADD_PARAM_${PN} = "--system --no-create-home --home-dir /var/run/squid --shell /bin/false --user-group squid" -PACKAGECONFIG ??= "${@bb.utils.contains('TARGET_ARCH', 'powerpc', 'noatomics', '', d)} \ - ${@bb.utils.contains('TARGET_ARCH', 'mips', 'noatomics', '', d)} \ - ${@bb.utils.contains('TARGET_ARCH', 'mipsel', 'noatomics', '', d)} \ - ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ " PACKAGECONFIG[libnetfilter-conntrack] = "--with-netfilter-conntrack=${includedir}, --without-netfilter-conntrack, libnetfilter-conntrack" -PACKAGECONFIG[noatomics] = "squid_cv_gnu_atomics=no,squid_cv_gnu_atomics=yes,," PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," PACKAGECONFIG[werror] = "--enable-strict-error-checking,--disable-strict-error-checking," +PACKAGECONFIG[esi] = "--enable-esi,--disable-esi,expat libxml2" +PACKAGECONFIG[ssl] = "--with-openssl=yes,--with-openssl=no,openssl" BASIC_AUTH = "DB SASL LDAP" diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/tftp-hpa_5.2.bb b/external/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/tftp-hpa_5.2.bb index 132972b3..413950be 100644 --- a/external/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/tftp-hpa_5.2.bb +++ b/external/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/tftp-hpa_5.2.bb @@ -82,10 +82,15 @@ INITSCRIPT_PACKAGES = "tftp-hpa-server" INITSCRIPT_NAME = "tftpd-hpa" INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 20 1 ." +ALTERNATIVE_${PN}-doc = "tftpd.8 tftp.1" +ALTERNATIVE_LINK_NAME[tftpd.8] = "${mandir}/man8/tftpd.8" +ALTERNATIVE_LINK_NAME[tftp.1] = "${mandir}/man1/tftp.1" + ALTERNATIVE_${PN} = "tftp" ALTERNATIVE_TARGET[tftp] = "${bindir}/tftp-hpa" ALTERNATIVE_PRIORITY = "60" + SYSTEMD_PACKAGES = "tftp-hpa-server" SYSTEMD_SERVICE_tftp-hpa-server = "tftpd-hpa.socket tftpd-hpa.service" SYSTEMD_AUTO_ENABLE_tftp-hpa-server = "enable" diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/vblade/vblade_22.bb b/external/meta-openembedded/meta-networking/recipes-daemons/vblade/vblade_22.bb index a51a8c31..a52a1e92 100644 --- a/external/meta-openembedded/meta-networking/recipes-daemons/vblade/vblade_22.bb +++ b/external/meta-openembedded/meta-networking/recipes-daemons/vblade/vblade_22.bb @@ -4,6 +4,8 @@ SECTION = "admin" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" +UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/aoetools/files/vblade/" + SRC_URI = "${SOURCEFORGE_MIRROR}/aoetools/${BP}.tar.gz \ file://cross.patch \ file://makefile-add-ldflags.patch \ diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/0001-vsftpd-allow-syscalls-in-the-seccomp-sandbox.patch b/external/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/0001-vsftpd-allow-syscalls-in-the-seccomp-sandbox.patch new file mode 100644 index 00000000..7573c967 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/0001-vsftpd-allow-syscalls-in-the-seccomp-sandbox.patch @@ -0,0 +1,46 @@ +From dd353303f62d1dfe32cb000e482616b021708fbe Mon Sep 17 00:00:00 2001 +From: Mingli Yu <mingli.yu@windriver.com> +Date: Thu, 29 Nov 2018 00:47:34 -0800 +Subject: [PATCH] vsftpd: allow syscalls in the seccomp sandbox + +* Allow sysinfo() and getdents64 in the seccomp + sandbox otherwise comes below OOPS: priv_sock_get_cmd + as the syscall sysinfo() and getdents64 not allowed + +root@qemux86-64:~# tnftp 192.168.1.1 +Connected to 192.168.1.1. +220 (vsFTPd 3.0.3) +Name (192.168.1.1:root): anonymous +331 Please specify the password. +Password: +230 Login successful. +Remote system type is UNIX. +Using binary mode to transfer files. +ftp> prompt +Interactive mode off. +ftp> mget small* +OOPS: priv_sock_get_cmd + +Upstream-Status: Pending + +Signed-off-by: Mingli Yu <mingli.yu@windriver.com> +--- + seccompsandbox.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/seccompsandbox.c b/seccompsandbox.c +index 2c350a9..377c50e 100644 +--- a/seccompsandbox.c ++++ b/seccompsandbox.c +@@ -409,6 +409,8 @@ seccomp_sandbox_setup_postlogin(const struct vsf_session* p_sess) + allow_nr(__NR_getcwd); + allow_nr(__NR_chdir); + allow_nr(__NR_getdents); ++ allow_nr(__NR_getdents64); ++ allow_nr(__NR_sysinfo); + /* Misc */ + allow_nr(__NR_umask); + +-- +2.17.1 + diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/0001-vsftpd-allow-sysinfo-in-the-seccomp-sandbox.patch b/external/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/0001-vsftpd-allow-sysinfo-in-the-seccomp-sandbox.patch deleted file mode 100644 index c6c0f80a..00000000 --- a/external/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/0001-vsftpd-allow-sysinfo-in-the-seccomp-sandbox.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 9c4826c19f04da533886209361a2caddf582d65c Mon Sep 17 00:00:00 2001 -From: Mingli Yu <Mingli.Yu@windriver.com> -Date: Tue, 6 Sep 2016 17:17:44 +0800 -Subject: [PATCH] vsftpd: allow sysinfo() in the seccomp sandbox - -Upstream-Status: Pending - -* Allow sysinfo() in the seccomp sandbox otherwise - comes below OOPS: priv_sock_get_cmd as the syscall - sysinfo() not allowed - -tnftp 192.168.1.1 -Connected to 192.168.1.1. -220 (vsFTPd 3.0.3) -Name (192.168.1.1:root): anonymous -331 Please specify the password. -Password: -230 Login successful. -Remote system type is UNIX. -Using binary mode to transfer files. -ftp> prompt -Interactive mode off. -ftp> mget small* -OOPS: priv_sock_get_cmd - -Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> - ---- - seccompsandbox.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/seccompsandbox.c b/seccompsandbox.c -index 2c350a9..67d9ca5 100644 ---- a/seccompsandbox.c -+++ b/seccompsandbox.c -@@ -409,6 +409,7 @@ seccomp_sandbox_setup_postlogin(const struct vsf_session* p_sess) - allow_nr(__NR_getcwd); - allow_nr(__NR_chdir); - allow_nr(__NR_getdents); -+ allow_nr(__NR_sysinfo); - /* Misc */ - allow_nr(__NR_umask); - diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.3.bb b/external/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.3.bb index 2e3e0e88..df0d7f45 100644 --- a/external/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.3.bb +++ b/external/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.3.bb @@ -18,7 +18,7 @@ SRC_URI = "https://security.appspot.com/downloads/vsftpd-${PV}.tar.gz \ file://volatiles.99_vsftpd \ file://vsftpd.service \ file://vsftpd-2.1.0-filter.patch \ - file://0001-vsftpd-allow-sysinfo-in-the-seccomp-sandbox.patch \ + file://0001-vsftpd-allow-syscalls-in-the-seccomp-sandbox.patch \ ${@bb.utils.contains('PACKAGECONFIG', 'tcp-wrappers', 'file://vsftpd-tcp_wrappers-support.patch', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '', '${NOPAM_SRC}', d)} \ file://0001-sysdeputil.c-Fix-with-musl-which-does-not-have-utmpx.patch \ |