On Thu, Oct 21, 2010 at 4:07 PM, Alexander Shishkin <[email protected]> wrote:
> +int FAST_FUNC xmkstemp(char *template)
> +{
> +       mode_t saved_umask;
> +       int fd;
> +
> +       saved_umask = umask(0);
> +       fd = mkstemp(template);
> +       umask(saved_umask);
> +
> +       if (fd == -1)
> +               bb_perror_msg_and_die("Can't create temp file %s", template);
> +
> +       return fd;
> +}

Why do you save/restore umask?
-- 
vda
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to