Fix bug in KUser on 5.x where root user is deleted merely by using the

program.  PORTREVISION bumped because this is a particularly nasty problem.

Patch by:	Adriaan de Groot <adridg@cs.kun.nl>
Submitted by:	Andy Fawcett <andy@athame.co.uk>
This commit is contained in:
Will Andrews 2003-12-10 20:56:01 +00:00
parent 22ef317c3f
commit ca8ce24b65
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=95566
4 changed files with 36 additions and 0 deletions

View file

@ -8,6 +8,7 @@
PORTNAME= kdeadmin
PORTVERSION= ${KDE_VERSION}
PORTREVISION= 1
CATEGORIES= sysutils kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${KDE_VERSION}/src

View file

@ -0,0 +1,17 @@
--- kuser/kuser.cpp.orig Wed Dec 10 22:03:21 2003
+++ kuser/kuser.cpp Wed Dec 10 22:05:05 2003
@@ -479,6 +479,14 @@
// 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);
if(rc != 0) {

View file

@ -8,6 +8,7 @@
PORTNAME= kdeadmin
PORTVERSION= ${KDE_VERSION}
PORTREVISION= 1
CATEGORIES= sysutils kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${KDE_VERSION}/src

View file

@ -0,0 +1,17 @@
--- kuser/kuser.cpp.orig Wed Dec 10 22:03:21 2003
+++ kuser/kuser.cpp Wed Dec 10 22:05:05 2003
@@ -479,6 +479,14 @@
// 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);
if(rc != 0) {