The Samba-Bugzilla – Attachment 11016 Details for
Bug 11254
nmbd rewrites browse.dat when not required.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for master.
bug-11254 (text/plain), 3.70 KB, created by
Jeremy Allison
on 2015-05-04 16:08:21 UTC
(
hide
)
Description:
git-am fix for master.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2015-05-04 16:08:21 UTC
Size:
3.70 KB
patch
obsolete
>From 718128dc712969bca163c6febea171cb576f6db9 Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Thu, 30 Apr 2015 12:05:17 -0700 >Subject: [PATCH 1/2] s3: nmbd: Ensure we only set work_changed = true if we > modify the record. > >https://bugzilla.samba.org/show_bug.cgi?id=11254 > >Signed-off-by: Jeremy Allison <jra@samba.org> >--- > source3/nmbd/nmbd_incomingdgrams.c | 22 +++++++++++++++++----- > 1 file changed, 17 insertions(+), 5 deletions(-) > >diff --git a/source3/nmbd/nmbd_incomingdgrams.c b/source3/nmbd/nmbd_incomingdgrams.c >index b728c13..9a69252 100644 >--- a/source3/nmbd/nmbd_incomingdgrams.c >+++ b/source3/nmbd/nmbd_incomingdgrams.c >@@ -327,12 +327,25 @@ a local master browser for workgroup %s and we think we are master. Forcing elec > ttl, comment); > } else { > /* Update the record. */ >- servrec->serv.type = servertype|SV_TYPE_LOCAL_LIST_ONLY; >+ if (servrec->serv.type != >+ (servertype|SV_TYPE_LOCAL_LIST_ONLY)) { >+ servrec->serv.type = >+ servertype|SV_TYPE_LOCAL_LIST_ONLY; >+ subrec->work_changed = true; >+ } >+ if (!strequal(servrec->serv.comment,comment)) { >+ strlcpy(servrec->serv.comment, >+ comment, >+ sizeof(servrec->serv.comment)); >+ subrec->work_changed = true; >+ } > update_server_ttl(servrec, ttl); >- strlcpy(servrec->serv.comment,comment,sizeof(servrec->serv.comment)); > } >- >- set_workgroup_local_master_browser_name( work, server_name ); >+ >+ if (!strequal(work->local_master_browser_name, server_name)) { >+ set_workgroup_local_master_browser_name( work, server_name ); >+ subrec->work_changed = true; >+ } > } else { > /* > * This server is announcing it is going down. Remove it from the >@@ -344,7 +357,6 @@ a local master browser for workgroup %s and we think we are master. Forcing elec > } > } > >- subrec->work_changed = True; > done: > return; > } >-- >2.2.0.rc0.207.ga3a616c > > >From dbe9f3f195d2dce9e6d0b968db5ff17cb52204ad Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Fri, 1 May 2015 09:56:59 -0700 >Subject: [PATCH 2/2] s3: nmbd: Don't set work_changed = True inside > update_server_ttl(). > >This is taken care of inside expire_servers() when it calls >remove_server_from_workgroup(). > >Ensure the only functions in nmbd_serverlistdb.c that >set subnet->work_changed are: > >remove_all_servers() >add_server_to_workgroup() >remove_server_from_workgroup() > >Fix inspired by a change from Volker. > >https://bugzilla.samba.org/show_bug.cgi?id=11254 > >Signed-off-by: Jeremy Allison <jra@samba.org> >--- > source3/nmbd/nmbd_serverlistdb.c | 5 ----- > 1 file changed, 5 deletions(-) > >diff --git a/source3/nmbd/nmbd_serverlistdb.c b/source3/nmbd/nmbd_serverlistdb.c >index b405719..cd84bdf 100644 >--- a/source3/nmbd/nmbd_serverlistdb.c >+++ b/source3/nmbd/nmbd_serverlistdb.c >@@ -133,8 +133,6 @@ workgroup %s. This is a bug.\n", name, work->work_group)); > DEBUG(3,("create_server_on_workgroup: Created server entry %s of type %x (%s) on \ > workgroup %s.\n", name,servertype,comment, work->work_group)); > >- work->subnet->work_changed = True; >- > return(servrec); > } > >@@ -151,8 +149,6 @@ void update_server_ttl(struct server_record *servrec, int ttl) > servrec->death_time = PERMANENT_TTL; > else > servrec->death_time = (ttl != PERMANENT_TTL) ? time(NULL)+(ttl*3) : PERMANENT_TTL; >- >- servrec->subnet->work_changed = True; > } > > /******************************************************************* >@@ -172,7 +168,6 @@ void expire_servers(struct work_record *work, time_t t) > if ((servrec->death_time != PERMANENT_TTL) && ((t == -1) || (servrec->death_time < t))) { > DEBUG(3,("expire_old_servers: Removing timed out server %s\n",servrec->serv.name)); > remove_server_from_workgroup(work, servrec); >- work->subnet->work_changed = True; > } > } > } >-- >2.2.0.rc0.207.ga3a616c >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 11254
:
11016
|
11017