Unix Password Sync Problem

doug_rintoul at SIL.ORG doug_rintoul at SIL.ORG
Thu May 13 16:02:00 GMT 1999


Todd,

The patch in my message did not address the segfault problem, only the problem
Redhat users were having with password sync. The following patch should fix the
segfault problem. Note, this is only a temporary fix. A real fix should be made
by those doing the VFS stuff.

--------------------- cut here ------------------------------------
--- samba990428/source/smbd/dir.c       Thu Apr  8 16:08:30 1999
+++ samba/source/smbd/dir.c     Fri May  7 13:18:01 1999
@@ -518,19 +518,28 @@
 {
   Dir *dirp;
   char *n;
-  DIR *p = conn->vfs_ops.opendir(name);
+  DIR *p;
   int used=0;
+  if (conn)
+       p = conn->vfs_ops.opendir(name);
+  else
+       p = dos_opendir(name);

   if (!p) return(NULL);
   dirp = (Dir *)malloc(sizeof(Dir));
   if (!dirp) {
+    if (conn)
     conn->vfs_ops.closedir(p);
     return(NULL);
   }
   dirp->pos = dirp->numentries = dirp->mallocsize = 0;
   dirp->data = dirp->current = NULL;

-  while ((n = vfs_readdirname(conn, p)))
+  if (conn)
+         n = vfs_readdirname(conn, p);
+
+
+  while ((n = conn ? vfs_readdirname(conn, p) : dos_readdirname(p)))
   {
     int l = strlen(n)+1;

@@ -554,6 +563,7 @@
     dirp->numentries++;
   }

+  if (conn)
   conn->vfs_ops.closedir(p);
   return((void *)dirp);
 }
--- samba990428/source/lib/doscalls.c   Wed Apr  7 20:51:32 1999
+++ samba/source/lib/doscalls.c Fri May  7 13:23:37 1999
@@ -56,19 +56,16 @@
  vfs_ops->opendir() function instead.
 ********************************************************************/

-#if 0
 DIR *dos_opendir(char *dname)
 {
   return(opendir(dos_to_unix(dname,False)));
 }
-#endif

 /*******************************************************************
  Readdirname() wrapper that calls unix_to_dos.  Should use the
  vfs_readdirname() function instead.
 ********************************************************************/

-#if 0
 char *dos_readdirname(DIR *p)
 {
   char *dname = readdirname(p);
@@ -79,7 +76,6 @@
   unix_to_dos(dname, True);
   return(dname);
 }
-#endif

 /*******************************************************************
  A stat() wrapper that calls dos_to_unix.
--------------------- cut here ------------------------------------

Doug.

-----Original Message-----
From: tas at microdisplay.com
Sent: Tuesday, May 11, 1999 7:05 PM
To: Doug Rintoul; samba-ntdom at samba.org
Subject: Re: Unix Password Sync Problem


Okay,

So I am basically getting a Signal 11 Segfault out of chgpasswd.

I tried melding pieces from 2.0.4 into the 2.1.0 branch in the faulty
routine when the patch below failed to work, and I STILL got
the same crash and signal:


[1999/05/11 17:01:21, 3] smbd/chgpasswd.c:chgpasswd(500)
  Password change for user: tas
[1999/05/11 17:01:21, 0] lib/fault.c:fault_report(40)
  ===============================================================
[1999/05/11 17:01:21, 0] lib/fault.c:fault_report(41)
  INTERNAL ERROR: Signal 11 in pid 3229 (2.1.0-prealpha)
  Please read the file BUGS.txt in the distribution
[1999/05/11 17:01:21, 0] lib/fault.c:fault_report(43)
  ===============================================================
[1999/05/11 17:01:21, 0] lib/util.c:smb_panic(2538)
  PANIC: internal error

Help!

thanks
-Todd



More information about the samba-ntdom mailing list