projects
/
mmh
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
823e60e
)
fix for bug #578 repl leaks umask; there are several other
author
Glenn Burkhardt
<glenn@aoi.ultranet.com>
Thu, 26 Jun 2003 01:30:36 +0000
(
01:30
+0000)
committer
Glenn Burkhardt
<glenn@aoi.ultranet.com>
Thu, 26 Jun 2003 01:30:36 +0000
(
01:30
+0000)
places in the code where the umask value is not restored,
so there might be other similar bugs
uip/replsbr.c
patch
|
blob
|
history
diff --git
a/uip/replsbr.c
b/uip/replsbr.c
index
1ea411c
..
a7616d3
100644
(file)
--- a/
uip/replsbr.c
+++ b/
uip/replsbr.c
@@
-76,14
+76,16
@@
replout (FILE *inb, char *msg, char *drft, struct msgs *mp, int outputlinelen,
register char **nxtbuf;
register char **ap;
register struct comp **savecomp;
- int char_read = 0, format_len;
+ int char_read = 0, format_len, mask;
char name[NAMESZ], *scanl, *cp;
FILE *out;
- umask(~m_gmprot());
+ mask = umask(~m_gmprot());
if ((out = fopen (drft, "w")) == NULL)
adios (drft, "unable to create");
+ umask(mask);
+
/* get new format string */
cp = new_fs (form, NULL, NULL);
format_len = strlen (cp);