IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 8, 2023, 12:14:39 PM (3 years ago)
Author:
eugene
Message:

merge from eam_branches/ipp-20220316. add safety to pxadmin to prevent drop of ops dbs, add fpcamera, more flexibility in ippadmin for testing; prevent pzgetexp from trying to download too many exposures

Location:
trunk/ippTools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools

  • trunk/ippTools/src

  • trunk/ippTools/src/pxadmin.c

    r26981 r42387  
    184184        psString dbName = name->data.str;
    185185
     186        // if name is e.g., gpc1, strcasecmp returns FALSE
     187        bool allowDelete = true;
     188        allowDelete = allowDelete && strcasecmp(dbName, "gpc1"); 
     189        allowDelete = allowDelete && strcasecmp(dbName, "gpc2"); 
     190        allowDelete = allowDelete && strcasecmp(dbName, "nebulous"); 
     191        allowDelete = allowDelete && strcasecmp(dbName, "isp"); 
     192        allowDelete = allowDelete && strcasecmp(dbName, "ssp"); 
     193        allowDelete = allowDelete && strcasecmp(dbName, "uic"); 
     194        allowDelete = allowDelete && strcasecmp(dbName, "hsc_v1"); 
     195        allowDelete = allowDelete && strcasecmp(dbName, "megacam_v1"); 
     196
     197        if (!allowDelete) {
     198            fprintf (stdout, "**** WARNING: not allowed to delete database %s.\n", dbName);
     199            return false;
     200        }
     201
    186202        fprintf(stdout, "*** delete the tables from database %s? ***\n", dbName);
    187203        fprintf(stdout, "*** to delete the tables, answer YES, and give password ***\n");
Note: See TracChangeset for help on using the changeset viewer.