summaryrefslogtreecommitdiffstats
path: root/man/sd_id128_get_machine.xml (follow)
Commit message (Collapse)AuthorAgeFilesLines
* sd-id128: add an app-specific flavour of the invocation ID tooLennart Poettering2024-04-201-5/+16
|
* man: use same version in public and system ident.David Tardon2023-12-251-1/+1
|
* man: use <simplelist> for 'See also' sectionsDavid Tardon2023-12-231-9/+9
| | | | | This is just a slight markup improvement; there should be no difference in rendering.
* man: condense version information for functionsAbderrahim Kitouni2023-09-191-2/+2
| | | | Use a more compact form like 'a, b, and c were added in version x'
* man: add version information for functionsAbderrahim Kitouni2023-09-041-0/+10
|
* sd-id128: do not allow null 'app_id' paramZbigniew Jędrzejewski-Szmek2023-09-021-1/+4
| | | | | | | | | | | | | | | | | | | | | If it is null, we get the 'base' param unchanged: $ build/systemd-id128 show 00000000000000000000000000000001 \ --app-specific=00000000000000000000000000000000 00000000000000000000000000000001 This is not good, because it breaks our promise that the base (usually either machine-id or boot-id) cannot be derived from the result. Some application using the library could use a null app id, inadvertently exposing the machine or boot id. (This could happen because of forgotten initialization, or maybe because the app id is configurable, and the user configures it wrongly.) Note: the other way the secret is not exposed: $ build/systemd-id128 show 00000000000000000000000000000000 \ --app-specific=00000000000000000000000000000002 4f63080959264900b0d88d999dae2d3a Normally systemd would not allow a null machine-id or boot-id, but we can let the user do the calculation that if they want to.
* man: document sd_id128_get_app_specificZbigniew Jędrzejewski-Szmek2023-08-291-12/+29
|
* man: add version infoAbderrahim Kitouni2023-08-291-7/+21
| | | | | | | | This tries to add information about when each option was added. It goes back to version 183. The version info is included from a separate file to allow generating it, which would allow more control on the formatting of the final output.
* man: correct reference to sd_id128_get_boot_app_specificJan Luebbe2023-06-221-1/+1
| | | | | | | The function sd_id128_get_boot_app_specific is the app specific variant of sd_id128_get_boot. Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
* man: update documents for sd_id128_get_invocation()Yu Watanabe2022-12-141-4/+14
|
* sd-id128: also refuse an empty invocation IDYu Watanabe2022-12-141-1/+2
|
* sd-id128: make sd_id128_get_machine() or friends return -EUCLEAN when an ID ↵Yu Watanabe2022-12-141-1/+1
| | | | | | | | | | | is in an invalid format EINVAL suggests that the caller passes an invalid argument. EIO is for "input/output error", i.e. the error you'd get if the disk or file system is borked, and this error code could be returned by the underlying read/write functions. Let's make the functions return an unambiguous error code.
* man: mention that sd_id128_get_boot() and friend may return -ENOSYSYu Watanabe2022-12-121-8/+14
| | | | | | | And drop to mention sd_id128_get_boot_app_specific() may return -ENOENT or -ENOMEDIUM. The function does not read /etc/machine-id. But reads a file in the procfs, which is a kind of the kernel API. Hence the failures are caused only when the system has wrong setup.
* man: mention sd_id128_get_machine() or friend may return -ENOPKGYu Watanabe2022-12-121-0/+8
|
* sd-id128: document everywhere that we treat all UUIDs as Variant 1Lennart Poettering2021-06-151-4/+4
| | | | | | | | So in theory UUID Variant 2 (i.e. microsoft GUIDs) are supposed to be displayed in native endian. That is of course a bad idea, and Linux userspace generally didn't implement that, i.e. uuidd and similar. Hence, let's not bother either, but let's document that we treat everything the same as Variant 1, even if it declares something else.
* tree-wide: fix typoYu Watanabe2021-05-281-1/+1
|
* man: document that it is guaranteed that generated ID128 are never all-zero ↵Lennart Poettering2021-05-261-6/+10
| | | | | | | | | | or all-one This is the case because the ID128 we generate are all marked as v4 UUID which requires that some bits are zero and others are one. Let's document this so that people can rely on SD_ID128_NULL being a special value for "uninitialized" that is always distinguishable from generated UUIDs.
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* tree-wide: fix spelling errorsFrantisek Sumsal2020-04-211-1/+1
| | | | | | Based on a report from Fossies.org using Codespell. Followup to #15436
* man: document error values for sd_id128_get_*()Zbigniew Jędrzejewski-Szmek2019-03-211-6/+47
|
* man: use same header for all filesZbigniew Jędrzejewski-Szmek2019-03-141-1/+1
| | | | | | | The "include" files had type "book" for some raeason. I don't think this is meaningful. Let's just use the same everywhere. $ perl -i -0pe 's^..DOCTYPE (book|refentry) PUBLIC "-//OASIS//DTD DocBook XML V4.[25]//EN"\s+"http^<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"\n "http^gms' man/*.xml
* man: standarize on one-line license headerZbigniew Jędrzejewski-Szmek2019-03-141-4/+1
| | | | | | No need to waste space, and uniformity is good. $ perl -i -0pe 's|\n+<!--\s*SPDX-License-Identifier: LGPL-2.1..\s*-->|\n<!-- SPDX-License-Identifier: LGPL-2.1+ -->|gms' man/*.xml
* Fix omission in docsJoost Heitbrink2019-01-151-2/+2
| | | | change "if is missing" to "if /etc/machine-id is missing".
* man: add man page for systemd-id128Zbigniew Jędrzejewski-Szmek2018-10-021-1/+14
|
* systemd-id128: a new tool to print machine/boot/invocation/app-specific idsZbigniew Jędrzejewski-Szmek2018-10-021-1/+2
| | | | | | | | | | | | | | The raison d'etre for this program is printing machine-app-specific IDs. We provide a library function for that, but not a convenient API. We can hardly ask people to quickly hack their own C programs or call libsystemd through CFFI in python or another scripting language if they just want to print an ID. Verb 'new' was already available as 'journalctl --new-id128', but this makes it more discoverable. v2: - rename binary to systemd-id128 - make --app-specific= into a switch that applies to boot-id and machine-id
* sd-id128: add sd_id128_get_boot_app_specific()Zbigniew Jędrzejewski-Szmek2018-10-021-21/+37
|
* man: move more examples to stand-alone files and use 2-space indentation ↵Zbigniew Jędrzejewski-Szmek2018-08-021-11/+1
| | | | | | | | | | | | consistenty Moving them out makes it easier to run them through a compiler, use automatic indentation, and opens the possibility to provide a download link in the future. I verified that all examples compile cleanly. (2-space indentation is used because the examples are already significantly indented in the man page, and we need to keep them narrow so that they display well on standard terminals.)
* man: drop unused <authorgroup> tags from man sourcesZbigniew Jędrzejewski-Szmek2018-06-141-9/+0
| | | | | | | | | | | | Docbook styles required those to be present, even though the templates that we use did not show those names anywhere. But something changed semi-recently (I would suspect docbook templates, but there was only a minor version bump in recent years, and the changelog does not suggest anything related), and builds now work without those entries. Let's drop this dead weight. Tested with F26-F29, debian unstable. $ perl -i -0pe 's/\s*<authorgroup>.*<.authorgroup>//gms' man/*xml
* tree-wide: remove Lennart's copyright linesLennart Poettering2018-06-141-2/+0
| | | | | | | | | | | These lines are generally out-of-date, incomplete and unnecessary. With SPDX and git repository much more accurate and fine grained information about licensing and authorship is available, hence let's drop the per-file copyright notice. Of course, removing copyright lines of others is problematic, hence this commit only removes my own lines and leaves all others untouched. It might be nicer if sooner or later those could go away too, making git the only and accurate source of authorship information.
* tree-wide: drop 'This file is part of systemd' blurbLennart Poettering2018-06-141-2/+0
| | | | | | | | | | | | | | | | This part of the copyright blurb stems from the GPL use recommendations: https://www.gnu.org/licenses/gpl-howto.en.html The concept appears to originate in times where version control was per file, instead of per tree, and was a way to glue the files together. Ultimately, we nowadays don't live in that world anymore, and this information is entirely useless anyway, as people are very welcome to copy these files into any projects they like, and they shouldn't have to change bits that are part of our copyright header for that. hence, let's just get rid of this old cruft, and shorten our codebase a bit.
* man: xinclude the generic text to talk about libsystemd pkgconfigZbigniew Jędrzejewski-Szmek2018-06-061-10/+2
| | | | | | | The only difference is that functions are not individually listed by name, but that seems completely pointless, since all functions that are documented are always exported, so the generic text tells the user all she or he needs to know.
* sd-id128: return -ENOMEDIUM on null idZbigniew Jędrzejewski-Szmek2018-05-311-3/+5
| | | | | | | | | We currently return -ENOMEDIUM when /etc/machine-id is empty, and -EINVAL when it is all zeros. But -EINVAL is also used for invalid args. The distinction between empty and all-zero is not very important, let's use the same return code. Also document -ENOENT and -ENOMEDIUM since they can be a bit surprising.
* tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek2018-04-061-13/+0
| | | | | | | | | | Files which are installed as-is (any .service and other unit files, .conf files, .policy files, etc), are left as is. My assumption is that SPDX identifiers are not yet that well known, so it's better to retain the extended header to avoid any doubt. I also kept any copyright lines. We can probably remove them, but it'd nice to obtain explicit acks from all involved authors before doing that.
* Add SPDX license identifiers to man pagesZbigniew Jędrzejewski-Szmek2017-11-191-0/+2
|
* sd-id128: add new sd_id128_get_machine_app_specific() APILennart Poettering2016-11-291-12/+53
| | | | | | | | | | | | This adds an API for retrieving an app-specific machine ID to sd-id128. Internally it calculates HMAC-SHA256 with an 128bit app-specific ID as payload and the machine ID as key. (An alternative would have been to use siphash for this, which is also cryptographically strong. However, as it only generates 64bit hashes it's not an obvious choice for generating 128bit IDs.) Fixes: #4667
* core: add "invocation ID" concept to service managerLennart Poettering2016-10-071-12/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new invocation ID concept to the service manager. The invocation ID identifies each runtime cycle of a unit uniquely. A new randomized 128bit ID is generated each time a unit moves from and inactive to an activating or active state. The primary usecase for this concept is to connect the runtime data PID 1 maintains about a service with the offline data the journal stores about it. Previously we'd use the unit name plus start/stop times, which however is highly racy since the journal will generally process log data after the service already ended. The "invocation ID" kinda matches the "boot ID" concept of the Linux kernel, except that it applies to an individual unit instead of the whole system. The invocation ID is passed to the activated processes as environment variable. It is additionally stored as extended attribute on the cgroup of the unit. The latter is used by journald to automatically retrieve it for each log logged message and attach it to the log entry. The environment variable is very easily accessible, even for unprivileged services. OTOH the extended attribute is only accessible to privileged processes (this is because cgroupfs only supports the "trusted." xattr namespace, not "user."). The environment variable may be altered by services, the extended attribute may not be, hence is the better choice for the journal. Note that reading the invocation ID off the extended attribute from journald is racy, similar to the way reading the unit name for a logging process is. This patch adds APIs to read the invocation ID to sd-id128: sd_id128_get_invocation() may be used in a similar fashion to sd_id128_get_boot(). PID1's own logging is updated to always include the invocation ID when it logs information about a unit. A new bus call GetUnitByInvocationID() is added that allows retrieving a bus path to a unit by its invocation ID. The bus path is built using the invocation ID, thus providing a path for referring to a unit that is valid only for the current runtime cycleof it. Outlook for the future: should the kernel eventually allow passing of cgroup information along AF_UNIX/SOCK_DGRAM messages via a unique cgroup id, then we can alter the invocation ID to be generated as hash from that rather than entirely randomly. This way we can derive the invocation race-freely from the messages.
* man: revert dynamic paths for split-usr setupsTom Gundersen2015-06-181-4/+1
| | | | | | | | | | | | | | | | | | | | | | | This did not really work out as we had hoped. Trying to do this upstream introduced several problems that probably makes it better suited as a downstream patch after all. At any rate, it is not releaseable in the current state, so we at least need to revert this before the release. * by adjusting the path to binaries, but not do the same thing to the search path we end up with inconsistent man-pages. Adjusting the search path too would be quite messy, and it is not at all obvious that this is worth the effort, but at any rate it would have to be done before we could ship this. * this means that distributed man-pages does not make sense as they depend on config options, and for better or worse we are still distributing man pages, so that is something that definitely needs sorting out before we could ship with this patch. * we have long held that split-usr is only minimally supported in order to boot, and something we hope will eventually go away. So before we start adding even more magic/effort in order to make this work nicely, we should probably question if it makes sense at all.
* man: generate configured paths in manpagesFilipe Brandenburger2015-05-281-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In particular, use /lib/systemd instead of /usr/lib/systemd in distributions like Debian which still have not adopted a /usr merge setup. Use XML entities from man/custom-entities.ent to replace configured paths while doing XSLT processing of the original XML files. There was precedent of some files (such as systemd.generator.xml) which were already using this approach. This addresses most of the (manual) fixes from this patch: http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/tree/debian/patches/Fix-paths-in-man-pages.patch?h=experimental-220 The idea of using generic XML entities was presented here: http://lists.freedesktop.org/archives/systemd-devel/2015-May/032240.html This patch solves almost all the issues, with the exception of: - Path to /bin/mount and /bin/umount. - Generic statements about preference of /lib over /etc. These will be handled separately by follow up patches. Tested: - With default configure settings, ran "make install" to two separate directories and compared the output to confirm they matched exactly. - Used a set of configure flags including $CONFFLAGS from Debian: http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/tree/debian/rules Installed the tree and confirmed the paths use /lib/systemd instead of /usr/lib/systemd and that no other unexpected differences exist. - Confirmed that `make distcheck` still passes.
* Reindent man pages to 2chZbigniew Jędrzejewski-Szmek2015-02-041-111/+103
|
* man: add a mapping for external manpagesZbigniew Jędrzejewski-Szmek2014-07-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | It is annoying when we have dead links on fd.o. Add project='man-pages|die-net|archlinux' to <citerefentry>-ies. In generated html, add external links to http://man7.org/linux/man-pages/man, http://linux.die.net/man/, https://www.archlinux.org/. By default, pages in sections 2 and 4 go to man7, since Michael Kerrisk is the autorative source on kernel related stuff. The rest of links goes to linux.die.net, because they have the manpages. Except for the pacman stuff, since it seems to be only available from archlinux.org. Poor gummiboot gets no link, because gummitboot(8) ain't to be found on the net. According to common wisdom, that would mean that it does not exist. But I have seen Kay using it, so I know it does, and deserves to be found. Can somebody be nice and put it up somewhere?
* doc: balance C indirections in function prototypesJan Engelhardt2014-05-081-2/+2
| | | | | | | | Shift the asterisks in the documentation's prototypes such that they are consistent among each other. Use the right side to match what is used in source code. Addendum to commit v209~82.
* man: fix references to .pc files which aren't separate anymoreLennart Poettering2014-02-191-1/+1
|
* man: resolve word omissionsJan Engelhardt2013-12-261-1/+1
| | | | | This is a recurring submission and includes corrections to: word omissions and word class choice.
* man: improve grammar and word formatting in numerous man pagesJason St. John2013-07-031-5/+5
| | | | | | | | | | Use proper grammar, word usage, adjective hyphenation, commas, capitalization, spelling, etc. To improve readability, some run-on sentences or sentence fragments were revised. [zj: remove the space from 'file name', 'host name', and 'time zone'.]
* man: fix spacing issue in various man pagesJason St. John2013-06-291-2/+1
| | | | | | | | | | | | | Before: libsystemd-daemonpkg-config(1) After: libsystemd-daemon pkg-config(1) This fix is more complicated than it should be due to the consecutive XML elements separated by collapsible whitespace. Merging the lines and separating the XML elements with an en space or a non-breaking space is the only solution that results in one, and only one, space being inserted between them when testing. An em space results in two spaces being inserted.
* man: Split sd_randomize(3) from sd_id128_get_{machine,boot}(3)Lennart Poettering2012-07-131-0/+138
They have too little to do with each other...