<feed xmlns='http://www.w3.org/2005/Atom'>
<title>guix/nix/libstore/store-api.hh, branch kernel-updates</title>
<subtitle>Transactional package manager, declarative GNU/Linux distribution, reproducible deployment tool, and more! https://guix.gnu.org</subtitle>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/'/>
<entry>
<title>daemon: Bypass authentication when importing content-addressed store items.</title>
<updated>2026-08-17T14:47:36+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2026-05-30T21:54:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=64d4de2a920445e5992f020e56490f5fcbdbba7c'/>
<id>64d4de2a920445e5992f020e56490f5fcbdbba7c</id>
<content type='text'>
This puts ‘importPaths’ on par with ‘addToStore’ and ‘addTextToStore’: since
the two latter RPCs let anyone add content-addressed items in the store,
there’s no reason for ‘importPaths’ to require signatures by authorized keys
on these content-addressed items.

This will allow for things like ‘guix copy’ of .drv items without
authorization, or ‘guix deploy’ with (build-locally? #f) without
authorization.

* nix/libstore/store-api.hh (isContentAddressedPath): New prototype.
* nix/libstore/store-api.cc (isContentAddressedPath): New function.
* nix/libutil/util.hh (isPlainFile): New prototype.
* nix/libutil/util.cc (isPlainFile): New function.
* nix/libstore/local-store.cc (LocalStore::importPath): Define ‘narHash’ and
‘contentAddressed’.  Allow unsigned imports when ‘contentAddressed’ is true;
bypass signature verification when ‘contentAddressed’ is true.
* tests/store.scm ("import not signed"): Rewrite to not use a
content-addressed store item.
("import signed by unauthorized key"): Likewise.
("import not signed but content-addressed tree"): New test.
("import not signed but content-addressed regular file"): New test.
("import signed by unauthorized key but content-addressed"): New test.
("import with corrupt signature"): New test.
("import signed by authorized key but hash doesn't match"): New test.
("import with corrupt signature but content-addressed"): New test.
("import signed by authorized key, hash doesn't match, but content-addressed"):
New test.
* doc/guix.texi (Invoking guix archive): Document the exception for
content-addressed store items.  Add anchor for ‘--authorize’.
(Invoking guix deploy): Document the benefit of (build-locally? #f).
Add cross-reference for ‘authorize?’.

Co-authored-by: Reepca Russelstein &lt;reepca@russelstein.xyz&gt;
Signed-off-by: Ludovic Courtès &lt;ludo@gnu.org&gt;
Merges: #8979
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This puts ‘importPaths’ on par with ‘addToStore’ and ‘addTextToStore’: since
the two latter RPCs let anyone add content-addressed items in the store,
there’s no reason for ‘importPaths’ to require signatures by authorized keys
on these content-addressed items.

This will allow for things like ‘guix copy’ of .drv items without
authorization, or ‘guix deploy’ with (build-locally? #f) without
authorization.

* nix/libstore/store-api.hh (isContentAddressedPath): New prototype.
* nix/libstore/store-api.cc (isContentAddressedPath): New function.
* nix/libutil/util.hh (isPlainFile): New prototype.
* nix/libutil/util.cc (isPlainFile): New function.
* nix/libstore/local-store.cc (LocalStore::importPath): Define ‘narHash’ and
‘contentAddressed’.  Allow unsigned imports when ‘contentAddressed’ is true;
bypass signature verification when ‘contentAddressed’ is true.
* tests/store.scm ("import not signed"): Rewrite to not use a
content-addressed store item.
("import signed by unauthorized key"): Likewise.
("import not signed but content-addressed tree"): New test.
("import not signed but content-addressed regular file"): New test.
("import signed by unauthorized key but content-addressed"): New test.
("import with corrupt signature"): New test.
("import signed by authorized key but hash doesn't match"): New test.
("import with corrupt signature but content-addressed"): New test.
("import signed by authorized key, hash doesn't match, but content-addressed"):
New test.
* doc/guix.texi (Invoking guix archive): Document the exception for
content-addressed store items.  Add anchor for ‘--authorize’.
(Invoking guix deploy): Document the benefit of (build-locally? #f).
Add cross-reference for ‘authorize?’.

Co-authored-by: Reepca Russelstein &lt;reepca@russelstein.xyz&gt;
Signed-off-by: Ludovic Courtès &lt;ludo@gnu.org&gt;
Merges: #8979
</pre>
</div>
</content>
</entry>
<entry>
<title>daemon: Remove ‘requireSignature’ argument to ‘importPaths’.</title>
<updated>2026-08-17T14:47:35+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2026-05-30T13:01:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=6fbe87f2c890e10c6b24f838b73ad3683b5c97b0'/>
<id>6fbe87f2c890e10c6b24f838b73ad3683b5c97b0</id>
<content type='text'>
For ‘guix-daemon’ the value of ‘requireSignature’ has always been true.

* nix/libstore/store-api.hh (StoreAPI)[importPaths]: Remove ‘requireSignature’
argument.
* nix/libstore/local-store.hh (LocalStore)[importPaths]: Likewise.
* nix/libstore/local-store.cc (LocalStore::importPaths): Adjust accordingly.
* nix/nix-daemon/nix-daemon.cc (performOp): Remove first argument to
‘importPaths’.

Change-Id: I7ed87f3af03cca7078e224788114c499773f01c2
Signed-off-by: Ludovic Courtès &lt;ludo@gnu.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For ‘guix-daemon’ the value of ‘requireSignature’ has always been true.

* nix/libstore/store-api.hh (StoreAPI)[importPaths]: Remove ‘requireSignature’
argument.
* nix/libstore/local-store.hh (LocalStore)[importPaths]: Likewise.
* nix/libstore/local-store.cc (LocalStore::importPaths): Adjust accordingly.
* nix/nix-daemon/nix-daemon.cc (performOp): Remove first argument to
‘importPaths’.

Change-Id: I7ed87f3af03cca7078e224788114c499773f01c2
Signed-off-by: Ludovic Courtès &lt;ludo@gnu.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>daemon: libstore: add assertStorePathStrict and helpers.</title>
<updated>2026-06-24T13:20:16+00:00</updated>
<author>
<name>Reepca Russelstein</name>
<email>reepca@russelstein.xyz</email>
</author>
<published>2026-06-21T12:19:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=69b37a8e5d166328fa3d9a7c61b7ca1dfa772552'/>
<id>69b37a8e5d166328fa3d9a7c61b7ca1dfa772552</id>
<content type='text'>
isStorePath is a lightweight check that only verifies that the given path is
in the store and doesn't have any '/' characters after the store prefix.  This
is insufficiently strict for verifying that a given path is actually a valid
store path.

isStoreName is extracted from checkStoreName, and to preserve the error
messages may have a second argument giving a string to write to with the
problem description in the case that isStoreName returns false.

* nix/libstore/store-api.hh (assertStorePathStrict, isStoreName,
  isStoreBasenameStrict, isStorePathStrict): new functions.
* nix/libstore/worker-protocol.hh (readStorePathStrict): new function.
  (readStorePathsStrict): new template.
* nix/libstore/store-api.cc (assertStorePathStrict, isStoreName,
  isStoreBasenameStrict, isStorePathStrict, readStorePathStrict,
  readStorePathsStrict): provide implementations.

Signed-off-by: Ludovic Courtès &lt;ludo@gnu.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
isStorePath is a lightweight check that only verifies that the given path is
in the store and doesn't have any '/' characters after the store prefix.  This
is insufficiently strict for verifying that a given path is actually a valid
store path.

isStoreName is extracted from checkStoreName, and to preserve the error
messages may have a second argument giving a string to write to with the
problem description in the case that isStoreName returns false.

* nix/libstore/store-api.hh (assertStorePathStrict, isStoreName,
  isStoreBasenameStrict, isStorePathStrict): new functions.
* nix/libstore/worker-protocol.hh (readStorePathStrict): new function.
  (readStorePathsStrict): new template.
* nix/libstore/store-api.cc (assertStorePathStrict, isStoreName,
  isStoreBasenameStrict, isStorePathStrict, readStorePathStrict,
  readStorePathsStrict): provide implementations.

Signed-off-by: Ludovic Courtès &lt;ludo@gnu.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nix: Spelling corrections.</title>
<updated>2026-01-14T08:16:45+00:00</updated>
<author>
<name>Efraim Flashner</name>
<email>efraim@flashner.co.il</email>
</author>
<published>2026-01-08T11:55:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=9efc2a690e5b5ea891457e2ae170597a548a19e6'/>
<id>9efc2a690e5b5ea891457e2ae170597a548a19e6</id>
<content type='text'>
* nix/libstore/globals.hh,
nix/libstore/store-api.hh,
nix/libutil/util.hh: Fix misspellings in comments.

Change-Id: Id77ea2bde1c2582d1a7bec4ed256ea900998c4b8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* nix/libstore/globals.hh,
nix/libstore/store-api.hh,
nix/libutil/util.hh: Fix misspellings in comments.

Change-Id: Id77ea2bde1c2582d1a7bec4ed256ea900998c4b8
</pre>
</div>
</content>
</entry>
<entry>
<title>daemon: Use inline functions and variables instead of extern</title>
<updated>2025-11-12T17:34:06+00:00</updated>
<author>
<name>Congcong Kuo</name>
<email>congcong.kuo@gmail.com</email>
</author>
<published>2025-10-20T03:39:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=d1a9fb85a4d46722f06d01bde6f61acae3d9ea7a'/>
<id>d1a9fb85a4d46722f06d01bde6f61acae3d9ea7a</id>
<content type='text'>
Avoid separate declarations and definitions for so-called 'global' objects.

* nix/libstore/derivations.{cc, hh} (drvHashes): Use inline instead of separate
declaration and definition.
* nix/libstore/globals.{cc, hh} (settings, nixVersion): Same.
* nix/libstore/local-store.hh (drvsLogDir, deduplicationMinSize): Same.
* nix/libstore/optimise-store.cc (deduplicationMinSize): Same.
* nix/libstore/store-api.{cc, hh} (store): Same.
* nix/libutil/archive.{cc, hh} (defaultPathFilter): Same.
* nix/libutil/hash.{cc, hh} (base32Chars): Same and modify header files.
* nix/libutil/util.{cc, hh} (logType, verbosity, _writeToStderr,
_isInterrupted): Same.
* nix/local.mk: Modified according to the rename of shared.hh.
* nix/nix-daemon/guix-daemon.cc (blockInt, argvSaved, run): Same and
modify header files.
* nix/nix-daemon/nix-daemon.cc: Modify header files.
* nix/nix-daemon/shared.hh: Renamed to nix-daemon.hh

Signed-off-by: Ludovic Courtès &lt;ludo@gnu.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Avoid separate declarations and definitions for so-called 'global' objects.

* nix/libstore/derivations.{cc, hh} (drvHashes): Use inline instead of separate
declaration and definition.
* nix/libstore/globals.{cc, hh} (settings, nixVersion): Same.
* nix/libstore/local-store.hh (drvsLogDir, deduplicationMinSize): Same.
* nix/libstore/optimise-store.cc (deduplicationMinSize): Same.
* nix/libstore/store-api.{cc, hh} (store): Same.
* nix/libutil/archive.{cc, hh} (defaultPathFilter): Same.
* nix/libutil/hash.{cc, hh} (base32Chars): Same and modify header files.
* nix/libutil/util.{cc, hh} (logType, verbosity, _writeToStderr,
_isInterrupted): Same.
* nix/local.mk: Modified according to the rename of shared.hh.
* nix/nix-daemon/guix-daemon.cc (blockInt, argvSaved, run): Same and
modify header files.
* nix/nix-daemon/nix-daemon.cc: Modify header files.
* nix/nix-daemon/shared.hh: Renamed to nix-daemon.hh

Signed-off-by: Ludovic Courtès &lt;ludo@gnu.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>daemon: Fix build failure with gcc@15.</title>
<updated>2025-06-01T14:01:03+00:00</updated>
<author>
<name>wrobell</name>
<email>wrobell@riseup.net</email>
</author>
<published>2025-05-23T16:44:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=7b66b41ce5cee48b14eb6cce3bb4b26f5b058652'/>
<id>7b66b41ce5cee48b14eb6cce3bb4b26f5b058652</id>
<content type='text'>
* nix/libstore/build.cc (CompareGoalPtrs::operator): Add const keyword.
* nix/libstore/store-api.hh: Add missing include for uint64_t.

Change-Id: I56368da9eb10dc376f7e6eeae6a61746bb36c9cf
Signed-off-by: Andreas Enge &lt;andreas@enge.fr&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* nix/libstore/build.cc (CompareGoalPtrs::operator): Add const keyword.
* nix/libstore/store-api.hh: Add missing include for uint64_t.

Change-Id: I56368da9eb10dc376f7e6eeae6a61746bb36c9cf
Signed-off-by: Andreas Enge &lt;andreas@enge.fr&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>daemon: Remove unused function exportPaths.</title>
<updated>2022-09-11T14:43:30+00:00</updated>
<author>
<name>Maxime Devos</name>
<email>maximedevos@telenet.be</email>
</author>
<published>2022-09-10T17:20:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=93032586df6b925e1ed9102dc3a77aa626aa60d3'/>
<id>93032586df6b925e1ed9102dc3a77aa626aa60d3</id>
<content type='text'>
* nix/libstore/store-api.cc (exportPaths): Remove it.
* nix/libstore/store-api.hh (exportPaths): Likewise.

Signed-off-by: Mathieu Othacehe &lt;othacehe@gnu.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* nix/libstore/store-api.cc (exportPaths): Remove it.
* nix/libstore/store-api.hh (exportPaths): Likewise.

Signed-off-by: Mathieu Othacehe &lt;othacehe@gnu.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>daemon: Remove unused function openStore.</title>
<updated>2022-09-11T14:43:30+00:00</updated>
<author>
<name>Maxime Devos</name>
<email>maximedevos@telenet.be</email>
</author>
<published>2022-09-10T17:20:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=1c5f5d6d8cb3bd42ed436e31366a328598165734'/>
<id>1c5f5d6d8cb3bd42ed436e31366a328598165734</id>
<content type='text'>
* nix/libstore/store-api.cc (openStore): Remove it.
* nix/libstore/store-api.hh (openStore): Likewise.

Signed-off-by: Mathieu Othacehe &lt;othacehe@gnu.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* nix/libstore/store-api.cc (openStore): Remove it.
* nix/libstore/store-api.hh (openStore): Likewise.

Signed-off-by: Mathieu Othacehe &lt;othacehe@gnu.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>daemon: Make 'profiles/per-user' non-world-writable.</title>
<updated>2019-10-16T20:53:40+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2019-10-16T09:51:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=81c580c8664bfeeb767e2c47ea343004e88223c7'/>
<id>81c580c8664bfeeb767e2c47ea343004e88223c7</id>
<content type='text'>
Fixes &lt;https://bugs.gnu.org/37744&gt;.
Reported at &lt;https://www.openwall.com/lists/oss-security/2019/10/09/4&gt;.

Based on Nix commit 5a303093dcae1e5ce9212616ef18f2ca51020b0d
by Eelco Dolstra &lt;edolstra@gmail.com&gt;.

* nix/libstore/local-store.cc (LocalStore::LocalStore): Set 'perUserDir'
to #o755 instead of #o1777.
(LocalStore::createUser): New function.
* nix/libstore/local-store.hh (LocalStore): Add it.
* nix/libstore/store-api.hh (StoreAPI): Add it.
* nix/nix-daemon/nix-daemon.cc (performOp): In 'wopSetOptions', add
condition to handle "user-name" property and honor it.
(processConnection): Add 'userId' parameter.  Call 'store-&gt;createUser'
when userId is not -1.
* guix/profiles.scm (ensure-profile-directory): Note that this is now
handled by the daemon.
* guix/store.scm (current-user-name): New procedure.
(set-build-options): Add #:user-name parameter and pass it to the daemon.
* tests/guix-daemon.sh: Test the creation of 'profiles/per-user' when
listening on a TCP socket.
* tests/store.scm ("profiles/per-user exists and is not writable")
("profiles/per-user/$USER exists"): New tests.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes &lt;https://bugs.gnu.org/37744&gt;.
Reported at &lt;https://www.openwall.com/lists/oss-security/2019/10/09/4&gt;.

Based on Nix commit 5a303093dcae1e5ce9212616ef18f2ca51020b0d
by Eelco Dolstra &lt;edolstra@gmail.com&gt;.

* nix/libstore/local-store.cc (LocalStore::LocalStore): Set 'perUserDir'
to #o755 instead of #o1777.
(LocalStore::createUser): New function.
* nix/libstore/local-store.hh (LocalStore): Add it.
* nix/libstore/store-api.hh (StoreAPI): Add it.
* nix/nix-daemon/nix-daemon.cc (performOp): In 'wopSetOptions', add
condition to handle "user-name" property and honor it.
(processConnection): Add 'userId' parameter.  Call 'store-&gt;createUser'
when userId is not -1.
* guix/profiles.scm (ensure-profile-directory): Note that this is now
handled by the daemon.
* guix/store.scm (current-user-name): New procedure.
(set-build-options): Add #:user-name parameter and pass it to the daemon.
* tests/guix-daemon.sh: Test the creation of 'profiles/per-user' when
listening on a TCP socket.
* tests/store.scm ("profiles/per-user exists and is not writable")
("profiles/per-user/$USER exists"): New tests.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove 'guix-register' and its traces.</title>
<updated>2018-06-14T09:17:00+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2018-06-08T09:03:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=ea0a06cee2ba05451f94714a4f913db02efbe92c'/>
<id>ea0a06cee2ba05451f94714a4f913db02efbe92c</id>
<content type='text'>
* Makefile.am (SH_TESTS): Remove tests/guix-register.sh.
* build-aux/pre-inst-env.in (GUIX_REGISTER): Remove.
* gnu/build/install.scm (directives): Remove outdated comment.
* gnu/build/vm.scm (root-partition-initializer): Update comment.
* gnu/packages/package-management.scm (guix-register): Remove.
* guix/config.scm.in (%sbindir, %guix-register-program): Remove.
* guix/scripts/system.scm (install): Adjust docstring.
* guix/self.scm (make-config.scm): Remove #:guix.  Do not generate
%sbindir and %guix-register-program.
(specification-&gt;package): Remove "guix".
* nix/guix-register/guix-register.cc: Remove.
* nix/libstore/store-api.cc (decodeValidPathInfo): Remove.
* nix/libstore/store-api.hh (decodeValidPathInfo): Remove declaration.
* nix/local.mk (sbin_PROGRAMS, guix_register_SOURCES)
(guix_register_CPPFLAGS, guix_register_LDFLAGS): Remove.
* tests/guix-register.sh: Remove.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Makefile.am (SH_TESTS): Remove tests/guix-register.sh.
* build-aux/pre-inst-env.in (GUIX_REGISTER): Remove.
* gnu/build/install.scm (directives): Remove outdated comment.
* gnu/build/vm.scm (root-partition-initializer): Update comment.
* gnu/packages/package-management.scm (guix-register): Remove.
* guix/config.scm.in (%sbindir, %guix-register-program): Remove.
* guix/scripts/system.scm (install): Adjust docstring.
* guix/self.scm (make-config.scm): Remove #:guix.  Do not generate
%sbindir and %guix-register-program.
(specification-&gt;package): Remove "guix".
* nix/guix-register/guix-register.cc: Remove.
* nix/libstore/store-api.cc (decodeValidPathInfo): Remove.
* nix/libstore/store-api.hh (decodeValidPathInfo): Remove declaration.
* nix/local.mk (sbin_PROGRAMS, guix_register_SOURCES)
(guix_register_CPPFLAGS, guix_register_LDFLAGS): Remove.
* tests/guix-register.sh: Remove.
</pre>
</div>
</content>
</entry>
</feed>
