From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8580 invoked by alias); 26 Mar 2018 17:00:52 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 42535 Received: (qmail 11108 invoked by uid 1010); 26 Mar 2018 17:00:52 -0000 X-Qmail-Scanner-Diagnostics: from mail-wm0-f45.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(74.125.82.45):SA:0(-1.9/5.0):. Processed in 1.898196 secs); 26 Mar 2018 17:00:52 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: stephane.chazelas@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=qEiV+CBXnjJeIKQh1dxfvgTL+JdvEpAQuEhI0aEwj9o=; b=aoF5IsU8EB37+3R117utKKj9WPATJqA6zSV2JxMmMokU8+V+JHZ+hkEvOhett+K/mq au4G+VT+86rx57nvzQmtNDGA4GOmi/N5yxibqfEo9rUtomesyQYhHuFTjMArHymEtGcJ 7gOOr5/OOCdkIb2yTsGK8uqNMEobjyE0KRhHuZep+jCc410U7KeJx7DPIPxLEIjnLYiv hdKfD6qOX7y4+EdefamLLijKzpJDgl6Np8uE2R2oFI5EJm0bNX0Vmp+hm+N0gXAAJCin zzXA5t+O4LxPK2OzGAJjvBE03Wx5eBXx6xC4xcNgINS9OVGILsK5Rlq5ijfWTFjwQ7rH x2zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=qEiV+CBXnjJeIKQh1dxfvgTL+JdvEpAQuEhI0aEwj9o=; b=p67T4vXZOMgi+UD8dk8HvxIn/LfJkPRf99++TD5jkfEqI4krvlPXcl+hpumpJyW2dk tFRsJXaC83g8yAAIMG7u5N1CG1uggBV91T+nm2j/p8cnkGTiaqAPQfHq0bKDeS1/9nRy sj4uzpWMykHF5GUVpZWkvDJHBictWPGai+fYxNy+6d1Op01utByC9+jEwAJmNAoZHJ4j I7f83F4PT3y0jCauXz3+IGpkaPtfSVR6Q9YjeL+UnVrqKU6q2jFcvZ8vucJtucXNqupl LVIYdNWKEtFdHXKXja4Lw4mu6lbg4yUKjzwJ97KXCPolHPHrWCcgFk8zEky5Nwm3WwuE yXEg== X-Gm-Message-State: AElRT7GkvVbEHOCX8OpUOimUi0kqwBAnPNv2mkiz5hwox2IajgiPtvGW c3eARFRw3vLrjG5dw827Ag4SXw== X-Google-Smtp-Source: AG47ELtqBYdkZ7imG3xW36rIIahrvU+sH64N4fEe4cqFNSYz6y4wpFZVqh2qEqUTlfjkvIoC2EKoWg== X-Received: by 10.28.87.73 with SMTP id l70mr15953846wmb.123.1522083645868; Mon, 26 Mar 2018 10:00:45 -0700 (PDT) Date: Mon, 26 Mar 2018 18:00:44 +0100 From: Stephane Chazelas To: Martijn Dekker Cc: Zsh hackers list Subject: Re: [PATCH] make sure internal temp files are user readable and writeable Message-ID: <20180326170044.GA10044@chaz.gmail.com> Mail-Followup-To: Martijn Dekker , Zsh hackers list References: <581009fe-372c-641a-cf5f-87e6a2a68dbb@inlv.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <581009fe-372c-641a-cf5f-87e6a2a68dbb@inlv.org> User-Agent: Mutt/1.5.24 (2015-08-30) 2018-03-26 18:45:23 +0200, Martijn Dekker: > Here-documents fail if the umask does not allow user reading. > > $ zsh -c $'umask u-r; cat < zsh:1: can't create temp file for here document: permission denied [...] > + mode_t old_umask = umask(0177); [...] Thanks. See also 42446 (https://www.zsh.org/mla/workers/2018/msg00252.html) with other suggested options. There I mentioned the potential need to block signals between the time the umask is changed temporarily and when it's restored (to avoid traps running with the wrong umask (0177 instead of the user's requested one)). -- Stephane