From: Erhan Ekici (erhan@uzem.itu.edu.tr)
Date: Mon 12 Jan 2004 - 21:02:16 EST
Merhabalar...
> > if (!session.disable_id_switching) { \
> > if (setregid(session.gid, PR_ROOT_GID)) \
> > log_pri(PR_LOG_ERR, "PRIVS_ROOT: unable to setregid(): %s", \
> > strerror(errno)); \
> > if (setreuid(session.uid, PR_ROOT_UID)) \
> > log_pri(PR_LOG_ERR, "PRIVS_ROOT: unable to setreuid(): %s", \
> > strerror(errno)); \
> > } else \
> > log_debug(DEBUG9, "ROOT PRIVS: ID switching disabled"); \
> >
> >
> > setregid(session.gid, PR_ROOT_GID) fonksiyonu pozitif(TRUE) sonuc
> > dondurmuyor.
Biraz once sanirim yanlis yazdim.Yukaridaki kosulda
setregid(session.gid, PR_ROOT_GID) basarili olursa 0 degerini dondurecek ve
if kosulu isletilmeyecek.Fakat basarisiz olunca -1 degerini dondurecek ve if
kosuluna girecektir.Bu da ekrana "PRIVS_ROOT: unable to setregid(): %s"
hata msg ini yazdirir.Bu durumda setregid() fonksiyonu yetkili kullanici
tarafindan calistirilmiyor demektir..
Daha fazla bilgi icin: man setregid
Umarim isinize yarar...
Iyi calismalar,
Quoting Erhan Ekici <erhan@uzem.itu.edu.tr>:
> Merhabalar...
>
> Haklisiniz..gece gece gozden kacirmisim..pardon.
> Bu durumda olayin tam tersini dusunmemiz gerekiyor sanirim...
> Yani processsin calisma yetkisi bu fonksiyonu gerceklememeli gibi..
>
> iyi calismalar,
>
>
>
> Quoting Özgür Çelik <ozgur.celik@enter.com.tr>:
>
> > Fakat session.gid true deger vermiyorsa neden else d=F6ng=FCs=FCn=FC =
> > i=FEletmeyebilir.
> > T=FEk.
> >
> >
> > -----Original Message-----
> > From: linux-network-bounce@liste.linux.org.tr
> > [mailto:linux-network-bounce@liste.linux.org.tr] On Behalf Of Erhan =
> > Ekici
> > Sent: Monday, January 12, 2004 3:56 AM
> > To: linux-network@liste.linux.org.tr; =D6zg=FCr =C7elik
> > Cc: linux-network@liste.linux.org.tr
> > Subject: [linux-network] Re: proftbd ile ilgili sorun
> >
> > Merhabalar...
> >
> > Proftpd kaynak kodunda privs.h=20
> > (http://castaglia.proftpd.de/doc/devel-guide/src/include/privs.h.html)
> > dosyas=FDnda hatan=FDn olu=FEtu=F0u k=FDs=FDm =FE=F6yle g=F6z=FCk=FCyor:
> >
> > if (!session.disable_id_switching) { \
> > if (setregid(session.gid, PR_ROOT_GID)) \
> > log_pri(PR_LOG_ERR, "PRIVS_ROOT: unable to setregid(): %s", \
> > strerror(errno)); \
> > if (setreuid(session.uid, PR_ROOT_UID)) \
> > log_pri(PR_LOG_ERR, "PRIVS_ROOT: unable to setreuid(): %s", \
> > strerror(errno)); \
> > } else \
> > log_debug(DEBUG9, "ROOT PRIVS: ID switching disabled"); \
> >
> >
> > setregid(session.gid, PR_ROOT_GID) fonksiyonu pozitif(TRUE) sonu=E7
> > d=F6nd=FCrm=FCyor.
> >
> > setregid() Function:
> > ----------------------=20
> > The setregid() function shall set the real and effective group IDs of =
> > the=20
> > calling process.Only a process with appropriate privileges can set the =
> > real=20
> > group ID and the effective group ID to any valid value.
> >
> > http://www.opengroup.org/onlinepubs/007904975/functions/setregid.html
> >
> > Umar=FDm i=FEinize yarar..
> >
> > =DDyi =C7al=FD=FEmalar...
> >
> >
> > Quoting =D6zg=FCr =C7elik <ozgur.celik@enter.com.tr>:
> >
> > > Version proftpd-1.2.9rc1 hp-ux =3DFCzerinde =
> > =3DE7al=3DFD=3DFE=3DFDyor=3D20
> > >=20
> > > Te=3DFEekk=3DFCrler
> > >=20
> > > -----Original Message-----
> > > From: linux-network-bounce@liste.linux.org.tr
> > > [mailto:linux-network-bounce@liste.linux.org.tr] On Behalf Of Devrim =
> > =3D
> > > GUNDUZ
> > > Sent: Sunday, January 11, 2004 8:37 PM
> > > To: linux-network@liste.linux.org.tr
> > > Subject: [linux-network] Re: proftbd ile ilgili sorun
> > >=20
> > > -----BEGIN PGP SIGNED MESSAGE-----
> > > Hash: SHA1
> > >=20
> > >=20
> > > Merhaba,
> > >=20
> > > On Sat, 10 Jan 2004, =3DD6zg=3DFCr =3DC7elik wrote:
> > >=20
> > > > Slm proftpd loglar=3D3DFDnda a=3D3DFEag=3D3DFDdaki hatay=3D3DFD =
> > veriyor bu =3D
> > > konu =3D3D
> > > > hakk=3D3DFDnda bilgisi
> > > > olan varm=3D3DFD=3D3D20
> > > > PRIVS_ROOT: unable to setregid(): Not owner .
> > >=20
> > > Kullandiginiz proftpd surumu nedir acaba? Bir de hangi dagitimda=3D20
> > > kullaniyorsunuz?
> > >=20
> > > Saygilar,
> > >=20
> > > - --=3D20
> > > Devrim GUNDUZ =3D20
> > > devrim@gunduz.org
> > devrim.gunduz@linux.org.tr=3D20
> > > http://www.TDMSoft.com
> > > http://www.gunduz.org
> > > -----BEGIN PGP SIGNATURE-----
> > > Version: GnuPG v1.2.1 (GNU/Linux)
> > >=20
> > > iD8DBQFAAZfWtl86P3SPfQ4RAuzoAJwMaDrZktzzBEgv9r3P1/FzFH/gawCfT6Zo
> > > VK5EMofSlkq09rgJeKbKcRY=3D3D
> > > =3D3D0lSP
> > > -----END PGP SIGNATURE-----
> > >=20
> > >=20
> > >=20
> > >=20
> > >=20
> >
> >
> > --=20
> >
> > Erhan Ekici
> > =DDT=DC Uzaktan E=F0itim Merkezi
> > E-Posta : erhan@uzem.itu.edu.tr
> >
> >
> > www.uzem.itu.edu.tr
> >
> >
> >
> >
> >
> >
>
>
> --
>
> Erhan Ekici
> İTÜ Uzaktan Eğitim Merkezi
> E-Posta : erhan@uzem.itu.edu.tr
>
>
> www.uzem.itu.edu.tr
>
>
>
>
-- Erhan Ekici İTÜ Uzaktan Eğitim Merkezi E-Posta : erhan@uzem.itu.edu.tr www.uzem.itu.edu.tr