diff options
Diffstat (limited to 'source3/modules')
-rw-r--r-- | source3/modules/vfs_notify_fam.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source3/modules/vfs_notify_fam.c b/source3/modules/vfs_notify_fam.c index 8f00c9207f..652e785e02 100644 --- a/source3/modules/vfs_notify_fam.c +++ b/source3/modules/vfs_notify_fam.c @@ -79,12 +79,27 @@ static NTSTATUS fam_open_connection(FAMConnection *fam_conn, ZERO_STRUCTP(fam_conn); FAMCONNECTION_GETFD(fam_conn) = -1; + +#ifdef HAVE_FAMNOEXISTS + /* We should honor outside setting of the GAM_CLIENT_ID. */ + setenv("GAM_CLIENT_ID","SAMBA",0); +#endif + if (asprintf(&name, "smbd (%lu)", (unsigned long)sys_getpid()) == -1) { DEBUG(0, ("No memory\n")); return NT_STATUS_NO_MEMORY; } res = FAMOpen2(fam_conn, name); + +#ifdef HAVE_FAMNOEXISTS + /* + * This reduces the chatter between GAMIN and samba making the pair + * much more reliable. + */ + FAMNoExists(fam_conn); +#endif + SAFE_FREE(name); if (res < 0) { |