Ignore:
Timestamp:
02/14/14 10:56:00 (5 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, releng/10.0.1, releng/10.0.2
Children:
296dc5b
Parents:
953cbc3d
Message:

Fix a bug in warden GUI, validate the hostname / IPs aren't in use before letting
the user continue to make a new jail

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/warden-gui/wizardNewJail.cpp

    rc0618f2 rd71f644  
    135135 
    136136         // Check if this IP / Host is already used 
    137          for (int i = 0; i < usedHosts.size(); ++i) 
    138             if ( usedHosts.at(i) == lineHost->text() ) { 
     137         for (int i = 0; i < usedHosts.size(); ++i) { 
     138            if ( usedHosts.at(i).toLower() == lineHost->text().toLower() ) { 
    139139               button(QWizard::NextButton)->setEnabled(false); 
    140140               lineHost->setPalette(badPal); 
     
    142142               return false; 
    143143            } 
     144         } 
    144145         for (int i = 0; i < usedIP.size(); ++i) 
    145             if ( usedIP.at(i) == lineIP->text() ) { 
     146            if ( usedIP.at(i).contains(lineIP->text() + "/24") ) { 
    146147               button(QWizard::NextButton)->setEnabled(false); 
    147148               lineIP->setPalette(badPal); 
Note: See TracChangeset for help on using the changeset viewer.