File scim-no-setpwent.diff of Package scim.import4151

Calling setpwent() in _init causes mysterious a free() corruption
detection in glibc when started on Firefox with glibc-2.10.

As an adhoc workaround, just let getpw*() call alone without
setpwent() & co.

---
 src/scim_utility.cpp |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/src/scim_utility.cpp
+++ b/src/scim_utility.cpp
@@ -547,9 +547,9 @@
 
     struct passwd *pw;
 
-    setpwent ();
+    // setpwent ();
     pw = getpwuid (getuid ());
-    endpwent ();
+    // endpwent ();
 
     if (pw) {
         home_dir = pw->pw_dir;
@@ -568,9 +568,9 @@
     struct passwd *pw;
     const char *user_name;
 
-    setpwent ();
+    // setpwent ();
     pw = getpwuid (getuid ());
-    endpwent ();
+    // endpwent ();
 
     if (pw && pw->pw_name)
         return String (pw->pw_name);
openSUSE Build Service is sponsored by