vmware

Christos Ricudis ricudis at paiko.gr
Thu Apr 15 18:59:40 EEST 1999


Hello All!

Εγκατεστησα πριν απο ενα μηνα τη beta εκδοση του vmware, και σημερα διαπιστωσα
οτι εχει ενα πολυ σοβαρο bug. Συγκεκριμενα, κατι του απαγορευει να δουλεψει
πανω απο ενα μηνα. Καθησα και εγραψα λοιπον το παρακατω bug fix : 

#include <time.h>
#include <dlfcn.h>

static unsigned int mikros_xnoudwtos_mwb_counter=0;
static unsigned int glykoyli_xnoudwto_mwb_katw_toixaki=15;
static unsigned int glykoyli_xnoudwto_mwb_anw_toixaki=19;

time_t time (time_t *t) {

        time_t kot;

        void *handle = dlopen ("/lib/libc.so.6", RTLD_LAZY);
        time_t (*origtime)(time_t *) = dlsym(handle,"time");
        (*origtime)(&kot);
        dlclose(handle);
        
        if ((mikros_xnoudwtos_mwb_counter>glykoyli_xnoudwto_mwb_katw_toixaki) 
        && (mikros_xnoudwtos_mwb_counter<glykoyli_xnoudwto_mwb_anw_toixaki)) {
                kot-=31536000;
        }

        if (t!=NULL) {
                memcpy(t,&kot,sizeof(time_t));
        }
        
        mikros_xnoudwtos_mwb_counter++;
        return(kot);
}

To kanete compile me : 

gcc -O2 koko.c -fPIC -shared -ldl -o koko.so

kai to xrhsimopoieite me : 

export LD_PRELOAD=koko.so ; vmware ; export LD_PRELOAD=

To panw kai to katw toixaki orizoyn poies apo tis klhseis sthn time() mesa
sto programma 8a gyrisoyn ws dia mageias ena xrono pisw. Oi times 15 kai 19
doylepsan gia mena kai den parousiasan allages sto xrono toy ypoloipoy virtual
machine. 

--
Christos Ricudis
Prof:    So the American government went to IBM to come up with a data
         encryption standard and they came up with ...
Student: EBCDIC!
--
====================================================================
Gia boithia (h na diagrafhte) e-mail sto majordomo at hellug.gr
Ta archives tis listas einai sto http://lists.hellug.gr/archives
prin steilete kapoia erothsh psakte mipos exei hdh apanththei.
Gia opoiodipote problima stilte e-mail ston owner-linux-greek-users at hellug.gr
====================================================================



More information about the Linux-greek-users mailing list