This is an automated email from the git hooks/post-receive script. sthibault pushed a commit to branch master in repository hurd.
commit 613dc2a3ae27ee493af07be1fcefc2dda0631d8f Author: Samuel Thibault <[email protected]> Date: Sun Feb 28 14:50:06 2016 +0000 New upstream snapshot --- eth-multiplexer/Makefile | 2 +- libbpf/Makefile | 2 -- libdiskfs/dir-lookup.c | 17 +++++++++-------- libmachdev/Makefile | 2 +- libnetfs/dir-lookup.c | 11 +++++++++-- libps/fmt.c | 2 +- libtreefs/dir-lookup.c | 11 +++++++++-- sutils/Makefile | 4 ++-- 8 files changed, 32 insertions(+), 19 deletions(-) diff --git a/eth-multiplexer/Makefile b/eth-multiplexer/Makefile index 8b392f4..159f385 100644 --- a/eth-multiplexer/Makefile +++ b/eth-multiplexer/Makefile @@ -26,7 +26,7 @@ MIGSFLAGS = -imacros $(srcdir)/mig-mutate.h device-MIGSFLAGS="-DMACH_PAYLOAD_TO_PORT=ports_payload_get_name" OBJS = $(SRCS:.c=.o) $(MIGSTUBS) LCLHDRS = ethernet.h util.h vdev.h netfs_impl.h -HURDLIBS=ports fshelp shouldbeinlibc netfs bpf +HURDLIBS = ihash iohelp ports fshelp shouldbeinlibc netfs bpf LDLIBS += -lpthread CFLAGS += -I$(top_srcdir)/libbpf diff --git a/libbpf/Makefile b/libbpf/Makefile index 37189af..8b02a2a 100644 --- a/libbpf/Makefile +++ b/libbpf/Makefile @@ -26,8 +26,6 @@ installhdrs = bpf_impl.h queue.h MIGSTUBS = OBJS = $(sort $(SRCS:.c=.o) $(MIGSTUBS)) -LDLIBS += -lpthread - MIGCOMSFLAGS = include ../Makeconf diff --git a/libdiskfs/dir-lookup.c b/libdiskfs/dir-lookup.c index 8b986e4..c50970d 100644 --- a/libdiskfs/dir-lookup.c +++ b/libdiskfs/dir-lookup.c @@ -421,24 +421,25 @@ diskfs_S_dir_lookup (struct protid *dircred, memcpy (pathbuf + np->dn_stat.st_size + 1, nextname, nextnamelen - 1); } - pathbuf[nextnamelen + np->dn_stat.st_size] = '\0'; + if (mustbedir) + { + pathbuf[nextnamelen + np->dn_stat.st_size] = '/'; + pathbuf[nextnamelen + np->dn_stat.st_size + 1] = '\0'; + } + else + pathbuf[nextnamelen + np->dn_stat.st_size] = '\0'; if (pathbuf[0] == '/') { /* Punt to the caller. */ *retry = FS_RETRY_MAGICAL; *returned_port = MACH_PORT_NULL; - memcpy (retryname, pathbuf, - nextnamelen + np->dn_stat.st_size + 1); - if (mustbedir) - { - retryname[nextnamelen + np->dn_stat.st_size] = '/'; - retryname[nextnamelen + np->dn_stat.st_size + 1] = '\0'; - } + strcpy (retryname, pathbuf); goto out; } path = pathbuf; + mustbedir = 0; } if (lastcomp) diff --git a/libmachdev/Makefile b/libmachdev/Makefile index b7cdd6b..77d2a34 100644 --- a/libmachdev/Makefile +++ b/libmachdev/Makefile @@ -26,7 +26,7 @@ LCLHDRS = dev_hdr.h device_emul.h ds_routines.h vm_param.h \ util.h queue.h io_req.h if_ether.h machdev.h linux-errno.h \ errno-base.h installhdrs = machdev.h -HURDLIBS = ports trivfs bpf +HURDLIBS = ports trivfs bpf ddekit LDLIBS += -lpthread OBJS = $(SRCS:.c=.o) $(MIGSTUBS) MIGSFLAGS = -imacros $(srcdir)/mig-mutate.h diff --git a/libnetfs/dir-lookup.c b/libnetfs/dir-lookup.c index 1fefd3f..cbe2941 100644 --- a/libnetfs/dir-lookup.c +++ b/libnetfs/dir-lookup.c @@ -367,7 +367,7 @@ netfs_S_dir_lookup (struct protid *diruser, linklen = np->nn_stat.st_size; nextnamelen = nextname ? strlen (nextname) + 1 : 0; - newnamelen = nextnamelen + linklen + 1; + newnamelen = nextnamelen + linklen + 1 + 1; linkbuf = alloca (newnamelen); error = netfs_attempt_readlink (diruser->user, np, linkbuf); @@ -380,7 +380,13 @@ netfs_S_dir_lookup (struct protid *diruser, memcpy (linkbuf + linklen + 1, nextname, nextnamelen - 1); } - linkbuf[nextnamelen + linklen] = '\0'; + if (mustbedir) + { + linkbuf[nextnamelen + linklen] = '/'; + linkbuf[nextnamelen + linklen + 1] = '\0'; + } + else + linkbuf[nextnamelen + linklen] = '\0'; if (linkbuf[0] == '/') { @@ -392,6 +398,7 @@ netfs_S_dir_lookup (struct protid *diruser, } filename = linkbuf; + mustbedir = 0; if (lastcomp) { lastcomp = 0; diff --git a/libps/fmt.c b/libps/fmt.c index 580b097..f914212 100644 --- a/libps/fmt.c +++ b/libps/fmt.c @@ -80,8 +80,8 @@ _fmt_create (char *src, int posix, struct ps_fmt_specs *fmt_specs, if (fields == NULL) { - FREE (new_fmt); FREE (new_fmt->src); + FREE (new_fmt); return ENOMEM; } diff --git a/libtreefs/dir-lookup.c b/libtreefs/dir-lookup.c index 8665059..80b5538 100644 --- a/libtreefs/dir-lookup.c +++ b/libtreefs/dir-lookup.c @@ -229,7 +229,7 @@ _treefs_s_dir_lookup (struct treefs_handle *h, /* Symlink contents + extra path won't fit in our buffer, so reallocate it and try again. */ { - path_buf_len = sym_len + nextname_len + 1; + path_buf_len = sym_len + nextname_len + 1 + 1; path_buf = alloca (path_buf_len); err = treefs_node_get_symlink (node, path_buf, &sym_len); } @@ -241,7 +241,13 @@ _treefs_s_dir_lookup (struct treefs_handle *h, path_buf[sym_len] = '/'; bcopy (nextname, path_buf + sym_len + 1, nextname_len - 1); } - path_buf[nextname_len + sym_len] = '\0'; + if (mustbedir) + { + path_buf[nextnamelen + sym_len] = '/'; + path_buf[nextnamelen + sym_len + 1] = '\0'; + } + else + path_buf[nextname_len + sym_len] = '\0'; if (path_buf[0] == '/') { @@ -253,6 +259,7 @@ _treefs_s_dir_lookup (struct treefs_handle *h, } path = path_buf; + mustbedir = 0; if (lastcomp) { lastcomp = 0; diff --git a/sutils/Makefile b/sutils/Makefile index 773a7da..e30bfb7 100644 --- a/sutils/Makefile +++ b/sutils/Makefile @@ -36,8 +36,8 @@ fsck: fstab.o clookup.o swapon swapoff: ../libstore/libstore.a default_pagerUser.o $(progs): %: %.o ../libshouldbeinlibc/libshouldbeinlibc.a -install: $(prefix)/dev $(prefix)/dev/MAKEDEV -$(prefix)/dev/MAKEDEV: +install: $(prefix)/dev/MAKEDEV +$(prefix)/dev/MAKEDEV: $(prefix)/dev ln -s ../sbin/MAKEDEV $@ $(prefix)/dev: @$(MKINSTALLDIRS) $@ -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hurd/hurd.git
