From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 13 Jun 2006 19:30:11 +0400 From: Alexey Tourbin To: ALT Devel discussion list Message-ID: <20060613153011.GK25291@localhost.localdomain> Mail-Followup-To: ALT Devel discussion list References: <20060613100648.GF25291@localhost.localdomain> <20060613121333.GA15408@basalt.office.altlinux.org> <20060613150418.GJ25291@localhost.localdomain> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lildS9pRFgpM/xzO" Content-Disposition: inline In-Reply-To: <20060613150418.GJ25291@localhost.localdomain> Subject: [devel] sucap + execcap = ... X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.7 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, 13 Jun 2006 15:29:50 -0000 Archived-At: List-Archive: List-Post: --lildS9pRFgpM/xzO Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 13, 2006 at 07:04:18PM +0400, Alexey Tourbin wrote: > On Tue, Jun 13, 2006 at 04:13:33PM +0400, Dmitry V. Levin wrote: > > On Tue, Jun 13, 2006 at 02:06:48PM +0400, Alexey Tourbin wrote: > > > =E9=DA cron.daily =CE=D5=D6=CE=CF =DA=C1=D0=D5=D3=CB=C1=D4=D8 =D0=D2= =CF=C7=D2=C1=CD=CD=D5 =CE=C1 =DB=C5=CC=CC=C5 (=D0=D2=C9=CD=C5=D2=CE=CF =CB= =C1=CB osec), > > > =D0=D2=C9 =DC=D4=CF=CD =D6=C5=CC=C1=D4=C5=CC=D8=CE=CF =D7=D9=D0=CF=CC= =CE=D1=D4=D8 =D0=D2=CF=C7=D2=C1=CD=CD=D5 =CF=D4 =D0=D3=C5=D7=C4=CF=D0=CF=CC= =D8=DA=CF=D7=C1=D4=C5=CC=D1 =C9 > > > =D3=C2=D2=CF=D3=C9=D4=D8 =D7=D3=C5 =D0=D2=C1=D7=C1, =CB=D2=CF=CD=C5 C= AP_DAC_READ_SEARCH (=CB=CF=D4=CF=D2=D9=C5 =C4=CF=CC=D6=CE=D9 =C2=D9=D4=D8 = =CB=C1=CB =D5 > > > =D2=D5=D4=C1). =EB=C1=CB =DC=D4=CF =D3=C4=C5=CC=C1=D4=D8 =D3 =D0=CF= =CD=CF=DD=D8=C0 libcap-utils? > > >=20 > > > # sucap at at ls =20 > > > Caps: =3Dep cap_setpcap-ep > >=20 > > =E2=C5=DA setpcap =D3 =D0=CF=CD=CF=DD=D8=C0 sucap =CE=C9=CB=C1=CB =CE= =C5 =D3=C4=C5=CC=C1=D4=D8. >=20 > =E1 =CB=C1=CB =D3 setpcap =D3=C4=C5=CC=C1=D4=D8? >=20 > # su -l nobody -s /bin/sh -c 'sleep 999999' & > [1] 14437 > # /sbin/setpcaps -q cap_dac_read_search=3Deip $! > [caps set to: > =3D cap_dac_read_search+eip > ] > Failed to set cap's on process `14437': (Operation not permitted) =F7 =CF=C2=DD=C5=CD =C5=D3=D4=D8 =D4=C9=D0=CF=D7=C1=D1 =DA=C1=C4=C1=DE=C1: = =D2=D5=D4 =C8=CF=DE=C5=D4 =DA=C1=D0=D5=D3=CB=C1=D4=D8 =D3=CB=D2=C9=D0=D4=D9 =D3 =D0=CF=CE=C9=D6=C5=CE=CE=D9=CD=C9 =D0=D2=C9=D7=C9=CC=C5=C7=D1=CD=C9 (= =CF=D4 =D0=D3=C5=D7=C4=CF=D0=CF=CC=D8=DA=CF=D7=C1=D4=C5=CC=D1), =CE=CF =D3 = =CE=C5=CB=CF=D4=CF=D2=D9=CD=C9 =D2=D5=D4=CF=D7=D9=CD=C9 capabilities. At some point, I decided I'd like to run a certain program non-root with certain capabilities only. I looked at the above two programs and stupidly thought they'd actually allow me to do this. http://www.uwsg.iu.edu/hypermail/linux/kernel/0503.1/2540.html =EF=CB=C1=DA=D9=D7=C1=C5=D4=D3=D1, =DE=D4=CF =D0=D2=C9=C5=CD=CC=C5=CD=CF=C7= =CF =D2=C5=DB=C5=CE=C9=D1 =DC=D4=CF=CA =D4=C9=D0=CF=D7=CF=CA =DA=C1=C4=C1= =DE=C9 =CE=C5=D4. =FE=D4=CF =CE=D5=D6=CE=CF, =D7=D2=CF=C4=C5 =D1=D3=CE=CF: suexeccap -u $uid -g $gid -c $cap -- qa-robot -m root@localhost psec /lib /= usr/lib --lildS9pRFgpM/xzO Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQFEjtoDfBKgtDjnu0YRArm5AKCIz+IdGaSRKeRz1U6IfK1LklFa4wCgxWYg kV/gE2uSkvaehAJXBkfHUxM= =dBf+ -----END PGP SIGNATURE----- --lildS9pRFgpM/xzO--