Changeset 12982


Ignore:
Timestamp:
01/08/12 18:00:40 (12 years ago)
Author:
obi
Message:

[titan] update securety procs

Location:
titan/titan
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/global.h

    r12966 r12982  
    22#define GLOBAL_H
    33
    4 int checkserial(char* input)
    5 {
    6         //comming....
    7         return 1;
     4void checkserial(char* input)
     5{
     6        char* authfile = NULL;
     7//      gethttp(get_ip("atemio.dyndns.tv"), "/svn/auth/trustlist", 80, "/tmp/.cachefile", "YXRlbWlvOkZIWlZCR2huemZ2RWhGREZUR3p1aWY1Njc2emhqR1RVR0JOSGpt", NULL);
     8        gethttp("atemio.dyndns.tv", "/svn/auth/trustlist", 80, "/tmp/.cachefile", "YXRlbWlvOkZIWlZCR2huemZ2RWhGREZUR3p1aWY1Njc2emhqR1RVR0JOSGpt", NULL);
     9
     10        authfile = command("cat /tmp/.cachefile");
     11        unlink("/tmp/.cachefile");
     12//      printf("authfile: %s\n",authfile);
     13//      printf("input: %s\n",input);
     14
     15        int count = 0;
     16        int i;
     17//      char* tmpstr = NULL;
     18//      tmpstr = ostrcat("", authfile, 0, 0);
     19        struct splitstr* ret = NULL;
     20        ret = strsplit(authfile, "\n", &count);
     21        int max = count;
     22        status.securety = 0;
     23
     24        for( i = 0; i < max; i++){
     25                if(ostrcmp(input, (&ret[i])->part) == 0)
     26                {
     27                        printf("Serial check ok: disable securety\n");
     28                        status.securety = 1;
     29                        break;
     30                }       
     31        }
     32//      if(string_find(input,authfile))
     33//              printf("found serial in trustlist\n");
     34//              return 0;
     35//      else
     36//              printf("error, not found serial in trustlist\n");
     37//      //comming....
     38//      return 1;
    839}
    940
     
    272303int checkmenuforbox(char *name)
    273304{
     305
     306        if(status.securety == 0)
     307        {
     308                if(ostrcmp("panel_system_update_flash_online", name) == 0) return 0;
     309                if(ostrcmp("panel_system_update_flash_tmp", name) == 0) return 0;
     310                if(ostrcmp("panel_system_eraseswap", name) == 0) return 0;
     311                if(ostrcmp("panel_extensions", name) == 0) return 0;
     312                if(ostrcmp("mediacenter", name) == 0) return 0;
     313                if(ostrcmp("browser", name) == 0) return 0;
     314                if(ostrcmp("callmon_main", name) == 0) return 0;
     315                if(ostrcmp("imdb", name) == 0) return 0;
     316                if(ostrcmp("keylock", name) == 0) return 0;
     317                if(ostrcmp("permtime", name) == 0) return 0;
     318                if(ostrcmp("networkbrowser", name) == 0) return 0;
     319                if(ostrcmp("mboxinfo", name) == 0) return 0;
     320                if(ostrcmp("keylock", name) == 0) return 0;
     321                if(ostrcmp("plugins", name) == 0) return 0;
     322                if(ostrcmp("skinselect", name) == 0) return 0;
     323                status.expertmodus = 0;
     324        }               
     325
    274326        if(status.expertmodus > 9) return 1;
    275327        if((checkbox("ATEMIO500") == 1) || (checkbox("ATEMIO510") == 1))
  • titan/titan/struct.h

    r12866 r12982  
    963963        //save old rotor position
    964964        int rotoroldorbitalpos;
     965        // securety check
     966        int securety;
    965967} status;
    966968
  • titan/titan/titan.c

    r12947 r12982  
    158158//#include "sci.h"
    159159
    160 #define TIMECODE 0
     160#define TIMECODE ""
    161161
    162162char* gettimeinfo()
     
    351351        }
    352352       
    353         if(file_exist("/var/swap/etc/.vnumber") == 1)
     353        if(file_exist("/mnt/swapextensions/etc/.vnumber") == 1)
    354354        {
    355355                destroy();
    356356                exit(100);
    357357        }
     358        checkserial(getcpuid());
     359
    358360#endif
    359361        debug(1000, "in");
     
    524526        if(skincheck > 0)
    525527        {
     528
    526529                tmpstr = ostrcat(tmpstr, _("Error: skin not found !!"), 1, 0);
    527530                goto starterror;
     
    686689                }
    687690        }
    688                        
     691       
    689692        screeninfobar();
    690693
Note: See TracChangeset for help on using the changeset viewer.