From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 30 Aug 2010 17:09:29 +0400 From: "Dmitry V. Levin" To: ALT Devel discussion list Message-ID: <20100830130913.GB15653@altlinux.org> Mail-Followup-To: ALT Devel discussion list References: <20100829221137.GB7732@altlinux.org> <1283149714.3294.12.camel@shrek.croc.ru> <1283149894.3294.14.camel@shrek.croc.ru> <20100830080754.GB6048@altlinux.org> <20100830081837.GD6048@altlinux.org> <1283156824.3294.22.camel@shrek.croc.ru> <20100830095129.GA10000@altlinux.org> <4C7B8346.5090402@altlinux.ru> <20100830102051.GC24249@altlinux.org> <4C7B883C.9030305@altlinux.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9zSXsLTf0vkW971A" Content-Disposition: inline In-Reply-To: <4C7B883C.9030305@altlinux.ru> X-fingerprint: FE4C 93AB E19A 2E4C CB5D 3E4E 7CAB E6AC 9E35 361E Subject: Re: [devel] I: xorg-server, dbus: SELinux support breaks software X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2010 13:10:51 -0000 X-List-Received-Date: Mon, 30 Aug 2010 13:10:51 -0000 Archived-At: List-Archive: List-Post: --9zSXsLTf0vkW971A Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 30, 2010 at 02:30:20PM +0400, Alexey Gladkov wrote: > 30.08.2010 14:21, Dmitry V. Levin wrote: > > =F7 =CB=CF=C4=C5 is_selinux_enabled() =CE=C5=D4 =D0=D2=CF=D7=C5=D2=CB= =C9 =CE=C1 =CE=C5=D7=CF=DA=CD=CF=D6=CE=CF=D3=D4=D8 =D0=D2=CF=DE=C9=D4=C1=D4= =D8. >=20 > 38 /* Drop back to detecting it the long way. */ > 39 fp =3D fopen("/proc/filesystems", "r"); > 40 if (!fp) > 41 return -1; >=20 > =FA=C4=C5=D3=D8 =CD=D9 =D7=CF=DA=D7=D2=C1=DD=C1=C5=CD -1. =FA=C1=DE=C5=CD= =D4=D5=D4 -1, =D0=CF=DE=C5=CD=D5 =CE=C5 goto out; ? =F0=CF=D4=CF=CD=D5 =DE=D4=CF out: =D7=D9=D0=CF=CC=CE=D1=C5=D4 fclose(fp) = =C9 =D7=CF=DA=D7=D2=C1=DD=C1=C5=D4 0/1. > 44 while ((num =3D getline(&buf, &len, fp)) !=3D -1) { > 45 if (strstr(buf, "selinuxfs")) { > 46 enabled =3D 1; > 47 break; > 48 } > 49 } > 50 > 51 if (num < 0) > 52 goto out; >=20 > =E4=C9=CD, =D0=D2=CF=D7=C5=D2=CB=C1 =C5=D3=D4=D8 =C9 =D7 =DC=D4=CF=CD =D3= =CC=D5=DE=C1=C5 =D7=C5=D2=CE=A3=D4=D3=D1 0. =EC=C0=C4=C9, =CB=CF=D4=CF=D2=D9=C5 =D0=C9=D3=C1=CC=C9 =DC=D4=CF=D4 =CB=CF= =C4, =DA=C1=CB=D2=D9=CC=C9 =C7=CC=C1=DA=C1 =CE=C1 =D4=CF, =DE=D4=CF, =D4=C5= =CF=D2=C5=D4=C9=DE=C5=D3=CB=C9 =D7=CF=DA=CD=CF=D6=CE=C1 =D3=C9=D4=D5=C1=C3=C9=D1, =CB=CF=C7=C4=C1 getline(= 3) =D7=CF=DA=D7=D2=C1=DD=C1=C5=D4 =CF=DB=C9=C2=CB=D5 =CE=C5 =C9=DA-=DA=C1 E= OF. =FC=D4=CF =D0=D2=CF=D7=C5=D2=CB=C1 =CE=C5 =CE=C1 =CF=DB=C9=C2=CB=D5, =C1 = =CE=C1 EOF. =E5=D3=CC=C9 =D7 =DC=D4=CF=CA =D4=CF=DE=CB=C5 num < 0, =DC=D4= =CF =DA=CE=C1=DE=C9=D4, =DE=D4=CF =D7 =C6=C1=CA=CC=C5 /proc/filesystems =CE=C5= =D4 selinuxfs. --=20 ldv --9zSXsLTf0vkW971A Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAkx7rXkACgkQfKvmrJ41Nh4eVQCfSs48rwDz/D0LhICcELCJZJ9q O/0AnRmZKseJBfcYkeo9KMQWxY+/ob7d =zNv/ -----END PGP SIGNATURE----- --9zSXsLTf0vkW971A--