From: Max Nikulin <manikulin@gmail.com>
To: vitalij@gmx.com
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] #+CALL - permission error -bash
Date: Fri, 3 May 2024 17:24:38 +0700 [thread overview]
Message-ID: <9af62cb2-f237-4423-ba7a-e1fccfc722f9@gmail.com> (raw)
In-Reply-To: <87frv09sar.fsf@localhost>
On 02/05/2024 21:55, Ihor Radchenko wrote:
> vitalij writes:
>
>> in org-babel-sh-evaluate
>> file:~/.emacs.d/elpa/org-9.6.28/ob-shell.el::300
>>
>> this do apply: (process-file "/tmp/babel-NfRG9P/sh-script-jmKNA4"
>> "/tmp/babel-NfRG9P/sh-stdin-o3CEm5" #<buffer *temp*> nil nil)
>>
>> I don't allow executables in /tmp folder!
>
> Why do you think that it is a bug in Org mode?
> AFAIK, it is generally expected that anything can go into tmp.
There are various guides recommending noexec, however they warn that
some issues should be expected.
Securing Debian Manual
- https://www.debian.org/doc/manuals/securing-debian-manual/ch04s10.en.html
4.10. Mounting partitions the right way
-
https://www.debian.org/doc/manuals/securing-debian-manual/checklist.en.html
B.2. Configuration checklist
Security in Arch Linux wiki:
https://wiki.archlinux.org/title/Security#Mount_options
Mount options
>> How to make it this way:
>>
>> (process-file "/use/bin/bash /tmp/babel-NfRG9P/sh-script-jmKNA4"
>> "/tmp/babel-NfRG9P/sh-stdin-o3CEm5" #<buffer *temp*> nil nil)
>>
>> ???
>>
>> It is like when you do:
>> ./a.sh
>>
>> instead of:
>> bash a.sh
Likely you mean
(process-file "/usr/bin/bash"
"/tmp/babel-NfRG9P/sh-stdin-o3CEm5" #<buffer *temp*> nil
"/tmp/babel-NfRG9P/sh-script-jmKNA4")
but it would ignore shebang. Try
#!/bin/sh -e
false
printf "Should not be executed\n"
So it is necessary to either drop :shebang or set temporary directory to
a suitable path.
next prev parent reply other threads:[~2024-05-03 10:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-02 14:41 [BUG] #+CALL - permission error -bash vitalij
2024-05-02 14:55 ` Ihor Radchenko
2024-05-03 10:24 ` Max Nikulin [this message]
2024-05-02 17:05 ` Leo Butler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9af62cb2-f237-4423-ba7a-e1fccfc722f9@gmail.com \
--to=manikulin@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=vitalij@gmx.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).