[Samba] File locking in NFS on Solaris

Jeremy Allison jra at samba.org
Thu Sep 16 18:24:58 GMT 2004


On Thu, Sep 16, 2004 at 02:15:38PM -0400, William Jojo wrote:
> 
> 
> Hmmmm. I've been following an smbpasswd locking problem over NFS (on AIX
> 5.2 ML04 - Samba 3.0.7) that appears to be F_SETLKW64 related as well when
> I'm trying to join a machine to a domain or when a workstations tries to
> actively change it's trust after 7 days. It's intermittent and doesn't
> appear related to load...the smbpasswd file attemps a lock and fails after
> caught alarm (5 seconds) just like the pdb_smbpasswd.c code shows.

Try this patch (already in the SVN code).

Jeremy.

Index: passdb/pdb_smbpasswd.c
===================================================================
--- passdb/pdb_smbpasswd.c	(revision 2310)
+++ passdb/pdb_smbpasswd.c	(working copy)
@@ -898,6 +898,8 @@
     } else {
 	    DEBUG(0,("mod_smbfilepwd_entry:  Using old smbpasswd format.  This is no longer supported.!\n"));
 	    DEBUG(0,("mod_smbfilepwd_entry:  No changes made, failing.!\n"));
+            pw_file_unlock(lockfd, &(smbpasswd_state->pw_file_lock_depth));
+            fclose(fp);
 	    return False;
     }
 



More information about the samba mailing list