Re: user database is corrupted on Fedora Core2
"Stephen Turner" <[email protected]> Mon, 22 Nov 2004 11:30:19 -0500
| Newsgroups | gmane.comp.lib.vovida.vocal |
|---|---|
| Message-ID | <[email protected]> |
Hi Tareq, > I have noticed that on my Fedora Core2 machine, the user > database gets corrupted out of no reason. All the users in > the list becomes "." (except for one or > two) and you cant edit/delete them. you have to run allinone > configure and reset the database. is there any config file > where i can manually add/delete the users? I noticed there is > a utility called manageusers but it has very limited > functionality. Another thing is, on my home pc, i tested > VOCAL on Suse Linux and never seen the user db corrupted. > Anyone having this problem? Yes! I encountered the same problem when using VOCAL 1.5.0 on Fedora Core 2. The problem was not really a database corruption, but a provisioning server defect that affected the "list accounts" operation used by the provisioning client. The defect is in the VFileSystem::readDir method in util/io/VFileSystem.cxx. It assumes that "." and ".." are always the first two entries returned by the readdir(3) function. For some reason as yet unknown to me, this is not true for my ext3 filesystem under Fedora Core 2. (Try "ls -f /" and see what results you get.) I've included a patch below that seems to have fixed the problem. Hope it helps! Regards, Stephen -- Stephen Turner <[email protected]> Index: VFileSystem.cxx =================================================================== RCS file: /cvsroot/vocal.modules/util/io/VFileSystem.cxx,v retrieving revision 1.4 diff -u -r1.4 VFileSystem.cxx --- VFileSystem.cxx 6 Sep 2002 08:58:15 -0000 1.4 +++ VFileSystem.cxx 22 Nov 2004 13:42:19 -0000 @@ -357,11 +357,11 @@ } struct dirent * dirp = readdir(dir); - dirp = readdir(dir); // eat the "." - dirp = readdir(dir); // eat the ".." while ( dirp ) { - list.push_back( string(dirp->d_name) ); + string name(dirp->d_name); + if (name != "." && name != "..") + list.push_back(name); dirp = readdir(dir); } _______________________________________________ vocal mailing list [email protected] To unsubscribe, please go to http://www.vovida.org/mailman/listinfo/vocal