Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/util-linux/files: crypto-loop.initd util-linux-2.13-setuid-checks.patch digest-util-linux-2.13-r2 digest-util-linux-2.12r-r8 util-linux-2.13-script-SIGWINCH.patch
Date: Fri, 05 Oct 2007 23:36:19
Message-Id: E1IdwZN-0001ar-NZ@stork.gentoo.org
1 vapier 07/10/05 23:26:57
2
3 Modified: crypto-loop.initd
4 Added: util-linux-2.13-setuid-checks.patch
5 digest-util-linux-2.13-r2
6 digest-util-linux-2.12r-r8
7 util-linux-2.13-script-SIGWINCH.patch
8 Log:
9 Add fix from upstream for `script` breakage with SIGWINCH #191452 by Eric Augustus. Add security fix from upstream. Fix from Petr Pisar for swap on cryptoloop #182031. Add by in loop-aes support via USE=crypt #193088 by Hank Leininger and Alon Bar-Lev.
10 (Portage version: 2.1.3.11)
11
12 Revision Changes Path
13 1.2 sys-apps/util-linux/files/crypto-loop.initd
14
15 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/util-linux/files/crypto-loop.initd?rev=1.2&view=markup
16 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/util-linux/files/crypto-loop.initd?rev=1.2&content-type=text/plain
17 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/util-linux/files/crypto-loop.initd?r1=1.1&r2=1.2
18
19 Index: crypto-loop.initd
20 ===================================================================
21 RCS file: /var/cvsroot/gentoo-x86/sys-apps/util-linux/files/crypto-loop.initd,v
22 retrieving revision 1.1
23 retrieving revision 1.2
24 diff -u -r1.1 -r1.2
25 --- crypto-loop.initd 29 Apr 2005 23:54:25 -0000 1.1
26 +++ crypto-loop.initd 5 Oct 2007 23:26:57 -0000 1.2
27 @@ -1,7 +1,7 @@
28 #!/sbin/runscript
29 # Copyright 1999-2005 Gentoo Foundation
30 # Distributed under the terms of the GNU General Public License v2
31 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/files/crypto-loop.initd,v 1.1 2005/04/29 23:54:25 vapier Exp $
32 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/files/crypto-loop.initd,v 1.2 2007/10/05 23:26:57 vapier Exp $
33
34 depend() {
35 need checkroot modules
36 @@ -51,7 +51,7 @@
37 for loop in $(ls /dev/loop[0-9]) ; do
38 losetup ${loop} &> /dev/null
39 if [[ $? == 0 ]] ; then
40 - umount ${loop} &>/dev/null
41 + umount ${loop} &>/dev/null || swapoff "${loop}" &>/dev/null
42 if ! /sbin/losetup -d ${loop} &> /dev/null ; then
43 ewarn "Failure deconfiguring ${loop}."
44 status=1
45
46
47
48 1.1 sys-apps/util-linux/files/util-linux-2.13-setuid-checks.patch
49
50 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/util-linux/files/util-linux-2.13-setuid-checks.patch?rev=1.1&view=markup
51 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/util-linux/files/util-linux-2.13-setuid-checks.patch?rev=1.1&content-type=text/plain
52
53 Index: util-linux-2.13-setuid-checks.patch
54 ===================================================================
55 From: Ludwig Nussel <ludwig.nussel@××××.de>
56 Date: Thu, 20 Sep 2007 12:57:20 +0000 (+0200)
57 Subject: mount: doesn't drop privileges properly when calling helpers
58 X-Git-Url: http://git.kernel.org/?p=utils%2Futil-linux-ng%2Futil-linux-ng.git;a=commitdiff_plain;h=ebbeb2c7ac1b00b6083905957837a271e80b187e
59
60 mount: doesn't drop privileges properly when calling helpers
61
62 {,u}mount calls setuid() and setgid() in the wrong order and doesn't checking
63 the return value of set{u,g}id(() when running helpers like mount.nfs.
64
65 Signed-off-by: Ludwig Nussel <ludwig.nussel@××××.de>
66 Signed-off-by: Karel Zak <kzak@××××××.com>
67 ---
68
69 diff --git a/mount/mount.c b/mount/mount.c
70 index 40699f3..5bc2b30 100644
71 --- a/mount/mount.c
72 +++ b/mount/mount.c
73 @@ -634,8 +634,12 @@ check_special_mountprog(const char *spec, const char *node, const char *type, in
74 char *oo, *mountargs[10];
75 int i = 0;
76
77 - setuid(getuid());
78 - setgid(getgid());
79 + if(setgid(getgid()) < 0)
80 + die(EX_FAIL, _("mount: cannot set group id: %s"), strerror(errno));
81 +
82 + if(setuid(getuid()) < 0)
83 + die(EX_FAIL, _("mount: cannot set user id: %s"), strerror(errno));
84 +
85 oo = fix_opts_string (flags, extra_opts, NULL);
86 mountargs[i++] = mountprog; /* 1 */
87 mountargs[i++] = (char *) spec; /* 2 */
88 diff --git a/mount/umount.c b/mount/umount.c
89 index b3100c9..3221619 100644
90 --- a/mount/umount.c
91 +++ b/mount/umount.c
92 @@ -102,8 +102,12 @@ check_special_umountprog(const char *spec, const char *node,
93 char *umountargs[8];
94 int i = 0;
95
96 - setuid(getuid());
97 - setgid(getgid());
98 + if(setgid(getgid()) < 0)
99 + die(EX_FAIL, _("umount: cannot set group id: %s"), strerror(errno));
100 +
101 + if(setuid(getuid()) < 0)
102 + die(EX_FAIL, _("umount: cannot set user id: %s"), strerror(errno));
103 +
104 umountargs[i++] = umountprog;
105 umountargs[i++] = xstrdup(node);
106 if (nomtab)
107
108
109
110 1.1 sys-apps/util-linux/files/digest-util-linux-2.13-r2
111
112 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/util-linux/files/digest-util-linux-2.13-r2?rev=1.1&view=markup
113 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/util-linux/files/digest-util-linux-2.13-r2?rev=1.1&content-type=text/plain
114
115 Index: digest-util-linux-2.13-r2
116 ===================================================================
117 MD5 601caadc3248fcd6b5911fc6339451e9 util-linux-ng-2.13-1.diff.bz2 40468
118 RMD160 defb0fa7abb39963d1d168c4fbf8352ceb2a916c util-linux-ng-2.13-1.diff.bz2 40468
119 SHA256 6606666808f510cc8aeead408e14d3226b06219b0752ca3badea7acd154929cd util-linux-ng-2.13-1.diff.bz2 40468
120 MD5 2175a6e64ba0cf8ff05402eaee33e4b0 util-linux-ng-2.13.tar.bz2 2702618
121 RMD160 499b1c5c2060b23d8bf504122a22122af99eb7fa util-linux-ng-2.13.tar.bz2 2702618
122 SHA256 002412e93d8e85b1796fdbe65bbb0a4d193d0317a7155fda4270667e08bdfbfc util-linux-ng-2.13.tar.bz2 2702618
123
124
125
126 1.1 sys-apps/util-linux/files/digest-util-linux-2.12r-r8
127
128 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/util-linux/files/digest-util-linux-2.12r-r8?rev=1.1&view=markup
129 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/util-linux/files/digest-util-linux-2.12r-r8?rev=1.1&content-type=text/plain
130
131 Index: digest-util-linux-2.12r-r8
132 ===================================================================
133 MD5 1020b93d723f1d573bacfe4a3362fc25 loop-AES-v3.1f.tar.bz2 173423
134 RMD160 7490e3d90727621fde3052fd1747af338518b158 loop-AES-v3.1f.tar.bz2 173423
135 SHA256 f744f3dd74b554d1a2e3788752c4a63049647bfd2bae71d9fff2427c0e175ca7 loop-AES-v3.1f.tar.bz2 173423
136 MD5 dee120b17425e1edf0a0c64f0e249c20 util-linux-2.12i-cryptoapi-losetup.patch.bz2 4800
137 RMD160 82e54aedd691aa93b67de9dfb9049a3f012a29f7 util-linux-2.12i-cryptoapi-losetup.patch.bz2 4800
138 SHA256 565a0cc6c3c148a66969276ae9d34dc34f19fbd45df2740343793ee067b3700f util-linux-2.12i-cryptoapi-losetup.patch.bz2 4800
139 MD5 6e0deccf97db98d2ae751577d019efa4 util-linux-2.12i.tar.gz 1975468
140 RMD160 f055a94ad247dc59293f7b933c12bdda135159fc util-linux-2.12i.tar.gz 1975468
141 SHA256 28e2fc70d7507e158d8861c958461aef1c4bbf4157a8ebbc237943944e5a8c4a util-linux-2.12i.tar.gz 1975468
142 MD5 af9d9e03038481fbf79ea3ac33f116f9 util-linux-2.12r.tar.bz2 1370907
143 RMD160 51950aafd5cbcb574e69fbd6b28d15a106147e64 util-linux-2.12r.tar.bz2 1370907
144 SHA256 b8e499b338ce9fbd1fb315194b26540ec823c0afc46c9e145ac7a3e38ad57e6b util-linux-2.12r.tar.bz2 1370907
145
146
147
148 1.1 sys-apps/util-linux/files/util-linux-2.13-script-SIGWINCH.patch
149
150 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/util-linux/files/util-linux-2.13-script-SIGWINCH.patch?rev=1.1&view=markup
151 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/util-linux/files/util-linux-2.13-script-SIGWINCH.patch?rev=1.1&content-type=text/plain
152
153 Index: util-linux-2.13-script-SIGWINCH.patch
154 ===================================================================
155 commit 2b8bbb5fb0f024ea3917fedbbbaf0fab1c1f6555
156 Author: Karel Zak <kzak@××××××.com>
157 Date: Fri Oct 5 12:22:13 2007 +0200
158
159 script: dies on SIGWINCH
160
161 The "doinput" process doesn't make a difference between SIGWINCH and
162 SIGCHILD. This process also sends unnecessary SIGWINCH to child (the
163 signal is ignored by child). Fixed.
164
165 Signed-off-by: Karel Zak <kzak@××××××.com>
166
167 diff --git a/misc-utils/script.c b/misc-utils/script.c
168 index d3272df..3b957d8 100644
169 --- a/misc-utils/script.c
170 +++ b/misc-utils/script.c
171 @@ -99,6 +99,7 @@ int tflg = 0;
172 static char *progname;
173
174 int die;
175 +int resized;
176
177 static void
178 die_if_link(char *fn) {
179 @@ -235,8 +236,14 @@ doinput() {
180 if (die == 0 && child && kill(child, 0) == -1 && errno == ESRCH)
181 die = 1;
182
183 - while (die == 0 && (cc = read(0, ibuf, BUFSIZ)) > 0)
184 - (void) write(master, ibuf, cc);
185 + while (die == 0) {
186 + if ((cc = read(0, ibuf, BUFSIZ)) > 0)
187 + (void) write(master, ibuf, cc);
188 + else if (cc == -1 && errno == EINTR && resized)
189 + resized = 0;
190 + else
191 + break;
192 + }
193
194 done();
195 }
196 @@ -255,11 +262,10 @@ finish(int dummy) {
197
198 void
199 resize(int dummy) {
200 + resized = 1;
201 /* transmit window change information to the child */
202 (void) ioctl(0, TIOCGWINSZ, (char *)&win);
203 (void) ioctl(slave, TIOCSWINSZ, (char *)&win);
204 -
205 - kill(child, SIGWINCH);
206 }
207
208 /*
209
210
211
212
213
214 --
215 gentoo-commits@g.o mailing list