Changeset 5335971


Ignore:
Timestamp:
05/19/15 08:57:14 (6 weeks ago)
Author:
Ken Moore <ken@…>
Branches:
master
Children:
7bc8f89
Parents:
2ee337d (diff), b155c12 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of github.com:pcbsd/pcbsd

Location:
src-qt5
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • src-qt5/life-preserver/lp-gui/LPISCSIWizard.ui

    r34adc01 rb155c12  
    5050     <widget class="QLabel" name="label_2"> 
    5151      <property name="text"> 
    52        <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Required:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;A Life Preserver configuration file for the remote system. (*.lps) &lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;If you do not have this file available, please contact the administrator(s) of the backup server and request one. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> 
     52       <string>A Life Preserver configuration file for the remote system is required. (*.lps)</string> 
     53      </property> 
     54      <property name="alignment"> 
     55       <set>Qt::AlignCenter</set> 
     56      </property> 
     57      <property name="wordWrap"> 
     58       <bool>true</bool> 
     59      </property> 
     60     </widget> 
     61    </item> 
     62    <item> 
     63     <spacer name="verticalSpacer_5"> 
     64      <property name="orientation"> 
     65       <enum>Qt::Vertical</enum> 
     66      </property> 
     67      <property name="sizeType"> 
     68       <enum>QSizePolicy::Fixed</enum> 
     69      </property> 
     70      <property name="sizeHint" stdset="0"> 
     71       <size> 
     72        <width>20</width> 
     73        <height>20</height> 
     74       </size> 
     75      </property> 
     76     </spacer> 
     77    </item> 
     78    <item> 
     79     <widget class="QLabel" name="label_19"> 
     80      <property name="mouseTracking"> 
     81       <bool>true</bool> 
     82      </property> 
     83      <property name="text"> 
     84       <string>If you do not have this file available, please contact the administrator(s) of the backup server and request one.</string> 
    5385      </property> 
    5486      <property name="alignment"> 
     
    195227     <widget class="QLabel" name="label_12"> 
    196228      <property name="text"> 
    197        <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;If these settings don't look right, please contact the administrator of the backup server.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> 
     229       <string>If these settings don't look right, please contact the administrator of the backup server.</string> 
    198230      </property> 
    199231      <property name="alignment"> 
     
    336368       <enum>Qt::Vertical</enum> 
    337369      </property> 
     370      <property name="sizeType"> 
     371       <enum>QSizePolicy::Fixed</enum> 
     372      </property> 
    338373      <property name="sizeHint" stdset="0"> 
    339374       <size> 
    340375        <width>20</width> 
    341         <height>78</height> 
     376        <height>130</height> 
    342377       </size> 
    343378      </property> 
     
    346381    <item> 
    347382     <widget class="QLabel" name="label_17"> 
    348       <property name="text"> 
    349        <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:11pt; font-weight:600;&quot;&gt;Please Wait&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Enabling off-site backup....&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> 
     383      <property name="font"> 
     384       <font> 
     385        <pointsize>11</pointsize> 
     386        <weight>75</weight> 
     387        <bold>true</bold> 
     388       </font> 
     389      </property> 
     390      <property name="text"> 
     391       <string>Please Wait.</string> 
    350392      </property> 
    351393      <property name="alignment"> 
     
    366408        <width>20</width> 
    367409        <height>77</height> 
     410       </size> 
     411      </property> 
     412     </spacer> 
     413    </item> 
     414    <item> 
     415     <widget class="QLabel" name="label_20"> 
     416      <property name="text"> 
     417       <string>Enabling off-site backup....</string> 
     418      </property> 
     419      <property name="alignment"> 
     420       <set>Qt::AlignCenter</set> 
     421      </property> 
     422     </widget> 
     423    </item> 
     424    <item> 
     425     <spacer name="verticalSpacer_6"> 
     426      <property name="orientation"> 
     427       <enum>Qt::Vertical</enum> 
     428      </property> 
     429      <property name="sizeType"> 
     430       <enum>QSizePolicy::Fixed</enum> 
     431      </property> 
     432      <property name="sizeHint" stdset="0"> 
     433       <size> 
     434        <width>20</width> 
     435        <height>20</height> 
    368436       </size> 
    369437      </property> 
     
    401469     <widget class="QLabel" name="label_13"> 
    402470      <property name="text"> 
    403        <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This key file is &lt;span style=&quot; text-decoration: underline;&quot;&gt;required&lt;/span&gt; to access/decrypt your saved data&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> 
     471       <string>This key file is required to access/decrypt your saved data</string> 
    404472      </property> 
    405473      <property name="alignment"> 
     
    526594    <item> 
    527595     <widget class="QLabel" name="label_15"> 
    528       <property name="text"> 
    529        <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;WARNING&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Make sure to save this key file to a safe location off-disk (like a USB stick you keep locked up). The administrator(s) of the backup server are &lt;span style=&quot; font-style:italic;&quot;&gt;not&lt;/span&gt; responsible for a lost key.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> 
     596      <property name="font"> 
     597       <font> 
     598        <pointsize>11</pointsize> 
     599        <weight>75</weight> 
     600        <bold>true</bold> 
     601       </font> 
     602      </property> 
     603      <property name="text"> 
     604       <string>WARNING</string> 
     605      </property> 
     606      <property name="alignment"> 
     607       <set>Qt::AlignCenter</set> 
     608      </property> 
     609      <property name="wordWrap"> 
     610       <bool>true</bool> 
     611      </property> 
     612     </widget> 
     613    </item> 
     614    <item> 
     615     <spacer name="verticalSpacer_7"> 
     616      <property name="orientation"> 
     617       <enum>Qt::Vertical</enum> 
     618      </property> 
     619      <property name="sizeType"> 
     620       <enum>QSizePolicy::Fixed</enum> 
     621      </property> 
     622      <property name="sizeHint" stdset="0"> 
     623       <size> 
     624        <width>20</width> 
     625        <height>10</height> 
     626       </size> 
     627      </property> 
     628     </spacer> 
     629    </item> 
     630    <item> 
     631     <widget class="QLabel" name="label_21"> 
     632      <property name="text"> 
     633       <string>Make sure to save this key file to a safe location off-disk (like a USB stick you keep locked up). The administrator(s) of the backup server are not responsible for a lost key.</string> 
    530634      </property> 
    531635      <property name="alignment"> 
  • src-qt5/PCDM/src/main.cpp

    r03ce59a r2ee337d  
    9696   
    9797  Config::loadConfigFile(confFile); 
     98  // Now set the backend functionality of which usernames are allowed 
     99  Backend::allowUidUnder1K(Config::allowUnder1KUsers()); 
    98100  //qDebug() << "Config File Loaded:" << QString::number(clock.elapsed())+" ms"; 
    99101  // Startup the main application 
  • src-qt5/PCDM/src/pcdm-backend.cpp

    r6edc239 r2ee337d  
    1818QString logFile; 
    1919QString saveX,saveUsername, lastUser, lastDE; 
     20bool Over1K = true; 
    2021 
    2122QStringList Backend::getAvailableDesktops(){   
     
    5253  if(index == -1){ Backend::log("PCDM: Invalid Desktop Name: " + xName); return ""; } 
    5354  return instXBinList[index]; 
     55} 
     56 
     57void Backend::allowUidUnder1K(bool allow){ 
     58  Over1K = !allow; 
     59  //Make sure to re0load the user list if necessary 
     60  readSystemUsers(); 
    5461} 
    5562 
     
    565572    //Check that the name/description does not contain "server" 
    566573    else if(uList[i].section(":",2,2).toInt() <= 1000){ 
    567         for(int f=0;f<filter.length(); f++){ 
    568           if(dispcheck.contains(filter[f])){ bad = true; break;} 
     574        if(Over1K){ bad = true;} //ignore anything under UID 1001 
     575        else{ 
     576          //Apply the special <1000 filters 
     577          for(int f=0;f<filter.length(); f++){ 
     578            if(dispcheck.contains(filter[f])){ bad = true; break;} 
     579          } 
    569580        } 
    570581    } 
  • src-qt5/PCDM/src/pcdm-backend.h

    r1e51936 r2ee337d  
    3737    static QString getDesktopIcon(QString); 
    3838    static QString getDesktopBinary(QString); 
     39    static void allowUidUnder1K(bool allow); 
    3940    static QStringList getSystemUsers(bool realnames = true); 
    4041    static QString getUsernameFromDisplayname(QString); 
  • src-qt5/PCDM/src/pcdm-config.cpp

    rbda7298 r2ee337d  
    2727  confStruct << "true";                                 // [10] Show System Users 
    2828  confStruct << "false";                                        // [11] Allow anonymous login 
     29  confStruct << "false";                                        // [12] Allow UID's under 1000 
    2930  return; 
    3031} 
     
    6061      else if(var=="SHOW_SYSTEM_USERS"){ confStruct[10] = val; } 
    6162      else if(var=="ALLOW_STEALTH_LOGIN"){ confStruct[11] = val; } 
     63      else if(var=="ALLOW_UID_UNDER_1K"){ confStruct[12] = val; } 
    6264      else{} 
    6365       
     
    9395  if(confStruct[3].toLower()=="true"){ return true; } 
    9496  else{ return false; }  
     97} 
     98 
     99bool Config::allowUnder1KUsers(){ 
     100  if(confStruct[12].toLower()=="true"){ return true; } 
     101  else{ return false; }   
    95102} 
    96103 
  • src-qt5/PCDM/src/pcdm-config.h

    ra2f1f4e r2ee337d  
    2828  static QString loginScriptsDir(); 
    2929  static bool useAutoLogin();           //returns whether auto-login is enabled 
     30  static bool allowUnder1KUsers(); 
    3031  static QString autoLoginUsername();   //returns username to log into automatically 
    3132  static QString autoLoginDesktop();    //return *.desktop file to startup automatically 
  • src-qt5/pc-dmconf/mainwindow.cpp

    ref8107f r2ee337d  
    123123    } 
    124124     
     125    ui->checkAllowUnder1K->setChecked(false); //PCDM defaults to false 
     126    QString allowU1K = pcbsd::Utils::getValFromSHFile(DM_CONFIG_FILE, "ALLOW_UID_UNDER_1K"); 
     127    if(allowU1K.toLower() == "true"){ 
     128      ui->checkAllowUnder1K->setChecked(true); 
     129    }    
    125130    //Update the UI appropriately 
    126131    itemChanged(); 
     
    135140    connect( ui->checkShowUsers, SIGNAL(stateChanged(int)), this, SLOT(itemChanged()) ); 
    136141    connect( ui->checkAllowStealth, SIGNAL(stateChanged(int)), this, SLOT(itemChanged()) ); 
    137      
     142    connect( ui->checkAllowUnder1K, SIGNAL(stateChanged(int)), this, SLOT(itemChanged()) ); 
    138143} 
    139144 
     
    233238        pcbsd::Utils::setConfFileValue(DM_CONFIG_FILE, "ALLOW_STEALTH_LOGIN", "ALLOW_STEALTH_LOGIN=FALSE", -1); 
    234239    } 
     240    if(ui->checkAllowUnder1K->isChecked()){ 
     241        pcbsd::Utils::setConfFileValue(DM_CONFIG_FILE, "ALLOW_UID_UNDER_1K", "ALLOW_UID_UNDER_1K=TRUE", -1); 
     242    }else{ 
     243        pcbsd::Utils::setConfFileValue(DM_CONFIG_FILE, "ALLOW_UID_UNDER_1K", "ALLOW_UID_UNDER_1K=FALSE", -1); 
     244    } 
    235245    // Lastly make sure we set perms 
    236246    system("chmod 600 " + DM_CONFIG_FILE.toLatin1()); 
  • src-qt5/pc-dmconf/mainwindow.ui

    ref8107f r2ee337d  
    127127       </attribute> 
    128128       <layout class="QGridLayout" name="gridLayout"> 
     129        <item row="3" column="0"> 
     130         <widget class="QCheckBox" name="checkAllowUnder1K"> 
     131          <property name="text"> 
     132           <string>Allow users with UID under 1001</string> 
     133          </property> 
     134         </widget> 
     135        </item> 
    129136        <item row="0" column="0"> 
    130137         <widget class="QCheckBox" name="checkShowPW"> 
     
    134141         </widget> 
    135142        </item> 
    136         <item row="3" column="0"> 
     143        <item row="5" column="0"> 
    137144         <spacer name="verticalSpacer_2"> 
    138145          <property name="orientation"> 
     
    147154         </spacer> 
    148155        </item> 
    149         <item row="1" column="0"> 
     156        <item row="2" column="0"> 
    150157         <widget class="QCheckBox" name="checkShowUsers"> 
    151158          <property name="text"> 
     
    157164         </widget> 
    158165        </item> 
    159         <item row="2" column="0"> 
     166        <item row="1" column="0"> 
    160167         <widget class="QCheckBox" name="checkAllowStealth"> 
    161168          <property name="toolTip"> 
  • src-qt5/pc-softweb/MainUI.cpp

    r4d4fd71 rfdea992  
    1919    tb->setMovable(false); 
    2020    tb->setFloatable(false); 
     21    tb->setContextMenuPolicy(Qt::CustomContextMenu); //disable the built-in visibility context menu 
    2122    backA = tb->addAction(QIcon(":icons/back.png"), tr("Back"), this, SLOT(GoBack()) ); 
    2223    forA = tb->addAction(QIcon(":icons/forward.png"), tr("Forward"), this, SLOT(GoForward()) ); 
Note: See TracChangeset for help on using the changeset viewer.