IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 11, 2026, 3:07:05 PM (3 months ago)
Author:
eugene
Message:

only allow pxadmin to delete databases named "test" or "simtest"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-pstamp-20260421/ippTools/src/pxadmin.c

    r42387 r43013  
    185185
    186186        // 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"); 
     187        bool allowDelete = false;
     188
     189        // only allow deletion for the following test databases:
     190        allowDelete = allowDelete || !strcasecmp(dbName, "test"); 
     191        allowDelete = allowDelete || !strcasecmp(dbName, "simtest"); 
     192
     193        // allowDelete = allowDelete && strcasecmp(dbName, "gpc1"); 
     194        // allowDelete = allowDelete && strcasecmp(dbName, "gpc2"); 
     195        // allowDelete = allowDelete && strcasecmp(dbName, "nebulous"); 
     196        // allowDelete = allowDelete && strcasecmp(dbName, "isp"); 
     197        // allowDelete = allowDelete && strcasecmp(dbName, "ssp"); 
     198        // allowDelete = allowDelete && strcasecmp(dbName, "uic"); 
     199        // allowDelete = allowDelete && strcasecmp(dbName, "hsc_v1"); 
     200        // allowDelete = allowDelete && strcasecmp(dbName, "megacam_v1"); 
    196201
    197202        if (!allowDelete) {
Note: See TracChangeset for help on using the changeset viewer.