Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37849488
en ru br
Репозитории ALT
S:3.6.10-alt1
D:2.4.5-alt1
5.1: 2.5.13-alt0.M50P.1
4.1: 2.4.9-alt0.M41.1
4.0: 2.4.9-alt0.M41.1
+updates:2.4.9-alt0.M41.1
3.0: 2.2.4-alt3
www.altlinux.org/Changes

Группа :: Система/Серверы
Пакет: postfix

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: postfix-2.2.4-owl-sparse-hack.patch
Скачать


diff -upk.orig postfix-2.2.4.orig/src/local/dotforward.c postfix-2.2.4/src/local/dotforward.c
--- postfix-2.2.4.orig/src/local/dotforward.c	2002-11-16 19:59:39 +0000
+++ postfix-2.2.4/src/local/dotforward.c	2005-02-26 22:49:30 +0000
@@ -235,6 +235,17 @@ int     deliver_dotforward(LOCAL_STATE s
 		msg_warn("file %s is world writable", STR(path));
 	    } else if ((fd = open_as(STR(path), O_RDONLY, 0, usr_attr.uid, usr_attr.gid)) < 0) {
 		msg_warn("cannot open file %s: %m", STR(path));
+	    } else if (fstat(fd, &st) != 0) {
+		msg_warn("cannot fstat file %s: %m", STR(path));
+		close(fd);
+	    } else if (S_ISREG(st.st_mode) == 0) {
+		msg_warn("file %s is no longer a regular file", STR(path));
+		close(fd);
+	    } else if (st.st_size > st.st_blocks * st.st_blksize &&
+		st.st_blksize >= 512) {
+		/* This works on Linux with ext2fs, but it doesn't have to */
+		msg_warn("file %s is a sparse file", STR(path));
+		close(fd);
 	    } else {
 		close_on_exec(fd, CLOSE_ON_EXEC);
 		addr_count = 0;
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin