From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 17 Aug 2005 01:42:56 +0400 From: Alexey Tourbin To: ALT Devel discussion list Message-ID: <20050816214256.GV19097@solemn.turbinal.org> Mail-Followup-To: ALT Devel discussion list References: <20050816193136.GT19097@solemn.turbinal.org> <20050816195629.GB2637@basalt.office.altlinux.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="90dcdHIige6KdqvY" Content-Disposition: inline In-Reply-To: <20050816195629.GB2637@basalt.office.altlinux.org> Cc: Subject: [devel] Re: suid/sgid programs and temporary files X-BeenThere: devel@altlinux.ru X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ALT Devel discussion list List-Id: ALT Devel discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Aug 2005 21:43:47 -0000 Archived-At: List-Archive: List-Post: --90dcdHIige6KdqvY Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 16, 2005 at 11:56:29PM +0400, Dmitry V. Levin wrote: > > =F5=D3=CC=CF=D7=C9=D1 =D0=CF=C4=DE=C5=D2=CB=CE=D5=D4=CF=CA =D0=D2=CF=D7= =C5=D2=CB=C9 =CD=CF=D6=CE=CF =D0=C5=D2=C5=D7=C5=D3=D4=C9 =D0=D2=C9=CD=C5=D2= =CE=CF =CB=C1=CB > > st.st_uid > 10 && st.st_uid !=3D getuid() > >=20 > > =F7=CF=D0=D2=CF=D3: =C8=CF=D2=CF=DB=CF =CC=C9, =DE=D4=CF =DA=C4=C5=D3= =D8 =C9=D3=D0=CF=CC=D8=DA=D5=C5=D4=D3=D1 real uid? =EE=C5 =CC=D5=DE=DB=C5 = =CC=C9 > > =D0=D2=CF=D7=C5=D2=D1=D4=D8 effective uid?=20 >=20 > =FC=D4=CF =DA=C1=D7=C9=D3=C9=D4 =CF=D4 =D3=C5=CD=C1=CE=D4=C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C=CF=C7 =D3=DE= =C9=D4=C1=C5=D4=D3=D1 =C2=C5=DA=CF=D0=C1=D3=CE=D9=CD, =D0=CF=D4=CF=CD=D5 =DE=D4=CF getuid() =3D= =3D =F7=C1=D3=C9=CC=C9=CA), =D4=CF =D7=D2=C5=CD=C5=CE=CE=D9=CA =C6=C1=CA=CC= =CD=CF=D6=CE=CF =C2=D5=C4=C5=D4 =D0=CF=C4=CD=C5=CE=C9=D4=D8. =F3 =C4=D2=D5=C7=CF=CA =D3=D4= =CF=D2=CF=CE=D9, =C5=D3=CC=C9 =C2=D9 =D7=D9=D0=CF=CC=CE=D1=CC=C1=D3=D8 =D0= =D2=CF=D7=C5=D2=CB=C1 geteuid() =3D=3D =F7=C1=D3=C9=CC=C9=CA, =D4=CF =CB=C1=D4=C1=CC=CF=C7 ~/tmp = =D5=D6=C5 =CE=C5 =D3=DE=C9=D4=C1=CC=D3=D1 =C2=D9 =C2=C5=DA=CF=D0=C1=D3=CE= =D9=CD. --90dcdHIige6KdqvY Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFDAl3gfBKgtDjnu0YRAuS5AKCqyR2UROnxl1TMcETAk6u5E2GqvwCeJoey eqS4Xfx9gzYmaXvAfFpQZqk= =B/lN -----END PGP SIGNATURE----- --90dcdHIige6KdqvY--