openat, chownat, ... in Guile?

  • Open
  • quality assurance status badge
Details
One participant
  • Maxime Devos
Owner
unassigned
Submitted by
Maxime Devos
Severity
normal
M
M
Maxime Devos wrote on 2 Feb 2021 15:45
(address . bug-guile@gnu.org)
6c9d1a78a198d4b5111fe42af67eaeb241e507ae.camel@telenet.be
Hi guilers,

I would like to see fchownat, openat, fchmodat
and any *at variants I forgot to appear in future versions
of Guile in some form. I have two proposals, which I will
illustrate with the procedure 'chmod':

* chmod can currently modify permissions of a file.
This OBJECT argument identifying the file can currently
be a filename or a port. Allow a ‘file in a directory’
object as well. This could be created with a procedure

(make-path-at DIRECTORY-PORT FILENAME)

This procedure does not perform any I/O, but rather
constructs what is effectively is a pair (DIRECTORY-PORT
. FILENAME) but with its own type.

* Follow the C API, but with Scheme types.

(chmodat DIRECTORY-PORT FILENAME MODE FLAGS)

where FLAGS can include AT_SYMLINK_NOFOLLOW (from chmod(2)
Linux man page)

Any thoughts?

Greetings,
Maxime

P.S. I'm not subscribed to bug-guile@gnu.org, please CC me.
-----BEGIN PGP SIGNATURE-----

iI0EABYIADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYBllixccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7r2sAQDriygPto4bXe/ZxgEACkMFAttd
35gJUUlnJCVkbW0ARwEAqWTg0KBtxyiEcB34kf5J8zRTHGOUw4SmvkV/CP68DQA=
=G0JL
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 5 Feb 2021 15:16
Re: Potential security weakness in Guix services
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . guix-devel@gnu.org)
c6164b827beb62aa8f8f276473081eb7cf557110.camel@telenet.be
On Fri, 2021-02-05 at 13:20 +0100, Maxime Devos wrote:
Toggle quote (9 lines)
> On Fri, 2021-02-05 at 10:57 +0100, Ludovic Courtès wrote:
> > [...]
> [...]
>
> I'll try to implement this API in Scheme (using the FFI), and post
> it at https://notabug.org/mdevos/things. I'll post a follow-up
> messsage once I've implemented the basics (openat, chmodat,
> chownat).

-----BEGIN PGP SIGNATURE-----

iI0EABYIADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYB1TRxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7nUPAPsH9KXqmRejDUetGW2tQtc9Sa6/
2JTTBINsrZUWiUQnTwEAj7xQNb2qCWMk2l1LswINy9/1PZ2r91UlzEe4lXoxbw4=
=IGWx
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 24 Mar 2022 12:55
Re: bug#54485: [PATCH] gnu: Add guile-with-openat.
(name . Ludovic Courtès)(address . ludo@gnu.org)
c1bc08a29b8c836ce6098e28fb0c01c2587bc013.camel@telenet.be
Ludovic Courtès schreef op do 24-03-2022 om 12:37 [+0100]:
Toggle quote (4 lines)
> Instead, I would prefer to actually review and apply the patches
> upstream.  I’ve been meaning to do that, really, but it requires a chunk
> of time and focus, which keeps leading me to postpone.

OK. I can relate, w.r.t. the IPFS substitution patches.

Toggle quote (3 lines)
> Is the latest patch set on guile-devel?  It’s not mentioned at
> <https://issues.guix.gnu.org/46258>.

-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYjxcPRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7u8JAP9X68N7KqIYB2g4C43hK1TeMv4n
LMbyJ3Xt42ismfPt5QD/U/yWNYurX2avnOmouLhBp+rYS59Qlo4yy7RvlFYcOgE=
=LX0E
-----END PGP SIGNATURE-----


?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 46258@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 46258
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch