places in the code where the umask value is not restored,
so there might be other similar bugs
register char **nxtbuf;
register char **ap;
register struct comp **savecomp;
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;
char name[NAMESZ], *scanl, *cp;
FILE *out;
+ mask = umask(~m_gmprot());
if ((out = fopen (drft, "w")) == NULL)
adios (drft, "unable to create");
if ((out = fopen (drft, "w")) == NULL)
adios (drft, "unable to create");
/* get new format string */
cp = new_fs (form, NULL, NULL);
format_len = strlen (cp);
/* get new format string */
cp = new_fs (form, NULL, NULL);
format_len = strlen (cp);