diff options
-rw-r--r-- | exec/exec.c | 7 | ||||
-rw-r--r-- | libdiskfs/dir-rename.c | 5 | ||||
-rw-r--r-- | libfshelp/perms-access.c | 2 | ||||
-rw-r--r-- | pfinet/linux-src/include/asm-i386/checksum.h | 6 | ||||
-rw-r--r-- | pfinet/linux-src/net/ipv4/tcp_ipv4.c | 2 | ||||
-rw-r--r-- | sutils/MAKEDEV.sh | 2 |
6 files changed, 17 insertions, 7 deletions
diff --git a/exec/exec.c b/exec/exec.c index cb3d7418..daa8a24b 100644 --- a/exec/exec.c +++ b/exec/exec.c @@ -1008,10 +1008,13 @@ finish (struct execdata *e, int dealloc_file) #ifdef EXECDATA_STREAM fclose (&e->stream); #else - if (e->file_data != NULL) + if (e->file_data != NULL) { free (e->file_data); - else if (map_buffer (e) != NULL) + e->file_data = NULL; + } else if (map_buffer (e) != NULL) { munmap (map_buffer (e), map_vsize (e)); + map_buffer (e) = NULL; + } #endif } if (dealloc_file && e->file != MACH_PORT_NULL) diff --git a/libdiskfs/dir-rename.c b/libdiskfs/dir-rename.c index 747c6666..867e395d 100644 --- a/libdiskfs/dir-rename.c +++ b/libdiskfs/dir-rename.c @@ -19,6 +19,7 @@ #include "priv.h" #include "fs_S.h" +#include <string.h> /* To avoid races in checkpath, and to prevent a directory from being simultaneously renamed by two processes, we serialize all renames of @@ -44,6 +45,10 @@ diskfs_S_dir_rename (struct protid *fromcred, if (! tocred) return EXDEV; + if (!strcmp (fromname, ".") || !strcmp (fromname, "..") + || !strcmp (toname, ".") || !strcmp (toname, "..")) + return EINVAL; + if (tocred->po->shadow_root != fromcred->po->shadow_root) /* Same translator, but in different shadow trees. */ return EXDEV; diff --git a/libfshelp/perms-access.c b/libfshelp/perms-access.c index fdca0b7b..67e52812 100644 --- a/libfshelp/perms-access.c +++ b/libfshelp/perms-access.c @@ -30,7 +30,7 @@ fshelp_access (struct stat *st, int op, struct iouser *user) { int gotit; if (idvec_contains (user->uids, 0)) - gotit = (op != S_IEXEC) || (st->st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)); + gotit = (op != S_IEXEC) || !S_ISREG(st->st_mode) || (st->st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)); else if (user->uids->num == 0 && (st->st_mode & S_IUSEUNK)) gotit = st->st_mode & (op << S_IUNKSHIFT); else if (!fshelp_isowner (st, user)) diff --git a/pfinet/linux-src/include/asm-i386/checksum.h b/pfinet/linux-src/include/asm-i386/checksum.h index ed023174..add89590 100644 --- a/pfinet/linux-src/include/asm-i386/checksum.h +++ b/pfinet/linux-src/include/asm-i386/checksum.h @@ -109,7 +109,8 @@ static inline unsigned short ip_fast_csum(unsigned char * iph, are modified, we must also specify them as outputs, or gcc will assume they contain their original values. */ : "=r" (sum), "=r" (iph), "=r" (ihl) - : "1" (iph), "2" (ihl)); + : "1" (iph), "2" (ihl) + : "memory"); return(sum); } @@ -185,7 +186,8 @@ static __inline__ unsigned short int csum_ipv6_magic(struct in6_addr *saddr, "adcl $0, %0\n" : "=&r" (sum) : "r" (saddr), "r" (daddr), - "r"(htonl((__u32) (len))), "r"(htonl(proto)), "0"(sum)); + "r"(htonl((__u32) (len))), "r"(htonl(proto)), "0"(sum) + : "memory"); return csum_fold(sum); } diff --git a/pfinet/linux-src/net/ipv4/tcp_ipv4.c b/pfinet/linux-src/net/ipv4/tcp_ipv4.c index 2364de33..ab6db9bb 100644 --- a/pfinet/linux-src/net/ipv4/tcp_ipv4.c +++ b/pfinet/linux-src/net/ipv4/tcp_ipv4.c @@ -613,7 +613,7 @@ int tcp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) return -ENETUNREACH; } - dst_release(xchg(&sk->dst_cache, rt)); + dst_release(xchg(&sk->dst_cache, &rt->u.dst)); buff = sock_wmalloc(sk, (MAX_HEADER + sk->prot->max_header), 0, GFP_KERNEL); diff --git a/sutils/MAKEDEV.sh b/sutils/MAKEDEV.sh index c9bd209f..260e93bf 100644 --- a/sutils/MAKEDEV.sh +++ b/sutils/MAKEDEV.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # Make standard devices # |