author | umopapisdn <umopapisdn> | 2002-09-28 06:36:30 (UTC) |
---|---|---|
committer | umopapisdn <umopapisdn> | 2002-09-28 06:36:30 (UTC) |
commit | 8a95ca149ff5eedc9215bb012c8d7d09cdcaf96c (patch) (unidiff) | |
tree | 50aed468fa8888266c589ce47131d0acaf7f82b7 | |
parent | 996c0d02d16c185acc3190baa5b4a1fc934e730c (diff) | |
download | opie-8a95ca149ff5eedc9215bb012c8d7d09cdcaf96c.zip opie-8a95ca149ff5eedc9215bb012c8d7d09cdcaf96c.tar.gz opie-8a95ca149ff5eedc9215bb012c8d7d09cdcaf96c.tar.bz2 |
Now actually makes the homedirectories owned by the user they belong to. :)
-rw-r--r-- | noncore/settings/usermanager/passwd.cpp | 5 | ||||
-rw-r--r-- | noncore/settings/usermanager/userdialog.cpp | 10 | ||||
-rw-r--r-- | noncore/settings/usermanager/userdialog.h | 2 | ||||
-rw-r--r-- | noncore/settings/usermanager/usermanager.pro | 2 |
4 files changed, 15 insertions, 4 deletions
diff --git a/noncore/settings/usermanager/passwd.cpp b/noncore/settings/usermanager/passwd.cpp index 310cef8..5063661 100644 --- a/noncore/settings/usermanager/passwd.cpp +++ b/noncore/settings/usermanager/passwd.cpp | |||
@@ -13,2 +13,3 @@ | |||
13 | #include <sys/types.h> | 13 | #include <sys/types.h> |
14 | #include <sys/stat.h> | ||
14 | #include <unistd.h> | 15 | #include <unistd.h> |
@@ -141,3 +142,3 @@ bool Passwd::findUser(int uid) { | |||
141 | 142 | ||
142 | bool Passwd::addUser(QString pw_name, QString pw_passwd, int pw_uid, int pw_gid, QString pw_gecos,QString pw_dir, QString pw_shell, bool createGroup=true) { | 143 | bool Passwd::addUser(QString pw_name, QString pw_passwd, int pw_uid, int pw_gid, QString pw_gecos,QString pw_dir, QString pw_shell, bool createGroup) { |
143 | QString tempString; | 144 | QString tempString; |
@@ -151,2 +152,4 @@ bool Passwd::addUser(QString pw_name, QString pw_passwd, int pw_uid, int pw_gid, | |||
151 | d.mkdir(pw_dir); | 152 | d.mkdir(pw_dir); |
153 | chown(pw_dir,pw_uid,pw_gid); | ||
154 | chmod(pw_dir,S_IRUSR|S_IWUSR|S_IXUSR); | ||
152 | } | 155 | } |
diff --git a/noncore/settings/usermanager/userdialog.cpp b/noncore/settings/usermanager/userdialog.cpp index f31775d..6940a3b 100644 --- a/noncore/settings/usermanager/userdialog.cpp +++ b/noncore/settings/usermanager/userdialog.cpp | |||
@@ -39,3 +39,4 @@ UserDialog::UserDialog(QWidget* parent, const char* name, bool modal, WFlags fl) | |||
39 | accounts->splitGroupEntry(*it); | 39 | accounts->splitGroupEntry(*it); |
40 | new QListViewItem(groupsListView,accounts->gr_name); | 40 | //new QListViewItem(groupsListView,accounts->gr_name); |
41 | new QCheckListItem(groupsListView,accounts->gr_name,QCheckListItem::CheckBox); | ||
41 | groupComboBox->insertItem(accounts->gr_name); | 42 | groupComboBox->insertItem(accounts->gr_name); |
@@ -157,2 +158,3 @@ void UserDialog::setupTab2() { | |||
157 | groupsListView->setMultiSelection(true); | 158 | groupsListView->setMultiSelection(true); |
159 | groupsListView->setAllColumnsShowFocus(false); | ||
158 | 160 | ||
@@ -317,3 +319,7 @@ void UserDialog::accept() { | |||
317 | void UserDialog::clickedPicture() { | 319 | void UserDialog::clickedPicture() { |
318 | QMessageBox::information(0,"Sorry!","Icon selection not yet implemented.\nComming real soon now! (tm)"); | 320 | QString filename=OFileDialog::getOpenFileName(OFileSelector::EXTENDED,"/opt/QtPalmtop/pics"); |
321 | // OFileDialog *fd=new OFileDialog("Select Icon",this, OFileSelector::OPEN, OFileSelector::EXTENDED,"/"); | ||
322 | //fd->showMaximized(); | ||
323 | //fd->exec(); | ||
324 | QMessageBox::information(0,"Sorry!","Icon selection not yet implemented.\nComming real soon now! (tm)\n"+filename); | ||
319 | } | 325 | } |
diff --git a/noncore/settings/usermanager/userdialog.h b/noncore/settings/usermanager/userdialog.h index b44de9e..df54269 100644 --- a/noncore/settings/usermanager/userdialog.h +++ b/noncore/settings/usermanager/userdialog.h | |||
@@ -20,2 +20,4 @@ | |||
20 | 20 | ||
21 | #include <opie/ofiledialog.h> | ||
22 | |||
21 | class UserDialog : public QDialog | 23 | class UserDialog : public QDialog |
diff --git a/noncore/settings/usermanager/usermanager.pro b/noncore/settings/usermanager/usermanager.pro index fc45f93..2f3212f 100644 --- a/noncore/settings/usermanager/usermanager.pro +++ b/noncore/settings/usermanager/usermanager.pro | |||
@@ -7,3 +7,3 @@ INCLUDEPATH += $(OPIEDIR)/include | |||
7 | DEPENDPATH+= $(OPIEDIR)/include | 7 | DEPENDPATH+= $(OPIEDIR)/include |
8 | LIBS += -lqpe -lcrypt | 8 | LIBS += -lqpe -lopie -lcrypt |
9 | TARGET = usermanager | 9 | TARGET = usermanager |