Egy IRC beszélgetés-szerü hogyan-t szeretnék közzétenni, amely a regular expression alapjait mutatja be. Ime egy kis ízelítö:
It’s a known issue, that users tend to overload the network by downloading movies, music, etc… so the admin would like to put the users into a chroot environment. Now this doesn’t gonna happen, since we can restrict some downloads using squid. The condition is an installed and configured squid.
Elöszöris, el kell döntened, hogy hol akarod a chroot körnzezetedet telepíteni, mivel késöbb egy kisebb rendszert fogsz telepiteni bele. Tehát az elsö lépés, hogy csinálsz egy ilyen könyvtárat, és ezzel elkezded a chroot környezet telepítésének elsö lépéseit. Köztudott, hogy a chroot a felhasználónak a root könyvtárát egy külön könyvtárba rakja. A többi külsö forrás a chrootolt felhasználó javára nem elérhetö. Talán a legfontosabb dolog az új környezetben az, hogy ne legyen superuser (root, uid=û). Ha a chrootol felhasználó root jogot szerez, akkor nagyon könnyü ebböl a környezetböl kitörni. Emiatt is csináljuk ezt a fajta korlátolt környezetet, hogy nehezítsük meg a támadó dolgát. És mivel a környezeten belül nincs root, a támadó nem is tudja megszerezni a root jogot. Na, elég a dumából, vágjunk neki:
First of all, you need to decide, where to build this chroot environment, since you will later install a separated little system in it. The first step is to create this directory, to begin the basic operations of the build of the chroot. As you may know chroot effectively changes the root directory of a user (or process, daemon, etc…) to a specified environment by the root user. Any other resource outside of this kind of jail would and should be inaccessible to the user, who has been chrooted. The most relevant thing in the new chroot environment is, that you don’t create a superuser (root, uid=0). If the chrooted user gains root access he can break out of this little cage. That is why we want to build a chrooted ambience, to protect our system from attackers. The attacker won’t gain root access, if there is no such user. So, enough of the jaw, let’s begin:
There are a several AJAX applications for form validation, like the one from Particletree, from roscripts, dustindiaz, dexagogo, fValidate, or FormAssembly. All these scripts are really great, but I didn’t found something that’s really simple, e.g. without using any AJAX library, so I decided to code one myself.