1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00
guile/module/ice-9
Tomas Volf b6866ded2b
ftw: Fix getuid-or-false, getgid-or-false macros.
Both macros were missing a quote for the procedure call, causing the
actual return value to be compiled into the ftw.go, instead of the
procedure call.  Snippet from disassembly of ftw.go does confirm that:

  55    (make-immediate 2 3990)         ;; 997                at ice-9/ftw.scm:319:46
  56    (make-long-immediate 1 120002)  ;; 30000              at ice-9/ftw.scm:320:46

That effectively prevented ftw from entering directories without access
for others.  Simple reproduction:

    scheme@(guile-user)> ,use (ice-9 ftw)
    scheme@(guile-user)> (mkdir "/tmp/xxxx")
    scheme@(guile-user)> (chmod "/tmp/xxxx" #o0700)
    scheme@(guile-user)> (ftw "/tmp/xxxx" (lambda (_ __ f) (pk f) #t))

    ;;; (directory-not-readable)
    $1 = #t
    scheme@(guile-user)> (system "ls -al /tmp/xxxx")
    total 0
    drwx------ 1 wolf wolf   0 Oct 11 22:54 .
    drwxrwxrwt 1 root root 888 Oct 11 22:54 ..
    $2 = 0

The fix is to quote the procedure call, leading to the intended
behavior.

Fixes <https://bugs.gnu.org/55344>.

* module/ice-9/ftw.scm (getuid-or-false): Quote the (getuid).
(getgid-or-false): Quote the (getgid).
* NEWS: Update.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-01-29 14:31:01 +01:00
..
peg Refactor PEG records 2019-10-21 17:21:47 +02:00
and-let-star.scm Add internal definitions to derived forms 2023-01-24 17:11:38 +01:00
arrays.scm Fix bitvectors and non-zero lower bound arrays in truncated-print 2017-10-31 13:23:44 +01:00
atomic.scm Compiler support for atomics 2016-09-06 12:18:35 +02:00
binary-ports.scm Rewrite custom binary ports in Scheme, in terms of custom ports 2023-06-08 09:03:10 +02:00
boot-9.scm define-inlinable marks residualized procedure as maybe-unused 2023-08-24 11:43:31 +02:00
buffered-input.scm
calling.scm
ChangeLog-2008
command-line.scm Bump user-visible copyright years to 2024. 2024-01-24 10:49:27 +01:00
common-list.scm
compile-psyntax.scm Fix compile-psyntax.scm -- canonicalize pass not needed 2021-04-29 21:52:27 +02:00
control.scm Add suspendable-continuation? 2016-12-12 21:13:00 +01:00
copy-tree.scm Remove unnecessary module imports. 2023-02-24 16:49:00 +01:00
curried-definitions.scm In curried definitions, move docstrings to outermost lambda 2022-08-29 11:45:39 +02:00
custom-ports.scm Add "custom ports" 2023-06-08 09:03:10 +02:00
deprecated.scm Move copy-tree to (ice-9 copy-tree); deprecate main binding 2020-09-10 21:57:21 +02:00
documentation.scm
eval-string.scm Remove unnecessary module imports. 2023-02-24 16:49:00 +01:00
eval.scm Introduce make-struct/simple 2018-01-21 21:03:35 +01:00
exceptions.scm exceptions: Export constructor and predicate for '&quit-exception'. 2020-01-18 23:33:01 +01:00
expect.scm
fdes-finalizers.scm Add file descriptor finalizers 2016-08-30 23:35:10 +02:00
format.scm doc: Document how (ice-9 format) replaces 'format'. 2022-10-12 22:49:00 +02:00
ftw.scm ftw: Fix getuid-or-false, getgid-or-false macros. 2024-01-29 14:31:01 +01:00
futures.scm Revert "futures: Limit the number of nested futures on the same stack." 2017-02-28 10:45:21 +01:00
gap-buffer.scm Re-implement (ice-9 gap-buffer) records in terms of srfi-9 2019-10-22 13:47:02 +02:00
getopt-long.scm Remove unnecessary module imports. 2023-02-24 16:49:00 +01:00
hash-table.scm Add procedures to convert alists into hash tables. 2013-11-18 23:03:38 -05:00
hcons.scm
history.scm
i18n.scm Add a fallback value for the locale-monetary-decimal-point 2019-05-23 17:31:23 +02:00
iconv.scm Add call-with-input-bytevector, call-with-output-bytevector 2021-01-12 12:09:19 +01:00
lineio.scm Deprecate (ice-9 lineio) 2023-06-08 10:21:28 +02:00
list.scm
local-eval.scm Add quote-syntax 2021-02-24 12:02:35 +01:00
ls.scm
match.scm Update match's no-matching-pattern code to use "throw" 2020-05-17 22:26:17 +02:00
match.upstream.scm Fix typos throughout codebase. 2023-07-16 22:09:01 +02:00
networking.scm
null.scm (ice-9 null) also exports aux syntax, syntax-rules 2019-09-27 22:57:38 +02:00
occam-channel.scm
optargs.scm
peg.scm
poe.scm
poll.scm Remove unnecessary module imports. 2023-02-24 16:49:00 +01:00
popen.scm Remove unnecessary module imports. 2023-02-24 16:49:00 +01:00
ports.scm Fix typos throughout codebase. 2023-07-16 22:09:01 +02:00
posix.scm
pretty-print.scm Fix pretty-print with a per-line prefix 2023-11-15 09:35:23 +01:00
psyntax-pp.scm psyntax: Honor source properties for things other than syntax objects. 2022-03-07 10:52:16 +01:00
psyntax.scm Ensure macro-introduced top-level identifiers are unique 2024-01-29 10:53:13 +01:00
q.scm
quasisyntax.scm
r5rs.scm
r6rs-libraries.scm Improve support for R6/R7 SRFI module name formats. 2021-11-02 10:02:29 +01:00
r7rs-libraries.scm Allow (library ...) form in cond-expand inside R7RS define-library. 2022-06-16 09:36:31 +02:00
rdelim.scm VM support for string-set!; slimmer read-string 2017-03-09 17:24:06 +01:00
read.scm ice-9/read: Parse #{}}# properly. 2021-08-02 12:15:59 +02:00
README
receive.scm
regex.scm
runq.scm
rw.scm
safe-r5rs.scm (ice-9 safe-r5rs) fixes for bound aux syntax 2019-09-27 22:57:38 +02:00
safe.scm Deprecate passing a non-zero size to make-module 2019-09-27 22:57:38 +02:00
sandbox.scm Remove unnecessary module imports. 2023-02-24 16:49:00 +01:00
save-stack.scm Avoid stacks in dynamically-bound values 2017-02-07 09:57:55 +01:00
scm-style-repl.scm Update old-style REPL code for deprecation 2014-04-02 12:08:48 +02:00
serialize.scm Deprecate dynamic roots 2016-11-21 23:09:21 +01:00
session.scm Deprecate passing a non-zero size to make-module 2019-09-27 22:57:38 +02:00
slib.scm
soft-ports.scm Modernize soft ports 2023-06-08 10:21:28 +02:00
stack-catch.scm
streams.scm Re-implement (ice-9 streams) in terms of (srfi srfi-41) 2015-03-09 13:48:38 +01:00
string-fun.scm string-fun: Fix typo 2022-09-17 13:41:47 +02:00
suspendable-ports.scm Fix some invalid unicode handling issues with suspendable ports. 2023-03-20 23:23:29 +01:00
test.scm Fix docstring for symbol->string, string->symbol 2023-09-18 16:03:41 +02:00
textual-ports.scm Implement R6RS custom textual ports 2023-06-08 10:21:02 +02:00
threads.scm Fix asymetric mutex locking when joining thread. 2024-01-25 23:12:53 +01:00
time.scm time: Use #: for 'define-module' clauses. 2019-05-23 15:41:32 +02:00
top-repl.scm (ice-9 safe-r5rs) fixes for bound aux syntax 2019-09-27 22:57:38 +02:00
unicode.scm Add (ice-9 unicode) module 2014-09-29 21:54:14 -04:00
vlist.scm
weak-vector.scm Add weak-vector-length, weak-vector-ref, weak-vector-set! 2014-02-07 13:00:41 +01:00

This directory contains various bits of Guile Scheme code.
Most of these are packaged as modules, with foo.scm implementing
the module `(ice-9 foo)'.

The non-module files are:

boot-9.scm	-- loaded on guile startup
		   implements module system + lots of other stuff
arrays.scm	-- loaded by boot-9.scm
networking.scm	-- loaded by boot-9.scm
posix.scm	-- loaded by boot-9.scm
r4rs.scm	-- loaded by boot-9.scm