diff options
7 files changed, 0 insertions, 255 deletions
diff --git a/debian/patches/0001-ftpfs-fix-error-handling-in-refresh_dir.patch b/debian/patches/0001-ftpfs-fix-error-handling-in-refresh_dir.patch deleted file mode 100644 index 086f5c3a..00000000 --- a/debian/patches/0001-ftpfs-fix-error-handling-in-refresh_dir.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 94e684b35dd5455e1cb4ac5e5f2aab2df0ebb2db Mon Sep 17 00:00:00 2001 -From: Justus Winter <4winter@informatik.uni-hamburg.de> -Date: Wed, 20 Nov 2013 11:58:41 +0100 -Subject: [PATCH 1/5] ftpfs: fix error handling in refresh_dir - -Found using the Clang Static Analyzer. - -* ftpfs/dir.c (refresh_dir): Fix error handling. ---- - ftpfs/dir.c | 20 ++++++++++++-------- - 1 file changed, 12 insertions(+), 8 deletions(-) - -diff --git a/ftpfs/dir.c b/ftpfs/dir.c -index da5ddbe..a9fea22 100644 ---- a/ftpfs/dir.c -+++ b/ftpfs/dir.c -@@ -384,14 +384,18 @@ refresh_dir (struct ftpfs_dir *dir, int update_stats, time_t timestamp, - if (! err) - err = update_ordered_name ("..", &dfs); - -- /* Refetch the directory from the server. */ -- if (update_stats) -- /* Fetch both names and stat info. */ -- err = ftp_conn_get_stats (conn, dir->rmt_path, 1, -- update_ordered_entry, &dfs); -- else -- /* Just fetch names. */ -- err = ftp_conn_get_names (conn, dir->rmt_path, update_ordered_name, &dfs); -+ if (! err) -+ { -+ /* Refetch the directory from the server. */ -+ if (update_stats) -+ /* Fetch both names and stat info. */ -+ err = ftp_conn_get_stats (conn, dir->rmt_path, 1, -+ update_ordered_entry, &dfs); -+ else -+ /* Just fetch names. */ -+ err = ftp_conn_get_names (conn, dir->rmt_path, -+ update_ordered_name, &dfs); -+ } - - if (! err) - /* GC any directory entries that weren't seen this time. */ --- -2.0.0 - diff --git a/debian/patches/0002-libshouldbeinlibc-fix-dead-initialization-in-fmt_nam.patch b/debian/patches/0002-libshouldbeinlibc-fix-dead-initialization-in-fmt_nam.patch deleted file mode 100644 index dbabc031..00000000 --- a/debian/patches/0002-libshouldbeinlibc-fix-dead-initialization-in-fmt_nam.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 3bef76f4db1d08ec1ee46d0c8d245523cf5feebb Mon Sep 17 00:00:00 2001 -From: Justus Winter <4winter@informatik.uni-hamburg.de> -Date: Wed, 20 Nov 2013 12:17:03 +0100 -Subject: [PATCH 2/5] libshouldbeinlibc: fix dead initialization in - fmt_named_interval - -Found using the Clang Static Analyzer. - -* libshouldbeinlibc/timefmt.c (fmt_named_interval): Fix dead -initialization. ---- - libshouldbeinlibc/timefmt.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libshouldbeinlibc/timefmt.c b/libshouldbeinlibc/timefmt.c -index a28f58b..cef72e0 100644 ---- a/libshouldbeinlibc/timefmt.c -+++ b/libshouldbeinlibc/timefmt.c -@@ -105,7 +105,7 @@ fmt_named_interval (struct timeval *tv, size_t width, - {{0, 1}, {0, 1}, {0, 0}, {" microsecond", "us", 0 }}, - {{0, 0} } - }; -- struct tscale *ts = time_scales; -+ struct tscale *ts; - - if (width <= 0 || width >= buf_len) - width = buf_len - 1; --- -2.0.0 - diff --git a/debian/patches/0003-trans-fakeroot-fix-error-handling.patch b/debian/patches/0003-trans-fakeroot-fix-error-handling.patch deleted file mode 100644 index 2a6bae94..00000000 --- a/debian/patches/0003-trans-fakeroot-fix-error-handling.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 8c769b20fdc47d3e943806abe5aa5fe2b517a092 Mon Sep 17 00:00:00 2001 -From: Justus Winter <4winter@informatik.uni-hamburg.de> -Date: Mon, 16 Jun 2014 16:50:12 +0200 -Subject: [PATCH 3/5] trans/fakeroot: fix error handling - -Found using the Clang Static Analyzer. - -* trans/fakeroot.c (new_node): Do not leak a pointer to freed memory. -Store NULL at *np instead. This fixes a node use-after-free in -netfs_S_dir_lookup. ---- - trans/fakeroot.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/trans/fakeroot.c b/trans/fakeroot.c -index 32a34ec..df2de64 100644 ---- a/trans/fakeroot.c -+++ b/trans/fakeroot.c -@@ -119,6 +119,7 @@ new_node (file_t file, mach_port_t idport, int locked, int openmodes, - mach_port_deallocate (mach_task_self (), nn->idport); - mach_port_deallocate (mach_task_self (), file); - free (*np); -+ *np = NULL; - return err; - } - --- -2.0.0 - diff --git a/debian/patches/0004-libports-avoid-realloc-3-corner-case.patch b/debian/patches/0004-libports-avoid-realloc-3-corner-case.patch deleted file mode 100644 index 7af7f42b..00000000 --- a/debian/patches/0004-libports-avoid-realloc-3-corner-case.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 430cd222921336dc9e06170c2e4a2e7024a8cadb Mon Sep 17 00:00:00 2001 -From: Justus Winter <4winter@informatik.uni-hamburg.de> -Date: Mon, 16 Jun 2014 17:34:22 +0200 -Subject: [PATCH 4/5] libports: avoid realloc(3) corner case - -If the size argument is 0, realloc may either return NULL, or return a -pointer that is only valid for use with free(3). In either case, the -memory is freed. So if realloc would return NULL (it does not on -GNU), the current code would double free p. - -Found using the Clang Static Analyzer. - -* libports/bucket-iterate.c (_ports_bucket_class_iterate): Avoid -calling realloc if no ports were matched. ---- - libports/bucket-iterate.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libports/bucket-iterate.c b/libports/bucket-iterate.c -index babc204..2d1b00d 100644 ---- a/libports/bucket-iterate.c -+++ b/libports/bucket-iterate.c -@@ -65,7 +65,7 @@ _ports_bucket_class_iterate (struct port_bucket *bucket, - } - pthread_mutex_unlock (&_ports_lock); - -- if (n != nr_items) -+ if (n != 0 && n != nr_items) - { - /* We allocated too much. Release unused memory. */ - void **new = realloc (p, n * sizeof *p); --- -2.0.0 - diff --git a/debian/patches/0005-libdiskfs-add-permission-check-to-file_chflags.patch b/debian/patches/0005-libdiskfs-add-permission-check-to-file_chflags.patch deleted file mode 100644 index 44140fc2..00000000 --- a/debian/patches/0005-libdiskfs-add-permission-check-to-file_chflags.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 3ea1eb1af128d1a20949983d212ef529becc6a77 Mon Sep 17 00:00:00 2001 -From: Justus Winter <4winter@informatik.uni-hamburg.de> -Date: Tue, 10 Jun 2014 14:22:31 +0200 -Subject: [PATCH 5/5] libdiskfs: add permission check to file_chflags - -Only root is allowed to change the high 16 bits. The TODO entry says -otherwise, but that must be a mistake. For reference, see the glibc -sources, sysdeps/mach/hurd/bits/stat.h. - -* libdiskfs/file-chflags.c (diskfs_S_file_chflags): Add permission -check. -* TODO (libdiskfs): Remove entry. ---- - TODO | 2 -- - libdiskfs/file-chflags.c | 8 ++++++++ - 2 files changed, 8 insertions(+), 2 deletions(-) - -diff --git a/TODO b/TODO -index d2500dc..0387e9f 100644 ---- a/TODO -+++ b/TODO -@@ -108,8 +108,6 @@ See `tasks', the exported task list. - Rename the rest to libhurdutil or somesuch. - - ** libdiskfs --*** file_chflags does not do proper permission checking (non-root isn't -- supposed to be able to change the low bits) - *** Add the short-circuited-but-not-builtin translator startup code from - dir-lookup to fsys_getroot. Compare and match carefully these two - routines and then share common code. -diff --git a/libdiskfs/file-chflags.c b/libdiskfs/file-chflags.c -index 01dc495..a29ff07 100644 ---- a/libdiskfs/file-chflags.c -+++ b/libdiskfs/file-chflags.c -@@ -23,8 +23,15 @@ kern_return_t - diskfs_S_file_chflags (struct protid *cred, - int flags) - { -+#define HI(X) ((X) & 0xffff0000u) - CHANGE_NODE_FIELD (cred, - ({ -+ /* Only root is allowed to change the high 16 -+ bits. */ -+ if ((HI (flags) != HI (np->dn_stat.st_flags)) -+ && ! idvec_contains (cred->user->uids, 0)) -+ return EPERM; -+ - err = fshelp_isowner (&np->dn_stat, cred->user); - if (!err) - err = diskfs_validate_flags_change (np, flags); -@@ -37,4 +44,5 @@ diskfs_S_file_chflags (struct protid *cred, - diskfs_notice_filechange(np, FILE_CHANGED_META, - 0, 0); - })); -+#undef HI - } --- -2.0.0 - diff --git a/debian/patches/david-fix-mach_debug.patch b/debian/patches/david-fix-mach_debug.patch deleted file mode 100644 index 017548de..00000000 --- a/debian/patches/david-fix-mach_debug.patch +++ /dev/null @@ -1,51 +0,0 @@ -Hi, - -The hard-coded /usr/include vpath will break building with sysroot -headers. Can the mach_debug defs files be handled like the others? - -Thanks. - -David - - Makeconf | 4 ++++ - procfs/Makefile | 3 --- - 2 files changed, 4 insertions(+), 3 deletions(-) - -diff --git a/Makeconf b/Makeconf -index 5cf995d..32eec13 100644 ---- a/Makeconf -+++ b/Makeconf -@@ -576,13 +576,17 @@ vpath %.defs $(top_srcdir)/hurd - mach_defs_names = bootstrap exc mach mach4 \ - mach_host mach_port mach_timer_reply memory_object \ - memory_object_default notify -+mach_debug_defs_names = mach_debug - device_defs_names = dev_forward device device_reply device_request - - mach_defs = $(addsuffix .defs,$(mach_defs_names)) -+mach_debug_defs = $(addsuffix .defs,$(mach_debug_defs_names)) - device_defs = $(addsuffix .defs,$(device_defs_names)) - - $(mach_defs): %.defs: - echo '#include <mach/$@>' > $@ -+$(mach_debug_defs): %.defs: -+ echo '#include <mach_debug/$@>' > $@ - $(device_defs): %.defs: - echo '#include <device/$@>' > $@ - -diff --git a/procfs/Makefile b/procfs/Makefile -index 6d7ca48..78f20c4 100644 ---- a/procfs/Makefile -+++ b/procfs/Makefile -@@ -28,7 +28,4 @@ OBJS = $(SRCS:.c=.o) - HURDLIBS = netfs fshelp iohelp ps ports ihash shouldbeinlibc - OTHERLIBS = -lpthread - --# Where to find .defs files. --vpath %.defs /usr/include/mach_debug -- - include ../Makeconf --- -1.9.3 - - diff --git a/debian/patches/series b/debian/patches/series index 23364dcf..91cedd09 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,6 +1,5 @@ # David Michael's patches david-add-random.patch -david-fix-mach_debug.patch diskfs_no_inherit_dir_group.patch init_try_runsystem.gnu.patch @@ -52,8 +51,3 @@ fix-net_rcv_msg.patch #pp.patch #pp-dde.patch #pp-random.patch -0001-ftpfs-fix-error-handling-in-refresh_dir.patch -0002-libshouldbeinlibc-fix-dead-initialization-in-fmt_nam.patch -0003-trans-fakeroot-fix-error-handling.patch -0004-libports-avoid-realloc-3-corner-case.patch -0005-libdiskfs-add-permission-check-to-file_chflags.patch |