From: Enver ALTIN (ealtin@casdb.com)
Date: Fri 09 Aug 2002 - 21:25:13 EEST
On Fri, 2002-08-09 at 19:25, Onur Yalazi wrote:
> Merhabalar..
Merhaba,
> Arkadaşlar php ile bir dosyanın sahibini nasıl sistemde bulunmayan sanal
> bir kullanıcı id (uid) si yapabiliriz?
> chown ile denediğimde sistemde bu kullanıcı bulunmuyor diye hata verdi..
> Acaba bir üç kağıt falan bilen var mı? ;)
glibc chown() fonksiyonu ise yarayacaktir. Kucuk bir C programi:
----------------------------
/* Untested */
#include <sys/types.h>
#include <unistd.h>
int main(int argc, char*argv[]) {
chown(
argv[1],
0, /* UID here */
0, /* GID here */
);
return 0;
}
----------------------------
$ gcc -o setowner hebele.c
ile derlersiniz, setuid root yaparsiniz ve kocaman bir guvenlik aciginiz
olur :)) Bir baslangic sadece.
$ man 2 chown
Iyi calismalar
-- Enver ALTIN (a.k.a. skyblue) - Software developer, generic solvent. http://enver.casdb.com/ - mailto: ealtin at casdb dot com http://enver.casdb.com/CV.html - Just me, myself and I.Besides, I think Slackware sounds better than 'Microsoft,' don't you? -- Patrick Volkerding
-- Attached file included as plaintext by Ecartis -- -- File: signature.asc -- Desc: This is a digitally signed message part
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org
iD8DBQA9VAkJZ1V/Ii8KIB8RAhOFAJ4zbzxp62yEy8UiLLVvLECZHE3xjACgmNkr OXL25fbiFt/fdCtuRXeQINg= =56FK -----END PGP SIGNATURE-----