[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    =?GB2312?B?W1BBVENIXUJVRzE3MTQ4OCwxNzE1NzQgY2FuJ3QgIGNyZWF0ZSB1c2VyJ3MgaG9tZSBmb2xkZXIg?=
From:       "=?GB2312?B?xcvOwMa9?=" <wppan () redflag-linux ! com>
Date:       2008-09-25 3:04:54
Message-ID: 20080925030454.B2B4B1377AC () mail ! redflag-linux ! com
[Download RAW message or body]

This is a MIME-formatted message.  If you see this text it means that your
mail software cannot handle MIME-formatted messages.


This patch is for BUG 171488 and 171574.

I find that when you add a new user, kuser doesn't create the user's home folder \
though you choose "Create home folder". And also when you delete a user,  kuser \
doesn't delete the user's home folder though you choose "Delete home folder".

I think that the developer maybe forget calling users->doCreate(&user) in \
KU_MainView::useradd() function and users->doDelete(&user) in KU_MainView::userdel() \
function.

In order to call functions above, I set those functions public instead of protected.

The attached patch applies to the directory   kdeadmin/kuser/

Best regards

pwp


["patch_for_kuser" (patch_for_kuser)]

Index: ku_mainview.cpp
===================================================================
--- ku_mainview.cpp	(版本 864541)
+++ ku_mainview.cpp	(工作副本)
@@ -286,6 +286,7 @@
     user.setGID( group.getGID() );
     user.setPGSID( group.getSID() );
   }
+  users->doCreate(&user);
   users->add( user );
   if ( !updateUsers() ) {
     groups->cancelMods();
@@ -337,6 +338,7 @@
   user.setDeleteMailBox( dlg.getDeleteMailBox() );
 
 
+  users->doDelete(&user);
   users->del( index );
   if ( !updateUsers() ) return;
 
Index: ku_user.h
===================================================================
--- ku_user.h	(版本 864541)
+++ ku_user.h	(工作副本)
@@ -242,6 +242,8 @@
 
   const QString &errorString() const { return mErrorString; }
   const QString &errorDetails() const { return mErrorDetails; }
+  bool doCreate( KU_User *user );
+  bool doDelete( KU_User *user );
 protected:
   int caps;
   KU_PrefsBase *mCfg;
@@ -253,8 +255,6 @@
   QString domsid;
   QString mErrorString, mErrorDetails;
 
-  bool doCreate( KU_User *user );
-  bool doDelete( KU_User *user );
   void parseGecos( const char *gecos, QString &name,
     QString &field1, QString &field2, QString &field3 );
   void fillGecos( KU_User &user, const char *gecos );


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic