diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-01-07 15:04:08 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-01-07 15:04:08 +0000 |
commit | 013340a79cc4988a750470808d834f3549d9fd98 (patch) | |
tree | e1c19adfdb38f22a42b67ac3209a96ae031ad60e | |
parent | 562d57023d07eae5f3a97e1df7862a6bf505a99a (diff) | |
download | alpine_aports-013340a79cc4988a750470808d834f3549d9fd98.tar.bz2 alpine_aports-013340a79cc4988a750470808d834f3549d9fd98.tar.xz alpine_aports-013340a79cc4988a750470808d834f3549d9fd98.zip |
main/mkinitfs: make root readonly for world
backported patch
-rw-r--r-- | main/mkinitfs/0001-init-make-readonly-for-world-when-tmpfs.patch | 28 | ||||
-rw-r--r-- | main/mkinitfs/APKBUILD | 4 |
2 files changed, 31 insertions, 1 deletions
diff --git a/main/mkinitfs/0001-init-make-readonly-for-world-when-tmpfs.patch b/main/mkinitfs/0001-init-make-readonly-for-world-when-tmpfs.patch new file mode 100644 index 0000000000..b777432b33 --- /dev/null +++ b/main/mkinitfs/0001-init-make-readonly-for-world-when-tmpfs.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | From 666c4d431cd585ce45df93bef58ada648bf88b55 Mon Sep 17 00:00:00 2001 | ||
2 | From: Natanael Copa <ncopa@alpinelinux.org> | ||
3 | Date: Fri, 7 Jan 2011 12:48:39 +0000 | ||
4 | Subject: [PATCH 1/3] init: make / readonly for world when tmpfs | ||
5 | |||
6 | --- | ||
7 | initramfs-init.in | 4 ++-- | ||
8 | 1 files changed, 2 insertions(+), 2 deletions(-) | ||
9 | |||
10 | diff --git a/initramfs-init.in b/initramfs-init.in | ||
11 | index d140d75..8604c12 100755 | ||
12 | --- a/initramfs-init.in | ||
13 | +++ b/initramfs-init.in | ||
14 | @@ -328,9 +328,9 @@ if [ "$SINGLEMODE" = "yes" ]; then | ||
15 | fi | ||
16 | |||
17 | # mount tmpfs sysroot | ||
18 | -root_opts= | ||
19 | +root_opts="-o mode=0755" | ||
20 | if [ -n "$KOPT_root_size" ]; then | ||
21 | - root_opts="-o size=$KOPT_root_size" | ||
22 | + root_opts="$root_opts,size=$KOPT_root_size" | ||
23 | fi | ||
24 | mount -t tmpfs $root_opts tmpfs $sysroot | ||
25 | |||
26 | -- | ||
27 | 1.7.3.5 | ||
28 | |||
diff --git a/main/mkinitfs/APKBUILD b/main/mkinitfs/APKBUILD index a970586612..38a2821bf7 100644 --- a/main/mkinitfs/APKBUILD +++ b/main/mkinitfs/APKBUILD | |||
@@ -1,12 +1,13 @@ | |||
1 | # Maintainer: Natanael Copa <ncopa@alpinelinux.org> | 1 | # Maintainer: Natanael Copa <ncopa@alpinelinux.org> |
2 | pkgname=mkinitfs | 2 | pkgname=mkinitfs |
3 | pkgver=2.1.2 | 3 | pkgver=2.1.2 |
4 | pkgrel=0 | 4 | pkgrel=1 |
5 | pkgdesc="Tool to generate initramfs images for Alpine" | 5 | pkgdesc="Tool to generate initramfs images for Alpine" |
6 | url=http://git.alpinelinux.org/cgit/mkinitfs | 6 | url=http://git.alpinelinux.org/cgit/mkinitfs |
7 | depends="busybox apk-tools>=2.0" | 7 | depends="busybox apk-tools>=2.0" |
8 | triggers="$pkgname.trigger:/usr/share/kernel/*" | 8 | triggers="$pkgname.trigger:/usr/share/kernel/*" |
9 | source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2 | 9 | source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2 |
10 | 0001-init-make-readonly-for-world-when-tmpfs.patch | ||
10 | eglibc.patch | 11 | eglibc.patch |
11 | " | 12 | " |
12 | license="GPL-2" | 13 | license="GPL-2" |
@@ -31,4 +32,5 @@ package() { | |||
31 | make install DESTDIR="$pkgdir" || return 1 | 32 | make install DESTDIR="$pkgdir" || return 1 |
32 | } | 33 | } |
33 | md5sums="e35426eb23b379a648500a353031e719 mkinitfs-2.1.2.tar.bz2 | 34 | md5sums="e35426eb23b379a648500a353031e719 mkinitfs-2.1.2.tar.bz2 |
35 | e38e2f5c2b22b2789b5bc03aacba4d2d 0001-init-make-readonly-for-world-when-tmpfs.patch | ||
34 | e59c2f7de496fe430b07e32fd812ebe0 eglibc.patch" | 36 | e59c2f7de496fe430b07e32fd812ebe0 eglibc.patch" |