Репозитории ALT
S: | 4.14.0-alt1 |
5.1: | 4.0.4.1-alt9 |
4.1: | 4.0.4.1-alt9 |
4.0: | 4.0.4.1-alt8 |
3.0: | 4.0.4.1-alt5 |
Группа :: Система/Основа
Пакет: shadow
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: shadow-4.0.4.1-alt-copy_tree-perms.patch
Скачать
Скачать
--- shadow-4.0.4.1/libmisc/copydir.c.orig 2004-11-10 19:31:41 +0300
+++ shadow-4.0.4.1/libmisc/copydir.c 2004-11-10 19:34:18 +0300
@@ -203,7 +203,7 @@ copy_tree (const char *src_root, const c
* the user and then recursively copy that directory.
*/
- mkdir (dst_name, sb.st_mode & 0777);
+ mkdir (dst_name, sb.st_mode & 0700);
chown (dst_name,
uid == (uid_t) - 1 ? sb.st_uid : uid,
gid == (gid_t) - 1 ? sb.st_gid : gid);
@@ -281,11 +281,11 @@ copy_tree (const char *src_root, const c
if (!S_ISREG (sb.st_mode)) {
if (mknod
- (dst_name, sb.st_mode & ~07777, sb.st_rdev)
+ (dst_name, sb.st_mode & ~07700, sb.st_rdev)
|| chown (dst_name,
uid == (uid_t) - 1 ? sb.st_uid : uid,
gid == (gid_t) - 1 ? sb.st_gid : gid)
- || chmod (dst_name, sb.st_mode & 07777)) {
+ || chmod (dst_name, sb.st_mode & 07700)) {
err++;
break;
}
@@ -309,7 +309,7 @@ copy_tree (const char *src_root, const c
|| chown (dst_name,
uid == (uid_t) - 1 ? sb.st_uid : uid,
gid == (gid_t) - 1 ? sb.st_gid : gid)
- || chmod (dst_name, sb.st_mode & 07777)) {
+ || chmod (dst_name, sb.st_mode & 07700)) {
if (preserve && (errno == EEXIST)) {
close(ifd);
continue;