summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/usermanager/opie-usermanager.control2
-rw-r--r--noncore/settings/usermanager/passwd.cpp9
-rw-r--r--noncore/settings/usermanager/userdialog.cpp2
-rw-r--r--noncore/settings/usermanager/usermanager.cpp4
4 files changed, 14 insertions, 3 deletions
diff --git a/noncore/settings/usermanager/opie-usermanager.control b/noncore/settings/usermanager/opie-usermanager.control
index f971fdc..e1c7762 100644
--- a/noncore/settings/usermanager/opie-usermanager.control
+++ b/noncore/settings/usermanager/opie-usermanager.control
@@ -6,4 +6,4 @@ Depends: opie-base
6Architecture: arm 6Architecture: arm
7Maintainer: Ted Parnefors <zaurus@bredband.net> 7Maintainer: Ted Parnefors <zaurus@bredband.net>
8License: GPL 8License: GPL
9Description: User/Group manager for OPIE. 9Description: User/Group manager for Opie.
diff --git a/noncore/settings/usermanager/passwd.cpp b/noncore/settings/usermanager/passwd.cpp
index 1e98778..f8e6d17 100644
--- a/noncore/settings/usermanager/passwd.cpp
+++ b/noncore/settings/usermanager/passwd.cpp
@@ -207,11 +207,16 @@ bool Passwd::searchGroup(QRegExp &groupRegExp) {
207 if((tempStringList.isEmpty())) { 207 if((tempStringList.isEmpty())) {
208 return false; 208 return false;
209 } else { 209 } else {
210 groupString=(*(tempStringList.begin())); 210 for(QStringList::Iterator it=tempStringList.begin(); it!=tempStringList.end(); it++) {
211 groupString=*it;
212 if(!groupString.find(QRegExp("^#"),0)) {// Skip commented lines.
211 splitGroupEntry(groupString); 213 splitGroupEntry(groupString);
212 }
213 return true; 214 return true;
214} 215}
216 }
217 }
218 return false;
219}
215 220
216// Find a group by groupname. 221// Find a group by groupname.
217bool Passwd::findGroup(const char *groupname) { 222bool Passwd::findGroup(const char *groupname) {
diff --git a/noncore/settings/usermanager/userdialog.cpp b/noncore/settings/usermanager/userdialog.cpp
index 0d2122b..c06f639 100644
--- a/noncore/settings/usermanager/userdialog.cpp
+++ b/noncore/settings/usermanager/userdialog.cpp
@@ -44,9 +44,11 @@ UserDialog::UserDialog(int viewmode, QWidget* parent, const char* name, bool mod
44 // And also fill the listview & the combobox with all available groups. 44 // And also fill the listview & the combobox with all available groups.
45 for( QStringList::Iterator it = accounts->groupStringList.begin(); it!=accounts->groupStringList.end(); ++it) { 45 for( QStringList::Iterator it = accounts->groupStringList.begin(); it!=accounts->groupStringList.end(); ++it) {
46 accounts->splitGroupEntry(*it); 46 accounts->splitGroupEntry(*it);
47 if(accounts->gr_name.find(QRegExp("^#"),0)) {// Skip commented lines.
47 new QCheckListItem(groupsListView,accounts->gr_name,QCheckListItem::CheckBox); 48 new QCheckListItem(groupsListView,accounts->gr_name,QCheckListItem::CheckBox);
48 groupComboBox->insertItem(accounts->gr_name); 49 groupComboBox->insertItem(accounts->gr_name);
49 } 50 }
51 }
50 showMaximized(); 52 showMaximized();
51} 53}
52 54
diff --git a/noncore/settings/usermanager/usermanager.cpp b/noncore/settings/usermanager/usermanager.cpp
index 57efa71..1946013 100644
--- a/noncore/settings/usermanager/usermanager.cpp
+++ b/noncore/settings/usermanager/usermanager.cpp
@@ -126,6 +126,7 @@ void UserConfig::getUsers() {
126 availableUID=500; 126 availableUID=500;
127 for(QStringList::Iterator it=accounts->passwdStringList.begin(); it!=accounts->passwdStringList.end(); ++it) { 127 for(QStringList::Iterator it=accounts->passwdStringList.begin(); it!=accounts->passwdStringList.end(); ++it) {
128 accounts->splitPasswdEntry(*it); // Split the string into it's components and store in variables in the accounts object. ("pr_name" and so on.) 128 accounts->splitPasswdEntry(*it); // Split the string into it's components and store in variables in the accounts object. ("pr_name" and so on.)
129 if(accounts->pw_name.find(QRegExp("^#"),0)) {// Skip commented lines.
129 new QListViewItem(usersListView,QString::number(accounts->pw_uid),accounts->pw_name,accounts->pw_gecos); 130 new QListViewItem(usersListView,QString::number(accounts->pw_uid),accounts->pw_name,accounts->pw_gecos);
130 if((accounts->pw_uid>=500) && (accounts->pw_uid<65000)) {// Is this user a "normal" user ? 131 if((accounts->pw_uid>=500) && (accounts->pw_uid<65000)) {// Is this user a "normal" user ?
131 mytext=QString(accounts->pw_name)+" - ("+QString(accounts->pw_gecos)+")"; // The string displayed next to the icon. 132 mytext=QString(accounts->pw_name)+" - ("+QString(accounts->pw_gecos)+")"; // The string displayed next to the icon.
@@ -137,6 +138,7 @@ void UserConfig::getUsers() {
137 } 138 }
138 if((accounts->pw_uid>=availableUID) && (accounts->pw_uid<65000)) availableUID=accounts->pw_uid+1; // Increase 1 to the latest know UID to get a free uid. 139 if((accounts->pw_uid>=availableUID) && (accounts->pw_uid<65000)) availableUID=accounts->pw_uid+1; // Increase 1 to the latest know UID to get a free uid.
139 } 140 }
141 }
140 usersIconView->sort(); 142 usersIconView->sort();
141} 143}
142 144
@@ -216,10 +218,12 @@ void UserConfig::getGroups() {
216 availableGID=500;// We need to find the next free GID, and are only interested in values between 500 & 65000. 218 availableGID=500;// We need to find the next free GID, and are only interested in values between 500 & 65000.
217 for(QStringList::Iterator it=accounts->groupStringList.begin(); it!=accounts->groupStringList.end(); ++it) {// Split the list into lines. 219 for(QStringList::Iterator it=accounts->groupStringList.begin(); it!=accounts->groupStringList.end(); ++it) {// Split the list into lines.
218 accounts->splitGroupEntry(*it);// Split the line into its components and fill the variables of 'accounts'. (gr_name, gr_uid & gr_mem). 220 accounts->splitGroupEntry(*it);// Split the line into its components and fill the variables of 'accounts'. (gr_name, gr_uid & gr_mem).
221 if(accounts->gr_name.find(QRegExp("^#"),0)) {// Skip commented lines.
219 new QListViewItem(groupsListView,QString::number(accounts->gr_gid),accounts->gr_name); 222 new QListViewItem(groupsListView,QString::number(accounts->gr_gid),accounts->gr_name);
220 if((accounts->gr_gid>=availableGID) && (accounts->gr_gid<65000)) availableGID=accounts->gr_gid+1;// Maybe a new free GID. 223 if((accounts->gr_gid>=availableGID) && (accounts->gr_gid<65000)) availableGID=accounts->gr_gid+1;// Maybe a new free GID.
221 } 224 }
222} 225}
226}
223 227
224void UserConfig::addGroup() { 228void UserConfig::addGroup() {
225 if(GroupDialog::addGroup(availableGID)) getGroups();// Bring up the add group dialog. 229 if(GroupDialog::addGroup(availableGID)) getGroups();// Bring up the add group dialog.