added my Recipes
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
From c5caf52b9ed79da8916ef5722efe6df61a856e2f Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Tue, 28 Mar 2017 20:09:12 -0700
|
||||
Subject: [PATCH] sysdeputil.c: Fix with musl which does not have utmpx
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
---
|
||||
sysdeputil.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/sysdeputil.c b/sysdeputil.c
|
||||
index 06f01f4..a8cff3b 100644
|
||||
--- a/sysdeputil.c
|
||||
+++ b/sysdeputil.c
|
||||
@@ -58,7 +58,9 @@
|
||||
#define VSF_SYSDEP_HAVE_SHADOW
|
||||
#define VSF_SYSDEP_HAVE_USERSHELL
|
||||
#define VSF_SYSDEP_HAVE_LIBCAP
|
||||
-#define VSF_SYSDEP_HAVE_UTMPX
|
||||
+#if defined(__GLIBC__)
|
||||
+ #define VSF_SYSDEP_HAVE_UTMPX
|
||||
+#endif
|
||||
|
||||
#define __USE_GNU
|
||||
#include <utmpx.h>
|
||||
@@ -0,0 +1,52 @@
|
||||
From bab3f62f1fd5b7c2ab197f4311ad191bf18816b9 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
Date: Mon, 20 Feb 2012 13:51:49 +0000
|
||||
Subject: [PATCH] Use DESTDIR within install to allow installing under a prefix
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
|
||||
---
|
||||
Makefile | 26 +++++++++++++-------------
|
||||
1 file changed, 13 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index c63ed1b..9e4f35f 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -29,21 +29,21 @@ vsftpd: $(OBJS)
|
||||
$(CC) -o vsftpd $(OBJS) $(LINK) $(LDFLAGS) $(LIBS)
|
||||
|
||||
install:
|
||||
- if [ -x /usr/local/sbin ]; then \
|
||||
- $(INSTALL) -m 755 vsftpd /usr/local/sbin/vsftpd; \
|
||||
+ if [ -x ${DESTDIR}/usr/local/sbin ]; then \
|
||||
+ $(INSTALL) -m 755 vsftpd ${DESTDIR}/usr/local/sbin/vsftpd; \
|
||||
else \
|
||||
- $(INSTALL) -m 755 vsftpd /usr/sbin/vsftpd; fi
|
||||
- if [ -x /usr/local/man ]; then \
|
||||
- $(INSTALL) -m 644 vsftpd.8 /usr/local/man/man8/vsftpd.8; \
|
||||
- $(INSTALL) -m 644 vsftpd.conf.5 /usr/local/man/man5/vsftpd.conf.5; \
|
||||
- elif [ -x /usr/share/man ]; then \
|
||||
- $(INSTALL) -m 644 vsftpd.8 /usr/share/man/man8/vsftpd.8; \
|
||||
- $(INSTALL) -m 644 vsftpd.conf.5 /usr/share/man/man5/vsftpd.conf.5; \
|
||||
+ $(INSTALL) -m 755 vsftpd ${DESTDIR}/usr/sbin/vsftpd; fi
|
||||
+ if [ -x ${DESTDIR}/usr/local/man ]; then \
|
||||
+ $(INSTALL) -m 644 vsftpd.8 ${DESTDIR}/usr/local/man/man8/vsftpd.8; \
|
||||
+ $(INSTALL) -m 644 vsftpd.conf.5 ${DESTDIR}/usr/local/man/man5/vsftpd.conf.5; \
|
||||
+ elif [ -x ${DESTDIR}/usr/share/man ]; then \
|
||||
+ $(INSTALL) -m 644 vsftpd.8 ${DESTDIR}/usr/share/man/man8/vsftpd.8; \
|
||||
+ $(INSTALL) -m 644 vsftpd.conf.5 ${DESTDIR}/usr/share/man/man5/vsftpd.conf.5; \
|
||||
else \
|
||||
- $(INSTALL) -m 644 vsftpd.8 /usr/man/man8/vsftpd.8; \
|
||||
- $(INSTALL) -m 644 vsftpd.conf.5 /usr/man/man5/vsftpd.conf.5; fi
|
||||
- if [ -x /etc/xinetd.d ]; then \
|
||||
- $(INSTALL) -m 644 xinetd.d/vsftpd /etc/xinetd.d/vsftpd; fi
|
||||
+ $(INSTALL) -m 644 vsftpd.8 ${DESTDIR}/usr/man/man8/vsftpd.8; \
|
||||
+ $(INSTALL) -m 644 vsftpd.conf.5 ${DESTDIR}/usr/man/man5/vsftpd.conf.5; fi
|
||||
+ if [ -x ${DESTDIR}/etc/xinetd.d ]; then \
|
||||
+ $(INSTALL) -m 644 xinetd.d/vsftpd ${DESTDIR}/etc/xinetd.d/vsftpd; fi
|
||||
|
||||
clean:
|
||||
rm -f *.o *.swp vsftpd
|
||||
@@ -0,0 +1,30 @@
|
||||
From 328799d0cd5c523ad7a814fefec16d8a84aa8010 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
Date: Tue, 16 Apr 2013 10:53:55 +0000
|
||||
Subject: [PATCH] Hardcode LIBS instead of using a script to determine
|
||||
available libs
|
||||
|
||||
We want to avoid this dynamic detection so we have a deterministic
|
||||
build.
|
||||
|
||||
Upstream-Status: Inappropriate [config]
|
||||
|
||||
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
|
||||
---
|
||||
Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 9e4f35f..3a5535d 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -8,7 +8,7 @@ CFLAGS = -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 \
|
||||
-D_FORTIFY_SOURCE=2 \
|
||||
#-pedantic -Wconversion
|
||||
|
||||
-LIBS = `./vsf_findlibs.sh`
|
||||
+LIBS = -lssl -lcrypto -lnsl -lresolv
|
||||
LINK = -Wl,-s
|
||||
LDFLAGS = -fPIE -pie -Wl,-z,relro -Wl,-z,now
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
From 261874ea47973ea156141185082252fc92081906 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
Date: Tue, 16 Apr 2013 10:53:55 +0000
|
||||
Subject: [PATCH] Disable stripping at link time
|
||||
|
||||
Upstream-Status: Inappropriate [config]
|
||||
|
||||
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
|
||||
---
|
||||
Makefile | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 3a5535d..e78019a 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -9,7 +9,6 @@ CFLAGS = -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 \
|
||||
#-pedantic -Wconversion
|
||||
|
||||
LIBS = -lssl -lcrypto -lnsl -lresolv
|
||||
-LINK = -Wl,-s
|
||||
LDFLAGS = -fPIE -pie -Wl,-z,relro -Wl,-z,now
|
||||
|
||||
OBJS = main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o \
|
||||
@@ -0,0 +1,26 @@
|
||||
From 71628ddc91b6efb9b922a3fcf8cc18522f5387be Mon Sep 17 00:00:00 2001
|
||||
From: "Roy.Li" <rongqing.li@windriver.com>
|
||||
Date: Mon, 20 Feb 2012 13:51:49 +0000
|
||||
Subject: [PATCH] Disable PAM
|
||||
|
||||
Upstream-Status: Inappropriate [config]
|
||||
|
||||
Signed-off-by: Roy.Li <rongqing.li@windriver.com>
|
||||
|
||||
---
|
||||
builddefs.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/builddefs.h b/builddefs.h
|
||||
index 0106d1a..f48a568 100644
|
||||
--- a/builddefs.h
|
||||
+++ b/builddefs.h
|
||||
@@ -2,7 +2,7 @@
|
||||
#define VSF_BUILDDEFS_H
|
||||
|
||||
#define VSF_BUILD_TCPWRAPPERS
|
||||
-#define VSF_BUILD_PAM
|
||||
+#undef VSF_BUILD_PAM
|
||||
#undef VSF_BUILD_SSL
|
||||
|
||||
#endif /* VSF_BUILDDEFS_H */
|
||||
@@ -0,0 +1,16 @@
|
||||
Disable PAM
|
||||
|
||||
Upstream-Status: Inappropriate [config]
|
||||
|
||||
diff -ur vsftpd-2.0.1_org/builddefs.h vsftpd-2.0.1_patch/builddefs.h
|
||||
--- vsftpd-2.0.1_org/builddefs.h 2004-07-02 16:36:59.000000000 +0200
|
||||
+++ vsftpd-2.0.1_patch/builddefs.h 2004-07-21 09:34:49.044900488 +0200
|
||||
@@ -2,7 +2,7 @@
|
||||
#define VSF_BUILDDEFS_H
|
||||
|
||||
#undef VSF_BUILD_TCPWRAPPERS
|
||||
-#define VSF_BUILD_PAM
|
||||
+#undef VSF_BUILD_PAM
|
||||
#undef VSF_BUILD_SSL
|
||||
|
||||
#endif /* VSF_BUILDDEFS_H */
|
||||
@@ -0,0 +1,89 @@
|
||||
From b756444854c5ab3b1284fd7113043fe8860e99ec Mon Sep 17 00:00:00 2001
|
||||
From: Roy Li <rongqing.li@windriver.com>
|
||||
Date: Fri, 24 Apr 2015 09:36:48 +0800
|
||||
Subject: [PATCH] Fix the CVE-2015-1419
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Try to fix deny_file parsing to do more what is expected. Taken
|
||||
from fedora. CVE-2015-1419
|
||||
|
||||
ftp://195.220.108.108/linux/fedora/linux/development/rawhide/source/SRPMS/v/vsftpd-3.0.2-13.fc22.src.rpm
|
||||
|
||||
Signed-off-by: Roy Li <rongqing.li@windriver.com>
|
||||
|
||||
---
|
||||
ls.c | 26 ++++++++++++++++++++++++--
|
||||
str.c | 11 +++++++++++
|
||||
str.h | 1 +
|
||||
3 files changed, 36 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/ls.c b/ls.c
|
||||
index 7e1376d..e9302dd 100644
|
||||
--- a/ls.c
|
||||
+++ b/ls.c
|
||||
@@ -246,9 +246,31 @@ vsf_filename_passes_filter(const struct mystr* p_filename_str,
|
||||
int ret = 0;
|
||||
char last_token = 0;
|
||||
int must_match_at_current_pos = 1;
|
||||
+
|
||||
+
|
||||
str_copy(&filter_remain_str, p_filter_str);
|
||||
- str_copy(&name_remain_str, p_filename_str);
|
||||
-
|
||||
+
|
||||
+ if (!str_isempty (&filter_remain_str) && !str_isempty(p_filename_str)) {
|
||||
+ if (str_get_char_at(p_filter_str, 0) == '/') {
|
||||
+ if (str_get_char_at(p_filename_str, 0) != '/') {
|
||||
+ str_getcwd (&name_remain_str);
|
||||
+
|
||||
+ if (str_getlen(&name_remain_str) > 1) /* cwd != root dir */
|
||||
+ str_append_char (&name_remain_str, '/');
|
||||
+
|
||||
+ str_append_str (&name_remain_str, p_filename_str);
|
||||
+ }
|
||||
+ else
|
||||
+ str_copy (&name_remain_str, p_filename_str);
|
||||
+ } else {
|
||||
+ if (str_get_char_at(p_filter_str, 0) != '{')
|
||||
+ str_basename (&name_remain_str, p_filename_str);
|
||||
+ else
|
||||
+ str_copy (&name_remain_str, p_filename_str);
|
||||
+ }
|
||||
+ } else
|
||||
+ str_copy(&name_remain_str, p_filename_str);
|
||||
+
|
||||
while (!str_isempty(&filter_remain_str) && *iters < VSFTP_MATCHITERS_MAX)
|
||||
{
|
||||
static struct mystr s_match_needed_str;
|
||||
diff --git a/str.c b/str.c
|
||||
index 6596204..ba4b92a 100644
|
||||
--- a/str.c
|
||||
+++ b/str.c
|
||||
@@ -711,3 +711,14 @@ str_replace_unprintable(struct mystr* p_str, char new_char)
|
||||
}
|
||||
}
|
||||
|
||||
+void
|
||||
+str_basename (struct mystr* d_str, const struct mystr* path)
|
||||
+{
|
||||
+ static struct mystr tmp;
|
||||
+
|
||||
+ str_copy (&tmp, path);
|
||||
+ str_split_char_reverse(&tmp, d_str, '/');
|
||||
+
|
||||
+ if (str_isempty(d_str))
|
||||
+ str_copy (d_str, path);
|
||||
+}
|
||||
diff --git a/str.h b/str.h
|
||||
index ab0a9a4..3a21b50 100644
|
||||
--- a/str.h
|
||||
+++ b/str.h
|
||||
@@ -100,6 +100,7 @@ void str_replace_unprintable(struct mystr* p_str, char new_char);
|
||||
int str_atoi(const struct mystr* p_str);
|
||||
filesize_t str_a_to_filesize_t(const struct mystr* p_str);
|
||||
unsigned int str_octal_to_uint(const struct mystr* p_str);
|
||||
+void str_basename (struct mystr* d_str, const struct mystr* path);
|
||||
|
||||
/* PURPOSE: Extract a line of text (delimited by \n or EOF) from a string
|
||||
* buffer, starting at character position 'p_pos'. The extracted line will
|
||||
@@ -0,0 +1,26 @@
|
||||
From c026b0c0de4eebb189bc77b2d4c3b9528454ac04 Mon Sep 17 00:00:00 2001
|
||||
From: "Roy.Li" <rongqing.li@windriver.com>
|
||||
Date: Fri, 19 Jul 2013 10:19:25 +0800
|
||||
Subject: [PATCH] Enable tcp_wrapper.
|
||||
|
||||
Upstream-Status: Inappropriate [configuration]
|
||||
|
||||
Signed-off-by: Roy.Li <rongqing.li@windriver.com>
|
||||
|
||||
---
|
||||
builddefs.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/builddefs.h b/builddefs.h
|
||||
index e908352..0106d1a 100644
|
||||
--- a/builddefs.h
|
||||
+++ b/builddefs.h
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef VSF_BUILDDEFS_H
|
||||
#define VSF_BUILDDEFS_H
|
||||
|
||||
-#undef VSF_BUILD_TCPWRAPPERS
|
||||
+#define VSF_BUILD_TCPWRAPPERS
|
||||
#define VSF_BUILD_PAM
|
||||
#undef VSF_BUILD_SSL
|
||||
|
||||
Reference in New Issue
Block a user