mirror of
https://github.com/samba-team/samba.git
synced 2025-03-10 12:58:35 +03:00
fixed another potential fork bomb where the wins file becomes
non-writeable for some reason. (This used to be commit 9edd43dcd6cc040416f11e00320c53682558fd8a)
This commit is contained in:
parent
d66a657f90
commit
c8e6aa6dc1
@ -234,6 +234,8 @@ static void complete_sync(struct sync_record *s)
|
|||||||
int count=0;
|
int count=0;
|
||||||
|
|
||||||
f = fopen(s->fname,"r");
|
f = fopen(s->fname,"r");
|
||||||
|
|
||||||
|
if (!f) return;
|
||||||
|
|
||||||
while (!feof(f)) {
|
while (!feof(f)) {
|
||||||
|
|
||||||
|
@ -1569,6 +1569,9 @@ void wins_write_database(BOOL background)
|
|||||||
if((fp = fopen(fnamenew,"w")) == NULL)
|
if((fp = fopen(fnamenew,"w")) == NULL)
|
||||||
{
|
{
|
||||||
DEBUG(0,("wins_write_database: Can't open %s. Error was %s\n", fnamenew, strerror(errno)));
|
DEBUG(0,("wins_write_database: Can't open %s. Error was %s\n", fnamenew, strerror(errno)));
|
||||||
|
if (background) {
|
||||||
|
_exit(0);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user