Changeset 6fae3f6


Ignore:
Timestamp:
11/07/13 10:18:26 (11 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1, releng/10.0.2, releng/10.0.3
Children:
31290f1
Parents:
87b0318 (diff), 1e75537 (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

Files:
17 edited

Legend:

Unmodified
Added
Removed
  • src-sh/libsh/functions.sh

    rbd99c30 r8afc51a  
    427427 
    428428   local _name="${_chkDir#${_mp}}" 
     429 
     430   # Make sure we have a '/' at the start of dataset 
     431   if [ "`echo ${_name} | cut -c 1`" != "/" ] ; then _name="/${_name}"; fi 
     432 
    429433   echo "${_name}" 
    430434   return 0 
  • src-qt4/EasyPBI/modBuild.cpp

    r56d14dd r2aa342f  
    670670    while(!in.atEnd()){ 
    671671      QString line = in.readLine(); 
    672       line.replace("\t"," ").simplified(); 
     672      line = line.replace("\t"," ").simplified(); 
    673673      if(!line.startsWith("#") && !line.isEmpty()){ 
    674674        original = line.section(" ",0,0,QString::SectionSkipEmpty); 
     
    11211121        for(int i=0; i<tmpL.length(); i++){ 
    11221122          if(tmpL[i].endsWith("\\")){ tmpL[i].chop(1); } 
    1123           tmpL[i].simplified(); 
     1123          tmpL[i] = tmpL[i].simplified(); 
    11241124          if( tmpL[i].startsWith("bin/") || tmpL[i].startsWith("sbin/") ){ 
    11251125            bins << tmpL[i]; 
     
    12181218    //convert the program name to the proper format 
    12191219    QString progname = progStruct[0]; 
    1220     progname.toLower().remove(" ").remove("\t").simplified(); 
     1220    progname = progname.toLower().remove(" ").remove("\t").simplified(); 
    12211221    //Now create the sample file contents 
    12221222    QStringList contents; 
     
    13121312    //convert the program name to the proper format 
    13131313    QString progname = progStruct[0]; 
    1314     progname.toLower().remove(" ").remove("\t").simplified(); 
     1314    progname = progname.toLower().remove(" ").remove("\t").simplified(); 
    13151315    //Now create the sample file contents 
    13161316    QStringList contents; 
  • src-qt4/PCDM/src/dialogKeyboard.cpp

    r1620346 r72c9698  
    6969  QString model, layout, variant; 
    7070 
    71   if ( ! comboBoxKeyboardModel->currentIndex() == -1 ) 
     71  if ( ! (comboBoxKeyboardModel->currentIndex() == -1) ) 
    7272     return; 
    7373  if ( ! listKbLayouts->currentItem() ) 
  • src-qt4/PCDM/src/loginWidget.cpp

    r1d2d46af r72c9698  
    6868  //Setup the Signals/Slots 
    6969  connect(pushLogin,SIGNAL(clicked()),this,SLOT(slotTryLogin())); 
    70   connect(pushUserIcon,SIGNAL(triggered(QAction*)), this, SLOT(slotUserActivated(QAction*))); 
    71   connect(userIcon,SIGNAL(triggered(QAction*)), this, SLOT(slotUserActivated(QAction*))); 
     70  connect(pushUserIcon,SIGNAL(triggered(QAction*)), this, SLOT(slotUserActivated())); 
     71  connect(userIcon,SIGNAL(triggered(QAction*)), this, SLOT(slotUserActivated())); 
    7272  connect(listUsers,SIGNAL(activated(int)),this,SLOT(slotChooseUser(int))); 
    7373  connect(listUserBig,SIGNAL(itemClicked(QListWidgetItem*)),this,SLOT(slotUserSelected()) ); 
     
    136136//    PRIVATE SLOTS 
    137137//------------------------------------- 
    138 void LoginWidget::slotUserActivated(QAction* act){ 
     138void LoginWidget::slotUserActivated(){ 
    139139    //Toggle the user box as to what is visible 
    140140    if(!userSelected){  
  • src-qt4/PCDM/src/loginWidget.h

    r1d2d46af r72c9698  
    7474 
    7575  private slots: 
    76         void slotUserActivated(QAction*); 
     76        void slotUserActivated(); 
    7777        //void slotUserClicked(QListWidgetItem*); 
    7878        void slotUserHighlighted(int); 
  • src-qt4/PCDM/src/pcdm-xprocess.cpp

    rfbbd5c0 r72c9698  
    2929  pam_session_open = FALSE; 
    3030  //Setup the finished signal/slot 
    31   connect( this, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(slotCleanup(int, QProcess::ExitStatus)) ); 
     31  connect( this, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(slotCleanup()) ); 
    3232} 
    3333 
     
    157157} 
    158158 
    159 void XProcess::slotCleanup(int exitCode, QProcess::ExitStatus status){ 
     159void XProcess::slotCleanup(){ 
    160160  pam_shutdown(); //make sure that PAM shuts down properly 
    161161  //Now remove this user's access to the Xserver 
     
    187187  this->setWorkingDirectory(xhome); //set the current directory to the user's home directory 
    188188} 
    189 /* 
    190 //Start the desktop in the current process with C functions 
    191 void XProcess::startDesktop(){ 
    192   //Check for PAM username/password validity 
    193   if( !pam_checkPW() ){ qDebug() << "Invalid username/password"; pam_shutdown(); return; } 
    194   //Startup the PAM session 
    195   if( !pam_startSession() ){ qDebug() << "Unable to open PAM session"; pam_shutdown(); return; } 
    196   pam_session_open = TRUE; //flag that pam has an open session 
    197    
    198   //Save the current user/desktop as the last login 
    199   Backend::saveLoginInfo(Backend::getDisplayNameFromUsername(xuser),xde); 
    200  
    201   // We will now fork off, so the child can drop root perms and do its thing 
    202   int pid = fork(); 
    203   if(pid < 0){ 
    204     Backend::log("Error: Could not fork for user permissions"); 
    205     return; 
    206   }else if( pid !=0 ){ 
    207     //Parent (calling) process 
    208     int status; 
    209     sleep(2); 
    210     waitpid(pid,&status,0); //wait for the child (session) to finish 
    211  
    212     // Child is all done, lets close down the pam session and cleanup 
    213     pam_shutdown(); 
    214     exit(0); 
    215   } 
    216    
    217   // Get the users uid/gid information 
    218   struct passwd *pw; 
    219   int uid; 
    220   char *ok; 
    221  
    222   if (!(pw = getpwnam(xuser.toLatin1()))) { 
    223       uid = strtol(xuser.toLatin1(), &ok, 10); 
    224       if (!(pw = getpwuid(uid))) { 
    225           emit InvalidLogin();  //Make sure the GUI knows that it was a failure 
    226           return; 
    227       } 
    228   } 
    229  
    230   if (setgid(pw->pw_gid) < 0) { 
    231       qDebug() << "setgid() failed!"; 
    232       emit InvalidLogin();  //Make sure the GUI knows that it was a failure 
    233       return; 
    234   } 
    235  
    236   // Setup our other groups 
    237   if (initgroups(xuser.toLatin1(), pw->pw_gid) < 0) { 
    238       qDebug() << "initgroups() failed!"; 
    239       emit InvalidLogin();  //Make sure the GUI knows that it was a failure 
    240       setgid(0); 
    241       return; 
    242   }  
    243  
    244   // Lets drop to user privs 
    245   if (setuid(pw->pw_uid) < 0) { 
    246       qDebug() << "setuid() failed!"; 
    247       emit InvalidLogin();  //Make sure the GUI knows that it was a failure 
    248       return; 
    249   } 
    250  
    251   QString cmd; 
    252   // Configure the DE startup command 
    253   //  - Setup to run the user's <home-dir>/.xprofile startup script 
    254   if(QFile::exists(xhome+"/.xprofile")){ 
    255     cmd.append(". "+xhome+"/.xprofile; ");  //make sure to start it in parallel 
    256   } 
    257   //  - Add the DE startup command to the end 
    258   cmd.append("dbus-launch --exit-with-session "+xcmd); 
    259  
    260   // Get the current locale code 
    261   QLocale mylocale; 
    262   QString langCode = mylocale.name(); 
    263    
    264   //Alternate way of starting a process using c library functions 
    265   
    266   //setup the environment variables 
    267   setenv("LOGNAME",xuser.toUtf8(),1); 
    268   setenv("USERNAME",xuser.toUtf8(),1); 
    269   QString pth = QString(getenv("PATH"))+":"+xhome+"/bin"; 
    270   setenv("PATH",pth.toUtf8(),1); 
    271   if(langCode.toLower()=="c"){} 
    272   else if(QString(getenv("MM_CHARSET")).isEmpty() ){ langCode.append("."+QString(getenv("MM_CHARSET"))); } 
    273   else{ langCode.append(".UTF-8"); } 
    274   setenv("LANG",langCode.toUtf8(),1); 
    275   setenv("MAIL",QString("/var/mail/"+xuser).toUtf8(),1); 
    276   setenv("GROUP",xuser.toUtf8(),1); 
    277   setenv("HOME",xhome.toUtf8(),1); 
    278   setenv("SHELL",pw->pw_shell,1); 
    279   setenv("SHLVL","0",1); 
    280   chdir(xhome.toUtf8()); //move to home dir 
    281     
    282   //Now start the process 
    283   system(cmd.toLatin1()); 
    284 } 
    285 */ 
    286    
    287 /*void XProcess::setupDesktop(QString user, QString pwd, QString desktop){ 
    288   //Setup internal variables 
    289   xuser = Backend::getUsernameFromDisplayname(user); 
    290   xpwd = pwd; 
    291   xhome = Backend::getUserHomeDir(xuser); 
    292   xcmd = Backend::getDesktopBinary(desktop); 
    293   xde = desktop; 
    294   //Also check password  validity 
    295   bool ok = pam_checkPW(); 
    296   pam_shutdown(); 
    297   if(ok){ emit ValidLogin(); } 
    298   else{ emit InvalidLogin(); } 
    299 } 
    300   */ 
    301    
    302189 
    303190//Stand-alone function to check a username/password combination for validity 
  • src-qt4/PCDM/src/pcdm-xprocess.h

    rb28c8d9 r72c9698  
    6161   
    6262  private slots: 
    63         void slotCleanup(int, QProcess::ExitStatus); 
     63        void slotCleanup(); 
    6464 
    6565  signals: 
  • src-qt4/PCDM/src/themeStruct.cpp

    rd9b0b9e8 r72c9698  
    9191            items[index].icon = val; //should be [icononly | textonly | textbesideicon | textundericon ] 
    9292        }else if(itemCat == "LOCATION"){ 
    93             val.remove("[").remove("]").simplified(); //remove the brackets 
     93           val = val.remove("[").remove("]").simplified(); //remove the brackets 
    9494            QString x = val.section(",",0,0); 
    9595            QString y = val.section(",",1,1); 
  • src-qt4/about-gui/mainwindow.cpp

    r7ba4ea7 r44640c4  
    226226 
    227227//////////////////////////////////////////////////////////////////////////// 
    228 void MainWindow::slotPackagesFinished(int exitCode, QProcess::ExitStatus exitStatus) 
     228void MainWindow::slotPackagesFinished() 
    229229{ 
    230230    ui->WaitTextLabel->setVisible(false); 
     
    241241        pkginfo->setProcessChannelMode(QProcess::MergedChannels); 
    242242        connect( pkginfo, SIGNAL(readyRead()), this, SLOT(slotReadPkg() ) ); 
    243         connect( pkginfo, SIGNAL(finished ( int, QProcess::ExitStatus)), this, SLOT(slotPackagesFinished(int, QProcess::ExitStatus))); 
     243        connect( pkginfo, SIGNAL(finished ( int, QProcess::ExitStatus)), this, SLOT(slotPackagesFinished())); 
    244244        pkginfo->start("pkg_info"); 
    245245        ui->WaitTextLabel->setVisible(true); 
  • src-qt4/about-gui/mainwindow.h

    r1620346 r44640c4  
    4747public slots: 
    4848    void slotSingleInstance(); 
    49     void slotPackagesFinished(int exitCode, QProcess::ExitStatus exitStatus ); 
     49    void slotPackagesFinished(); 
    5050 
    5151private slots: 
  • src-qt4/libpcbsd/ui/metaWidget.cpp

    r1620346 r6019880  
    543543            if ( ( (*it)->text(0) == metaPkgList.at(z).at(0) && metaPkgList.at(z).at(5) == "NO" && (*it)->checkState(0) == Qt::Checked ) || \ 
    544544                 ( (*it)->text(0) == metaPkgList.at(z).at(0) && metaPkgList.at(z).at(5) == "NO" && (*it)->checkState(0) == Qt::PartiallyChecked ) ) 
    545                 if ( tmp.isEmpty() ) 
     545                if ( tmp.isEmpty() ){ 
    546546                        tmp = (*it)->text(0); 
    547                 else 
     547                }else{ 
    548548                        tmp = tmp + "," + (*it)->text(0); 
     549                } 
    549550         ++it; 
    550551        } 
     
    561562            // See if any packages status have changed 
    562563            if ( (*it)->text(0) == metaPkgList.at(z).at(0) && metaPkgList.at(z).at(5) == "YES" && (*it)->checkState(0) == Qt::Unchecked ) 
    563                 if ( tmp.isEmpty() ) 
     564                if ( tmp.isEmpty() ){ 
    564565                        tmp = (*it)->text(0); 
    565                 else 
     566                }else{ 
    566567                        tmp = tmp + "," + (*it)->text(0); 
     568                } 
    567569         ++it; 
    568570        } 
     
    588590 
    589591        if (aItem->childCount() == 0) { 
    590                 if (aItem->checkState(0) == Qt::Checked && aItem->parent() ) 
    591                         if ( allChildrenPkgsChecked(aItem->parent()->text(0))) 
     592                if (aItem->checkState(0) == Qt::Checked && aItem->parent() ){ 
     593                        if ( allChildrenPkgsChecked(aItem->parent()->text(0))){ 
    592594                                aItem->parent()->setCheckState(0, Qt::Checked);  
    593                         else 
     595                        }else{ 
    594596                                aItem->parent()->setCheckState(0, Qt::PartiallyChecked);         
    595                 if (aItem->checkState(0) == Qt::Unchecked && aItem->parent() ) 
     597                        } 
     598                } 
     599                if (aItem->checkState(0) == Qt::Unchecked && aItem->parent() ){ 
    596600                        if ( ! allChildrenPkgsUnchecked(aItem->parent()->text(0))) 
    597601                                aItem->parent()->setCheckState(0, Qt::PartiallyChecked);         
    598  
     602                } 
    599603 
    600604        } else { 
  • src-qt4/libpcbsd/utils/utils.cpp

    r7c7f02c r6019880  
    138138  QFile confFile(envFile); 
    139139  if ( ! confFile.open( QIODevice::ReadOnly ) ) 
    140         return false; 
     140        return ""; 
    141141 
    142142  QTextStream stream( &confFile ); 
     
    170170  QFile confFile(envFile); 
    171171  if ( ! confFile.open( QIODevice::ReadOnly ) ) 
    172         return false; 
     172        return ""; 
    173173 
    174174  QTextStream stream( &confFile ); 
  • src-qt4/pc-controlpanel/grouplist.cpp

    r1620346 r18c4ab8  
    5757                QCPItem* anItem = new QCPItem; 
    5858 
    59                 if (anItem->read(dir.absoluteFilePath(DirList[i]), vEnabledDE)) 
     59                if (anItem->readDE(dir.absoluteFilePath(DirList[i]), vEnabledDE)) 
    6060                { 
    6161                    if ((anItem->isSudoRequired() && (!EnableSudo)) 
  • src-qt4/pc-controlpanel/item.cpp

    r1620346 r18c4ab8  
    6060 
    6161/////////////////////////////////////////////////////////////////////////////// 
    62 bool QCPItem::read(QString FileName, const QVector<QString>& vEnabledDE) 
     62bool QCPItem::readDE(QString FileName, const QVector<QString>& vEnabledDE) 
    6363{ 
    6464    QString Str; 
  • src-qt4/pc-controlpanel/item.h

    r1620346 r18c4ab8  
    4646          * @return TRUE if success and item is visible 
    4747          */ 
    48         bool read(QString FileName, const QVector<QString>& vEnabledDE); 
     48        bool readDE(QString FileName, const QVector<QString>& vEnabledDE); 
    4949 
    5050        /** 
  • src-qt4/pc-controlpanel/mainwnd.cpp

    r7cc177e r18c4ab8  
    420420    QObject::connect(&mDirWatcher, SIGNAL(directoryChanged(const QString &)), 
    421421                     this, SLOT(onDirectoryChanged(const QString &))); 
     422    QString junk = path; //to get rid of compilation warning about unused variable 
    422423} 
    423424 
  • src-qt4/pc-dmconf/main.cpp

    rfb7fe1b r87b0318  
    66#include "mainwindow.h" 
    77#include "../config.h" 
     8 
     9#include <unistd.h> 
     10#include <sys/types.h> 
    811 
    912int main(int argc, char *argv[]) 
Note: See TracChangeset for help on using the changeset viewer.