[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdeadmin/kuser
From: Maks Orlovich <maksim () kde ! org>
Date: 2005-04-07 14:30:25
Message-ID: 20050407143025.D783E63E () office ! kde ! org
[Download RAW message or body]
CVS commit by orlovich:
Do not access cbposix if it's not initialized (also set it to 0 in that case, so the \
app crashes but does not corrupt data in case of other unguarded access; this \
probably should be done for the other conditionally created widgets as well, but \
that's up to KUser folks).
Avoids damaging accounts in people's password files(!!!!), and crashing when editting \
all over the place.
CCBUG:100443
M +7 -3 propdlg.cpp 1.85
--- kdeadmin/kuser/propdlg.cpp #1.84:1.85
@@ -211,4 +211,6 @@ void propdlg::initDlg()
connect(cbposix, SIGNAL(stateChanged(int)), this, SLOT(cbposixChanged()));
addRow(frame, layout, row++, cbposix, i18n("Disable &POSIX account \
information"), whatstr); + } else {
+ cbposix = 0;
}
frontrow = row;
@@ -707,5 +709,6 @@ void propdlg::mergeUser( KUser *user, KU
newuser->copy( user );
- if ( cbposix->state() != QButton::NoChange ) {
+
+ if ( kug->getUsers().getCaps() & KUsers::Cap_Disable_POSIX && cbposix->state() != \
QButton::NoChange ) { if ( cbposix->isChecked() )
newuser->setCaps( newuser->getCaps() & ~KUser::Cap_POSIX );
@@ -874,5 +877,5 @@ bool propdlg::check()
{
bool one = ( mUsers.getFirst() == mUsers.getLast() );
- bool posix = !( cbposix->isChecked() );
+ bool posix = !( kug->getUsers().getCaps() & KUsers::Cap_Disable_POSIX ) || !( \
cbposix->isChecked() );
if ( one && posix && leid->text().isEmpty() ) {
@@ -929,5 +932,6 @@ void propdlg::slotOk()
uid_t newuid = leid->text().toULong();
- if ( one && !cbposix->isChecked() && olduid != newuid )
+ if ( one && ( !( kug->getUsers().getCaps() & KUsers::Cap_Disable_POSIX ) || \
!cbposix->isChecked() ) + && olduid != newuid )
{
if (kug->getUsers().lookup(newuid)) {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic