⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 e2fsprogs-1.37-2.patch

📁 最新的文件系统生成工具
💻 PATCH
📖 第 1 页 / 共 2 页
字号:
@@ -76,14 +76,14 @@ typedef __s64		e2_blkcnt_t; typedef __u32		ext2_dirhash_t; -#if EXT2_FLAT_INCLUDES+#ifdef EXT2_FLAT_INCLUDES #include "com_err.h" #include "ext2_io.h" #include "ext2_err.h" #else #include <et/com_err.h>-#include <ext2fs/ext2_io.h> #include <ext2fs/ext2_err.h>+#include <ext2fs/ext2_io.h> #endif  /*@@ -245,7 +245,7 @@ 	io_channel			image_io; }; -#if EXT2_FLAT_INCLUDES+#ifdef EXT2_FLAT_INCLUDES #include "e2_bitops.h" #else #include <ext2fs/bitops.h>diff -urN e2fsprogs-1.37/lib/ext2fs/ind_block.c e2fsprogs-1.37-patched/lib/ext2fs/ind_block.c--- e2fsprogs-1.37/lib/ext2fs/ind_block.c	2005-01-05 22:15:49.000000000 -0600+++ e2fsprogs-1.37-patched/lib/ext2fs/ind_block.c	2005-06-18 16:34:01.000000000 -0500@@ -32,7 +32,7 @@ 	else { 		retval = io_channel_read_blk(fs->io, blk, 1, buf); 		if (retval)-			retval;+			return retval; 	} #ifdef EXT2FS_ENABLE_SWAPFS 	if (fs->flags & (EXT2_FLAG_SWAP_BYTES | EXT2_FLAG_SWAP_BYTES_READ)) {diff -urN e2fsprogs-1.37/lib/ext2fs/inode.c e2fsprogs-1.37-patched/lib/ext2fs/inode.c--- e2fsprogs-1.37/lib/ext2fs/inode.c	2005-03-21 00:10:13.000000000 -0600+++ e2fsprogs-1.37-patched/lib/ext2fs/inode.c	2005-06-18 16:34:01.000000000 -0500@@ -724,7 +724,6 @@ 				 struct ext2_inode *inode) { 	struct ext2_inode	*buf;-	errcode_t		retval; 	int 			size = EXT2_INODE_SIZE(fs->super); 	struct ext2_inode_large	*large_inode; @@ -743,7 +742,7 @@ 	large_inode->i_extra_isize = sizeof(struct ext2_inode_large) -  		EXT2_GOOD_OLD_INODE_SIZE; -	retval = ext2fs_write_inode_full(fs, ino, buf, size);+	return ext2fs_write_inode_full(fs, ino, buf, size); }   diff -urN e2fsprogs-1.37/lib/ext2fs/test_io.c e2fsprogs-1.37-patched/lib/ext2fs/test_io.c--- e2fsprogs-1.37/lib/ext2fs/test_io.c	2004-12-06 16:45:50.000000000 -0600+++ e2fsprogs-1.37-patched/lib/ext2fs/test_io.c	2005-06-18 16:34:01.000000000 -0500@@ -22,6 +22,14 @@ #if HAVE_SYS_TYPES_H #include <sys/types.h> #endif+#ifdef HAVE_SYS_PRCTL_H+#include <sys/prctl.h>+#else+#define PR_GET_DUMPABLE 3+#endif+#if (!defined(HAVE_PRCTL) && defined(linux))+#include <sys/syscall.h>+#endif  #include "ext2_fs.h" #include "ext2fs.h"@@ -132,6 +140,27 @@ 	abort(); } +static char *safe_getenv(const char *arg)+{+	if ((getuid() != geteuid()) || (getgid() != getgid()))+		return NULL;+#if HAVE_PRCTL+	if (prctl(PR_GET_DUMPABLE) == 0)+		return NULL;+#else+#if (defined(linux) && defined(SYS_prctl))+	if (syscall(SYS_prctl, PR_GET_DUMPABLE) == 0)+		return NULL;+#endif+#endif++#ifdef HAVE___SECURE_GETENV+	return __secure_getenv("BLKID_FILE");+#else+	return getenv("BLKID_FILE");+#endif+}+ static errcode_t test_open(const char *name, int flags, io_channel *channel) { 	io_channel	io = NULL;@@ -178,25 +207,25 @@ 	data->write_byte = 	test_io_cb_write_byte;  	data->outfile = NULL;-	if ((value = getenv("TEST_IO_LOGFILE")) != NULL)+	if ((value = safe_getenv("TEST_IO_LOGFILE")) != NULL) 		data->outfile = fopen(value, "w"); 	if (!data->outfile) 		data->outfile = stderr;  	data->flags = 0;-	if ((value = getenv("TEST_IO_FLAGS")) != NULL)+	if ((value = safe_getenv("TEST_IO_FLAGS")) != NULL) 		data->flags = strtoul(value, NULL, 0); 	 	data->block = 0;-	if ((value = getenv("TEST_IO_BLOCK")) != NULL)+	if ((value = safe_getenv("TEST_IO_BLOCK")) != NULL) 		data->block = strtoul(value, NULL, 0);  	data->read_abort_count = 0;-	if ((value = getenv("TEST_IO_READ_ABORT")) != NULL)+	if ((value = safe_getenv("TEST_IO_READ_ABORT")) != NULL) 		data->read_abort_count = strtoul(value, NULL, 0);  	data->write_abort_count = 0;-	if ((value = getenv("TEST_IO_WRITE_ABORT")) != NULL)+	if ((value = safe_getenv("TEST_IO_WRITE_ABORT")) != NULL) 		data->write_abort_count = strtoul(value, NULL, 0); 	 	*channel = io;diff -urN e2fsprogs-1.37/lib/ss/ChangeLog e2fsprogs-1.37-patched/lib/ss/ChangeLog--- e2fsprogs-1.37/lib/ss/ChangeLog	2005-03-21 21:37:01.000000000 -0600+++ e2fsprogs-1.37-patched/lib/ss/ChangeLog	2005-06-18 16:34:01.000000000 -0500@@ -1,3 +1,10 @@+2005-03-31  Theodore Ts'o  <tytso@mit.edu>++	* get_readline.c (ss_get_readline), pager.c (ss_page_stdin): If+		called by a setuid/setgid or an otherwise privileged+		program, be paranoid and ignore the PAGER and+		SS_READLINE_PATH environment variables.+ 2005-03-21  Theodore Ts'o  <tytso@mit.edu>  	* Release of E2fsprogs 1.37diff -urN e2fsprogs-1.37/lib/ss/get_readline.c e2fsprogs-1.37-patched/lib/ss/get_readline.c--- e2fsprogs-1.37/lib/ss/get_readline.c	2003-12-07 11:11:38.000000000 -0600+++ e2fsprogs-1.37-patched/lib/ss/get_readline.c	2005-06-18 16:34:01.000000000 -0500@@ -50,7 +50,7 @@ 	if (info->readline_handle) 		return; -	libpath = getenv("SS_READLINE_PATH");+	libpath = ss_safe_getenv("SS_READLINE_PATH"); 	if (!libpath) 		libpath = DEFAULT_LIBPATH; 	if (*libpath == 0 || !strcmp(libpath, "none"))diff -urN e2fsprogs-1.37/lib/ss/pager.c e2fsprogs-1.37-patched/lib/ss/pager.c--- e2fsprogs-1.37/lib/ss/pager.c	2003-12-07 11:11:38.000000000 -0600+++ e2fsprogs-1.37-patched/lib/ss/pager.c	2005-06-18 16:34:01.000000000 -0500@@ -28,11 +28,40 @@ #include <sys/types.h> #include <sys/file.h> #include <signal.h>+#ifdef HAVE_SYS_PRCTL_H+#include <sys/prctl.h>+#else+#define PR_GET_DUMPABLE 3+#endif+#if (!defined(HAVE_PRCTL) && defined(linux))+#include <sys/syscall.h>+#endif  static char MORE[] = "more"; extern char *_ss_pager_name; extern char *getenv PROTOTYPE((const char *)); +char *ss_safe_getenv(const char *arg)+{+	if ((getuid() != geteuid()) || (getgid() != getgid()))+		return NULL;+#if HAVE_PRCTL+	if (prctl(PR_GET_DUMPABLE) == 0)+		return NULL;+#else+#if (defined(linux) && defined(SYS_prctl))+	if (syscall(SYS_prctl, PR_GET_DUMPABLE) == 0)+		return NULL;+#endif+#endif++#ifdef HAVE___SECURE_GETENV+	return __secure_getenv("BLKID_FILE");+#else+	return getenv("BLKID_FILE");+#endif+}+ /*  * this needs a *lot* of work....  *@@ -89,7 +118,7 @@ 	sigdelset(&mask, SIGINT); 	sigprocmask(SIG_SETMASK, &mask, 0); 	if (_ss_pager_name == (char *)NULL) {-		if ((_ss_pager_name = getenv("PAGER")) == (char *)NULL)+		if ((_ss_pager_name = ss_safe_getenv("PAGER")) == (char *)NULL) 			_ss_pager_name = MORE; 	} 	(void) execlp(_ss_pager_name, _ss_pager_name, (char *) NULL);diff -urN e2fsprogs-1.37/lib/ss/ss_internal.h e2fsprogs-1.37-patched/lib/ss/ss_internal.h--- e2fsprogs-1.37/lib/ss/ss_internal.h	2003-12-07 11:11:38.000000000 -0600+++ e2fsprogs-1.37-patched/lib/ss/ss_internal.h	2005-06-18 16:34:01.000000000 -0500@@ -89,6 +89,7 @@ void ss_list_requests(int, char const * const *, int, pointer); int ss_execute_command(int sci_idx, char *argv[]); int ss_pager_create(void);+char *ss_safe_getenv(const char *arg); char **ss_rl_completion(const char *text, int start, int end);  extern ss_data **_ss_table;diff -urN e2fsprogs-1.37/misc/ChangeLog e2fsprogs-1.37-patched/misc/ChangeLog--- e2fsprogs-1.37/misc/ChangeLog	2005-03-21 21:37:01.000000000 -0600+++ e2fsprogs-1.37-patched/misc/ChangeLog	2005-06-18 16:34:01.000000000 -0500@@ -1,3 +1,13 @@+2005-04-09  Theodore Ts'o  <tytso@mit.edu>++	* filefrag.c (frag_report): Don't abort filefrag if+		EXT3_IOC_GETFLAGS ioctl is not supported, so that filefrag+		can work on non-ext2/3 filesystems, as advertised.+		(Addresses Debian Bug: #303509)++	* mke2fs.8.in: Fix minor spelling typo.  (Addresses SourceForge+		Bug #1177804)+ 2005-03-21  Theodore Ts'o  <tytso@mit.edu>  	* Release of E2fsprogs 1.37diff -urN e2fsprogs-1.37/misc/filefrag.c e2fsprogs-1.37-patched/misc/filefrag.c--- e2fsprogs-1.37/misc/filefrag.c	2005-03-18 19:25:28.000000000 -0600+++ e2fsprogs-1.37-patched/misc/filefrag.c	2005-06-18 16:34:01.000000000 -0500@@ -110,11 +110,8 @@ 		close(fd); 		return; 	}-	if (ioctl(fd, EXT3_IOC_GETFLAGS, &flags) < 0) {-		perror("EXT3_IOC_GETFLAGS");-		close(fd);-		return;-	}+	if (ioctl(fd, EXT3_IOC_GETFLAGS, &flags) < 0)+		flags = 0; 	if (flags & EXT3_EXTENTS_FL) { 		printf("File is stored in extents format\n"); 		is_ext2 = 0;diff -urN e2fsprogs-1.37/misc/mke2fs.8.in e2fsprogs-1.37-patched/misc/mke2fs.8.in--- e2fsprogs-1.37/misc/mke2fs.8.in	2005-01-05 10:12:19.000000000 -0600+++ e2fsprogs-1.37-patched/misc/mke2fs.8.in	2005-06-18 16:34:01.000000000 -0500@@ -305,7 +305,7 @@ .B \-M Set the last mounted directory for the filesystem.  This might be useful  for the sake of utilities that key off of the last mounted directory to -determine where the filesytem should be mounted.+determine where the filesystem should be mounted. .TP .B \-n causes mke2fs to not actually create a filesystem, but display what itdiff -urN e2fsprogs-1.37/tests/ChangeLog e2fsprogs-1.37-patched/tests/ChangeLog--- e2fsprogs-1.37/tests/ChangeLog	2005-03-21 21:37:01.000000000 -0600+++ e2fsprogs-1.37-patched/tests/ChangeLog	2005-06-18 16:34:01.000000000 -0500@@ -1,3 +1,8 @@+2005-04-09  Theodore Ts'o  <tytso@mit.edu>++	* test_script.in: Make the test script driver exit with a non-zero+		status if there are any failed tests.+ 2005-03-21  Theodore Ts'o  <tytso@mit.edu>  	* Release of E2fsprogs 1.37diff -urN e2fsprogs-1.37/tests/test_script.in e2fsprogs-1.37-patched/tests/test_script.in--- e2fsprogs-1.37/tests/test_script.in	2005-01-17 18:13:38.000000000 -0600+++ e2fsprogs-1.37-patched/tests/test_script.in	2005-06-18 16:34:01.000000000 -0500@@ -59,3 +59,4 @@  echo "$num_ok tests succeeded	$num_failed tests failed" +test "$num_failed" -eq 0 || exit 1

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -