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

List:       kde-commits
Subject:    kdeadmin/kuser
From:       Adriaan de Groot <adridg () cs ! kun ! nl>
Date:       2003-12-08 21:44:11
[Download RAW message or body]

CVS commit by adridg: 

The code comment says it all. KUser destroys the root entry in
/etc/passwd on FreeBSD current, rendering the system unusable.
This is something of a workaround, rewinding the file to the
beginning before trying to read from it (possibly a good idea
_anyway_). 

CCMAIL: kde@freebsd.org


  M +8 -0      kuser.cpp   1.64


--- kdeadmin/kuser/kuser.cpp  #1.63:1.64
@@ -481,4 +481,12 @@ bool KUsers::loadpwd() {
   // Start reading passwd file(s)
 
+#ifdef Q_OS_FREEBSD
+  // For FreeBSD, some weird effect in the C++ libraries
+  // eats the first entry of the passwd file on -CURRENT,
+  // which renders KUser a system-destroyer instead of
+  // just a useless tool.
+  setpwent();
+#endif
+
   for(int i = 0; i < MAXFILES; i++) {
     rc = stat(QFile::encodeName(filename), &st);                


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

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